Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; 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 compression)
72 #:use-module (gnu packages crypto)
73 #:use-module (gnu packages databases)
74 #:use-module (gnu packages django)
75 #:use-module (gnu packages file)
76 #:use-module (gnu packages fontutils)
77 #:use-module (gnu packages gcc)
78 #:use-module (gnu packages ghostscript)
79 #:use-module (gnu packages gl)
80 #:use-module (gnu packages glib)
81 #:use-module (gnu packages graphviz)
82 #:use-module (gnu packages gstreamer)
83 #:use-module (gnu packages gtk)
84 #:use-module (gnu packages icu4c)
85 #:use-module (gnu packages image)
86 #:use-module (gnu packages imagemagick)
87 #:use-module (gnu packages libevent)
88 #:use-module (gnu packages libffi)
89 #:use-module (gnu packages linux)
90 #:use-module (gnu packages man)
91 #:use-module (gnu packages maths)
92 #:use-module (gnu packages multiprecision)
93 #:use-module (gnu packages networking)
94 #:use-module (gnu packages ncurses)
95 #:use-module (gnu packages openstack)
96 #:use-module (gnu packages password-utils)
97 #:use-module (gnu packages pcre)
98 #:use-module (gnu packages perl)
99 #:use-module (gnu packages pkg-config)
100 #:use-module (gnu packages protobuf)
101 #:use-module (gnu packages qt)
102 #:use-module (gnu packages readline)
103 #:use-module (gnu packages sdl)
104 #:use-module (gnu packages search)
105 #:use-module (gnu packages shells)
106 #:use-module (gnu packages ssh)
107 #:use-module (gnu packages statistics)
108 #:use-module (gnu packages tex)
109 #:use-module (gnu packages texinfo)
110 #:use-module (gnu packages tls)
111 #:use-module (gnu packages version-control)
112 #:use-module (gnu packages video)
113 #:use-module (gnu packages web)
114 #:use-module (gnu packages base)
115 #:use-module (gnu packages xml)
116 #:use-module (gnu packages xorg)
117 #:use-module (gnu packages xdisorg)
118 #:use-module (gnu packages tcl)
119 #:use-module (gnu packages bdw-gc)
120 #:use-module (guix packages)
121 #:use-module (guix download)
122 #:use-module (guix git-download)
123 #:use-module (guix utils)
124 #:use-module (guix build-system gnu)
125 #:use-module (guix build-system cmake)
126 #:use-module (guix build-system python)
127 #:use-module (guix build-system trivial)
128 #:use-module (srfi srfi-1))
129
130 (define-public python-2.7
131 (package
132 (name "python")
133 (version "2.7.13")
134 (source
135 (origin
136 (method url-fetch)
137 (uri (string-append "https://www.python.org/ftp/python/"
138 version "/Python-" version ".tar.xz"))
139 (sha256
140 (base32
141 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
142 (patches (search-patches "python-2.7-search-paths.patch"
143 "python-2-deterministic-build-info.patch"
144 "python-2.7-site-prefixes.patch"
145 "python-2.7-source-date-epoch.patch"
146 "python-2.7-getentropy-on-old-kernels.patch"))
147 (modules '((guix build utils)))
148 ;; suboptimal to delete failing tests here, but if we delete them in the
149 ;; arguments then we need to make sure to strip out that phase when it
150 ;; gets inherited by python and python-minimal.
151 (snippet
152 '(begin
153 (for-each delete-file
154 '("Lib/test/test_compileall.py"
155 "Lib/test/test_ctypes.py" ; fails on mips64el
156 "Lib/test/test_distutils.py"
157 "Lib/test/test_import.py"
158 "Lib/test/test_shutil.py"
159 "Lib/test/test_socket.py"
160 "Lib/test/test_subprocess.py"))
161 #t))))
162 (outputs '("out"
163 "tk")) ;tkinter; adds 50 MiB to the closure
164 (build-system gnu-build-system)
165 (arguments
166 `(;; 356 tests OK.
167 ;; 6 tests failed:
168 ;; test_compileall test_distutils test_import test_shutil test_socket
169 ;; test_subprocess
170 ;; 39 tests skipped:
171 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
172 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
173 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
174 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
175 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
176 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
177 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
178 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
179 ;; test_winreg test_winsound test_zipfile64
180 ;; 4 skips unexpected on linux2:
181 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
182 #:test-target "test"
183 #:configure-flags
184 (list "--enable-shared" ;allow embedding
185 "--with-system-ffi" ;build ctypes
186 "--with-ensurepip=install" ;install pip and setuptools
187 "--enable-unicode=ucs4"
188 (string-append "LDFLAGS=-Wl,-rpath="
189 (assoc-ref %outputs "out") "/lib"))
190
191 #:modules ((ice-9 ftw) (ice-9 match)
192 (guix build utils) (guix build gnu-build-system))
193 #:phases
194 (modify-phases %standard-phases
195 (add-before
196 'configure 'patch-lib-shells
197 (lambda _
198 ;; Filter for existing files, since some may not exist in all
199 ;; versions of python that are built with this recipe.
200 (substitute* (filter file-exists?
201 '("Lib/subprocess.py"
202 "Lib/popen2.py"
203 "Lib/distutils/tests/test_spawn.py"
204 "Lib/test/test_subprocess.py"))
205 (("/bin/sh") (which "sh")))
206
207 ;; Use zero as the timestamp in .pyc files so that builds are
208 ;; deterministic. TODO: Remove it when this variable is set in
209 ;; gnu-build-system.scm.
210 (setenv "SOURCE_DATE_EPOCH" "1")
211 #t))
212 (add-before 'configure 'do-not-record-configure-flags
213 (lambda* (#:key configure-flags #:allow-other-keys)
214 ;; Remove configure flags from the installed '_sysconfigdata.py'
215 ;; and 'Makefile' so we don't end up keeping references to the
216 ;; build tools.
217 ;;
218 ;; Preserve at least '--with-system-ffi' since otherwise the
219 ;; thing tries to build libffi, fails, and we end up with a
220 ;; Python that lacks ctypes.
221 (substitute* "configure"
222 (("^CONFIG_ARGS=.*$")
223 (format #f "CONFIG_ARGS='~a'\n"
224 (if (member "--with-system-ffi" configure-flags)
225 "--with-system-ffi"
226 ""))))
227 #t))
228 (add-before
229 'check 'pre-check
230 (lambda _
231 ;; 'Lib/test/test_site.py' needs a valid $HOME
232 (setenv "HOME" (getcwd))
233 #t))
234 (add-after
235 'unpack 'set-source-file-times-to-1980
236 ;; XXX One of the tests uses a ZIP library to pack up some of the
237 ;; source tree, and fails with "ZIP does not support timestamps
238 ;; before 1980". Work around this by setting the file times in the
239 ;; source tree to sometime in early 1980.
240 (lambda _
241 (let ((circa-1980 (* 10 366 24 60 60)))
242 (ftw "." (lambda (file stat flag)
243 (utime file circa-1980 circa-1980)
244 #t))
245 #t)))
246 (add-after 'install 'remove-tests
247 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
248 ;; because these files are used by some libraries out there.
249 (lambda* (#:key outputs #:allow-other-keys)
250 (let ((out (assoc-ref outputs "out")))
251 (match (scandir (string-append out "/lib")
252 (lambda (name)
253 (string-prefix? "python" name)))
254 ((pythonX.Y)
255 (let ((testdir (string-append out "/lib/" pythonX.Y
256 "/test")))
257 (with-directory-excursion testdir
258 (for-each delete-file-recursively
259 (scandir testdir
260 (match-lambda
261 ((or "." "..") #f)
262 (file
263 (not
264 (string-prefix? "test_support."
265 file))))))
266 (call-with-output-file "__init__.py" (const #t))
267 #t)))))))
268 (add-before 'strip 'make-libraries-writable
269 (lambda* (#:key outputs #:allow-other-keys)
270 ;; Make .so files writable so they can be stripped.
271 (let ((out (assoc-ref outputs "out")))
272 (for-each (lambda (file)
273 (chmod file #o755))
274 (find-files (string-append out "/lib")
275 "\\.so"))
276 #t)))
277 (add-after 'install 'move-tk-inter
278 (lambda* (#:key outputs #:allow-other-keys)
279 ;; When Tkinter support is built move it to a separate output so
280 ;; that the main output doesn't contain a reference to Tcl/Tk.
281 (let ((out (assoc-ref outputs "out"))
282 (tk (assoc-ref outputs "tk")))
283 (when tk
284 (match (find-files out "tkinter.*\\.so")
285 ((tkinter.so)
286 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
287 ;; want it under TK/lib/pythonX.Y/site-packages.
288 (let* ((len (string-length out))
289 (target (string-append
290 tk "/"
291 (string-drop
292 (dirname (dirname tkinter.so))
293 len)
294 "/site-packages")))
295 (install-file tkinter.so target)
296 (delete-file tkinter.so)))))
297 #t))))))
298 (inputs
299 `(("bzip2" ,bzip2)
300 ("gdbm" ,gdbm)
301 ("libffi" ,libffi) ; for ctypes
302 ("sqlite" ,sqlite) ; for sqlite extension
303 ("openssl" ,openssl)
304 ("readline" ,readline)
305 ("zlib" ,zlib)
306 ("tcl" ,tcl)
307 ("tk" ,tk))) ; for tkinter
308 (native-inputs
309 `(("pkg-config" ,pkg-config)))
310 (native-search-paths
311 (list (search-path-specification
312 (variable "PYTHONPATH")
313 (files '("lib/python2.7/site-packages")))))
314 (home-page "https://www.python.org")
315 (synopsis "High-level, dynamically-typed programming language")
316 (description
317 "Python is a remarkably powerful dynamic programming language that
318 is used in a wide variety of application domains. Some of its key
319 distinguishing features include: clear, readable syntax; strong
320 introspection capabilities; intuitive object orientation; natural
321 expression of procedural code; full modularity, supporting hierarchical
322 packages; exception-based error handling; and very high level dynamic
323 data types.")
324 (license license:psfl)))
325
326 ;; Current 2.x version.
327 (define-public python-2 python-2.7)
328
329 (define-public python-3.5
330 (package (inherit python-2)
331 (version "3.5.3")
332 (source (origin
333 (method url-fetch)
334 (uri (string-append "https://www.python.org/ftp/python/"
335 version "/Python-" version ".tar.xz"))
336 (patches (search-patches
337 "python-fix-tests.patch"
338 "python-3.5-fix-tests.patch"
339 "python-3.5-getentropy-on-old-kernels.patch"
340 "python-3-deterministic-build-info.patch"
341 "python-3-search-paths.patch"))
342 (patch-flags '("-p0"))
343 (sha256
344 (base32
345 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
346 (snippet
347 '(begin
348 (for-each delete-file
349 '("Lib/ctypes/test/test_win32.py" ; fails on aarch64
350 "Lib/test/test_fcntl.py"))
351 #t))))
352 (arguments (substitute-keyword-arguments (package-arguments python-2)
353 ((#:tests? _) #t)))
354 (native-search-paths
355 (list (search-path-specification
356 (variable "PYTHONPATH")
357 (files (list (string-append "lib/python"
358 (version-major+minor version)
359 "/site-packages"))))))))
360
361 ;; Current 3.x version.
362 (define-public python-3 python-3.5)
363
364 ;; Current major version.
365 (define-public python python-3)
366
367 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
368 ;; Python (Tk -> libxcb -> Python.)
369
370 (define-public python2-minimal
371 (package (inherit python-2)
372 (name "python-minimal")
373 (outputs '("out"))
374
375 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
376 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
377 ;; libffi.
378 (inputs `(("libffi" ,libffi)
379 ("zlib" ,zlib)))))
380
381 (define-public python-minimal
382 (package (inherit python)
383 (name "python-minimal")
384 (outputs '("out"))
385
386 ;; Build fails due to missing ctypes without libffi.
387 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
388 ;; zlib is required by 'zipimport', used by pip.
389 (inputs `(("libffi" ,libffi)
390 ("openssl" ,openssl)
391 ("zlib" ,zlib)))))
392
393 (define* (wrap-python3 python
394 #:optional
395 (name (string-append (package-name python) "-wrapper")))
396 (package (inherit python)
397 (name name)
398 (source #f)
399 (build-system trivial-build-system)
400 (outputs '("out"))
401 (inputs `(("bash" ,bash)))
402 (propagated-inputs `(("python" ,python)))
403 (arguments
404 `(#:modules ((guix build utils))
405 #:builder
406 (begin
407 (use-modules (guix build utils))
408 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
409 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
410 (mkdir-p bin)
411 (for-each
412 (lambda (old new)
413 (symlink (string-append python old)
414 (string-append bin "/" new)))
415 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
416 `("python" ,"pydoc" ,"idle" ,"pip"))
417 ;; python-config outputs search paths based upon its location,
418 ;; use a bash wrapper to avoid changing its outputs.
419 (let ((bash (string-append (assoc-ref %build-inputs "bash")
420 "/bin/bash"))
421 (old (string-append python "python3-config"))
422 (new (string-append bin "/python-config")))
423 (with-output-to-file new
424 (lambda ()
425 (format #t "#!~a~%" bash)
426 (format #t "exec \"~a\" \"$@\"~%" old)
427 (chmod new #o755)
428 #t)))))))
429 (synopsis "Wrapper for the Python 3 commands")
430 (description
431 "This package provides wrappers for the commands of Python@tie{}3.x such
432 that they can be invoked under their usual name---e.g., @command{python}
433 instead of @command{python3}.")))
434
435 (define-public python-wrapper (wrap-python3 python))
436 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
437
438 (define-public python-psutil
439 (package
440 (name "python-psutil")
441 (version "4.3.0")
442 (source
443 (origin
444 (method url-fetch)
445 (uri (pypi-uri "psutil" version))
446 (sha256
447 (base32
448 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
449 (build-system python-build-system)
450 (arguments
451 ;; FIXME: some tests does not return and times out.
452 '(#:tests? #f))
453 (home-page "https://www.github.com/giampaolo/psutil")
454 (synopsis "Library for retrieving information on running processes")
455 (description
456 "psutil (Python system and process utilities) is a library for retrieving
457 information on running processes and system utilization (CPU, memory, disks,
458 network) in Python. It is useful mainly for system monitoring, profiling and
459 limiting process resources and management of running processes. It implements
460 many functionalities offered by command line tools such as: ps, top, lsof,
461 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
462 pidof, tty, taskset, pmap.")
463 (license license:bsd-3)))
464
465 (define-public python2-psutil
466 (package-with-python2 python-psutil))
467
468 (define-public python-passlib
469 (package
470 (name "python-passlib")
471 (version "1.7.1")
472 (source
473 (origin
474 (method url-fetch)
475 (uri (pypi-uri "passlib" version))
476 (sha256
477 (base32
478 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
479 (build-system python-build-system)
480 (native-inputs
481 `(("python-nose" ,python-nose)))
482 (propagated-inputs
483 `(("python-py-bcrypt" ,python-py-bcrypt)))
484 (arguments
485 `(#:phases
486 (alist-cons-before
487 'check 'set-PYTHON_EGG_CACHE
488 ;; some tests require access to "$HOME/.cython"
489 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
490 %standard-phases)))
491 (home-page "https://bitbucket.org/ecollins/passlib")
492 (synopsis
493 "Comprehensive password hashing framework")
494 (description
495 "Passlib is a password hashing library for Python 2 & 3, which provides
496 cross-platform implementations of over 30 password hashing algorithms, as well
497 as a framework for managing existing password hashes. It's designed to be
498 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
499 to providing full-strength password hashing for multi-user application.")
500 (license license:bsd-3)))
501
502 (define-public python2-passlib
503 (package-with-python2 python-passlib))
504
505 (define-public python-py-bcrypt
506 (package
507 (name "python-py-bcrypt")
508 (version "0.4")
509 (source
510 (origin
511 (method url-fetch)
512 (uri (string-append
513 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
514 version
515 ".tar.gz"))
516 (sha256
517 (base32
518 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
519 (build-system python-build-system)
520 (home-page "https://code.google.com/p/py-bcrypt")
521 (synopsis
522 "Bcrypt password hashing and key derivation")
523 (description
524 "A python wrapper of OpenBSD's Blowfish password hashing code. This
525 system hashes passwords using a version of Bruce Schneier's Blowfish block
526 cipher with modifications designed to raise the cost of off-line password
527 cracking and frustrate fast hardware implementation. The computation cost of
528 the algorithm is parametised, so it can be increased as computers get faster.
529 The intent is to make a compromise of a password database less likely to
530 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
531 John the Ripper).")
532 ;; "sha2.c" is under BSD-3;
533 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
534 ;; the rest is under ISC.
535 (license (list license:isc license:bsd-3 license:bsd-4))))
536
537 (define-public python2-py-bcrypt
538 (package-with-python2 python-py-bcrypt))
539
540
541 (define-public python-paramiko
542 (package
543 (name "python-paramiko")
544 (version "2.1.2")
545 (source
546 (origin
547 (method url-fetch)
548 (uri (pypi-uri "paramiko" version))
549 (sha256
550 (base32
551 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
552 (build-system python-build-system)
553 (arguments
554 '(#:phases
555 (modify-phases %standard-phases
556 (replace 'check
557 (lambda _
558 (zero? (system* "python" "test.py")))))))
559 (propagated-inputs
560 `(("python-pyasn1" ,python-pyasn1)
561 ("python-cryptography" ,python-cryptography)))
562 (home-page "http://www.paramiko.org/")
563 (synopsis "SSHv2 protocol library")
564 (description "Paramiko is a python implementation of the SSHv2 protocol,
565 providing both client and server functionality. While it leverages a Python C
566 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
567 Python interface around SSH networking concepts.")
568 (license license:lgpl2.1+)))
569
570 (define-public python2-paramiko
571 (package-with-python2 python-paramiko))
572
573
574 (define-public python-httplib2
575 (package
576 (name "python-httplib2")
577 (version "0.9.2")
578 (source
579 (origin
580 (method url-fetch)
581 (uri (pypi-uri "httplib2" version))
582 (sha256
583 (base32
584 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
585 (build-system python-build-system)
586 (home-page "https://github.com/jcgregorio/httplib2")
587 (synopsis "Comprehensive HTTP client library")
588 (description
589 "A comprehensive HTTP client library supporting many features left out of
590 other HTTP libraries.")
591 (license license:expat)))
592
593 (define-public python2-httplib2
594 (package-with-python2 python-httplib2))
595
596 (define-public python-ecdsa
597 (package
598 (name "python-ecdsa")
599 (version "0.13")
600 (source
601 (origin
602 (method url-fetch)
603 (uri (string-append
604 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
605 version
606 ".tar.gz"))
607 (sha256
608 (base32
609 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
610 (build-system python-build-system)
611 (inputs
612 `(("openssl" ,openssl)))
613 (home-page
614 "https://github.com/warner/python-ecdsa")
615 (synopsis
616 "ECDSA cryptographic signature library (pure python)")
617 (description
618 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
619 Curve Digital Signature Algorithm), implemented purely in Python. With this
620 library, you can quickly create keypairs (signing key and verifying key), sign
621 messages, and verify the signatures. The keys and signatures are very short,
622 making them easy to handle and incorporate into other protocols.")
623 (license license:expat)))
624
625 (define-public python2-ecdsa
626 (package-with-python2 python-ecdsa))
627
628 (define-public python-ccm
629 (package
630 (name "python-ccm")
631 (version "2.1.6")
632 (source
633 (origin
634 (method url-fetch)
635 (uri (pypi-uri "ccm" version))
636 (sha256
637 (base32
638 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
639 (build-system python-build-system)
640 (propagated-inputs
641 `(("python-pyyaml" ,python-pyyaml)
642 ;; Not listed in setup.py, but used in ccmlib/node.py for full
643 ;; functionality
644 ("python-psutil" ,python-psutil)
645 ("python-six" ,python-six)))
646 (home-page "https://github.com/pcmanus/ccm")
647 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
648 localhost")
649 (description "Cassandra Cluster Manager is a development tool for testing
650 local Cassandra clusters. It creates, launches and removes Cassandra clusters
651 on localhost.")
652 (license license:asl2.0)))
653
654 (define-public python2-ccm
655 (package-with-python2 python-ccm))
656
657 (define-public python-pytz
658 (package
659 (name "python-pytz")
660 (version "2017.2")
661 (source
662 (origin
663 (method url-fetch)
664 (uri (pypi-uri "pytz" version ".zip"))
665 (sha256
666 (base32
667 "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m"))))
668 (build-system python-build-system)
669 (native-inputs
670 `(("unzip" ,unzip)))
671 (home-page "http://pythonhosted.org/pytz")
672 (synopsis "Python timezone library")
673 (description "This library brings the Olson tz database into Python. It
674 allows accurate and cross platform timezone calculations using Python 2.4 or
675 higher. It also solves the issue of ambiguous times at the end of daylight
676 saving time. Almost all of the Olson timezones are supported.")
677 (license license:expat)))
678
679 (define-public python2-pytz
680 (package-with-python2 python-pytz))
681
682 (define-public python-clyent
683 (package
684 (name "python-clyent")
685 (version "1.2.1")
686 (source
687 (origin
688 (method url-fetch)
689 (uri (pypi-uri "clyent" version))
690 (sha256
691 (base32
692 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
693 (build-system python-build-system)
694 (native-inputs
695 `(("python-mock" ,python-mock)))
696 (home-page "https://github.com/binstar/clyent")
697 (synopsis "Command line client library")
698 (description "Clyent is a Python command line utiliy library. It is used
699 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
700 (license license:bsd-3)))
701
702 (define-public python2-clyent
703 (package-with-python2 python-clyent))
704
705 (define-public python-babel
706 (package
707 (name "python-babel")
708 (version "2.3.4")
709 (source
710 (origin
711 (method url-fetch)
712 (uri (pypi-uri "Babel" version))
713 (sha256
714 (base32
715 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
716 (build-system python-build-system)
717 (propagated-inputs
718 `(("python-pytz" ,python-pytz)))
719 (arguments `(#:tests? #f)) ; no test target
720 (home-page "http://babel.pocoo.org/")
721 (synopsis
722 "Tools for internationalizing Python applications")
723 (description
724 "Babel is composed of two major parts:
725 - tools to build and work with gettext message catalogs
726 - a Python interface to the CLDR (Common Locale Data Repository), providing
727 access to various locale display names, localized number and date formatting,
728 etc. ")
729 (license license:bsd-3)))
730
731 (define-public python2-babel
732 (package-with-python2 python-babel))
733
734 (define-public python2-backport-ssl-match-hostname
735 (package
736 (name "python2-backport-ssl-match-hostname")
737 (version "3.5.0.1")
738 (source
739 (origin
740 (method url-fetch)
741 (uri (string-append
742 "https://pypi.python.org/packages/source/b/"
743 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
744 version ".tar.gz"))
745 (sha256
746 (base32
747 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
748 (build-system python-build-system)
749 (arguments
750 `(#:python ,python-2
751 #:tests? #f)) ; no test target
752 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
753 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
754 (description
755 "This backport brings the ssl.match_hostname() function to users of
756 earlier versions of Python. The function checks the hostname in the
757 certificate returned by the server to which a connection has been established,
758 and verifies that it matches the intended target hostname.")
759 (license license:psfl)))
760
761 (define-public python-hdf4
762 (package
763 (name "python-hdf4")
764 (version "0.9")
765 (source
766 (origin
767 (method url-fetch)
768 (uri (pypi-uri name version))
769 (sha256
770 (base32
771 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
772 (build-system python-build-system)
773 (native-inputs `(("nose" ,python-nose)))
774 (propagated-inputs `(("numpy" ,python-numpy)))
775 (inputs
776 `(("hdf4" ,hdf4)
777 ("libjpeg" ,libjpeg)
778 ("zlib" ,zlib)))
779 (arguments
780 `(#:phases
781 (modify-phases %standard-phases
782 (replace 'check
783 (lambda _
784 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
785 ;; on to import numpy. Somehow this works on their CI system.
786 ;; Let's just manage PYTHONPATH here instead.
787 (substitute* "runexamples.sh"
788 (("export PYTHONPATH=.*") ""))
789 (setenv "PYTHONPATH"
790 (string-append (getcwd) ":"
791 (getenv "PYTHONPATH")))
792 (and (zero? (system* "./runexamples.sh"))
793 (zero? (system* "nosetests" "-v"))))))))
794 (home-page "https://github.com/fhs/python-hdf4")
795 (synopsis "Python interface to the NCSA HDF4 library")
796 (description
797 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
798 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
799 NetCDF files can also be read and modified. Python-HDF4 is a fork of
800 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
801 (license license:expat)))
802
803 (define-public python2-hdf4
804 (package-with-python2 python-hdf4))
805
806 (define-public python-h5py
807 (package
808 (name "python-h5py")
809 (version "2.6.0")
810 (source
811 (origin
812 (method url-fetch)
813 (uri (pypi-uri "h5py" version))
814 (sha256
815 (base32
816 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
817 (build-system python-build-system)
818 (arguments
819 `(#:tests? #f ; no test target
820 #:phases
821 (modify-phases %standard-phases
822 (add-after 'unpack 'fix-hdf5-paths
823 (lambda* (#:key inputs #:allow-other-keys)
824 (let ((prefix (assoc-ref inputs "hdf5")))
825 (substitute* "setup_build.py"
826 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
827 (string-append "['" prefix "/lib" "']"))
828 (("'/opt/local/include', '/usr/local/include'")
829 (string-append "'" prefix "/include" "'")))
830 (substitute* "setup_configure.py"
831 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
832 (string-append "['" prefix "/lib" "']")))
833 #t))))))
834 (propagated-inputs
835 `(("python-six" ,python-six)
836 ("python-numpy" ,python-numpy)))
837 (inputs
838 `(("hdf5" ,hdf5)))
839 (native-inputs
840 `(("python-cython" ,python-cython)
841 ("python-pkgconfig" ,python-pkgconfig)))
842 (home-page "http://www.h5py.org/")
843 (synopsis "Read and write HDF5 files from Python")
844 (description
845 "The h5py package provides both a high- and low-level interface to the
846 HDF5 library from Python. The low-level interface is intended to be a
847 complete wrapping of the HDF5 API, while the high-level component supports
848 access to HDF5 files, datasets and groups using established Python and NumPy
849 concepts.")
850 (license license:bsd-3)))
851
852 (define-public python2-h5py
853 (package-with-python2 python-h5py))
854
855 (define-public python-netcdf4
856 (package
857 (name "python-netcdf4")
858 (version "1.2.7")
859 (source
860 (origin
861 (method url-fetch)
862 (uri (pypi-uri "netCDF4" version))
863 (sha256
864 (base32
865 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
866 (build-system python-build-system)
867 (native-inputs
868 `(("python-cython" ,python-cython)))
869 (propagated-inputs
870 `(("python-numpy" ,python-numpy)))
871 (inputs
872 `(("netcdf" ,netcdf)
873 ("hdf4" ,hdf4)
874 ("hdf5" ,hdf5)))
875 (arguments
876 '(#:phases
877 (modify-phases %standard-phases
878 (replace 'check
879 (lambda _
880 (setenv "NO_NET" "1") ; disable opendap tests
881 (with-directory-excursion "test"
882 (setenv "PYTHONPATH" ; find and add the library we just built
883 (string-append
884 (car (find-files "../build" "lib.*"
885 #:directories? #:t
886 #:fail-on-error? #:t))
887 ":" (getenv "PYTHONPATH")))
888 (zero? (system* "python" "run_all.py"))))))))
889 (home-page
890 "https://github.com/Unidata/netcdf4-python")
891 (synopsis "Python/numpy interface to the netCDF library")
892 (description "Netcdf4-python is a Python interface to the netCDF C
893 library. netCDF version 4 has many features not found in earlier
894 versions of the library and is implemented on top of HDF5. This module
895 can read and write files in both the new netCDF 4 and the old netCDF 3
896 format, and can create files that are readable by HDF5 clients. The
897 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
898 to users of that module.")
899 ;; The software is mainly ISC, but includes some files covered
900 ;; by the Expat license.
901 (license (list license:isc license:expat))))
902
903 (define-public python2-netcdf4
904 (package-with-python2 python-netcdf4))
905
906 (define-public python-lockfile
907 (package
908 (name "python-lockfile")
909 (version "0.12.2")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
914 "lockfile-" version ".tar.gz"))
915 (sha256
916 (base32
917 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
918 (build-system python-build-system)
919 (arguments '(#:test-target "check"))
920 (native-inputs
921 `(("python-pbr" ,python-pbr)))
922 (home-page "https://launchpad.net/pylockfile")
923 (synopsis "Platform-independent file locking module")
924 (description
925 "The lockfile package exports a LockFile class which provides a simple
926 API for locking files.")
927 (license license:expat)))
928
929 (define-public python2-lockfile
930 (package-with-python2 python-lockfile))
931
932 (define-public python-mock
933 (package
934 (name "python-mock")
935 (version "1.0.1")
936 (source
937 (origin
938 (method url-fetch)
939 (uri (pypi-uri "mock" version))
940 (sha256
941 (base32
942 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
943 (build-system python-build-system)
944 (arguments '(#:test-target "check"))
945 (home-page "https://github.com/testing-cabal/mock")
946 (synopsis "Python mocking and patching library for testing")
947 (description
948 "Mock is a library for testing in Python. It allows you to replace parts
949 of your system under test with mock objects and make assertions about how they
950 have been used.")
951 (license license:expat)))
952
953 (define-public python2-mock
954 (package-with-python2 python-mock))
955
956 ;;; Some packages (notably, certbot and python-acme) rely on this newer version
957 ;;; of python-mock. However, a large number of packages fail to build with
958 ;;; mock@2, so we add a new variable for now. Also, there may be a dependency
959 ;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
960 (define-public python-mock-2
961 (package
962 (inherit python-mock)
963 (version "2.0.0")
964 (source
965 (origin
966 (method url-fetch)
967 (uri (pypi-uri "mock" version))
968 (sha256
969 (base32
970 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
971 (propagated-inputs
972 `(("python-pbr" ,python-pbr-minimal)
973 ,@(package-propagated-inputs python-mock)))))
974
975 (define-public python-setuptools
976 (package
977 (name "python-setuptools")
978 (version "31.0.0")
979 (source
980 (origin
981 (method url-fetch)
982 (uri (pypi-uri "setuptools" version))
983 (sha256
984 (base32
985 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
986 (modules '((guix build utils)))
987 (snippet
988 '(begin
989 ;; Remove included binaries which are used to build self-extracting
990 ;; installers for Windows.
991 ;; TODO: Find some way to build them ourself so we can include them.
992 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
993 #t))))
994 (build-system python-build-system)
995 ;; FIXME: Tests require pytest, which itself relies on setuptools.
996 ;; One could bootstrap with an internal untested setuptools.
997 (arguments
998 `(#:tests? #f))
999 (home-page "https://pypi.python.org/pypi/setuptools")
1000 (synopsis
1001 "Library designed to facilitate packaging Python projects")
1002 (description
1003 "Setuptools is a fully-featured, stable library designed to facilitate
1004 packaging Python projects, where packaging includes:
1005 Python package and module definitions,
1006 distribution package metadata,
1007 test hooks,
1008 project installation,
1009 platform-specific details,
1010 Python 3 support.")
1011 ;; TODO: setuptools now bundles the following libraries:
1012 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1013 (license (list license:psfl ; setuptools itself
1014 license:expat ; six, appdirs, pyparsing
1015 license:asl2.0 ; packaging is dual ASL2/BSD-2
1016 license:bsd-2))))
1017
1018 (define-public python2-setuptools
1019 (package-with-python2 python-setuptools))
1020
1021 (define-public python-uniseg
1022 (package
1023 (name "python-uniseg")
1024 (version "0.7.1")
1025 (source
1026 (origin
1027 (method url-fetch)
1028 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1029 "get/rel-" version ".tar.gz"))
1030 (file-name (string-append name "-" version ".tar.gz"))
1031 (sha256
1032 (base32
1033 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1034 (build-system python-build-system)
1035 (arguments
1036 '(#:tests? #f)) ; The test suite requires network access.
1037 (home-page
1038 "https://bitbucket.org/emptypage/uniseg-python")
1039 (synopsis
1040 "Python library to determine Unicode text segmentations")
1041 (description
1042 "Uniseg is a Python package used to determine Unicode text segmentations.
1043 Supported segmentations include:
1044 @enumerate
1045 @item @dfn{Code point} (any value in the Unicode codespace)
1046 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1047 multiple Unicode code points, e.g. \"G\" + acute-accent)
1048 @item Word break
1049 @item Sentence break
1050 @item Line break
1051 @end enumerate")
1052 (license license:expat)))
1053
1054 (define-public python2-uniseg
1055 (package-with-python2 python-uniseg))
1056
1057 ;;; Pycrypto is abandoned upstream:
1058 ;;;
1059 ;;; https://github.com/dlitz/pycrypto/issues/173
1060 ;;;
1061 ;;; TODO Remove this package from GNU Guix.
1062 (define-public python-pycrypto
1063 (package
1064 (name "python-pycrypto")
1065 (version "2.6.1")
1066 (source
1067 (origin
1068 (method url-fetch)
1069 (uri (pypi-uri "pycrypto" version))
1070 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
1071 (sha256
1072 (base32
1073 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1074 (build-system python-build-system)
1075 (inputs
1076 `(("python" ,python)
1077 ("gmp" ,gmp)))
1078 (arguments
1079 `(#:phases
1080 (alist-cons-before
1081 'build 'set-build-env
1082 ;; pycrypto runs an autoconf configure script behind the scenes
1083 (lambda _
1084 (setenv "CONFIG_SHELL" (which "bash")))
1085 %standard-phases)))
1086 (home-page "http://www.pycrypto.org/")
1087 (synopsis "Cryptographic modules for Python")
1088 (description
1089 "Pycrypto is a collection of both secure hash functions (such as SHA256
1090 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1091 etc.). The package is structured to make adding new modules easy.")
1092 (license license:public-domain)))
1093
1094 (define-public python2-pycrypto
1095 (let ((pycrypto (package-with-python2 python-pycrypto)))
1096 (package (inherit pycrypto)
1097 (inputs
1098 `(("python" ,python-2)
1099 ,@(alist-delete
1100 "python"
1101 (package-inputs pycrypto)))))))
1102
1103 (define-public python-eventlet
1104 (package
1105 (name "python-eventlet")
1106 (version "0.20.1")
1107 (source
1108 (origin
1109 (method url-fetch)
1110 (uri (pypi-uri "eventlet" version))
1111 (sha256
1112 (base32
1113 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1114 (build-system python-build-system)
1115 (propagated-inputs
1116 `(("python-greenlet" ,python-greenlet)))
1117 (arguments
1118 ;; TODO: Requires unpackaged 'enum-compat'.
1119 '(#:tests? #f))
1120 (home-page "http://eventlet.net")
1121 (synopsis "Concurrent networking library for Python")
1122 (description
1123 "Eventlet is a concurrent networking library for Python that
1124 allows you to change how you run your code, not how you write it.
1125 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1126 Coroutines ensure that the developer uses a blocking style of programming
1127 that is similar to threading, but provide the benefits of non-blocking I/O.
1128 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1129 from the Python interpreter, or as a small part of a larger application.")
1130 (license license:expat)))
1131
1132 (define-public python2-eventlet
1133 (let ((base (package-with-python2
1134 (strip-python2-variant python-eventlet))))
1135 (package (inherit base)
1136 (propagated-inputs
1137 `(("python2-enum34" ,python2-enum34)
1138 ,@(package-propagated-inputs base))))))
1139
1140 (define-public python-keyring
1141 (package
1142 (name "python-keyring")
1143 (version "8.7")
1144 (source
1145 (origin
1146 (method url-fetch)
1147 (uri (pypi-uri "keyring" version))
1148 (sha256
1149 (base32
1150 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1151 (build-system python-build-system)
1152 (native-inputs
1153 `(("python-setuptools-scm" ,python-setuptools-scm)))
1154 (propagated-inputs
1155 `(("python-pycrypto" ,python-pycrypto)))
1156 (arguments
1157 `(#:tests? #f)) ;TODO: tests require pytest
1158 (home-page "https://github.com/jaraco/keyring")
1159 (synopsis "Store and access your passwords safely")
1160 (description
1161 "The Python keyring lib provides a easy way to access the system keyring
1162 service from python. It can be used in any application that needs safe
1163 password storage.")
1164 ;; "MIT" and PSF dual license
1165 (license license:x11)))
1166
1167 (define-public python2-keyring
1168 (package-with-python2 python-keyring))
1169
1170 (define-public python-six
1171 (package
1172 (name "python-six")
1173 (version "1.10.0")
1174 (source
1175 (origin
1176 (method url-fetch)
1177 (uri (pypi-uri "six" version))
1178 (sha256
1179 (base32
1180 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1181 (build-system python-build-system)
1182 (native-inputs
1183 `(("python-py" ,python-py)
1184 ("python-pytest" ,python-pytest)))
1185 (home-page "http://pypi.python.org/pypi/six/")
1186 (synopsis "Python 2 and 3 compatibility utilities")
1187 (description
1188 "Six is a Python 2 and 3 compatibility library. It provides utility
1189 functions for smoothing over the differences between the Python versions with
1190 the goal of writing Python code that is compatible on both Python versions.
1191 Six supports every Python version since 2.5. It is contained in only one
1192 Python file, so it can be easily copied into your project.")
1193 (license license:x11)))
1194
1195 (define-public python2-six
1196 (package-with-python2 python-six))
1197
1198 (define-public python-dateutil
1199 (package
1200 (name "python-dateutil")
1201 (version "2.6.0")
1202 (source
1203 (origin
1204 (method url-fetch)
1205 (uri (pypi-uri "python-dateutil" version))
1206 (sha256
1207 (base32
1208 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1209 (build-system python-build-system)
1210 (propagated-inputs
1211 `(("python-six" ,python-six)))
1212 (home-page "https://dateutil.readthedocs.io/en/stable/")
1213 (synopsis "Extensions to the standard datetime module")
1214 (description
1215 "The dateutil module provides powerful extensions to the standard
1216 datetime module, available in Python 2.3+.")
1217 (license license:bsd-3)))
1218
1219 (define-public python2-dateutil
1220 (package-with-python2 python-dateutil))
1221
1222 (define-public python-parsedatetime
1223 (package
1224 (name "python-parsedatetime")
1225 (version "2.4")
1226 (source
1227 (origin
1228 (method url-fetch)
1229 (uri (pypi-uri "parsedatetime" version))
1230 (sha256
1231 (base32
1232 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
1233 (build-system python-build-system)
1234 (native-inputs
1235 `(("python-nose" ,python-nose)
1236 ("python-pyicu" ,python-pyicu)
1237 ("python-pytest" ,python-pytest)
1238 ("python-pytest-runner" ,python-pytest-runner)))
1239 (propagated-inputs
1240 `(("python-future" ,python-future)))
1241 (home-page "https://github.com/bear/parsedatetime/")
1242 (synopsis
1243 "Parse human-readable date/time text")
1244 (description
1245 "Parse human-readable date/time text.")
1246 (license license:asl2.0)))
1247
1248 (define-public python2-parsedatetime
1249 (package-with-python2 python-parsedatetime))
1250
1251 (define-public python-pandas
1252 (package
1253 (name "python-pandas")
1254 (version "0.19.2")
1255 (source
1256 (origin
1257 (method url-fetch)
1258 (uri (pypi-uri "pandas" version))
1259 (sha256
1260 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1261 (patches
1262 (search-patches "python-pandas-skip-failing-tests.patch"))))
1263 (build-system python-build-system)
1264 (propagated-inputs
1265 `(("python-numpy" ,python-numpy)
1266 ("python-pytz" ,python-pytz)
1267 ("python-dateutil" ,python-dateutil)))
1268 (native-inputs
1269 `(("python-nose" ,python-nose)
1270 ("python-cython" ,python-cython)))
1271 (home-page "http://pandas.pydata.org")
1272 (synopsis "Data structures for data analysis, time series, and statistics")
1273 (description
1274 "Pandas is a Python package providing fast, flexible, and expressive data
1275 structures designed to make working with structured (tabular,
1276 multidimensional, potentially heterogeneous) and time series data both easy
1277 and intuitive. It aims to be the fundamental high-level building block for
1278 doing practical, real world data analysis in Python.")
1279 (license license:bsd-3)))
1280
1281 (define-public python2-pandas
1282 (package-with-python2 python-pandas))
1283
1284 (define-public python-tzlocal
1285 (package
1286 (name "python-tzlocal")
1287 (version "1.2.2")
1288 (source
1289 (origin
1290 (method url-fetch)
1291 (uri (pypi-uri "tzlocal" version))
1292 (sha256
1293 (base32
1294 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1295 (build-system python-build-system)
1296 (propagated-inputs
1297 `(("python-pytz" ,python-pytz)))
1298 (home-page "https://github.com/regebro/tzlocal")
1299 (synopsis
1300 "Local timezone information for Python")
1301 (description
1302 "Tzlocal returns a tzinfo object with the local timezone information.
1303 This module attempts to fix a glaring hole in pytz, that there is no way to
1304 get the local timezone information, unless you know the zoneinfo name, and
1305 under several distributions that's hard or impossible to figure out.")
1306 (license license:cc0)))
1307
1308 (define-public python2-pysqlite
1309 (package
1310 (name "python2-pysqlite")
1311 (version "2.8.3")
1312 (source
1313 (origin
1314 (method url-fetch)
1315 (uri (pypi-uri "pysqlite" version))
1316 (sha256
1317 (base32
1318 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1319 (build-system python-build-system)
1320 (inputs
1321 `(("sqlite" ,sqlite)))
1322 (arguments
1323 `(#:python ,python-2 ; incompatible with Python 3
1324 #:tests? #f)) ; no test target
1325 (home-page "https://github.com/ghaering/pysqlite")
1326 (synopsis "SQLite bindings for Python")
1327 (description
1328 "Pysqlite provides SQLite bindings for Python that comply to the
1329 Database API 2.0T.")
1330 (license license:zlib)))
1331
1332
1333 (define-public python2-mechanize
1334 (package
1335 (name "python2-mechanize")
1336 (version "0.2.5")
1337 (source
1338 (origin
1339 (method url-fetch)
1340 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1341 version ".tar.gz"))
1342 (sha256
1343 (base32
1344 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1345 (build-system python-build-system)
1346 (arguments
1347 `(#:python ,python-2 ; apparently incompatible with Python 3
1348 #:tests? #f))
1349 ;; test fails with message
1350 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1351 ;; (python-3.3.2) or
1352 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1353 ;; (python-2.7.5).
1354 ;; The source code is from March 2011 and probably not up-to-date
1355 ;; with respect to python unit tests.
1356 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1357 (synopsis
1358 "Stateful programmatic web browsing in Python")
1359 (description
1360 "Mechanize implements stateful programmatic web browsing in Python,
1361 after Andy Lester’s Perl module WWW::Mechanize.")
1362 (license (license:non-copyleft
1363 "file://COPYING"
1364 "See COPYING in the distribution."))))
1365
1366
1367 (define-public python-simplejson
1368 (package
1369 (name "python-simplejson")
1370 (version "3.10.0")
1371 (source
1372 (origin
1373 (method url-fetch)
1374 (uri (pypi-uri "simplejson" version))
1375 (sha256
1376 (base32
1377 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1378 (build-system python-build-system)
1379 (home-page "http://simplejson.readthedocs.org/en/latest/")
1380 (synopsis
1381 "Json library for Python")
1382 (description
1383 "JSON (JavaScript Object Notation) is a subset of JavaScript
1384 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1385 format.
1386
1387 Simplejson exposes an API familiar to users of the standard library marshal
1388 and pickle modules. It is the externally maintained version of the json
1389 library contained in Python 2.6, but maintains compatibility with Python 2.5
1390 and (currently) has significant performance advantages, even without using
1391 the optional C extension for speedups. Simplejson is also supported on
1392 Python 3.3+.")
1393 (license license:x11)))
1394
1395 (define-public python2-simplejson
1396 (package-with-python2 python-simplejson))
1397
1398
1399 (define-public python-pyicu
1400 (package
1401 (name "python-pyicu")
1402 (version "1.9.5")
1403 (source
1404 (origin
1405 (method url-fetch)
1406 (uri (pypi-uri "PyICU" version))
1407 (sha256
1408 (base32
1409 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1410 (build-system python-build-system)
1411 (arguments
1412 '(#:phases
1413 (modify-phases %standard-phases
1414 (add-before 'check 'delete-failing-test
1415 (lambda _
1416 ;; XXX: These tests require locales that are unavailable
1417 ;; in the build environment.
1418 (delete-file "test/test_DateTimeParserGenerator.py")
1419 #t)))))
1420 (inputs
1421 `(("icu4c" ,icu4c)))
1422 (home-page "http://pyicu.osafoundation.org/")
1423 (synopsis "Python extension wrapping the ICU C++ API")
1424 (description
1425 "PyICU is a python extension wrapping the ICU C++ API.")
1426 (license license:x11)))
1427
1428 (define-public python2-pyicu
1429 (package-with-python2 python-pyicu))
1430
1431 (define-public python2-dogtail
1432 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1433 ;; spaces in indentation" with Python 3.
1434 (package
1435 (name "python2-dogtail")
1436 (version "0.9.9")
1437 (source (origin
1438 (method url-fetch)
1439 (uri (pypi-uri "dogtail" version))
1440 (sha256
1441 (base32
1442 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1443 (build-system python-build-system)
1444 (arguments `(#:python ,python-2
1445 #:tests? #f)) ; invalid command "test"
1446 ;; Currently no offical homepage.
1447 (home-page "https://pypi.python.org/pypi/dogtail/")
1448 (synopsis "GUI test tool and automation framework written in Python")
1449 (description
1450 "Dogtail is a GUI test tool and automation framework written in Python.
1451 It uses Accessibility (a11y) technologies to communicate with desktop
1452 applications. dogtail scripts are written in Python and executed like any
1453 other Python program.")
1454 (license license:gpl2+)))
1455
1456 (define-public python2-empy
1457 (package
1458 (name "python2-empy")
1459 (version "3.3")
1460 (source (origin
1461 (method url-fetch)
1462 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1463 version ".tar.gz"))
1464 (sha256
1465 (base32
1466 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1467 (build-system python-build-system)
1468 (arguments
1469 `(#:python ,python-2
1470 #:phases (alist-replace
1471 'check
1472 (lambda _
1473 (zero? (system* "./test.sh")))
1474 %standard-phases)))
1475 (home-page "http://www.alcyone.com/software/empy/")
1476 (synopsis "Templating system for Python")
1477 (description
1478 "EmPy is a system for embedding Python expressions and statements in
1479 template text; it takes an EmPy source file, processes it, and produces
1480 output. This is accomplished via expansions, which are special signals to the
1481 EmPy system and are set off by a special prefix (by default the at sign, @@).
1482 EmPy can expand arbitrary Python expressions and statements in this way, as
1483 well as a variety of special forms. Textual data not explicitly delimited in
1484 this way is sent unaffected to the output, allowing Python to be used in
1485 effect as a markup language. Also supported are callbacks via hooks,
1486 recording and playback via diversions, and dynamic, chainable filters. The
1487 system is highly configurable via command line options and embedded
1488 commands.")
1489 (license license:lgpl2.1+)))
1490
1491 (define-public python2-element-tree
1492 (package
1493 (name "python2-element-tree")
1494 (version "1.2.6")
1495 (source (origin
1496 (method url-fetch)
1497 (uri (string-append
1498 "http://effbot.org/media/downloads/elementtree-"
1499 version "-20050316.tar.gz"))
1500 (sha256
1501 (base32
1502 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1503 (build-system python-build-system)
1504 (arguments
1505 `(#:python ,python-2 ; seems to be part of Python 3
1506 #:tests? #f)) ; no 'test' sub-command
1507 (synopsis "Toolkit for XML processing in Python")
1508 (description
1509 "ElementTree is a Python library supporting lightweight XML processing.")
1510 (home-page "http://effbot.org/zone/element-index.htm")
1511 (license (license:x11-style
1512 "http://docs.python.org/2/license.html"
1513 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1514
1515 (define-public python2-pybugz
1516 (package
1517 (name "python2-pybugz")
1518 (version "0.6.11")
1519 (source (origin
1520 (method url-fetch)
1521 (uri (string-append
1522 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1523 version ".tar.gz"))
1524 (sha256
1525 (base32
1526 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1527 (patches (search-patches "pybugz-stty.patch"
1528 "pybugz-encode-error.patch"))))
1529 (build-system python-build-system)
1530 (arguments
1531 `(#:python ,python-2 ; SyntaxError with Python 3
1532 #:tests? #f)) ; no 'test' sub-command
1533 (propagated-inputs
1534 `(("element-tree" ,python2-element-tree)))
1535 (synopsis "Python and command-line interface to Bugzilla")
1536 (description
1537 "PyBugz is a Python library and command-line tool to query the Bugzilla
1538 bug tracking system. It is meant as an aid to speed up interaction with the
1539 bug tracker.")
1540 (home-page "http://www.liquidx.net/pybugz/")
1541 (license license:gpl2)))
1542
1543 (define-public python-enum34
1544 (package
1545 (name "python-enum34")
1546 (version "1.1.6")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (pypi-uri "enum34" version))
1551 (sha256
1552 (base32
1553 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1554 (build-system python-build-system)
1555 (home-page "https://pypi.python.org/pypi/enum34")
1556 (synopsis "Backported Python 3.4 Enum")
1557 (description
1558 "Enum34 is the new Python stdlib enum module available in Python 3.4
1559 backported for previous versions of Python from 2.4 to 3.3.")
1560 (license license:bsd-3)))
1561
1562 (define-public python2-enum34
1563 (package-with-python2 python-enum34))
1564
1565 (define-public python-parse-type
1566 (package
1567 (name "python-parse-type")
1568 (version "0.3.4")
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (string-append "https://pypi.python.org/packages/source/p/"
1573 "parse_type/parse_type-" version ".tar.gz"))
1574 (sha256
1575 (base32
1576 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1577 (build-system python-build-system)
1578 (arguments
1579 `(#:phases
1580 (modify-phases %standard-phases
1581 (add-after 'unpack 'patch-tests
1582 (lambda _
1583 (substitute* "tests/test_parse_type_parse.py"
1584 ;; Newer Python versions don't have the problem this test tests.
1585 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1586 ""))
1587 #t)))))
1588 (propagated-inputs
1589 `(("python-six" ,python-six)
1590 ("python-parse" ,python-parse)))
1591 (native-inputs
1592 `(("python-pytest" ,python-pytest)
1593 ("python-pytest-runner" ,python-pytest-runner)))
1594 (home-page "https://github.com/jenisys/parse_type")
1595 (synopsis "Extended parse module")
1596 (description
1597 "Parse_type extends the python parse module.")
1598 (properties
1599 `((python2-variant . ,(delay python2-parse-type))))
1600 (license license:bsd-3)))
1601
1602 (define-public python2-parse-type
1603 (let ((base (package-with-python2
1604 (strip-python2-variant python-parse-type))))
1605 (package (inherit base)
1606 (propagated-inputs
1607 `(("python2-enum34" ,python2-enum34)
1608 ,@(package-propagated-inputs base))))))
1609
1610 (define-public python-parse
1611 (package
1612 (name "python-parse")
1613 (version "1.6.6")
1614 (source
1615 (origin
1616 (method url-fetch)
1617 (uri (pypi-uri "parse" version))
1618 (sha256
1619 (base32
1620 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1621 (patches (search-patches "python-parse-too-many-fields.patch"))))
1622 (build-system python-build-system)
1623 (arguments
1624 `(#:phases
1625 (modify-phases %standard-phases
1626 (replace 'check
1627 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1628 (home-page "https://github.com/r1chardj0n3s/parse")
1629 (synopsis "Parse strings")
1630 (description
1631 "Parse strings using a specification based on the Python format()
1632 syntax.")
1633 (license license:x11)))
1634
1635 (define-public python-polib
1636 (package
1637 (name "python-polib")
1638 (version "1.0.8")
1639 (source (origin
1640 (method url-fetch)
1641 (uri (pypi-uri "polib" version))
1642 (sha256
1643 (base32
1644 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1645 (build-system python-build-system)
1646 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1647 (synopsis "Manipulate, create and modify gettext files")
1648 (description "Polib can manipulate any gettext format (po, pot and mo)
1649 files. It can be used to create po files from scratch or to modify
1650 existing ones.")
1651 (license license:expat)))
1652
1653 (define-public python2-polib
1654 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1655 (package
1656 (inherit base)
1657 (arguments `(,@(package-arguments base)
1658 ;; Tests don't work with python2.
1659 #:tests? #f)))))
1660
1661 (define-public scons
1662 (package
1663 (name "scons")
1664 (version "2.5.1")
1665 (source (origin
1666 (method url-fetch)
1667 (uri (string-append "mirror://sourceforge/scons/scons/" version
1668 "/scons-" version ".tar.gz"))
1669 (sha256
1670 (base32
1671 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1672 (build-system python-build-system)
1673 (arguments
1674 ;; With Python 3.x, fails to build with a syntax error.
1675 `(#:python ,python-2
1676 #:use-setuptools? #f ; still relies on distutils
1677 #:tests? #f)) ; no 'python setup.py test' command
1678 (home-page "http://scons.org/")
1679 (synopsis "Software construction tool written in Python")
1680 (description
1681 "SCons is a software construction tool. Think of SCons as an improved,
1682 cross-platform substitute for the classic Make utility with integrated
1683 functionality similar to autoconf/automake and compiler caches such as ccache.
1684 In short, SCons is an easier, more reliable and faster way to build
1685 software.")
1686 (license license:x11)))
1687
1688 (define-public python-extras
1689 (package
1690 (name "python-extras")
1691 (version "0.0.3")
1692 (source
1693 (origin
1694 (method url-fetch)
1695 (uri (string-append
1696 "https://pypi.python.org/packages/source/e/extras/extras-"
1697 version ".tar.gz"))
1698 (sha256
1699 (base32
1700 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1701 (build-system python-build-system)
1702 (arguments
1703 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1704 '(#:tests? #f))
1705 (home-page "https://github.com/testing-cabal/extras")
1706 (synopsis "Useful extensions to the Python standard library")
1707 (description
1708 "Extras is a set of extensions to the Python standard library.")
1709 (license license:expat)))
1710
1711 (define-public python2-extras
1712 (package-with-python2 python-extras))
1713
1714 (define-public python-mimeparse
1715 (package
1716 (name "python-mimeparse")
1717 (version "0.1.4")
1718 (source
1719 (origin
1720 (method url-fetch)
1721 (uri (string-append
1722 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1723 version ".tar.gz"))
1724 (sha256
1725 (base32
1726 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1727 (build-system python-build-system)
1728 (arguments
1729 '(#:tests? #f)) ; no setup.py test command
1730 (home-page
1731 "https://github.com/dbtsai/python-mimeparse")
1732 (synopsis "Python library for parsing MIME types")
1733 (description
1734 "Mimeparse provides basic functions for parsing MIME type names and
1735 matching them against a list of media-ranges.")
1736 (license license:expat)))
1737
1738 (define-public python2-mimeparse
1739 (package-with-python2 python-mimeparse))
1740
1741 (define-public python-nose
1742 (package
1743 (name "python-nose")
1744 (version "1.3.7")
1745 (source
1746 (origin
1747 (method url-fetch)
1748 (uri (pypi-uri "nose" version))
1749 (sha256
1750 (base32
1751 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1752 (build-system python-build-system)
1753 (arguments
1754 '(#:tests? #f)) ; FIXME: test suite fails
1755 (home-page "http://readthedocs.org/docs/nose/")
1756 (synopsis "Python testing library")
1757 (description
1758 "Nose extends the unittest library to make testing easier.")
1759 (license license:lgpl2.0+)))
1760
1761 (define-public python2-nose
1762 (package-with-python2 python-nose))
1763
1764 (define-public python-nose2
1765 (package
1766 (name "python-nose2")
1767 (version "0.6.5")
1768 (source
1769 (origin
1770 (method url-fetch)
1771 (uri (pypi-uri "nose2" version))
1772 (sha256
1773 (base32
1774 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1775 (build-system python-build-system)
1776 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1777 (propagated-inputs
1778 `(("python-cov-core" ,python-cov-core)
1779 ("python-pytest-cov" ,python-pytest-cov)
1780 ("python-six" ,python-six)))
1781 (home-page "https://github.com/nose-devs/nose2")
1782 (synopsis "Next generation of nicer testing for Python")
1783 (description
1784 "Nose2 is the next generation of nicer testing for Python, based on the
1785 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1786 better plugin api, being easier for users to configure, and simplifying internal
1787 interfaces and processes.")
1788 (license license:bsd-2)))
1789
1790 (define-public python2-nose2
1791 (package-with-python2 python-nose2))
1792
1793 (define-public python-unittest2
1794 (package
1795 (name "python-unittest2")
1796 (version "0.5.1")
1797 (source
1798 (origin
1799 (method url-fetch)
1800 (uri (string-append
1801 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1802 version ".tar.gz"))
1803 (sha256
1804 (base32
1805 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1806 (build-system python-build-system)
1807 (home-page "http://pypi.python.org/pypi/unittest2")
1808 (synopsis "Python unit testing library")
1809 (description
1810 "Unittest2 is a replacement for the unittest module in the Python
1811 standard library.")
1812 (license license:psfl)))
1813
1814 (define-public python2-unittest2
1815 (package (inherit python-unittest2)
1816 (name "python2-unittest2")
1817 (version "0.5.1")
1818 (source
1819 (origin
1820 (method url-fetch)
1821 (uri (string-append
1822 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1823 version ".tar.gz"))
1824 (sha256
1825 (base32
1826 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1827 (arguments
1828 `(#:python ,python-2
1829 #:tests? #f)))) ; no setup.py test command
1830
1831 (define-public python-pafy
1832 (package
1833 (name "python-pafy")
1834 (version "0.5.3.1")
1835 (source
1836 (origin
1837 (method url-fetch)
1838 (uri (pypi-uri "pafy" version))
1839 (sha256
1840 (base32
1841 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1842 (build-system python-build-system)
1843 (arguments
1844 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1845 (propagated-inputs
1846 ;; Youtube-dl is a python package which is imported in the file
1847 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1848 `(("youtube-dl" ,youtube-dl)))
1849 (home-page "https://np1.github.io/pafy/")
1850 (synopsis "Retrieve YouTube content and metadata")
1851 (description
1852 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1853 (license license:lgpl3+)))
1854
1855 (define-public python-py
1856 (package
1857 (name "python-py")
1858 (version "1.4.32")
1859 (source
1860 (origin
1861 (method url-fetch)
1862 (uri (pypi-uri "py" version))
1863 (sha256
1864 (base32
1865 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1866 (build-system python-build-system)
1867 (arguments
1868 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1869 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1870 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1871 ;; Is this module globally installed?"
1872 '(#:tests? #f))
1873 (home-page "http://pylib.readthedocs.org/")
1874 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1875 (description
1876 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1877 code introspection, and logging.")
1878 (license license:expat)))
1879
1880 (define-public python2-py
1881 (package-with-python2 python-py))
1882
1883 (define-public python-pytest
1884 (package
1885 (name "python-pytest")
1886 (version "2.7.3")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (string-append
1891 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1892 version ".tar.gz"))
1893 (sha256
1894 (base32
1895 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1896 (modules '((guix build utils)))
1897 (snippet
1898 ;; One of the tests involves the /usr directory, so it fails.
1899 '(substitute* "testing/test_argcomplete.py"
1900 (("def test_remove_dir_prefix\\(self\\):")
1901 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1902 (build-system python-build-system)
1903 (propagated-inputs
1904 `(("python-py" ,python-py)))
1905 (native-inputs
1906 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
1907 ("bash" ,bash)
1908 ("python-nose" ,python-nose)
1909 ("python-mock" ,python-mock)))
1910 (home-page "http://pytest.org")
1911 (synopsis "Python testing library")
1912 (description
1913 "Pytest is a testing tool that provides auto-discovery of test modules
1914 and functions, detailed info on failing assert statements, modular fixtures,
1915 and many external plugins.")
1916 (license license:expat)))
1917
1918 (define-public python2-pytest
1919 (package-with-python2 python-pytest))
1920
1921 ;; Some packages require a newer pytest.
1922 (define-public python-pytest-3.0
1923 (package
1924 (inherit python-pytest)
1925 (name "python-pytest")
1926 (version "3.0.7")
1927 (source (origin
1928 (method url-fetch)
1929 (uri (pypi-uri "pytest" version))
1930 (sha256
1931 (base32
1932 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1933 (arguments
1934 `(#:phases
1935 (modify-phases %standard-phases
1936 (add-before 'check 'disable-invalid-test
1937 (lambda _
1938 (substitute* "testing/test_argcomplete.py"
1939 (("def test_remove_dir_prefix" line)
1940 (string-append "@pytest.mark.skip"
1941 "(reason=\"Assumes that /usr exists.\")\n "
1942 line)))
1943 #t)))))
1944 (native-inputs
1945 `(("python-hypothesis" ,python-hypothesis)
1946 ,@(package-native-inputs python-pytest)))
1947 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1948
1949 (define-public python2-pytest-3.0
1950 (let ((base (package-with-python2
1951 (strip-python2-variant python-pytest-3.0))))
1952 (package (inherit base)
1953 (native-inputs
1954 `(("python2-enum34" ,python2-enum34)
1955 ,@(package-native-inputs base))))))
1956
1957 (define-public python-pytest-cov
1958 (package
1959 (name "python-pytest-cov")
1960 (version "2.4.0")
1961 (source
1962 (origin
1963 (method url-fetch)
1964 (uri (pypi-uri "pytest-cov" version))
1965 (sha256
1966 (base32
1967 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1968 (build-system python-build-system)
1969 (arguments
1970 `(#:phases
1971 (modify-phases %standard-phases
1972 (replace 'check
1973 (lambda _
1974 ;; options taken from tox.ini
1975 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1976 ;; with "Duplicate implicit target name"
1977 (zero? (system* "python" "./setup.py" "check"
1978 "--strict" "--metadata")))))))
1979 (propagated-inputs
1980 `(("python-coverage" ,python-coverage)
1981 ("python-pytest" ,python-pytest)))
1982 (home-page "https://github.com/pytest-dev/pytest-cov")
1983 (synopsis "Pytest plugin for measuring coverage")
1984 (description
1985 "Pytest-cov produces coverage reports. It supports centralised testing and
1986 distributed testing in both @code{load} and @code{each} modes. It also
1987 supports coverage of subprocesses.")
1988 (license license:expat)))
1989
1990 (define-public python2-pytest-cov
1991 (package-with-python2 python-pytest-cov))
1992
1993 (define-public python-pytest-runner
1994 (package
1995 (name "python-pytest-runner")
1996 (version "2.11.1")
1997 (source
1998 (origin
1999 (method url-fetch)
2000 (uri (pypi-uri "pytest-runner" version))
2001 (sha256
2002 (base32
2003 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
2004 (build-system python-build-system)
2005 (arguments
2006 `(#:phases
2007 (modify-phases %standard-phases
2008 ;; The fancy way of setting the version with setuptools_scm does not
2009 ;; seem to work here.
2010 (add-after 'unpack 'set-version
2011 (lambda _
2012 (substitute* "docs/conf.py"
2013 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
2014 (string-append "version = \"" ,version "\"")))
2015 #t)))))
2016 (native-inputs
2017 `(("python-pytest" ,python-pytest)
2018 ("python-setuptools-scm" ,python-setuptools-scm)))
2019 (home-page "https://github.com/pytest-dev/pytest-runner")
2020 (synopsis "Invoke py.test as a distutils command")
2021 (description
2022 "This package provides a @command{pytest-runner} command that
2023 @file{setup.py} files can use to run tests.")
2024 (license license:expat)))
2025
2026 (define-public python2-pytest-runner
2027 (package-with-python2 python-pytest-runner))
2028
2029 (define-public python-pytest-mock
2030 (package
2031 (name "python-pytest-mock")
2032 (version "1.2")
2033 (source
2034 (origin
2035 (method url-fetch)
2036 (uri (pypi-uri "pytest-mock" version ".zip"))
2037 (sha256
2038 (base32
2039 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2040 (build-system python-build-system)
2041 (native-inputs
2042 `(("unzip" ,unzip)))
2043 (propagated-inputs
2044 `(("python-pytest" ,python-pytest)))
2045 (home-page "https://github.com/pytest-dev/pytest-mock/")
2046 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2047 (description
2048 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2049 around the patching API provided by the @code{mock} package, but with the
2050 benefit of not having to worry about undoing patches at the end of a test.
2051 The mocker fixture has the same API as @code{mock.patch}, supporting the
2052 same arguments.")
2053 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2054 (license license:expat)))
2055
2056 (define-public python2-pytest-mock
2057 (let ((base (package-with-python2
2058 (strip-python2-variant python-pytest-mock))))
2059 (package (inherit base)
2060 (propagated-inputs
2061 `(("python2-mock" ,python2-mock)
2062 ,@(package-propagated-inputs base))))))
2063
2064 (define-public python-pytest-xdist
2065 (package
2066 (name "python-pytest-xdist")
2067 (version "1.14")
2068 (source
2069 (origin
2070 (method url-fetch)
2071 (uri (pypi-uri "pytest-xdist" version ".zip"))
2072 (sha256
2073 (base32
2074 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2075 (modules '((guix build utils)))
2076 (snippet
2077 '(begin
2078 ;; Remove pre-compiled .pyc files from source.
2079 (for-each delete-file-recursively
2080 (find-files "." "__pycache__" #:directories? #t))
2081 (for-each delete-file (find-files "." "\\.pyc$"))
2082 #t))))
2083 (build-system python-build-system)
2084 (arguments
2085 '(#:tests? #f)) ;FIXME: Some tests are failing.
2086 ;; #:phases
2087 ;; (modify-phases %standard-phases
2088 ;; (delete 'check)
2089 ;; (add-after 'install 'check
2090 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2091 ;; (add-installed-pythonpath inputs outputs)
2092 ;; (zero? (system* "py.test" "-v")))))
2093 (native-inputs
2094 `(("unzip" ,unzip)
2095 ("python-setuptools-scm" ,python-setuptools-scm)))
2096 (propagated-inputs
2097 `(("python-execnet" ,python-execnet)
2098 ("python-pytest" ,python-pytest)
2099 ("python-py" ,python-py)))
2100 (home-page
2101 "https://github.com/pytest-dev/pytest-xdist")
2102 (synopsis
2103 "Plugin for py.test with distributed testing and loop-on-failing modes")
2104 (description
2105 "The pytest-xdist plugin extends py.test with some unique test execution
2106 modes: parallelization, running tests in boxed subprocesses, the ability
2107 to run tests repeatedly when failed, and the ability to run tests on multiple
2108 Python interpreters or platforms. It uses rsync to copy the existing
2109 program code to a remote location, executes there, and then syncs the
2110 result back.")
2111 (license license:expat)))
2112
2113 (define-public python2-pytest-xdist
2114 (package-with-python2 python-pytest-xdist))
2115
2116 (define-public python-scripttest
2117 (package
2118 (name "python-scripttest")
2119 (version "1.3")
2120 (source
2121 (origin
2122 (method url-fetch)
2123 (uri (string-append
2124 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2125 version ".tar.gz"))
2126 (sha256
2127 (base32
2128 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2129 (build-system python-build-system)
2130 (native-inputs
2131 `(("python-pytest" ,python-pytest)))
2132 (home-page "http://pythonpaste.org/scripttest/")
2133 (synopsis "Python library to test command-line scripts")
2134 (description "Scripttest is a Python helper library for testing
2135 interactive command-line applications. With it you can run a script in a
2136 subprocess and see the output as well as any file modifications.")
2137 (license license:expat)))
2138
2139 (define-public python2-scripttest
2140 (package-with-python2 python-scripttest))
2141
2142 (define-public python-testtools
2143 (package
2144 (name "python-testtools")
2145 (version "1.4.0")
2146 (source
2147 (origin
2148 (method url-fetch)
2149 (uri (pypi-uri "testtools" version))
2150 (sha256
2151 (base32
2152 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2153 (build-system python-build-system)
2154 (arguments
2155 `(#:phases
2156 (modify-phases %standard-phases
2157 (add-after 'unpack 'fix-module-imports
2158 (lambda _
2159 (substitute* "setup.py"
2160 (("'unittest2>=0.8.0',") ""))
2161 (substitute* '("testtools/testcase.py"
2162 "testtools/testsuite.py"
2163 "testtools/run.py"
2164 "testtools/tests/test_run.py"
2165 "testtools/tests/test_testsuite.py"
2166 "testtools/tests/test_deferredruntest.py")
2167 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2168 (("import unittest2 as unittest") "import unittest")
2169 (("import unittest2") "import unittest as unittest2")
2170 (("from unittest2 import") "from unittest import"))
2171 (substitute* "testtools/tests/test_testresult.py"
2172 ;; NUL in source code is not allowed (raises ValueError).
2173 (("\\x00\\x04") "\\x04"))
2174 #t)))))
2175 (propagated-inputs
2176 `(("python-mimeparse" ,python-mimeparse)
2177 ("python-extras" ,python-extras)))
2178 (home-page "https://github.com/testing-cabal/testtools")
2179 (synopsis
2180 "Extensions to the Python standard library unit testing framework")
2181 (description
2182 "Testtools extends the Python standard library unit testing framework to
2183 provide matchers, more debugging information, and cross-Python
2184 compatibility.")
2185 (license license:psfl)))
2186
2187 (define-public python2-testtools
2188 (package-with-python2 python-testtools))
2189
2190 (define-public python-testscenarios
2191 (package
2192 (name "python-testscenarios")
2193 (version "0.4")
2194 (source
2195 (origin
2196 (method url-fetch)
2197 (uri (string-append
2198 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2199 version ".tar.gz"))
2200 (sha256
2201 (base32
2202 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2203 (build-system python-build-system)
2204 (propagated-inputs
2205 `(("python-testtools" ,python-testtools)))
2206 (home-page "https://launchpad.net/testscenarios")
2207 (synopsis "Pyunit extension for dependency injection")
2208 (description
2209 "Testscenarios provides clean dependency injection for Python unittest
2210 style tests.")
2211 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2212
2213 (define-public python2-testscenarios
2214 (package-with-python2 python-testscenarios))
2215
2216 (define-public python-testresources
2217 (package
2218 (name "python-testresources")
2219 (version "0.2.7")
2220 (source
2221 (origin
2222 (method url-fetch)
2223 (uri (string-append
2224 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2225 version ".tar.gz"))
2226 (sha256
2227 (base32
2228 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2229 (build-system python-build-system)
2230 (home-page "https://launchpad.net/testresources")
2231 (synopsis
2232 "Pyunit extension for managing test resources")
2233 (description
2234 "Testresources is an extension to Python's unittest to allow declarative
2235 use of resources by test cases.")
2236 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2237
2238 (define-public python2-testresources
2239 (package-with-python2 python-testresources))
2240
2241 (define-public python-subunit
2242 (package
2243 (name "python-subunit")
2244 (version "0.0.21")
2245 (source
2246 (origin
2247 (method url-fetch)
2248 (uri (string-append
2249 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2250 version ".tar.gz"))
2251 (sha256
2252 (base32
2253 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2254 (build-system python-build-system)
2255 (propagated-inputs
2256 `(("python-extras" ,python-extras)
2257 ("python-mimeparse" ,python-mimeparse)))
2258 (native-inputs
2259 `(("python-testscenarios" ,python-testscenarios)))
2260 (home-page "http://launchpad.net/subunit")
2261 (synopsis "Python implementation of the subunit protocol")
2262 (description
2263 "Python-subunit is a Python implementation of the subunit test streaming
2264 protocol.")
2265 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2266
2267 (define-public python2-subunit
2268 (package-with-python2 python-subunit))
2269
2270 ;; Recent versions of python-fixtures and python-testrepository need
2271 ;; python-pbr for packaging, which itself needs these two packages for
2272 ;; testing.
2273 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2274 ;; same source, just without any test dependencies and with tests disabled.
2275 ;; python-pbr-minmal is then used to package python-fixtures and
2276 ;; python-testrepository.
2277 ;; Strictly speaking we currently could remove the test-requirements from the
2278 ;; normal python-pbr package (and save this package) since test are disabled
2279 ;; there anyway. But this may change in future.
2280 (define python-pbr-minimal
2281 (package
2282 (name "python-pbr-minimal")
2283 (version "3.0.1")
2284 (source
2285 (origin
2286 (method url-fetch)
2287 (uri (pypi-uri "pbr" version))
2288 (sha256
2289 (base32
2290 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2291 (build-system python-build-system)
2292 (arguments
2293 `(#:tests? #f))
2294 (home-page "http://docs.openstack.org/developer/pbr/")
2295 (synopsis "Minimal build of python-pbr used for bootstrapping")
2296 (description
2297 "Used only for bootstrapping python2-pbr, you should not need this.")
2298 (license license:asl2.0)))
2299
2300 (define python2-pbr-minimal
2301 (package-with-python2 python-pbr-minimal))
2302
2303 (define-public python-pbr
2304 (package
2305 (inherit python-pbr-minimal)
2306 (name "python-pbr")
2307 (arguments
2308 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2309 (propagated-inputs
2310 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2311 (native-inputs
2312 `(("python-fixtures" ,python-fixtures)
2313 ;; discover, coverage, hacking, subunit
2314 ("python-mock" ,python-mock)
2315 ("python-six" ,python-six)
2316 ("python-sphinx" ,python-sphinx)
2317 ("python-testrepository" ,python-testrepository)
2318 ("python-testresources" ,python-testresources)
2319 ("python-testscenarios" ,python-testscenarios)
2320 ("python-testtools" ,python-testtools)
2321 ("python-virtualenv" ,python-virtualenv)))
2322 (synopsis "Enhance the default behavior of Python’s setuptools")
2323 (description
2324 "Python Build Reasonableness (PBR) is a library that injects some useful
2325 and sensible default behaviors into your setuptools run. It will set
2326 versions, process requirements files and generate AUTHORS and ChangeLog file
2327 from git information.
2328 ")))
2329
2330 (define-public python2-pbr
2331 (package-with-python2 python-pbr))
2332
2333 (define-public python-fixtures
2334 (package
2335 (name "python-fixtures")
2336 (version "1.4.0")
2337 (source
2338 (origin
2339 (method url-fetch)
2340 (uri (pypi-uri "fixtures" version))
2341 (sha256
2342 (base32
2343 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2344 (build-system python-build-system)
2345 (arguments
2346 '(#:phases
2347 (modify-phases %standard-phases
2348 (replace 'check
2349 (lambda _
2350 (zero? (system* "python" "-m" "testtools.run"
2351 "fixtures.test_suite")))))))
2352 (propagated-inputs
2353 `(("python-six" ,python-six)))
2354 (native-inputs
2355 `(("python-mock" ,python-mock)
2356 ("python-pbr-minimal" ,python-pbr-minimal)
2357 ("python-testtools" ,python-testtools)))
2358 (home-page "https://launchpad.net/python-fixtures")
2359 (synopsis "Python test fixture library")
2360 (description
2361 "Fixtures provides a way to create reusable state, useful when writing
2362 Python tests.")
2363 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2364
2365 (define-public python2-fixtures
2366 (package-with-python2 python-fixtures))
2367
2368 (define-public python-testrepository
2369 (package
2370 (name "python-testrepository")
2371 (version "0.0.20")
2372 (source
2373 (origin
2374 (method url-fetch)
2375 (uri (string-append
2376 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2377 version ".tar.gz"))
2378 (sha256
2379 (base32
2380 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2381 (build-system python-build-system)
2382 (arguments
2383 ;; FIXME: Many tests are failing.
2384 '(#:tests? #f))
2385 (propagated-inputs
2386 `(("python-fixtures" ,python-fixtures)
2387 ("python-subunit" ,python-subunit)
2388 ("python-testtools" ,python-testtools)))
2389 (native-inputs
2390 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2391 ("python-mimeparse" ,python-mimeparse)))
2392 (home-page "https://launchpad.net/testrepository")
2393 (synopsis "Database for Python test results")
2394 (description "Testrepository provides a database of test results which can
2395 be used as part of a developer's workflow to check things such as what tests
2396 have failed since the last commit or what tests are currently failing.")
2397 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2398
2399 (define-public python2-testrepository
2400 (package-with-python2 python-testrepository))
2401
2402 (define-public python-coverage
2403 (package
2404 (name "python-coverage")
2405 (version "4.1")
2406 (source
2407 (origin
2408 (method url-fetch)
2409 (uri (pypi-uri "coverage" version))
2410 (sha256
2411 (base32
2412 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2413 (build-system python-build-system)
2414 (arguments
2415 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2416 '(#:tests? #f))
2417 (home-page "http://nedbatchelder.com/code/coverage")
2418 (synopsis "Code coverage measurement for Python")
2419 (description
2420 "Coverage measures code coverage, typically during test execution. It
2421 uses the code analysis tools and tracing hooks provided in the Python standard
2422 library to determine which lines are executable, and which have been
2423 executed.")
2424 (license license:bsd-3)))
2425
2426 (define-public python2-coverage
2427 (package-with-python2 python-coverage))
2428
2429 (define-public python-cov-core
2430 (package
2431 (name "python-cov-core")
2432 (version "1.15.0")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (pypi-uri "cov-core" version))
2437 (sha256
2438 (base32
2439 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2440 (build-system python-build-system)
2441 (propagated-inputs
2442 `(("python-coverage" ,python-coverage)))
2443 (home-page "https://github.com/schlamar/cov-core")
2444 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2445 (description
2446 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2447 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2448 testing frameworks.")
2449 (license license:expat)))
2450
2451 (define-public python2-cov-core
2452 (package-with-python2 python-cov-core))
2453
2454 (define-public python-discover
2455 (package
2456 (name "python-discover")
2457 (version "0.4.0")
2458 (source
2459 (origin
2460 (method url-fetch)
2461 (uri (string-append
2462 "https://pypi.python.org/packages/source/d/discover/discover-"
2463 version ".tar.gz"))
2464 (sha256
2465 (base32
2466 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2467 (build-system python-build-system)
2468 (home-page "http://pypi.python.org/pypi/discover/")
2469 (synopsis
2470 "Python test discovery for unittest")
2471 (description
2472 "Discover provides test discovery for unittest, a feature that has been
2473 backported from Python 2.7 for Python 2.4+.")
2474 (license license:bsd-3)))
2475
2476 (define-public python2-discover
2477 (package-with-python2 python-discover))
2478
2479 (define-public behave
2480 (package
2481 (name "behave")
2482 (version "1.2.5")
2483 (source (origin
2484 (method url-fetch)
2485 (uri (pypi-uri "behave" version ".tar.bz2"))
2486 (sha256
2487 (base32
2488 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2489 (build-system python-build-system)
2490 (propagated-inputs
2491 `(("python-six" ,python-six)
2492 ("python-parse" ,python-parse)
2493 ("python-parse-type" ,python-parse-type)))
2494 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2495 ;PyHamcrest>=1.8
2496 (home-page "https://github.com/behave/behave")
2497 (synopsis "Python behavior-driven development")
2498 (description
2499 "Behave is a tool for behavior-driven development in python.
2500 Behavior-driven development (or BDD) is an agile software development
2501 technique that encourages collaboration between developers, QA and
2502 non-technical or business participants in a software project. Behave uses
2503 tests written in a natural language style, backed up by Python code.")
2504 (license license:x11)))
2505
2506 (define-public python-exif-read
2507 (package
2508 (name "python-exif-read")
2509 (version "2.1.2")
2510 (source (origin
2511 (method url-fetch)
2512 (uri (pypi-uri "ExifRead" version))
2513 (sha256
2514 (base32
2515 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2516 (build-system python-build-system)
2517 (arguments `(#:tests? #f)) ; no tests
2518 (home-page "https://github.com/ianare/exif-py")
2519 (synopsis "Python library to extract EXIF data from image files")
2520 (description
2521 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2522 files.")
2523 (license license:bsd-3)))
2524
2525 (define-public python2-exif-read
2526 (package-with-python2 python-exif-read))
2527
2528 (define-public python-pyld
2529 (package
2530 (name "python-pyld")
2531 (version "0.7.1")
2532 (source (origin
2533 (method url-fetch)
2534 (uri (pypi-uri "PyLD" version))
2535 (sha256
2536 (base32
2537 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2538 (build-system python-build-system)
2539 (arguments `(#:tests? #f)) ; no tests
2540 (home-page "https://github.com/digitalbazaar/pyld")
2541 (synopsis "Python implementation of the JSON-LD specification")
2542 (description
2543 "PyLD is an implementation of the JSON-LD specification.")
2544 (license license:bsd-3)))
2545
2546 (define-public python2-pyld
2547 (package-with-python2 python-pyld))
2548
2549 (define-public python-certifi
2550 (package
2551 (name "python-certifi")
2552 (version "2017.1.23")
2553 (source (origin
2554 (method url-fetch)
2555 (uri (pypi-uri "certifi" version))
2556 (sha256
2557 (base32
2558 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2559 (build-system python-build-system)
2560 (home-page "https://certifi.io/")
2561 (synopsis "Python CA certificate bundle")
2562 (description
2563 "Certifi is a Python library that contains a CA certificate bundle, which
2564 is used by the Requests library to verify HTTPS requests.")
2565 (license license:asl2.0)))
2566
2567 (define-public python2-certifi
2568 (package-with-python2 python-certifi))
2569
2570 (define-public python-click
2571 (package
2572 (name "python-click")
2573 (version "6.7")
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (pypi-uri "click" version))
2578 (sha256
2579 (base32
2580 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2581 (build-system python-build-system)
2582 (arguments
2583 `(#:phases
2584 (modify-phases %standard-phases
2585 (add-after 'unpack 'fix-paths
2586 (lambda* (#:key inputs #:allow-other-keys)
2587 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2588 "cross-libc" "libc"))))
2589 (substitute* "click/_unicodefun.py"
2590 (("'locale'")
2591 (string-append "'" glibc "/bin/locale'"))))
2592 #t))
2593 (replace 'check
2594 (lambda _
2595 (zero? (system* "make" "test")))))))
2596 (native-inputs
2597 `(("python-pytest" ,python-pytest)))
2598 (home-page "http://click.pocoo.org")
2599 (synopsis "Command line library for Python")
2600 (description
2601 "Click is a Python package for creating command line interfaces in a
2602 composable way with as little code as necessary. Its name stands for
2603 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2604 with sensible defaults out of the box.")
2605 (license license:bsd-3)))
2606
2607 (define-public python2-click
2608 (package-with-python2 python-click))
2609
2610 (define-public python-wheel
2611 (package
2612 (name "python-wheel")
2613 (version "0.30.0a0")
2614 (source
2615 (origin
2616 (method url-fetch)
2617 (uri (pypi-uri "wheel" version))
2618 (sha256
2619 (base32
2620 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2621 (build-system python-build-system)
2622 (native-inputs
2623 `(("python-jsonschema" ,python-jsonschema)
2624 ("python-pytest-cov" ,python-pytest-cov)))
2625 (home-page "https://bitbucket.org/pypa/wheel/")
2626 (synopsis "Format for built Python packages")
2627 (description
2628 "A wheel is a ZIP-format archive with a specially formatted filename and
2629 the @code{.whl} extension. It is designed to contain all the files for a PEP
2630 376 compatible install in a way that is very close to the on-disk format. Many
2631 packages will be properly installed with only the @code{Unpack} step and the
2632 unpacked archive preserves enough information to @code{Spread} (copy data and
2633 scripts to their final locations) at any later time. Wheel files can be
2634 installed with a newer @code{pip} or with wheel's own command line utility.")
2635 (license license:expat)
2636 (properties `((python2-variant . ,(delay python2-wheel))))))
2637
2638 (define-public python2-wheel
2639 (let ((wheel (package-with-python2
2640 (strip-python2-variant python-wheel))))
2641 (package (inherit wheel)
2642 (native-inputs `(("python2-functools32" ,python2-functools32)
2643 ,@(package-native-inputs wheel))))))
2644
2645
2646 (define-public python-requests
2647 (package
2648 (name "python-requests")
2649 (version "2.13.0")
2650 (source (origin
2651 (method url-fetch)
2652 (uri (pypi-uri "requests" version))
2653 (sha256
2654 (base32
2655 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2656 ;; TODO: unbundle urllib3 and chardet.
2657 (build-system python-build-system)
2658 (arguments
2659 ;; FIXME: Some tests require network access.
2660 '(#:tests? #f))
2661 (home-page "http://python-requests.org/")
2662 (synopsis "Python HTTP library")
2663 (description
2664 "Requests is a Python HTTP client library. It aims to be easier to use
2665 than Python’s urllib2 library.")
2666 (license license:asl2.0)))
2667
2668 ;; Some software requires an older version of Requests, notably Docker
2669 ;; Compose.
2670 (define-public python-requests-2.7
2671 (package (inherit python-requests)
2672 (version "2.7.0")
2673 (source (origin
2674 (method url-fetch)
2675 (uri (pypi-uri "requests" version))
2676 (sha256
2677 (base32
2678 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2679
2680 (define-public python2-requests
2681 (package-with-python2 python-requests))
2682
2683 (define-public python-vcversioner
2684 (package
2685 (name "python-vcversioner")
2686 (version "2.16.0.0")
2687 (source
2688 (origin
2689 (method url-fetch)
2690 (uri (pypi-uri "vcversioner" version))
2691 (sha256
2692 (base32
2693 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2694 (build-system python-build-system)
2695 (synopsis "Python library for version number discovery")
2696 (description "Vcversioner is a Python library that inspects tagging
2697 information in a variety of version control systems in order to discover
2698 version numbers.")
2699 (home-page "https://github.com/habnabit/vcversioner")
2700 (license license:isc)))
2701
2702 (define-public python2-vcversioner
2703 (package-with-python2 python-vcversioner))
2704
2705 (define-public python-jsonschema
2706 (package
2707 (name "python-jsonschema")
2708 (version "2.5.1")
2709 (source (origin
2710 (method url-fetch)
2711 (uri
2712 (string-append
2713 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2714 version ".tar.gz"))
2715 (sha256
2716 (base32
2717 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2718 (build-system python-build-system)
2719 (arguments
2720 '(#:phases
2721 (modify-phases %standard-phases
2722 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2723 (native-inputs
2724 `(("python-nose" ,python-nose)
2725 ("python-vcversioner" ,python-vcversioner)))
2726 (home-page "https://github.com/Julian/jsonschema")
2727 (synopsis "Implementation of JSON Schema for Python")
2728 (description
2729 "Jsonschema is an implementation of JSON Schema for Python.")
2730 (license license:expat)
2731 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2732
2733 (define-public python2-jsonschema
2734 (let ((jsonschema (package-with-python2
2735 (strip-python2-variant python-jsonschema))))
2736 (package (inherit jsonschema)
2737 (native-inputs
2738 `(("python2-mock" ,python2-mock)
2739 ,@(package-native-inputs jsonschema)))
2740 (propagated-inputs
2741 `(("python2-functools32" ,python2-functools32))))))
2742
2743 (define-public python-schema
2744 (package
2745 (name "python-schema")
2746 (version "0.6.6")
2747 (source
2748 (origin
2749 (method url-fetch)
2750 (uri (pypi-uri "schema" version))
2751 (sha256
2752 (base32
2753 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2754 (build-system python-build-system)
2755 (native-inputs
2756 `(("python-pytest" ,python-pytest)))
2757 (home-page "https://github.com/keleshev/schema")
2758 (synopsis "Simple data validation library")
2759 (description
2760 "@code{python-schema} is a library for validating Python data
2761 structures, such as those obtained from config-files, forms, external
2762 services or command-line parsing, converted from JSON/YAML (or
2763 something else) to Python data-types.")
2764 (license license:psfl)))
2765
2766 (define-public python2-schema
2767 (package-with-python2 python-schema))
2768
2769 (define-public python-schema-0.5
2770 (package (inherit python-schema)
2771 (version "0.5.0")
2772 (source
2773 (origin
2774 (method url-fetch)
2775 (uri (pypi-uri "schema" version))
2776 (sha256
2777 (base32
2778 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2779
2780 (define-public python2-schema-0.5
2781 (package-with-python2 python-schema-0.5))
2782
2783 (define-public python-kitchen
2784 (package
2785 (name "python-kitchen")
2786 (version "1.2.4")
2787 (source
2788 (origin
2789 (method url-fetch)
2790 (uri (pypi-uri "kitchen" version))
2791 (sha256
2792 (base32
2793 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2794 (build-system python-build-system)
2795 (propagated-inputs
2796 `(("python-chardet" ,python-chardet)))
2797 (home-page "https://github.com/fedora-infra/kitchen")
2798 (synopsis "Python API for snippets")
2799 (description "@code{kitchen} module provides a python API for all sorts of
2800 little useful snippets of code that everybody ends up writing for their projects
2801 but never seem big enough to build an independent release. Use kitchen and stop
2802 cutting and pasting that code over and over.")
2803 (license (list license:lgpl2.1+
2804 ;; subprocess.py, test_subprocess.py,
2805 ;; kitchen/pycompat25/defaultdict.py:
2806 license:psfl))))
2807
2808 (define-public python2-kitchen
2809 (package-with-python2 python-kitchen))
2810
2811 (define-public python-unidecode
2812 (package
2813 (name "python-unidecode")
2814 (version "0.04.20")
2815 (source (origin
2816 (method url-fetch)
2817 (uri (pypi-uri "Unidecode" version))
2818 (sha256
2819 (base32
2820 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2821 (build-system python-build-system)
2822 (home-page "https://pypi.python.org/pypi/Unidecode")
2823 (synopsis "ASCII transliterations of Unicode text")
2824 (description
2825 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2826 useful when integrating with legacy code that doesn't support Unicode, or for
2827 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2828 machine identifiers from human-readable Unicode strings that should still be
2829 somewhat intelligeble.")
2830 (license license:gpl2+)))
2831
2832 (define-public python2-unidecode
2833 (package-with-python2 python-unidecode))
2834
2835 (define-public python-pyjwt
2836 (package
2837 (name "python-pyjwt")
2838 (version "1.4.0")
2839 (source
2840 (origin
2841 (method url-fetch)
2842 (uri (pypi-uri "PyJWT" version))
2843 (sha256
2844 (base32
2845 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2846 (build-system python-build-system)
2847 (native-inputs
2848 `(("python-pytest" ,python-pytest)
2849 ("python-pytest-cov" ,python-pytest-cov)
2850 ("python-pytest-runner" ,python-pytest-runner)))
2851 (home-page "https://github.com/progrium/pyjwt")
2852 (synopsis "JSON Web Token implementation in Python")
2853 (description
2854 "PyJWT is a JSON Web Token implementation written in Python.")
2855 (license license:expat)))
2856
2857 (define-public python2-pyjwt
2858 (package-with-python2 python-pyjwt))
2859
2860 (define-public python-pykka
2861 (package
2862 (name "python-pykka")
2863 (version "1.2.1")
2864 (source
2865 (origin
2866 (method url-fetch)
2867 (uri (pypi-uri "Pykka" version))
2868 (sha256
2869 (base32
2870 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2871 (build-system python-build-system)
2872 (native-inputs
2873 `(("python-mock" ,python-mock)
2874 ("python-nose" ,python-nose)
2875 ("python-gevent" ,python-gevent)
2876 ("python-eventlet" ,python-eventlet)))
2877 (home-page "https://www.pykka.org/")
2878 (synopsis "Pykka is a Python implementation of the actor model")
2879 (description
2880 "Pykka is a Python implementation of the actor model.
2881 The actor model introduces some simple rules to control the sharing
2882 of state and cooperation between execution units, which makes it
2883 easier to build concurrent applications.")
2884 (license license:asl2.0)))
2885
2886 (define-public python2-pykka
2887 (package-with-python2 python-pykka))
2888
2889 (define-public python-oauthlib
2890 (package
2891 (name "python-oauthlib")
2892 (version "1.0.3")
2893 (source (origin
2894 (method url-fetch)
2895 (uri (pypi-uri "oauthlib" version))
2896 (sha256
2897 (base32
2898 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2899 (build-system python-build-system)
2900 (native-inputs
2901 `(("python-nose" ,python-nose)
2902 ("python-mock" ,python-mock)
2903 ("python-cryptography" ,python-cryptography)
2904 ("python-pyjwt" ,python-pyjwt)
2905 ("python-blinker" ,python-blinker)))
2906 (home-page "https://github.com/idan/oauthlib")
2907 (synopsis "OAuth implementation for Python")
2908 (description
2909 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2910 OAuth request-signing logic.")
2911 (license license:bsd-3)
2912 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2913
2914 (define-public python2-oauthlib
2915 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2916 (package
2917 (inherit base)
2918 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2919 ,@(package-native-inputs base))))))
2920
2921 (define-public python-itsdangerous
2922 (package
2923 (name "python-itsdangerous")
2924 (version "0.24")
2925 (source
2926 (origin
2927 (method url-fetch)
2928 (uri (string-append
2929 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2930 version ".tar.gz"))
2931 (sha256
2932 (base32
2933 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2934 (build-system python-build-system)
2935 (home-page "https://github.com/mitsuhiko/itsdangerous")
2936 (synopsis "Python library for passing data to/from untrusted environments")
2937 (description
2938 "Itsdangerous provides various helpers to pass trusted data to untrusted
2939 environments and back.")
2940 (license license:bsd-3)))
2941
2942 (define-public python2-itsdangerous
2943 (package-with-python2 python-itsdangerous))
2944
2945 (define-public python-pyyaml
2946 (package
2947 (name "python-pyyaml")
2948 (version "3.12")
2949 (source
2950 (origin
2951 (method url-fetch)
2952 (uri (pypi-uri "PyYAML" version))
2953 (sha256
2954 (base32
2955 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2956 (build-system python-build-system)
2957 (inputs
2958 `(("libyaml" ,libyaml)))
2959 (home-page "http://pyyaml.org/wiki/PyYAML")
2960 (synopsis "YAML parser and emitter for Python")
2961 (description
2962 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2963 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2964 API, and sensible error messages. PyYAML supports standard YAML tags and
2965 provides Python-specific tags that allow to represent an arbitrary Python
2966 object.")
2967 (license license:expat)))
2968
2969 (define-public python2-pyyaml
2970 (package-with-python2 python-pyyaml))
2971
2972 (define-public python-virtualenv
2973 (package
2974 (name "python-virtualenv")
2975 (version "15.0.3")
2976 (source
2977 (origin
2978 (method url-fetch)
2979 (uri (pypi-uri "virtualenv" version))
2980 (sha256
2981 (base32
2982 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2983 (build-system python-build-system)
2984 (arguments
2985 `(#:phases
2986 (modify-phases %standard-phases
2987 (replace 'check
2988 (lambda _
2989 ;; Disable failing test. See upstream bug report
2990 ;; https://github.com/pypa/virtualenv/issues/957
2991 (substitute* "tests/test_virtualenv.py"
2992 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2993 (zero? (system* "py.test")))))))
2994 (native-inputs
2995 `(("python-mock" ,python-mock)
2996 ("python-pytest" ,python-pytest)))
2997 (home-page "https://virtualenv.pypa.io/")
2998 (synopsis "Virtual Python environment builder")
2999 (description
3000 "Virtualenv is a tool to create isolated Python environments.")
3001 (license license:expat)))
3002
3003 (define-public python2-virtualenv
3004 (package-with-python2 python-virtualenv))
3005
3006 (define-public python-markupsafe
3007 (package
3008 (name "python-markupsafe")
3009 (version "0.23")
3010 (source
3011 (origin
3012 (method url-fetch)
3013 (uri (string-append
3014 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
3015 version ".tar.gz"))
3016 (sha256
3017 (base32
3018 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
3019 (build-system python-build-system)
3020 (home-page "https://github.com/mitsuhiko/markupsafe")
3021 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3022 (description
3023 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3024 for Python.")
3025 (license license:bsd-3)))
3026
3027 (define-public python2-markupsafe
3028 (package-with-python2 python-markupsafe))
3029
3030 (define-public python-jinja2
3031 (package
3032 (name "python-jinja2")
3033 (version "2.8")
3034 (source
3035 (origin
3036 (method url-fetch)
3037 (uri (pypi-uri "Jinja2" version))
3038 (sha256
3039 (base32
3040 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
3041 (build-system python-build-system)
3042 (propagated-inputs
3043 `(("python-markupsafe" ,python-markupsafe)))
3044 (home-page "http://jinja.pocoo.org/")
3045 (synopsis "Python template engine")
3046 (description
3047 "Jinja2 is a small but fast and easy to use stand-alone template engine
3048 written in pure Python.")
3049 (license license:bsd-3)))
3050
3051 (define-public python2-jinja2
3052 (package-with-python2 python-jinja2))
3053
3054 (define-public python-pystache
3055 (package
3056 (name "python-pystache")
3057 (version "0.5.4")
3058 (source (origin
3059 (method url-fetch)
3060 (uri (pypi-uri "pystache" version))
3061 (sha256
3062 (base32
3063 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3064 (build-system python-build-system)
3065 (arguments
3066 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3067 (home-page "http://defunkt.io/pystache/")
3068 (synopsis "Python logic-less template engine")
3069 (description
3070 "Pystache is a Python implementation of the framework agnostic,
3071 logic-free templating system Mustache.")
3072 (license license:expat)
3073 (properties `((python2-variant . ,(delay python2-pystache))))))
3074
3075 (define-public python2-pystache
3076 (package (inherit (package-with-python2
3077 (strip-python2-variant python-pystache)))
3078 (arguments
3079 `(#:python ,python-2
3080 #:phases
3081 (modify-phases %standard-phases
3082 (replace 'check
3083 (lambda _
3084 (zero? (system* "python" "test_pystache.py")))))))))
3085
3086 (define-public python-joblib
3087 (package
3088 (name "python-joblib")
3089 (version "0.10.3")
3090 (source (origin
3091 (method url-fetch)
3092 (uri (pypi-uri "joblib" version))
3093 (sha256
3094 (base32
3095 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3096 (modules '((guix build utils)))
3097 (snippet
3098 '(begin
3099 ;; Remove pre-compiled .pyc files from source.
3100 (for-each delete-file-recursively
3101 (find-files "." "__pycache__" #:directories? #t))
3102 (for-each delete-file (find-files "." "\\.pyc$"))
3103 #t))))
3104 (build-system python-build-system)
3105 (arguments
3106 `(#:phases
3107 (modify-phases %standard-phases
3108 (add-before 'check 'disable-failing-tests
3109 (lambda _
3110 ;; This numpydoc tests fails for unknown reasons
3111 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3112 ;; This numpydoc test depends on matplotlib, which is not a
3113 ;; required input.
3114 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3115 ;; These tests fail to execute sys.executable
3116 (substitute* "joblib/test/test_parallel.py"
3117 (("import nose" line)
3118 (string-append "from nose.plugins.skip import SkipTest\n" line))
3119 (("def test_nested_parallel_warnings" line)
3120 (string-append "@SkipTest\n" line))
3121 (("def test_parallel_with_interactively_defined_functions" line)
3122 (string-append "@SkipTest\n" line)))
3123 #t)))))
3124 ;; Provide nose to enable tests command
3125 (native-inputs
3126 `(("python-nose" ,python-nose)
3127 ("python-sphinx" ,python-sphinx)
3128 ("python-docutils" ,python-docutils)
3129 ("python-numpydoc" ,python-numpydoc)))
3130 (home-page "http://pythonhosted.org/joblib/")
3131 (synopsis "Using Python functions as pipeline jobs")
3132 (description
3133 "Joblib is a set of tools to provide lightweight pipelining in Python.
3134 In particular, joblib offers: transparent disk-caching of the output values
3135 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3136 logging and tracing of the execution.")
3137 (license license:bsd-3)))
3138
3139 (define-public python2-joblib
3140 (package-with-python2 python-joblib))
3141
3142 (define-public python-docutils
3143 (package
3144 (name "python-docutils")
3145 (version "0.13.1")
3146 (source
3147 (origin
3148 (method url-fetch)
3149 (uri (pypi-uri "docutils" version))
3150 (sha256
3151 (base32
3152 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3153 (build-system python-build-system)
3154 (arguments
3155 '(#:tests? #f)) ; no setup.py test command
3156 (home-page "http://docutils.sourceforge.net/")
3157 (synopsis "Python Documentation Utilities")
3158 (description
3159 "Docutils is a modular system for processing documentation into useful
3160 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3161 reStructuredText.")
3162 ;; Most of the source code is public domain, but some source files are
3163 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3164 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3165
3166 (define-public python2-docutils
3167 (package-with-python2 python-docutils))
3168
3169 (define-public python-pygments
3170 (package
3171 (name "python-pygments")
3172 (version "2.1.3")
3173 (source
3174 (origin
3175 (method url-fetch)
3176 (uri (pypi-uri "Pygments" version))
3177 (sha256
3178 (base32
3179 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3180 (build-system python-build-system)
3181 (arguments
3182 ;; FIXME: Tests require sphinx, which depends on this.
3183 '(#:tests? #f))
3184 (home-page "http://pygments.org/")
3185 (synopsis "Syntax highlighting")
3186 (description
3187 "Pygments is a syntax highlighting package written in Python.")
3188 (license license:bsd-2)))
3189
3190 (define-public python2-pygments
3191 (package-with-python2 python-pygments))
3192
3193 (define-public python-sphinxcontrib-websupport
3194 (package
3195 (name "python-sphinxcontrib-websupport")
3196 (version "1.0.1")
3197 (source (origin
3198 (method url-fetch)
3199 (uri (pypi-uri "sphinxcontrib-websupport" version))
3200 (sha256
3201 (base32
3202 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
3203 (build-system python-build-system)
3204 (propagated-inputs
3205 `(("python-mock" ,python-mock)
3206 ("python-pytest" ,python-pytest)
3207 ("python-xapian-bindings" ,python-xapian-bindings)))
3208 ;; Needed for running the test suite
3209 (native-inputs
3210 `(("python-six" ,python-six)
3211 ("python-jinja2" ,python-jinja2)
3212 ("python-docutils" ,python-docutils)
3213 ("python-sphinx" ,python-sphinx)
3214 ("python-sqlalchemy" ,python-sqlalchemy)
3215 ("python-whoosh" ,python-whoosh)))
3216 (home-page "http://sphinx-doc.org/")
3217 (synopsis "Sphinx API for web applications")
3218 (description "This package provides a Python API to easily integrate
3219 Sphinx documentation into your web application. It provides tools to
3220 integrate Sphinx documents in web templates and to handle searches.")
3221 (license license:bsd-3)))
3222
3223 (define-public python-sphinx
3224 (package
3225 (name "python-sphinx")
3226 (version "1.5.1")
3227 (source
3228 (origin
3229 (method url-fetch)
3230 (uri (pypi-uri "Sphinx" version))
3231 (sha256
3232 (base32
3233 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3234 (build-system python-build-system)
3235 (arguments
3236 `(#:phases
3237 (modify-phases %standard-phases
3238 (replace 'check
3239 (lambda _
3240 ;; Requires Internet access.
3241 (delete-file "tests/test_build_linkcheck.py")
3242 (zero? (system* "make" "test")))))))
3243 (propagated-inputs
3244 `(("python-imagesize" ,python-imagesize)
3245 ("python-sphinx-alabaster-theme"
3246 ,python-sphinx-alabaster-theme)
3247 ("python-babel" ,python-babel)
3248 ("python-snowballstemmer" ,python-snowballstemmer)
3249 ("python-docutils" ,python-docutils)
3250 ("python-jinja2" ,python-jinja2)
3251 ("python-pygments" ,python-pygments)
3252 ("python-requests" ,python-requests)
3253 ("python-six" ,python-six)))
3254 (native-inputs
3255 `(("graphviz" ,graphviz)
3256 ("python-html5lib" ,python-html5lib)
3257 ("python-mock" ,python-mock)
3258 ("python-nose" ,python-nose)))
3259 (home-page "http://sphinx-doc.org/")
3260 (synopsis "Python documentation generator")
3261 (description "Sphinx is a tool that makes it easy to create documentation
3262 for Python projects or other documents consisting of multiple reStructuredText
3263 sources.")
3264 (license license:bsd-3)
3265 (properties `((python2-variant . ,(delay python2-sphinx))))))
3266
3267 (define-public python-sphinx-1.6
3268 (package (inherit python-sphinx)
3269 (name "python-sphinx")
3270 (version "1.6.3")
3271 (source (origin
3272 (method url-fetch)
3273 (uri (pypi-uri "Sphinx" version))
3274 (sha256
3275 (base32
3276 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
3277 (arguments
3278 `(#:phases
3279 (modify-phases %standard-phases
3280 (replace 'check
3281 (lambda _
3282 ;; Requires Internet access.
3283 (delete-file "tests/test_build_linkcheck.py")
3284 (substitute* "tests/test_build_latex.py"
3285 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
3286 "@pytest.mark.skip()"))
3287 (zero? (system* "make" "test")))))))
3288 (propagated-inputs
3289 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
3290 ,@(package-propagated-inputs python-sphinx)))
3291 (native-inputs
3292 `(("python-pytest" ,python-pytest-3.0)
3293 ("imagemagick" ,imagemagick) ; for "convert"
3294 ,@(package-native-inputs python-sphinx)))
3295 (properties '())))
3296
3297 (define-public python-sphinx-1.5.3
3298 (package
3299 (inherit python-sphinx)
3300 (name "python-sphinx")
3301 (version "1.5.3")
3302 (source
3303 (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "Sphinx" version))
3306 (sha256
3307 (base32
3308 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3309 (native-inputs
3310 `(("python-pytest" ,python-pytest-3.0)
3311 ,@(package-native-inputs python-sphinx)))))
3312
3313 (define-public python2-sphinx
3314 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3315 (package
3316 (inherit base)
3317 (native-inputs `(("python2-mock" ,python2-mock)
3318 ("python2-enum34" ,python2-enum34)
3319 ,@(package-native-inputs base)))
3320 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3321 ,@(package-propagated-inputs base))))))
3322
3323 (define-public python-sphinx-rtd-theme
3324 (package
3325 (name "python-sphinx-rtd-theme")
3326 (version "0.2.4")
3327 (source
3328 (origin
3329 (method url-fetch)
3330 (uri (pypi-uri "sphinx_rtd_theme" version))
3331 (sha256
3332 (base32
3333 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3334 (build-system python-build-system)
3335 (arguments '(#:tests? #f)) ; No tests.
3336 (propagated-inputs
3337 `(("python-sphinx" ,python-sphinx)))
3338 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3339 (synopsis "ReadTheDocs.org theme for Sphinx")
3340 (description "A theme for Sphinx used by ReadTheDocs.org.")
3341 (license license:expat)))
3342
3343 (define-public python2-sphinx-rtd-theme
3344 (package-with-python2 python-sphinx-rtd-theme))
3345
3346 (define-public python-rst.linker
3347 (package
3348 (name "python-rst.linker")
3349 (version "1.7")
3350 (source
3351 (origin
3352 (method url-fetch)
3353 (uri (pypi-uri "rst.linker" version))
3354 (sha256
3355 (base32
3356 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3357 (build-system python-build-system)
3358 (propagated-inputs
3359 `(("python-dateutil" ,python-dateutil)
3360 ("python-six" ,python-six)))
3361 (native-inputs
3362 `(("python-setuptools-scm" ,python-setuptools-scm)))
3363 ;; Test would require path.py, which would introduce a cyclic dependence.
3364 (arguments `(#:tests? #f))
3365 ;; Note: As of version 1.7 the documentation is not worth building.
3366 (home-page "https://github.com/jaraco/rst.linker")
3367 (synopsis "Sphinx plugin to add links and timestamps")
3368 (description "rst.linker allows to automatically replace text by a
3369 reStructuredText external reference or timestamps. It's primary purpose is to
3370 augment the changelog, but it can be used for other documents, too.")
3371 (license license:expat)))
3372
3373 (define-public python2-rst.linker
3374 (package-with-python2 python-rst.linker))
3375
3376 (define-public python-feedgenerator
3377 (package
3378 (name "python-feedgenerator")
3379 (version "1.9")
3380 (source
3381 (origin
3382 (method url-fetch)
3383 (uri (pypi-uri "feedgenerator" version))
3384 (sha256
3385 (base32
3386 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3387 (modules '((guix build utils)))
3388 (snippet
3389 '(begin
3390 ;; Remove pre-compiled .pyc files from source.
3391 (for-each delete-file-recursively
3392 (find-files "." "__pycache__" #:directories? #t))
3393 (for-each delete-file (find-files "." "\\.pyc$"))
3394 #t))))
3395 (build-system python-build-system)
3396 (propagated-inputs
3397 `(("python-pytz" ,python-pytz)
3398 ("python-six" ,python-six)))
3399 (home-page "https://github.com/getpelican/feedgenerator")
3400 (synopsis
3401 "Standalone version of Django's Atom/RSS feed generator")
3402 (description
3403 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3404 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3405 (license license:bsd-3)))
3406
3407 (define-public python2-feedgenerator
3408 (package-with-python2 python-feedgenerator))
3409
3410 (define-public python-blinker
3411 (package
3412 (name "python-blinker")
3413 (version "1.4")
3414 (source
3415 (origin
3416 (method url-fetch)
3417 (uri (pypi-uri "blinker" version))
3418 (sha256
3419 (base32
3420 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3421 (build-system python-build-system)
3422 (home-page "http://pythonhosted.org/blinker/")
3423 (synopsis "Fast, simple object-to-object and broadcast signaling")
3424 (description
3425 "Blinker provides a fast dispatching system that allows any number of
3426 interested parties to subscribe to events, or \"signals\".")
3427 (license license:expat)))
3428
3429 (define-public python2-blinker
3430 (package-with-python2 python-blinker))
3431
3432 (define-public pelican
3433 (package
3434 (name "pelican")
3435 (version "3.6.3")
3436 (source
3437 (origin
3438 (method url-fetch)
3439 (uri (pypi-uri "pelican" version))
3440 (sha256
3441 (base32
3442 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3443 (build-system python-build-system)
3444 (propagated-inputs
3445 `(("python-feedgenerator" ,python-feedgenerator)
3446 ("python-jinja2" ,python-jinja2)
3447 ("python-pygments" ,python-pygments)
3448 ("python-docutils" ,python-docutils)
3449 ("python-pytz" ,python-pytz)
3450 ("python-blinker" ,python-blinker)
3451 ("python-unidecode" ,python-unidecode)
3452 ("python-six" ,python-six)
3453 ("python-dateutil" ,python-dateutil)))
3454 (home-page "http://getpelican.com/")
3455 (arguments
3456 `(;; XXX Requires a lot more packages to do unit tests :P
3457 #:tests? #f
3458 #:phases (modify-phases %standard-phases
3459 (add-before
3460 'install 'adjust-requires
3461 ;; Since feedgenerator is installed from git, it doesn't
3462 ;; conform to the version requirements.
3463 ;;
3464 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3465 ;; version requirement so setuptools doesn't get confused.
3466 (lambda _
3467 (substitute* "setup.py"
3468 (("['\"]feedgenerator.*?['\"]")
3469 "'feedgenerator'")))))))
3470 (synopsis "Python-based static site publishing system")
3471 (description
3472 "Pelican is a tool to generate a static blog from reStructuredText,
3473 Markdown input files, and more. Pelican uses Jinja2 for templating
3474 and is very extensible.")
3475 (license license:agpl3+)))
3476
3477 (define-public python-scikit-learn
3478 (package
3479 (name "python-scikit-learn")
3480 (version "0.18.1")
3481 (source
3482 (origin
3483 (method url-fetch)
3484 (uri (string-append
3485 "https://github.com/scikit-learn/scikit-learn/archive/"
3486 version ".tar.gz"))
3487 (file-name (string-append name "-" version ".tar.gz"))
3488 (sha256
3489 (base32
3490 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3491 (build-system python-build-system)
3492 (arguments
3493 `(#:phases
3494 (modify-phases %standard-phases
3495 (delete 'check)
3496 (add-after 'install 'check
3497 ;; Running tests from the source directory requires
3498 ;; an "inplace" build with paths relative to CWD.
3499 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3500 ;; Use the installed version instead.
3501 (lambda* (#:key inputs outputs #:allow-other-keys)
3502 (add-installed-pythonpath inputs outputs)
3503 ;; some tests require access to "$HOME"
3504 (setenv "HOME" "/tmp")
3505 ;; Step out of the source directory just to be sure.
3506 (chdir "..")
3507 (zero? (system* "nosetests" "-v" "sklearn")))))))
3508 (inputs
3509 `(("openblas" ,openblas)))
3510 (native-inputs
3511 `(("python-nose" ,python-nose)
3512 ("python-cython" ,python-cython)))
3513 (propagated-inputs
3514 `(("python-numpy" ,python-numpy)
3515 ("python-scipy" ,python-scipy)))
3516 (home-page "http://scikit-learn.org/")
3517 (synopsis "Machine Learning in Python")
3518 (description
3519 "Scikit-learn provides simple and efficient tools for data
3520 mining and data analysis.")
3521 (license license:bsd-3)))
3522
3523 (define-public python2-scikit-learn
3524 (package-with-python2 python-scikit-learn))
3525
3526 (define-public python-scikit-image
3527 (package
3528 (name "python-scikit-image")
3529 (version "0.11.3")
3530 (source
3531 (origin
3532 (method url-fetch)
3533 (uri (string-append
3534 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3535 version ".tar.gz"))
3536 (sha256
3537 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3538 (build-system python-build-system)
3539 (arguments
3540 ;; TODO: Some tests require running X11 server. Disable them?
3541 '(#:tests? #f))
3542 ;; See DEPENDS.txt for the list of build and run time requiremnts
3543 (propagated-inputs
3544 `(("python-matplotlib" ,python-matplotlib)
3545 ("python-networkx" ,python-networkx)
3546 ("python-scipy" ,python-scipy)
3547 ("python-pillow" ,python-pillow)))
3548 (native-inputs
3549 `(("python-numpy" ,python-numpy)
3550 ("python-cython" ,python-cython)
3551 ("python-six" ,python-six)))
3552 (home-page "http://scikit-image.org/")
3553 (synopsis "Image processing in Python")
3554 (description
3555 "Scikit-image is a collection of algorithms for image processing.")
3556 (license license:bsd-3)))
3557
3558 (define-public python2-scikit-image
3559 (package-with-python2 python-scikit-image))
3560
3561 (define-public python-redis
3562 (package
3563 (name "python-redis")
3564 (version "2.10.5")
3565 (source
3566 (origin
3567 (method url-fetch)
3568 (uri (pypi-uri "redis" version))
3569 (sha256
3570 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3571 (build-system python-build-system)
3572 ;; Tests require a running Redis server
3573 (arguments '(#:tests? #f))
3574 ;; As long as we are not running test, we do not need this input :-)
3575 ;;(native-inputs
3576 ;; `(("python-pytest" ,python-pytest)))
3577 (home-page "https://github.com/andymccurdy/redis-py")
3578 (synopsis "Redis Python client")
3579 (description
3580 "This package provides a Python interface to the Redis key-value store.")
3581 (license license:expat)))
3582
3583 (define-public python2-redis
3584 (package-with-python2 python-redis))
3585
3586 (define-public python-rq
3587 (package
3588 (name "python-rq")
3589 (version "0.7.1")
3590 (source
3591 (origin
3592 (method url-fetch)
3593 (uri (pypi-uri "rq" version))
3594 (sha256
3595 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3596 (build-system python-build-system)
3597 (propagated-inputs
3598 `(("python-click" ,python-click)
3599 ("python-redis" ,python-redis)))
3600 (home-page "http://python-rq.org/")
3601 (synopsis "Simple job queues for Python")
3602 (description
3603 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3604 processing them in the background with workers. It is backed by Redis and it
3605 is designed to have a low barrier to entry.")
3606 (license license:bsd-2)))
3607
3608 (define-public python2-rq
3609 (package-with-python2 python-rq))
3610
3611 (define-public python-cython
3612 (package
3613 (name "python-cython")
3614 (version "0.25.2")
3615 (source
3616 (origin
3617 (method url-fetch)
3618 (uri (pypi-uri "Cython" version))
3619 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
3620 (sha256
3621 (base32
3622 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
3623 (build-system python-build-system)
3624 ;; we need the full python package and not just the python-wrapper
3625 ;; because we need libpython3.3m.so
3626 (inputs
3627 `(("python" ,python)))
3628 (arguments
3629 `(#:phases
3630 (modify-phases %standard-phases
3631 (add-before 'check 'set-HOME
3632 ;; some tests require access to "$HOME/.cython"
3633 (lambda _ (setenv "HOME" "/tmp")))
3634 (replace 'check
3635 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3636 (home-page "http://cython.org/")
3637 (synopsis "C extensions for Python")
3638 (description "Cython is an optimising static compiler for both the Python
3639 programming language and the extended Cython programming language. It makes
3640 writing C extensions for Python as easy as Python itself.")
3641 (license license:asl2.0)
3642 (properties `((python2-variant . ,(delay python2-cython))))))
3643
3644 (define-public python2-cython
3645 (package (inherit (package-with-python2
3646 (strip-python2-variant python-cython)))
3647 (name "python2-cython")
3648 (inputs
3649 `(("python-2" ,python-2))))) ; this is not automatically changed
3650
3651 ;; The RPython toolchain currently does not support Python 3.
3652 (define-public python2-rpython
3653 (package
3654 (name "python2-rpython")
3655 (version "0.1.4")
3656 (source
3657 (origin
3658 (method url-fetch)
3659 (uri (pypi-uri "rpython" version))
3660 (sha256
3661 (base32
3662 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3663 (build-system python-build-system)
3664 (arguments `(#:python ,python-2))
3665 (native-inputs
3666 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3667 (home-page "https://rpython.readthedocs.org")
3668 (synopsis "Framework for implementing interpreters and virtual machines")
3669 (description "RPython is a translation and support framework for
3670 producing implementations of dynamic languages, emphasizing a clean separation
3671 between language specification and implementation aspects.")
3672 (license license:expat)))
3673
3674 (define-public python-numpy
3675 (package
3676 (name "python-numpy")
3677 (version "1.12.0")
3678 (source
3679 (origin
3680 (method url-fetch)
3681 (uri (string-append
3682 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3683 (file-name (string-append name "-" version ".tar.gz"))
3684 (sha256
3685 (base32
3686 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3687 (build-system python-build-system)
3688 (inputs
3689 `(("openblas" ,openblas)
3690 ("lapack" ,lapack)))
3691 (native-inputs
3692 `(("python-cython" ,python-cython)
3693 ("python-nose" ,python-nose)
3694 ("gfortran" ,gfortran)))
3695 (arguments
3696 `(#:phases
3697 (modify-phases %standard-phases
3698 (add-before 'build 'set-environment-variables
3699 (lambda* (#:key inputs #:allow-other-keys)
3700 (call-with-output-file "site.cfg"
3701 (lambda (port)
3702 (format port
3703 "[openblas]
3704 libraries = openblas
3705 library_dirs = ~a/lib
3706 include_dirs = ~a/include
3707
3708 # backslash-n to make emacs happy
3709 \n[lapack]
3710 lapack_libs = lapack
3711 library_dirs = ~a/lib
3712 include_dirs = ~a/include
3713 "
3714 (assoc-ref inputs "openblas")
3715 (assoc-ref inputs "openblas")
3716 (assoc-ref inputs "lapack")
3717 (assoc-ref inputs "lapack"))))
3718 ;; Use "gcc" executable, not "cc".
3719 (substitute* "numpy/distutils/system_info.py"
3720 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3721 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3722 #t))
3723 ;; Tests can only be run after the library has been installed and not
3724 ;; within the source directory.
3725 (delete 'check)
3726 (add-after 'install 'check
3727 (lambda* (#:key outputs inputs #:allow-other-keys)
3728 ;; Make installed package available for running the tests
3729 (add-installed-pythonpath inputs outputs)
3730 (with-directory-excursion "/tmp"
3731 (zero? (system* "python" "-c"
3732 "import numpy; numpy.test(verbose=2)"))))))))
3733 (home-page "http://www.numpy.org/")
3734 (synopsis "Fundamental package for scientific computing with Python")
3735 (description "NumPy is the fundamental package for scientific computing
3736 with Python. It contains among other things: a powerful N-dimensional array
3737 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3738 and Fortran code, useful linear algebra, Fourier transform, and random number
3739 capabilities.")
3740 (license license:bsd-3)))
3741
3742 (define-public python2-numpy
3743 (package-with-python2 python-numpy))
3744
3745 (define-public python-munch
3746 (package
3747 (name "python-munch")
3748 (version "2.0.4")
3749 (source
3750 (origin
3751 (method url-fetch)
3752 (uri (pypi-uri "munch" version))
3753 (sha256
3754 (base32
3755 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3756 (build-system python-build-system)
3757 (home-page "https://github.com/Infinidat/munch")
3758 (synopsis "Dot-accessible dictionary")
3759 (description "Munch is a dot-accessible dictionary similar to JavaScript
3760 objects.")
3761 (license license:expat)))
3762
3763 (define-public python2-munch
3764 (package-with-python2 python-munch))
3765
3766 (define-public python2-fastlmm
3767 (package
3768 (name "python2-fastlmm")
3769 (version "0.2.21")
3770 (source
3771 (origin
3772 (method url-fetch)
3773 (uri (pypi-uri "fastlmm" version ".zip"))
3774 (sha256
3775 (base32
3776 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3777 (build-system python-build-system)
3778 (arguments
3779 `(#:python ,python-2)) ; only Python 2.7 is supported
3780 (propagated-inputs
3781 `(("python2-numpy" ,python2-numpy)
3782 ("python2-scipy" ,python2-scipy)
3783 ("python2-matplotlib" ,python2-matplotlib)
3784 ("python2-pandas" ,python2-pandas)
3785 ("python2-scikit-learn" ,python2-scikit-learn)
3786 ("python2-pysnptools" ,python2-pysnptools)))
3787 (native-inputs
3788 `(("unzip" ,unzip)
3789 ("python2-cython" ,python2-cython)
3790 ("python2-mock" ,python2-mock)
3791 ("python2-nose" ,python2-nose)))
3792 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3793 (synopsis "Perform genome-wide association studies on large data sets")
3794 (description
3795 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3796 Models, is a program for performing both single-SNP and SNP-set genome-wide
3797 association studies (GWAS) on extremely large data sets.")
3798 (license license:asl2.0)))
3799
3800 (define-public python-numpy-documentation
3801 (package
3802 (name "python-numpy-documentation")
3803 (version (package-version python-numpy))
3804 (source (package-source python-numpy))
3805 (build-system python-build-system)
3806 (native-inputs
3807 `(("python-matplotlib" ,python-matplotlib)
3808 ("python-numpy" ,python-numpy)
3809 ("pkg-config" ,pkg-config)
3810 ("python-sphinx" ,python-sphinx)
3811 ("python-numpydoc" ,python-numpydoc)
3812 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3813 texlive-fonts-ec
3814 texlive-generic-ifxetex
3815 texlive-generic-pdftex
3816 texlive-latex-amsfonts
3817 texlive-latex-capt-of
3818 texlive-latex-cmap
3819 texlive-latex-environ
3820 texlive-latex-eqparbox
3821 texlive-latex-etoolbox
3822 texlive-latex-expdlist
3823 texlive-latex-fancyhdr
3824 texlive-latex-fancyvrb
3825 texlive-latex-fncychap
3826 texlive-latex-float
3827 texlive-latex-framed
3828 texlive-latex-geometry
3829 texlive-latex-graphics
3830 texlive-latex-hyperref
3831 texlive-latex-mdwtools
3832 texlive-latex-multirow
3833 texlive-latex-oberdiek
3834 texlive-latex-parskip
3835 texlive-latex-preview
3836 texlive-latex-tabulary
3837 texlive-latex-threeparttable
3838 texlive-latex-titlesec
3839 texlive-latex-trimspaces
3840 texlive-latex-ucs
3841 texlive-latex-upquote
3842 texlive-latex-url
3843 texlive-latex-varwidth
3844 texlive-latex-wrapfig)))
3845 ("texinfo" ,texinfo)
3846 ("perl" ,perl)
3847 ("scipy-sphinx-theme"
3848 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3849 (method git-fetch)
3850 (uri (git-reference
3851 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3852 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3853 (sha256
3854 (base32
3855 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3856 ,@(package-native-inputs python-numpy)))
3857 (arguments
3858 `(#:tests? #f ; we're only generating the documentation
3859 #:phases
3860 (modify-phases %standard-phases
3861 (delete 'build)
3862 (replace 'install
3863 (lambda* (#:key inputs outputs #:allow-other-keys)
3864 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3865 (doc (string-append
3866 data "/doc/" ,name "-"
3867 ,(package-version python-numpy)))
3868 (info-reader (string-append data "/info"))
3869 (html (string-append doc "/html"))
3870 (scipy-sphinx-theme "scipy-sphinx-theme")
3871 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3872 (pyver ,(string-append "PYVER=")))
3873
3874 ;; FIXME: this is needed to for texlive-union to generate
3875 ;; fonts, which are not found.
3876 (setenv "HOME" "/tmp")
3877
3878 (with-directory-excursion "doc"
3879 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3880 (mkdir-p html)
3881 (system* "make" "html" pyver)
3882 (system* "make" "latex" "PAPER=a4" pyver)
3883 (system* "make" "-C" "build/latex"
3884 "all-pdf" "PAPER=a4" pyver)
3885 ;; FIXME: Generation of the info file fails.
3886 ;; (system* "make" "info" pyver)
3887 ;; (mkdir-p info)
3888 ;; (copy-file "build/texinfo/numpy.info"
3889 ;; (string-append info "/numpy.info"))
3890 (for-each (lambda (file)
3891 (copy-file (string-append "build/latex" file)
3892 (string-append doc file)))
3893 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3894 (with-directory-excursion "build/html"
3895 (for-each (lambda (file)
3896 (let* ((dir (dirname file))
3897 (tgt-dir (string-append html "/" dir)))
3898 (unless (equal? "." dir)
3899 (mkdir-p tgt-dir))
3900 (install-file file html)))
3901 (find-files "." ".*")))))
3902 #t)))))
3903 (home-page (package-home-page python-numpy))
3904 (synopsis "Documentation for the python-numpy package")
3905 (description (package-description python-numpy))
3906 (license (package-license python-numpy))))
3907
3908 (define-public python2-numpy-documentation
3909 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3910 (package
3911 (inherit numpy-documentation)
3912 (native-inputs `(("python2-functools32" ,python2-functools32)
3913 ,@(package-native-inputs numpy-documentation))))))
3914
3915 (define-public python-pygit2
3916 (package
3917 (name "python-pygit2")
3918 (version "0.25.0")
3919 (source
3920 (origin
3921 (method url-fetch)
3922 (uri (pypi-uri "pygit2" version))
3923 (sha256
3924 (base32
3925 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3926 (patches
3927 (search-patches "python-pygit2-disable-network-tests.patch"))))
3928 (build-system python-build-system)
3929 (propagated-inputs
3930 `(("python-six" ,python-six)
3931 ("python-cffi" ,python-cffi)
3932 ("libgit2" ,libgit2)
3933 ("python-tox" ,python-tox)))
3934 (home-page "https://github.com/libgit2/pygit2")
3935 (synopsis "Python bindings for libgit2")
3936 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3937 library, libgit2 implements Git plumbing.")
3938 ;; GPL2.0 only, with linking exception.
3939 (license license:gpl2)))
3940
3941 (define-public python2-pygit2
3942 (package-with-python2 python-pygit2))
3943
3944 (define-public python-pyparsing
3945 (package
3946 (name "python-pyparsing")
3947 (version "2.2.0")
3948 (source
3949 (origin
3950 (method url-fetch)
3951 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3952 "/pyparsing-" version
3953 "/pyparsing-" version ".tar.gz"))
3954 (sha256
3955 (base32
3956 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3957 (build-system python-build-system)
3958 (outputs '("out" "doc"))
3959 (arguments
3960 `(#:tests? #f ; no test target
3961 #:phases
3962 (modify-phases %standard-phases
3963 (add-after 'install 'install-doc
3964 (lambda* (#:key outputs #:allow-other-keys)
3965 (let* ((doc (string-append (assoc-ref outputs "doc")
3966 "/share/doc/" ,name "-" ,version))
3967 (html-doc (string-append doc "/html"))
3968 (examples (string-append doc "/examples")))
3969 (mkdir-p html-doc)
3970 (mkdir-p examples)
3971 (for-each
3972 (lambda (dir tgt)
3973 (map (lambda (file)
3974 (install-file file tgt))
3975 (find-files dir ".*")))
3976 (list "docs" "htmldoc" "examples")
3977 (list doc html-doc examples))
3978 #t))))))
3979 (home-page "http://pyparsing.wikispaces.com")
3980 (synopsis "Python parsing class library")
3981 (description
3982 "The pyparsing module is an alternative approach to creating and
3983 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3984 of regular expressions. The pyparsing module provides a library of classes
3985 that client code uses to construct the grammar directly in Python code.")
3986 (license license:expat)))
3987
3988 (define-public python2-pyparsing
3989 (package-with-python2 python-pyparsing))
3990
3991 (define-public python-numpydoc
3992 (package
3993 (name "python-numpydoc")
3994 (version "0.5")
3995 (source
3996 (origin
3997 (method url-fetch)
3998 (uri (string-append
3999 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
4000 version ".tar.gz"))
4001 (sha256
4002 (base32
4003 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
4004 (modules '((guix build utils)))
4005 (snippet
4006 '(begin
4007 ;; Drop a test requiring matplotlib, which we cannot add as an
4008 ;; input since it would create a circular dependency: Extend the
4009 ;; test for Python 3, where it is already dropped, to Python 2.
4010 (substitute* "numpydoc/tests/test_plot_directive.py"
4011 (("3") "2"))))))
4012 (build-system python-build-system)
4013 (propagated-inputs
4014 `(("python-sphinx" ,python-sphinx)))
4015 (native-inputs
4016 `(("python-nose" ,python-nose)))
4017 (home-page "https://pypi.python.org/pypi/numpydoc")
4018 (synopsis
4019 "Numpy's Sphinx extensions")
4020 (description
4021 "Sphinx extension to support docstrings in Numpy format.")
4022 (license license:bsd-2)))
4023
4024 (define-public python2-numpydoc
4025 (package-with-python2 python-numpydoc))
4026
4027 (define-public python-numexpr
4028 (package
4029 (name "python-numexpr")
4030 (version "2.6.1")
4031 (source
4032 (origin
4033 (method url-fetch)
4034 (uri (pypi-uri "numexpr" version))
4035 (sha256
4036 (base32
4037 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
4038 (build-system python-build-system)
4039 (arguments `(#:tests? #f)) ; no tests included
4040 (propagated-inputs
4041 `(("python-numpy" ,python-numpy)))
4042 (home-page "https://github.com/pydata/numexpr")
4043 (synopsis "Fast numerical expression evaluator for NumPy")
4044 (description
4045 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4046 expressions that operate on arrays are accelerated and use less memory than
4047 doing the same calculation in Python. In addition, its multi-threaded
4048 capabilities can make use of all your cores, which may accelerate
4049 computations, most specially if they are not memory-bounded (e.g. those using
4050 transcendental functions).")
4051 (license license:expat)))
4052
4053 (define-public python2-numexpr
4054 (package-with-python2 python-numexpr))
4055
4056 (define-public python-cycler
4057 (package
4058 (name "python-cycler")
4059 (version "0.10.0")
4060 (source (origin
4061 (method url-fetch)
4062 (uri (pypi-uri "cycler" version))
4063 (sha256
4064 (base32
4065 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4066 (build-system python-build-system)
4067 (arguments
4068 ;; XXX: The current version requires 'coveralls' which we don't have.
4069 ;; Enable this for the next release which uses 'python-pytest'.
4070 '(#:tests? #f))
4071 (propagated-inputs
4072 `(("python-six" ,python-six)))
4073 (home-page "http://matplotlib.org/cycler/")
4074 (synopsis "Composable keyword argument iterator")
4075 (description
4076 "When using @code{matplotlib} and plotting more than one line, it is
4077 common to want to be able to want to be able to cycle over one or more artist
4078 styles; but the plotting logic can quickly become involved.
4079 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4080 @code{Cycler} class was developed.")
4081 (license license:bsd-3)))
4082
4083 (define-public python2-cycler
4084 (package-with-python2 python-cycler))
4085
4086 (define-public python-colorspacious
4087 (package
4088 (name "python-colorspacious")
4089 (version "1.1.0")
4090 (source
4091 (origin
4092 (method url-fetch)
4093 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
4094 version ".tar.gz"))
4095 (file-name (string-append name "-" version))
4096 (sha256
4097 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
4098 (build-system python-build-system)
4099 (propagated-inputs
4100 `(("python-numpy" ,python-numpy)))
4101 (native-inputs
4102 `(("python-nose" ,python-nose)))
4103 (arguments
4104 `(#:phases
4105 (modify-phases %standard-phases
4106 (replace 'check
4107 (lambda _
4108 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
4109 (home-page "https://github.com/njsmith/colorspacious")
4110 (synopsis "Python library for colorspace conversions")
4111 (description "@code{colorspacious} is a Python library that lets you
4112 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4113 (license license:expat)))
4114
4115 (define-public python2-colorspacious
4116 (package-with-python2 python-colorspacious))
4117
4118 (define-public python-matplotlib
4119 (package
4120 (name "python-matplotlib")
4121 (version "2.0.2")
4122 (source
4123 (origin
4124 (method url-fetch)
4125 (uri (pypi-uri "matplotlib" version))
4126 (sha256
4127 (base32
4128 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
4129 (build-system python-build-system)
4130 (propagated-inputs ; the following packages are all needed at run time
4131 `(("python-cycler" ,python-cycler)
4132 ("python-pyparsing" ,python-pyparsing)
4133 ("python-pygobject" ,python-pygobject)
4134 ("gobject-introspection" ,gobject-introspection)
4135 ("python-tkinter" ,python "tk")
4136 ("python-dateutil" ,python-dateutil)
4137 ("python-numpy" ,python-numpy)
4138 ("python-pillow" ,python-pillow)
4139 ("python-pytz" ,python-pytz)
4140 ("python-six" ,python-six)
4141 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4142 ;; from 'gtk+') provides the required 'typelib' files used by
4143 ;; 'gobject-introspection'. The location of these files is set with the
4144 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4145 ;; is done automatically by a 'native-search-path' procedure. However,
4146 ;; at run-time the user must set this variable as follows:
4147 ;;
4148 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
4149 ("gtk+" ,gtk+)
4150 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4151 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4152 ;; object. For this reason we need to import both libraries.
4153 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4154 ("python-pycairo" ,python-pycairo)
4155 ("python-cairocffi" ,python-cairocffi)))
4156 (inputs
4157 `(("libpng" ,libpng)
4158 ("imagemagick" ,imagemagick)
4159 ("freetype" ,freetype)
4160 ("cairo" ,cairo)
4161 ("glib" ,glib)
4162 ;; FIXME: Add backends when available.
4163 ;("python-wxpython" ,python-wxpython)
4164 ("python-pyqt" ,python-pyqt)
4165 ("tcl" ,tcl)
4166 ("tk" ,tk)))
4167 (native-inputs
4168 `(("pkg-config" ,pkg-config)
4169 ("python-nose" ,python-nose)
4170 ("python-mock" ,python-mock)))
4171 (arguments
4172 `(#:phases
4173 (modify-phases %standard-phases
4174 (add-before 'build 'configure-environment
4175 (lambda* (#:key outputs inputs #:allow-other-keys)
4176 (let ((cairo (assoc-ref inputs "cairo"))
4177 (gtk+ (assoc-ref inputs "gtk+")))
4178 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4179 ;; has not effect.
4180 (setenv "LD_LIBRARY_PATH"
4181 (string-append cairo "/lib:" gtk+ "/lib"))
4182 (setenv "HOME" (getcwd))
4183 (call-with-output-file "setup.cfg"
4184 (lambda (port)
4185 (format port "[directories]~%
4186 basedirlist = ~a,~a~%
4187 [rc_options]~%
4188 backend = TkAgg~%"
4189 (assoc-ref inputs "tcl")
4190 (assoc-ref inputs "tk")))))
4191 #t)))))
4192 (home-page "http://matplotlib.org")
4193 (synopsis "2D plotting library for Python")
4194 (description
4195 "Matplotlib is a Python 2D plotting library which produces publication
4196 quality figures in a variety of hardcopy formats and interactive environments
4197 across platforms. Matplotlib can be used in Python scripts, the python and
4198 ipython shell, web application servers, and six graphical user interface
4199 toolkits.")
4200 (license license:psfl)
4201 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4202
4203 (define-public python2-matplotlib
4204 (let ((matplotlib (package-with-python2
4205 (strip-python2-variant python-matplotlib))))
4206 (package (inherit matplotlib)
4207 ;; Make sure to use special packages for Python 2 instead
4208 ;; of those automatically rewritten by package-with-python2.
4209 (propagated-inputs
4210 `(("python2-pycairo" ,python2-pycairo)
4211 ("python2-functools32" ,python2-functools32)
4212 ("python2-pygobject-2" ,python2-pygobject-2)
4213 ("python2-subprocess32" ,python2-subprocess32)
4214 ("python2-tkinter" ,python-2 "tk")
4215 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4216 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4217
4218 (define-public python-matplotlib-documentation
4219 (package
4220 (name "python-matplotlib-documentation")
4221 (version (package-version python-matplotlib))
4222 (source (package-source python-matplotlib))
4223 (build-system python-build-system)
4224 (native-inputs
4225 `(("python-matplotlib" ,python-matplotlib)
4226 ("python-colorspacious" ,python-colorspacious)
4227 ("python-sphinx" ,python-sphinx)
4228 ("python-numpydoc" ,python-numpydoc)
4229 ("python-ipython" ,python-ipython)
4230 ("python-mock" ,python-mock)
4231 ("graphviz" ,graphviz)
4232 ("texlive" ,texlive)
4233 ("texinfo" ,texinfo)
4234 ,@(package-native-inputs python-matplotlib)))
4235 (arguments
4236 `(#:tests? #f ; we're only generating documentation
4237 #:phases
4238 (modify-phases %standard-phases
4239 (replace 'build
4240 (lambda _
4241 (chdir "doc")
4242 ;; Produce pdf in 'A4' format.
4243 (substitute* "conf.py"
4244 (("latex_paper_size = 'letter'") "")
4245 ;; latex_paper_size is deprecated -> set paper size using
4246 ;; latex_elements
4247 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4248 ;; insert at a point where latex_elements{} is defined:
4249 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4250 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4251 (replace 'install
4252 (lambda* (#:key inputs outputs #:allow-other-keys)
4253 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4254 (doc (string-append data "/doc/python-matplotlib-" ,version))
4255 (info (string-append data "/info"))
4256 (html (string-append doc "/html")))
4257 (mkdir-p html)
4258 (mkdir-p info)
4259 (copy-recursively "build/html" html)
4260 (symlink (string-append html "/_images")
4261 (string-append info "/matplotlib-figures"))
4262 (with-directory-excursion "build/texinfo"
4263 (substitute* "matplotlib.texi"
4264 (("@image\\{([^,]*)" all file)
4265 (string-append "@image{matplotlib-figures/" file)))
4266 (symlink (string-append html "/_images")
4267 "./matplotlib-figures")
4268 (system* "makeinfo" "--no-split"
4269 "-o" "matplotlib.info" "matplotlib.texi"))
4270 (copy-file "build/texinfo/matplotlib.info"
4271 (string-append info "/matplotlib.info"))
4272 (copy-file "build/latex/Matplotlib.pdf"
4273 (string-append doc "/Matplotlib.pdf")))
4274 #t)))))
4275 (home-page (package-home-page python-matplotlib))
4276 (synopsis "Documentation for the python-matplotlib package")
4277 (description (package-description python-matplotlib))
4278 (license (package-license python-matplotlib))))
4279
4280 (define-public python2-matplotlib-documentation
4281 (package-with-python2 python-matplotlib-documentation))
4282
4283 (define-public python2-pysnptools
4284 (package
4285 (name "python2-pysnptools")
4286 (version "0.3.9")
4287 (source
4288 (origin
4289 (method url-fetch)
4290 (uri (pypi-uri "pysnptools" version ".zip"))
4291 (sha256
4292 (base32
4293 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4294 (build-system python-build-system)
4295 (arguments
4296 `(#:python ,python-2)) ; only Python 2.7 is supported
4297 (propagated-inputs
4298 `(("python2-numpy" ,python2-numpy)
4299 ("python2-scipy" ,python2-scipy)
4300 ("python2-pandas" ,python2-pandas)))
4301 (native-inputs
4302 `(("python2-cython" ,python2-cython)))
4303 (native-inputs
4304 `(("unzip" ,unzip)))
4305 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4306 (synopsis "Library for reading and manipulating genetic data")
4307 (description
4308 "PySnpTools is a library for reading and manipulating genetic data. It
4309 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4310 those files. It can also efficiently manipulate ranges of integers using set
4311 operators such as union, intersection, and difference.")
4312 (license license:asl2.0)))
4313
4314 (define-public python-rpy2
4315 (package
4316 (name "python-rpy2")
4317 (version "2.7.6")
4318 (source
4319 (origin
4320 (method url-fetch)
4321 (uri (pypi-uri "rpy2" version))
4322 (sha256
4323 (base32
4324 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4325 (build-system python-build-system)
4326 (arguments
4327 '(#:phases
4328 (modify-phases %standard-phases
4329 (delete 'check)
4330 (add-after 'install 'check
4331 (lambda* (#:key outputs inputs #:allow-other-keys)
4332 ;; It's easier to run tests after install.
4333 ;; Make installed package available for running the tests
4334 (add-installed-pythonpath inputs outputs)
4335 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4336 (propagated-inputs
4337 `(("python-six" ,python-six)))
4338 (inputs
4339 `(("readline" ,readline)
4340 ("icu4c" ,icu4c)
4341 ("pcre" ,pcre)
4342 ("r-minimal" ,r-minimal)
4343 ("r-survival" ,r-survival)))
4344 (native-inputs
4345 `(("zlib" ,zlib)))
4346 (home-page "http://rpy.sourceforge.net/")
4347 (synopsis "Python interface to the R language")
4348 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4349 low-level interface to R from Python, a proposed high-level interface,
4350 including wrappers to graphical libraries, as well as R-like structures and
4351 functions.")
4352 (license license:gpl3+)))
4353
4354 (define-public python2-rpy2
4355 (let ((rpy2 (package-with-python2 python-rpy2)))
4356 (package (inherit rpy2)
4357 (propagated-inputs
4358 `(("python2-singledispatch" ,python2-singledispatch)
4359 ,@(package-propagated-inputs rpy2))))))
4360
4361 (define-public python-scipy
4362 (package
4363 (name "python-scipy")
4364 (version "0.19.1")
4365 (source
4366 (origin
4367 (method url-fetch)
4368 (uri (pypi-uri "scipy" version))
4369 (sha256
4370 (base32
4371 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
4372 (build-system python-build-system)
4373 (propagated-inputs
4374 `(("python-numpy" ,python-numpy)
4375 ("python-matplotlib" ,python-matplotlib)
4376 ("python-pyparsing" ,python-pyparsing)))
4377 (inputs
4378 `(("lapack" ,lapack)
4379 ("openblas" ,openblas)))
4380 (native-inputs
4381 `(("python-cython" ,python-cython)
4382 ("python-nose" ,python-nose)
4383 ("python-sphinx" ,python-sphinx)
4384 ("python-numpydoc" ,python-numpydoc)
4385 ("gfortran" ,gfortran)
4386 ("perl" ,perl)))
4387 (outputs '("out" "doc"))
4388 (arguments
4389 `(#:phases
4390 (modify-phases %standard-phases
4391 (add-before 'build 'configure-openblas
4392 (lambda* (#:key inputs #:allow-other-keys)
4393 (call-with-output-file "site.cfg"
4394 (lambda (port)
4395 (format port
4396 "[blas]
4397 libraries = openblas
4398 library_dirs = ~a/lib
4399 include_dirs = ~a/include
4400
4401 # backslash-n to make emacs happy
4402 \n[atlas]
4403 library_dirs = ~a/lib
4404 atlas_libs = openblas
4405 "
4406 (assoc-ref inputs "openblas")
4407 (assoc-ref inputs "openblas")
4408 (assoc-ref inputs "openblas"))))
4409 #t))
4410 (add-after 'install 'install-doc
4411 (lambda* (#:key inputs outputs #:allow-other-keys)
4412 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4413 (doc (string-append data "/doc/" ,name "-" ,version))
4414 (html (string-append doc "/html"))
4415 (pyver ,(string-append "PYVER=")))
4416 ;; Make installed package available for building the
4417 ;; documentation
4418 (add-installed-pythonpath inputs outputs)
4419 (with-directory-excursion "doc"
4420 ;; Fix generation of images for mathematical expressions.
4421 (substitute* (find-files "source" "conf\\.py")
4422 (("pngmath_use_preview = True")
4423 "pngmath_use_preview = False"))
4424 (mkdir-p html)
4425 (system* "make" "html" pyver)
4426 (with-directory-excursion "build/html"
4427 (for-each (lambda (file)
4428 (let* ((dir (dirname file))
4429 (tgt-dir (string-append html "/" dir)))
4430 (install-file file html)))
4431 (find-files "." ".*")))))
4432 #t))
4433 (add-after 'unpack 'fix-tests
4434 (lambda _
4435 (substitute* "scipy/integrate/tests/test_quadpack.py"
4436 (("libm.so") "libm.so.6"))
4437 #t))
4438 ;; Tests can only be run after the library has been installed and not
4439 ;; within the source directory.
4440 (delete 'check)
4441 (add-after 'install 'check
4442 (lambda* (#:key inputs outputs #:allow-other-keys)
4443 (add-installed-pythonpath inputs outputs)
4444 (with-directory-excursion "/tmp"
4445 (zero? (system* "python" "-c"
4446 "import scipy; scipy.test('full')")))
4447 #t)))))
4448 (home-page "http://www.scipy.org/")
4449 (synopsis "The Scipy library provides efficient numerical routines")
4450 (description "The SciPy library is one of the core packages that make up
4451 the SciPy stack. It provides many user-friendly and efficient numerical
4452 routines such as routines for numerical integration and optimization.")
4453 (properties `((python2-variant . ,(delay python2-scipy))))
4454 (license license:bsd-3)))
4455
4456 (define-public python2-scipy
4457 (package-with-python2
4458 (strip-python2-variant python-scipy)))
4459
4460 (define-public python-sockjs-tornado
4461 (package
4462 (name "python-sockjs-tornado")
4463 (version "1.0.3")
4464 (source
4465 (origin
4466 (method url-fetch)
4467 (uri (pypi-uri "sockjs-tornado" version))
4468 (sha256
4469 (base32
4470 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4471 (build-system python-build-system)
4472 (arguments
4473 `(;; There are no tests, and running the test phase requires missing
4474 ;; dependencies
4475 #:tests? #f))
4476 (propagated-inputs
4477 `(("python-tornado" ,python-tornado)))
4478 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4479 (synopsis
4480 "SockJS python server implementation on top of Tornado framework")
4481 (description
4482 "SockJS-tornado provides the server side counterpart to a SockJS client
4483 library, through the Tornado framework.
4484
4485 SockJS provides a low latency, full duplex, cross-domain communication channel
4486 between a web browser and web server.")
4487 (license license:expat)))
4488
4489 (define-public python2-sockjs-tornado
4490 (package-with-python2 python-sockjs-tornado))
4491
4492 (define-public python-socksipy-branch
4493 (package
4494 (name "python-socksipy-branch")
4495 (version "1.01")
4496 (source
4497 (origin
4498 (method url-fetch)
4499 (uri (pypi-uri "SocksiPy-branch" version))
4500 (sha256
4501 (base32
4502 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4503 (build-system python-build-system)
4504 (arguments
4505 `(#:tests? #f)) ; There are no tests
4506 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4507 (synopsis "Python SOCKS module")
4508 (description
4509 "SocksiPy - A Python SOCKS client module. It provides a
4510 socket-like interface that supports connections to any TCP
4511 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4512 The original version was developed by Dan Haim, this is a
4513 branch created by Mario Vilas to address some open issues,
4514 as the original project seems to have been abandoned circa 2007.")
4515 (license license:bsd-3)))
4516
4517 (define-public python2-socksipy-branch
4518 (package-with-python2 python-socksipy-branch))
4519
4520 (define-public python-sqlalchemy
4521 (package
4522 (name "python-sqlalchemy")
4523 (version "1.0.12")
4524 (source
4525 (origin
4526 (method url-fetch)
4527 (uri (string-append "https://pypi.python.org/packages/source/S/"
4528 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4529 (sha256
4530 (base32
4531 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4532 (build-system python-build-system)
4533 (native-inputs
4534 `(("python-cython" ,python-cython) ;for c extensions
4535 ("python-pytest" ,python-pytest)
4536 ("python-mock" ,python-mock))) ;for tests
4537 (arguments
4538 `(#:phases (alist-replace
4539 'check
4540 (lambda _ (zero? (system* "py.test")))
4541 %standard-phases)))
4542 (home-page "http://www.sqlalchemy.org")
4543 (synopsis "Database abstraction library")
4544 (description
4545 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4546 gives application developers the full power and flexibility of SQL. It
4547 provides a full suite of well known enterprise-level persistence patterns,
4548 designed for efficient and high-performing database access, adapted into a
4549 simple and Pythonic domain language.")
4550 (license license:x11)))
4551
4552 (define-public python2-sqlalchemy
4553 (package-with-python2 python-sqlalchemy))
4554
4555 (define-public python-pycodestyle
4556 (package
4557 (name "python-pycodestyle")
4558 (version "2.3.1")
4559 (source
4560 (origin
4561 (method url-fetch)
4562 (uri (pypi-uri "pycodestyle" version))
4563 (sha256
4564 (base32
4565 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4566 (build-system python-build-system)
4567 (home-page "https://pycodestyle.readthedocs.io/")
4568 (synopsis "Python style guide checker")
4569 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4570 Python code against some of the style conventions in
4571 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4572 (license license:expat)))
4573
4574 (define-public python2-pycodestyle
4575 (package-with-python2 python-pycodestyle))
4576
4577 (define-public python-orderedmultidict
4578 (package
4579 (name "python-orderedmultidict")
4580 (version "0.7.11")
4581 (source
4582 (origin
4583 (method url-fetch)
4584 (uri (pypi-uri "orderedmultidict" version))
4585 (sha256
4586 (base32
4587 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4588 (build-system python-build-system)
4589 (arguments
4590 `(#:phases
4591 (modify-phases %standard-phases
4592 (add-after 'unpack 'fix-tests
4593 (lambda _
4594 ;; The package uses nosetest for running the tests.
4595 ;; Adding this initfile allows to run the test suite
4596 ;; without requiring nosetest.
4597 (zero? (system* "touch" "tests/__init__.py")))))))
4598 (propagated-inputs
4599 `(("python-six" ,python-six)))
4600 (native-inputs
4601 `(("python-pycodestyle" ,python-pycodestyle)))
4602 (home-page "https://github.com/gruns/orderedmultidict")
4603 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4604 (description "This package contains a library for ordered multivalue
4605 dictionaries. A multivalue dictionary is a dictionary that can store
4606 multiple values for the same key. An ordered multivalue dictionary is a
4607 multivalue dictionary that retains the order of insertions and deletions.")
4608 (license license:unlicense)))
4609
4610 (define-public python2-orderedmultidict
4611 (package-with-python2 python-orderedmultidict))
4612
4613 (define-public python-furl
4614 (package
4615 (name "python-furl")
4616 (version "0.5.6")
4617 (source
4618 (origin
4619 (method url-fetch)
4620 (uri (pypi-uri "furl" version))
4621 (sha256
4622 (base32
4623 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4624 (build-system python-build-system)
4625 (propagated-inputs
4626 `(("python-six" ,python-six)
4627 ("python-orderedmultidict" ,python-orderedmultidict)))
4628 (native-inputs
4629 `(("python-pycodestyle" ,python-pycodestyle)))
4630 (home-page "https://github.com/gruns/furl")
4631 (synopsis "URL manipulation in Python")
4632 (description "Furl provides an easy-to-use alternative to the
4633 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4634 (license license:unlicense)))
4635
4636 (define-public python2-furl
4637 (package-with-python2 python-furl))
4638
4639 (define-public python-flaky
4640 (package
4641 (name "python-flaky")
4642 (version "3.4.0")
4643 (source (origin
4644 (method url-fetch)
4645 (uri (pypi-uri "flaky" version))
4646 (sha256
4647 (base32
4648 "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
4649 (build-system python-build-system)
4650 (arguments
4651 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
4652 '(#:tests? #f))
4653 (home-page "https://github.com/box/flaky")
4654 (synopsis "Automatically rerun flaky tests")
4655 (description
4656 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
4657 reruns flaky tests.
4658
4659 Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
4660 on components that aren't 100% reliable. With flaky, instead of removing
4661 those tests or marking them to @code{@@skip}, they can be automatically
4662 retried.")
4663 (license license:asl2.0)))
4664
4665 (define-public python2-flaky
4666 (package-with-python2 python-flaky))
4667
4668 (define-public python-flask-babel
4669 (package
4670 (name "python-flask-babel")
4671 (version "0.11.1")
4672 (source
4673 (origin
4674 (method url-fetch)
4675 (uri (pypi-uri "Flask-Babel" version))
4676 (sha256
4677 (base32
4678 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4679 (build-system python-build-system)
4680 (propagated-inputs
4681 `(("python-flask" ,python-flask)
4682 ("python-babel" ,python-babel)
4683 ("python-jinja2" ,python-jinja2)
4684 ("python-pytz" ,python-pytz)))
4685 (home-page "https://github.com/python-babel/flask-babel")
4686 (synopsis "Add i18n/l10n support to Flask applications")
4687 (description "This package implements internationalization and localization
4688 support for Flask. This is based on the Python babel module as well as pytz -
4689 both of which are installed automatically if you install this library.")
4690 (license license:bsd-3)))
4691
4692 (define-public python2-flask-babel
4693 (package-with-python2 python-flask-babel))
4694
4695 (define-public python-sqlalchemy-utils
4696 (package
4697 (name "python-sqlalchemy-utils")
4698 (version "0.32.13")
4699 (source
4700 (origin
4701 (method url-fetch)
4702 (uri (pypi-uri "SQLAlchemy-Utils" version))
4703 (sha256
4704 (base32
4705 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4706 (build-system python-build-system)
4707 (arguments
4708 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4709 ;; #:phases
4710 ;; (modify-phases %standard-phases
4711 ;; (replace 'check
4712 ;; (lambda _
4713 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4714 (propagated-inputs
4715 `(("python-six" ,python-six)
4716 ("python-sqlalchemy" ,python-sqlalchemy)))
4717 (native-inputs
4718 `(("python-dateutil" ,python-dateutil)
4719 ("python-flexmock" ,python-flexmock)
4720 ("python-psycopg2" ,python-psycopg2)
4721 ("python-pytest" ,python-pytest)
4722 ("python-pytz" ,python-pytz)))
4723 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4724 (synopsis "Various utility functions for SQLAlchemy")
4725 (description
4726 "SQLAlchemy-utils provides various utility functions and custom data types
4727 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4728
4729 You might also want to install the following optional dependencies:
4730 @enumerate
4731 @item @code{python-passlib}
4732 @item @code{python-babel}
4733 @item @code{python-cryptography}
4734 @item @code{python-pytz}
4735 @item @code{python-psycopg2}
4736 @item @code{python-furl}
4737 @item @code{python-flask-babel}
4738 @end enumerate
4739 ")
4740 (license license:bsd-3)))
4741
4742 (define-public python2-sqlalchemy-utils
4743 (package-with-python2 python-sqlalchemy-utils))
4744
4745 (define-public python-alembic
4746 (package
4747 (name "python-alembic")
4748 (version "0.8.10")
4749 (source
4750 (origin
4751 (method url-fetch)
4752 (uri (pypi-uri "alembic" version))
4753 (sha256
4754 (base32
4755 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4756 (build-system python-build-system)
4757 (native-inputs
4758 `(("python-mock" ,python-mock)
4759 ("python-pytest-cov" ,python-pytest-cov)))
4760 (propagated-inputs
4761 `(("python-sqlalchemy" ,python-sqlalchemy)
4762 ("python-mako" ,python-mako)
4763 ("python-editor" ,python-editor)))
4764 (home-page "http://bitbucket.org/zzzeek/alembic")
4765 (synopsis
4766 "Database migration tool for SQLAlchemy")
4767 (description
4768 "Alembic is a lightweight database migration tool for usage with the
4769 SQLAlchemy Database Toolkit for Python.")
4770 (license license:expat)))
4771
4772 (define-public python2-alembic
4773 (package-with-python2 python-alembic))
4774
4775 (define-public python-autopep8
4776 (package
4777 (name "python-autopep8")
4778 (version "1.2.4")
4779 (source
4780 (origin
4781 (method url-fetch)
4782 (uri (pypi-uri "autopep8" version))
4783 (sha256
4784 (base32
4785 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4786 (build-system python-build-system)
4787 (propagated-inputs
4788 `(("python-pep8" ,python-pep8)))
4789 (home-page "https://github.com/hhatto/autopep8")
4790 (synopsis "Format Python code according to the PEP 8 style guide")
4791 (description
4792 "@code{autopep8} automatically formats Python code to conform to
4793 the PEP 8 style guide. It uses the pycodestyle utility to determine
4794 what parts of the code needs to be formatted. @code{autopep8} is
4795 capable of fixing most of the formatting issues that can be reported
4796 by pycodestyle.")
4797 (license (license:non-copyleft
4798 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4799
4800 (define-public python2-autopep8
4801 (package-with-python2 python-autopep8))
4802
4803 (define-public python-distutils-extra
4804 (package
4805 (name "python-distutils-extra")
4806 (version "2.38")
4807 (source
4808 (origin
4809 (method url-fetch)
4810 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4811 version "/+download/python-distutils-extra-"
4812 version ".tar.gz"))
4813 (sha256
4814 (base32
4815 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4816 (build-system python-build-system)
4817 (home-page "https://launchpad.net/python-distutils-extra/")
4818 (synopsis "Enhancements to Python's distutils")
4819 (description
4820 "The python-distutils-extra module enables you to easily integrate
4821 gettext support, themed icons, and scrollkeeper-based documentation into
4822 Python's distutils.")
4823 (license license:gpl2)))
4824
4825 (define-public python2-distutils-extra
4826 (package-with-python2 python-distutils-extra))
4827
4828 (define-public python2-elib.intl
4829 (package
4830 (name "python2-elib.intl")
4831 (version "0.0.3")
4832 (source
4833 (origin
4834 ;; This project doesn't tag releases or publish tarballs, so we take
4835 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4836 (method git-fetch)
4837 (uri (git-reference
4838 (url "https://github.com/dieterv/elib.intl.git")
4839 (commit "d09997cfef")))
4840 (sha256
4841 (base32
4842 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4843 (build-system python-build-system)
4844 (arguments
4845 ;; incompatible with Python 3 (exception syntax)
4846 `(#:python ,python-2
4847 #:tests? #f))
4848 (home-page "https://github.com/dieterv/elib.intl")
4849 (synopsis "Enhanced internationalization for Python")
4850 (description
4851 "The elib.intl module provides enhanced internationalization (I18N)
4852 services for your Python modules and applications.")
4853 (license license:lgpl3+)))
4854
4855 (define-public python-pillow
4856 (package
4857 (name "python-pillow")
4858 (version "3.3.3")
4859 (source
4860 (origin
4861 (method url-fetch)
4862 (uri (pypi-uri "Pillow" version))
4863 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4864 (sha256
4865 (base32
4866 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4867 (build-system python-build-system)
4868 (native-inputs
4869 `(("python-nose" ,python-nose)))
4870 (inputs
4871 `(("freetype" ,freetype)
4872 ("lcms" ,lcms)
4873 ("zlib" ,zlib)
4874 ("libjpeg" ,libjpeg)
4875 ("openjpeg" ,openjpeg)
4876 ("libtiff" ,libtiff)
4877 ("libwebp" ,libwebp)))
4878 (arguments
4879 `(#:phases (modify-phases %standard-phases
4880 (add-after
4881 'install 'check-installed
4882 (lambda* (#:key outputs inputs #:allow-other-keys)
4883 (begin
4884 (setenv "HOME" (getcwd))
4885 ;; Make installed package available for running the
4886 ;; tests
4887 (add-installed-pythonpath inputs outputs)
4888 (and (zero? (system* "python" "selftest.py"
4889 "--installed"))
4890 (zero? (system* "python" "test-installed.py"))))))
4891 (delete 'check))))
4892 (home-page "https://pypi.python.org/pypi/Pillow")
4893 (synopsis "Fork of the Python Imaging Library")
4894 (description
4895 "The Python Imaging Library adds image processing capabilities to your
4896 Python interpreter. This library provides extensive file format support, an
4897 efficient internal representation, and fairly powerful image processing
4898 capabilities. The core image library is designed for fast access to data
4899 stored in a few basic pixel formats. It should provide a solid foundation for
4900 a general image processing tool.")
4901 (license (license:x11-style
4902 "http://www.pythonware.com/products/pil/license.htm"
4903 "The PIL Software License"))))
4904
4905 (define-public python2-pillow
4906 (package-with-python2 python-pillow))
4907
4908 (define-public python-pycparser
4909 (package
4910 (name "python-pycparser")
4911 (version "2.17")
4912 (source
4913 (origin
4914 (method url-fetch)
4915 (uri (pypi-uri "pycparser" version))
4916 (sha256
4917 (base32
4918 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4919 (outputs '("out" "doc"))
4920 (build-system python-build-system)
4921 (native-inputs
4922 `(("pkg-config" ,pkg-config)))
4923 (arguments
4924 `(#:phases
4925 (modify-phases %standard-phases
4926 (replace 'check
4927 (lambda _
4928 (with-directory-excursion "tests"
4929 (zero? (system* "python" "all_tests.py")))))
4930 (add-after 'install 'install-doc
4931 (lambda* (#:key outputs #:allow-other-keys)
4932 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4933 (doc (string-append data "/doc/" ,name "-" ,version))
4934 (examples (string-append doc "/examples")))
4935 (mkdir-p examples)
4936 (for-each (lambda (file)
4937 (copy-file (string-append "." file)
4938 (string-append doc file)))
4939 '("/README.rst" "/CHANGES" "/LICENSE"))
4940 (copy-recursively "examples" examples)))))))
4941 (home-page "https://github.com/eliben/pycparser")
4942 (synopsis "C parser in Python")
4943 (description
4944 "Pycparser is a complete parser of the C language, written in pure Python
4945 using the PLY parsing library. It parses C code into an AST and can serve as
4946 a front-end for C compilers or analysis tools.")
4947 (license license:bsd-3)))
4948
4949 (define-public python2-pycparser
4950 (package-with-python2 python-pycparser))
4951
4952 (define-public python-cffi
4953 (package
4954 (name "python-cffi")
4955 (version "1.10.0")
4956 (source
4957 (origin
4958 (method url-fetch)
4959 (uri (pypi-uri "cffi" version))
4960 (sha256
4961 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
4962 (build-system python-build-system)
4963 (outputs '("out" "doc"))
4964 (inputs
4965 `(("libffi" ,libffi)))
4966 (propagated-inputs ; required at run-time
4967 `(("python-pycparser" ,python-pycparser)))
4968 (native-inputs
4969 `(("pkg-config" ,pkg-config)
4970 ("python-sphinx" ,python-sphinx)
4971 ("python-pytest" ,python-pytest)))
4972 (arguments
4973 `(#:modules ((ice-9 ftw)
4974 (srfi srfi-26)
4975 (guix build utils)
4976 (guix build python-build-system))
4977 #:phases
4978 (modify-phases %standard-phases
4979 (replace 'check
4980 (lambda _
4981 (setenv "PYTHONPATH"
4982 (string-append
4983 (getenv "PYTHONPATH")
4984 ":" (getcwd) "/build/"
4985 (car (scandir "build" (cut string-prefix? "lib." <>)))))
4986
4987 ;; XXX The "normal" approach of setting CC and friends does
4988 ;; not work here. Is this the correct way of doing things?
4989 (substitute* "testing/embedding/test_basic.py"
4990 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4991 (string-append "c = distutils.ccompiler.new_compiler();"
4992 "c.set_executables(compiler='gcc',"
4993 "compiler_so='gcc',linker_exe='gcc',"
4994 "linker_so='gcc -shared')")))
4995 (substitute* "testing/cffi0/test_ownlib.py"
4996 (("'cc testownlib") "'gcc testownlib"))
4997 (zero? (system* "py.test" "-v" "c/" "testing/"))))
4998 (add-after 'install 'install-doc
4999 (lambda* (#:key outputs #:allow-other-keys)
5000 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5001 (doc (string-append data "/doc/" ,name "-" ,version))
5002 (html (string-append doc "/html")))
5003 (with-directory-excursion "doc"
5004 (system* "make" "html")
5005 (mkdir-p html)
5006 (copy-recursively "build/html" html))
5007 (copy-file "LICENSE" (string-append doc "/LICENSE"))
5008 #t))))))
5009 (home-page "http://cffi.readthedocs.org")
5010 (synopsis "Foreign function interface for Python")
5011 (description
5012 "Foreign Function Interface for Python calling C code.")
5013 (license license:expat)))
5014
5015 (define-public python2-cffi
5016 (package-with-python2 python-cffi))
5017
5018 (define-public python-xcffib
5019 (package
5020 (name "python-xcffib")
5021 (version "0.5.1")
5022 (source
5023 (origin
5024 (method url-fetch)
5025 (uri (pypi-uri "xcffib" version))
5026 (sha256
5027 (base32
5028 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
5029 (build-system python-build-system)
5030 (inputs
5031 `(("libxcb" ,libxcb)))
5032 (propagated-inputs
5033 `(("python-cffi" ,python-cffi) ; used at run time
5034 ("python-six" ,python-six)))
5035 (arguments
5036 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5037 #:tests? #f
5038 #:phases
5039 (modify-phases %standard-phases
5040 (add-after 'unpack 'fix-libxcb-path
5041 (lambda* (#:key inputs #:allow-other-keys)
5042 (let ((libxcb (assoc-ref inputs "libxcb")))
5043 (substitute* '("xcffib/__init__.py")
5044 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5045 #t)))
5046 (add-after 'install 'install-doc
5047 (lambda* (#:key outputs #:allow-other-keys)
5048 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5049 "/doc/" ,name "-" ,version)))
5050 (mkdir-p doc)
5051 (copy-file "README.md"
5052 (string-append doc "/README.md"))
5053 #t))))))
5054 (home-page "https://github.com/tych0/xcffib")
5055 (synopsis "XCB Python bindings")
5056 (description
5057 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5058 support for Python 3 and PyPy. It is based on cffi.")
5059 (license license:expat)))
5060
5061 (define-public python2-xcffib
5062 (package-with-python2 python-xcffib))
5063
5064 (define-public python-cairocffi
5065 (package
5066 (name "python-cairocffi")
5067 (version "0.8.0")
5068 (source
5069 (origin
5070 (method url-fetch)
5071 ;; The archive on pypi is missing the 'utils' directory!
5072 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
5073 version ".tar.gz"))
5074 (file-name (string-append name "-" version ".tar.gz"))
5075 (sha256
5076 (base32
5077 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
5078 (build-system python-build-system)
5079 (outputs '("out" "doc"))
5080 (inputs
5081 `(("gdk-pixbuf" ,gdk-pixbuf)
5082 ("cairo" ,cairo)))
5083 (native-inputs
5084 `(("pkg-config" ,pkg-config)
5085 ("python-sphinx" ,python-sphinx)
5086 ("python-docutils" ,python-docutils)))
5087 (propagated-inputs
5088 `(("python-xcffib" ,python-xcffib))) ; used at run time
5089 (arguments
5090 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
5091 #:tests? #f
5092 #:phases
5093 (modify-phases %standard-phases
5094 (add-after 'install 'install-doc
5095 (lambda* (#:key inputs outputs #:allow-other-keys)
5096 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5097 (doc (string-append data "/doc/" ,name "-" ,version))
5098 (html (string-append doc "/html")))
5099 (setenv "LD_LIBRARY_PATH"
5100 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5101 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5102 (setenv "LANG" "en_US.UTF-8")
5103 (mkdir-p html)
5104 (for-each (lambda (file)
5105 (copy-file (string-append "." file)
5106 (string-append doc file)))
5107 '("/README.rst" "/CHANGES" "/LICENSE"))
5108 (system* "python" "setup.py" "build_sphinx")
5109 (copy-recursively "docs/_build/html" html)
5110 #t))))))
5111 (home-page "https://github.com/Kozea/cairocffi")
5112 (synopsis "Python bindings and object-oriented API for Cairo")
5113 (description
5114 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5115 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5116 graphics library with support for multiple backends including image buffers,
5117 PNG, PostScript, PDF, and SVG file output.")
5118 (license license:bsd-3)))
5119
5120 (define-public python2-cairocffi
5121 (package-with-python2 python-cairocffi))
5122
5123 (define-public python-decorator
5124 (package
5125 (name "python-decorator")
5126 (version "4.0.10")
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (pypi-uri "decorator" version))
5131 (sha256
5132 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
5133 (build-system python-build-system)
5134 (arguments '(#:tests? #f)) ; no test target
5135 (home-page "https://pypi.python.org/pypi/decorator/")
5136 (synopsis "Python module to simplify usage of decorators")
5137 (description
5138 "The aim of the decorator module is to simplify the usage of decorators
5139 for the average programmer, and to popularize decorators usage giving examples
5140 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5141 etc. The core of this module is a decorator factory.")
5142 (license license:expat)))
5143
5144 (define-public python2-decorator
5145 (package-with-python2 python-decorator))
5146
5147 (define-public python-drmaa
5148 (package
5149 (name "python-drmaa")
5150 (version "0.7.7")
5151 (source
5152 (origin
5153 (method url-fetch)
5154 (uri (pypi-uri "drmaa" version))
5155 (sha256
5156 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5157 (build-system python-build-system)
5158 ;; The test suite requires libdrmaa which is provided by the cluster
5159 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5160 ;; should be set to the path of the libdrmaa library.
5161 (arguments '(#:tests? #f))
5162 (native-inputs
5163 `(("python-nose" ,python-nose)))
5164 (home-page "https://pypi.python.org/pypi/drmaa")
5165 (synopsis "Python bindings for the DRMAA library")
5166 (description
5167 "A Python package for Distributed Resource Management (DRM) job
5168 submission and control. This package is an implementation of the DRMAA 1.0
5169 Python language binding specification.")
5170 (license license:bsd-3)))
5171
5172 (define-public python2-drmaa
5173 (package-with-python2 python-drmaa))
5174
5175 (define-public python-grako
5176 (package
5177 (name "python-grako")
5178 (version "3.99.9")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri
5183 (pypi-uri "grako" version ".zip"))
5184 (sha256
5185 (base32
5186 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5187 (build-system python-build-system)
5188 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5189 (native-inputs
5190 `(("unzip" ,unzip)
5191 ("python-pytest" ,python-pytest-3.0)
5192 ("python-pytest-runner" ,python-pytest-runner)))
5193 (home-page "https://bitbucket.org/neogeny/grako")
5194 (synopsis "EBNF parser generator")
5195 (description
5196 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5197 memoizing PEG/Packrat parser in Python.")
5198 (license license:bsd-3)))
5199
5200 (define-public python2-grako
5201 (package-with-python2 python-grako))
5202
5203 (define-public python-gridmap
5204 (package
5205 (name "python-gridmap")
5206 (version "0.13.0")
5207 (source
5208 (origin
5209 (method url-fetch)
5210 (uri (string-append
5211 "https://github.com/pygridtools/gridmap/archive/v"
5212 version ".tar.gz"))
5213 (file-name (string-append name "-" version ".tar.gz"))
5214 (sha256
5215 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5216 (build-system python-build-system)
5217 (arguments
5218 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5219 (propagated-inputs
5220 `(("python-psutil" ,python-psutil)
5221 ("python-drmaa" ,python-drmaa)
5222 ("python-pyzmq" ,python-pyzmq)))
5223 (home-page "https://github.com/pygridtools/gridmap")
5224 (synopsis "Create jobs on a cluster directly from Python")
5225 (description
5226 "Gridmap is a Python package to allow you to easily create jobs on the
5227 cluster directly from Python. You can directly map Python functions onto the
5228 cluster without needing to write any wrapper code yourself.")
5229 (license license:gpl3+)))
5230
5231 (define-public python2-gridmap
5232 (package-with-python2 python-gridmap))
5233
5234 (define-public python-pexpect
5235 (package
5236 (name "python-pexpect")
5237 (version "4.2.1")
5238 (source
5239 (origin
5240 (method url-fetch)
5241 (uri (pypi-uri "pexpect" version))
5242 (sha256
5243 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
5244 (build-system python-build-system)
5245 (arguments
5246 `(#:phases
5247 (modify-phases %standard-phases
5248 (add-before 'check 'prepare-tests
5249 (lambda _
5250 (substitute* (find-files "tests")
5251 (("/bin/ls") (which "ls"))
5252 (("/bin/echo") (which "echo"))
5253 (("/bin/which") (which "which"))
5254 ;; Many tests try to use the /bin directory which
5255 ;; is not present in the build environment.
5256 ;; Use one that's non-empty and unlikely to change.
5257 (("/bin'") "/dev'"))
5258 ;; XXX: Socket connection test gets "Connection reset by peer".
5259 ;; Why does it not work? Delete for now.
5260 (delete-file "tests/test_socket.py")
5261 #t))
5262 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
5263 (native-inputs
5264 `(("python-nose" ,python-nose)
5265 ("python-pytest" ,python-pytest-3.0)
5266 ("man-db" ,man-db)
5267 ("which" ,which)
5268 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5269 (propagated-inputs
5270 `(("python-ptyprocess" ,python-ptyprocess)))
5271 (home-page "http://pexpect.readthedocs.org/")
5272 (synopsis "Controlling interactive console applications")
5273 (description
5274 "Pexpect is a pure Python module for spawning child applications;
5275 controlling them; and responding to expected patterns in their output.
5276 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5277 child application and control it as if a human were typing commands.")
5278 (license license:isc)))
5279
5280 (define-public python2-pexpect
5281 (package-with-python2 python-pexpect))
5282
5283 (define-public python-setuptools-scm
5284 (package
5285 (name "python-setuptools-scm")
5286 (version "1.15.0")
5287 (source (origin
5288 (method url-fetch)
5289 (uri (pypi-uri "setuptools_scm" version))
5290 (sha256
5291 (base32
5292 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5293 (build-system python-build-system)
5294 (home-page "https://github.com/pypa/setuptools_scm/")
5295 (synopsis "Manage Python package versions in SCM metadata")
5296 (description
5297 "Setuptools_scm handles managing your Python package versions in
5298 @dfn{software configuration management} (SCM) metadata instead of declaring
5299 them as the version argument or in a SCM managed file.")
5300 (license license:expat)))
5301
5302 (define-public python2-setuptools-scm
5303 (package-with-python2 python-setuptools-scm))
5304
5305 (define-public python-pathpy
5306 (package
5307 (name "python-pathpy")
5308 (version "8.1.1")
5309 (source
5310 (origin
5311 (method url-fetch)
5312 (uri (string-append "https://pypi.python.org/packages/source/p/"
5313 "path.py/path.py-" version ".tar.gz"))
5314 (sha256
5315 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5316 (outputs '("out" "doc"))
5317 (build-system python-build-system)
5318 (propagated-inputs
5319 `(("python-appdirs" ,python-appdirs)))
5320 (native-inputs
5321 `(("python-setuptools-scm" ,python-setuptools-scm)
5322 ("python-sphinx" ,python-sphinx)
5323 ("python-rst.linker" ,python-rst.linker)
5324 ("python-pytest" ,python-pytest)
5325 ("python-pytest-runner" ,python-pytest-runner)))
5326 (arguments
5327 `(#:phases
5328 (modify-phases %standard-phases
5329 (add-after 'build 'build-doc
5330 (lambda _
5331 (setenv "LANG" "en_US.UTF-8")
5332 (zero? (system* "python" "setup.py" "build_sphinx"))))
5333 (add-after 'install 'install-doc
5334 (lambda* (#:key outputs #:allow-other-keys)
5335 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5336 (doc (string-append data "/doc/" ,name "-" ,version))
5337 (html (string-append doc "/html")))
5338 (mkdir-p html)
5339 (for-each (lambda (file)
5340 (copy-file file (string-append doc "/" file)))
5341 '("README.rst" "CHANGES.rst"))
5342 (copy-recursively "build/sphinx/html" html)))))))
5343 (home-page "https://github.com/jaraco/path.py")
5344 (synopsis "Python module wrapper for built-in os.path")
5345 (description
5346 "@code{path.py} implements path objects as first-class entities, allowing
5347 common operations on files to be invoked on those path objects directly.")
5348 (license license:expat)))
5349
5350 (define-public python2-pathpy
5351 (package-with-python2 python-pathpy))
5352
5353 (define-public python-pickleshare
5354 (package
5355 (name "python-pickleshare")
5356 (version "0.5")
5357 (source
5358 (origin
5359 (method url-fetch)
5360 (uri (string-append "https://pypi.python.org/packages/source/p/"
5361 "pickleshare/pickleshare-" version ".tar.gz"))
5362 (sha256
5363 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5364 (build-system python-build-system)
5365 (propagated-inputs
5366 `(("python-pathpy" ,python-pathpy)))
5367 (home-page "https://github.com/vivainio/pickleshare")
5368 (synopsis "Tiny key value database with concurrency support")
5369 (description
5370 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5371 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5372 shelve, many processes can access the database simultaneously. Changing a
5373 value in database is immediately visible to other processes accessing the same
5374 database. Concurrency is possible because the values are stored in separate
5375 files. Hence the “database” is a directory where all files are governed by
5376 PickleShare.")
5377 (license license:expat)))
5378
5379 (define-public python2-pickleshare
5380 (package-with-python2 python-pickleshare))
5381
5382 (define-public python-simplegeneric
5383 (package
5384 (name "python-simplegeneric")
5385 (version "0.8.1")
5386 (source
5387 (origin
5388 (method url-fetch)
5389 (uri (string-append "https://pypi.python.org/packages/source/s/"
5390 "simplegeneric/simplegeneric-" version ".zip"))
5391 (sha256
5392 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5393 (build-system python-build-system)
5394 (native-inputs
5395 `(("unzip" ,unzip)))
5396 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5397 (synopsis "Python module for simple generic functions")
5398 (description
5399 "The simplegeneric module lets you define simple single-dispatch generic
5400 functions, akin to Python’s built-in generic functions like @code{len()},
5401 @code{iter()} and so on. However, instead of using specially-named methods,
5402 these generic functions use simple lookup tables, akin to those used by
5403 e.g. @code{pickle.dump()} and other generic functions found in the Python
5404 standard library.")
5405 (license license:zpl2.1)))
5406
5407 (define-public python2-simplegeneric
5408 (package-with-python2 python-simplegeneric))
5409
5410 (define-public python-ipython-genutils
5411 ;; TODO: This package is retired, check if can be removed, see description.
5412 (package
5413 (name "python-ipython-genutils")
5414 (version "0.1.0")
5415 (source
5416 (origin
5417 (method url-fetch)
5418 (uri (string-append "https://pypi.python.org/packages/source/i/"
5419 "ipython_genutils/ipython_genutils-"
5420 version ".tar.gz"))
5421 (sha256
5422 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5423 (build-system python-build-system)
5424 (arguments `(#:tests? #f)) ; no tests
5425 (home-page "http://ipython.org")
5426 (synopsis "Vestigial utilities from IPython")
5427 (description
5428 "This package provides retired utilities from IPython. No packages
5429 outside IPython/Jupyter should depend on it.
5430
5431 This package shouldn't exist. It contains some common utilities shared by
5432 Jupyter and IPython projects during The Big Split. As soon as possible, those
5433 packages will remove their dependency on this, and this package will go
5434 away.")
5435 (license license:bsd-3)))
5436
5437 (define-public python2-ipython-genutils
5438 (package-with-python2 python-ipython-genutils))
5439
5440 (define-public python-traitlets
5441 (package
5442 (name "python-traitlets")
5443 (version "4.2.0")
5444 (source
5445 (origin
5446 (method url-fetch)
5447 (uri (pypi-uri "traitlets" version))
5448 (sha256
5449 (base32
5450 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5451 (build-system python-build-system)
5452 (arguments
5453 `(#:phases
5454 (modify-phases %standard-phases
5455 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5456 (propagated-inputs
5457 `(("python-ipython-genutils" ,python-ipython-genutils)
5458 ("python-decorator" ,python-decorator)))
5459 (native-inputs
5460 `(("python-mock" ,python-mock)
5461 ("python-nose" ,python-nose)))
5462 (home-page "http://ipython.org")
5463 (synopsis "Configuration system for Python applications")
5464 (description
5465 "Traitlets is a framework that lets Python classes have attributes with
5466 type checking, dynamically calculated default values, and ‘on change’
5467 callbacks. The package also includes a mechanism to use traitlets for
5468 configuration, loading values from files or from command line arguments. This
5469 is a distinct layer on top of traitlets, so you can use traitlets in your code
5470 without using the configuration machinery.")
5471 (license license:bsd-3)))
5472
5473 (define-public python2-traitlets
5474 (package-with-python2 python-traitlets))
5475
5476 (define-public python-jupyter-core
5477 (package
5478 (name "python-jupyter-core")
5479 (version "4.2.1")
5480 (source
5481 (origin
5482 (method url-fetch)
5483 (uri (string-append (pypi-uri "jupyter_core" version)))
5484 (sha256
5485 (base32
5486 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5487 (build-system python-build-system)
5488 ;; FIXME: not sure how to run the tests
5489 (arguments `(#:tests? #f))
5490 (propagated-inputs
5491 `(("python-traitlets" ,python-traitlets)))
5492 (home-page "http://jupyter.org/")
5493 (synopsis "Jupyter base package")
5494 (description
5495 "Jupyter core is the base package on which Jupyter projects rely.")
5496 (license license:bsd-3)))
5497
5498 (define-public python2-jupyter-core
5499 (package-with-python2 python-jupyter-core))
5500
5501 (define-public python-jupyter-client
5502 (package
5503 (name "python-jupyter-client")
5504 (version "4.4.0")
5505 (source
5506 (origin
5507 (method url-fetch)
5508 (uri (pypi-uri "jupyter_client" version))
5509 (sha256
5510 (base32
5511 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5512 (build-system python-build-system)
5513 ;; Tests fail because of missing native python kernel which I assume is
5514 ;; provided by the ipython package, which we cannot use because it would
5515 ;; cause a dependency cycle.
5516 (arguments `(#:tests? #f))
5517 (propagated-inputs
5518 `(("python-pyzmq" ,python-pyzmq)
5519 ("python-traitlets" ,python-traitlets)
5520 ("python-jupyter-core" ,python-jupyter-core)))
5521 (home-page "http://jupyter.org/")
5522 (synopsis "Jupyter protocol implementation and client libraries")
5523 (description
5524 "The @code{jupyter_client} package contains the reference implementation
5525 of the Jupyter protocol. It also provides client and kernel management APIs
5526 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5527 installing @code{kernelspec}s for use with Jupyter frontends.")
5528 (license license:bsd-3)))
5529
5530 (define-public python2-jupyter-client
5531 (package-with-python2 python-jupyter-client))
5532
5533 (define-public python-ipykernel
5534 (package
5535 (name "python-ipykernel")
5536 (version "4.5.2")
5537 (source
5538 (origin
5539 (method url-fetch)
5540 (uri (pypi-uri "ipykernel" version))
5541 (sha256
5542 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5543 (build-system python-build-system)
5544 ;; The tests load a submodule of IPython. However, IPython itself depends
5545 ;; on ipykernel.
5546 (arguments `(#:tests? #f))
5547 (propagated-inputs
5548 ;; imported at runtime during connect
5549 `(("python-jupyter-client" ,python-jupyter-client)))
5550 (home-page "http://ipython.org")
5551 (synopsis "IPython Kernel for Jupyter")
5552 (description
5553 "This package provides the IPython kernel for Jupyter.")
5554 (license license:bsd-3)))
5555
5556 (define-public python2-ipykernel
5557 (package-with-python2 python-ipykernel))
5558
5559 (define-public python-testpath
5560 (package
5561 (name "python-testpath")
5562 (version "0.2")
5563 (source
5564 (origin
5565 (method url-fetch)
5566 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5567 version ".tar.gz"))
5568 (file-name (string-append name "-" version ".tar.gz"))
5569 (sha256
5570 (base32
5571 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5572 (build-system python-build-system)
5573 (arguments
5574 `(#:tests? #f ; this package does not even have a setup.py
5575 #:modules ((guix build python-build-system)
5576 (guix build utils)
5577 (srfi srfi-1))
5578 #:imported-modules (,@%python-build-system-modules
5579 (srfi srfi-1))
5580 #:phases
5581 (modify-phases %standard-phases
5582 (delete 'install)
5583 (replace 'build
5584 (lambda* (#:key inputs outputs #:allow-other-keys)
5585 (let* ((version (last
5586 (string-split (assoc-ref inputs "python") #\-)))
5587 (x.y (string-join (take (string-split version #\.) 2)
5588 "."))
5589 (dir (string-append
5590 (assoc-ref outputs "out")
5591 "/lib/python" x.y "/site-packages/testpath")))
5592 (mkdir-p dir)
5593 (copy-recursively "testpath" dir))
5594 #t)))))
5595 (home-page "https://github.com/takluyver/testpath")
5596 (synopsis "Test utilities for code working with files and commands")
5597 (description
5598 "Testpath is a collection of utilities for Python code working with files
5599 and commands. It contains functions to check things on the filesystem, and
5600 tools for mocking system commands and recording calls to those.")
5601 (license license:expat)))
5602
5603 (define-public python2-testpath
5604 (package-with-python2 python-testpath))
5605
5606 (define-public python-ipython
5607 (package
5608 (name "python-ipython")
5609 (version "5.2.2")
5610 (source
5611 (origin
5612 (method url-fetch)
5613 (uri (pypi-uri "ipython" version ".tar.gz"))
5614 (sha256
5615 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5616 (build-system python-build-system)
5617 (outputs '("out" "doc"))
5618 (propagated-inputs
5619 `(("python-pyzmq" ,python-pyzmq)
5620 ("python-prompt-toolkit" ,python-prompt-toolkit)
5621 ("python-terminado" ,python-terminado)
5622 ("python-matplotlib" ,python-matplotlib)
5623 ("python-numpy" ,python-numpy)
5624 ("python-numpydoc" ,python-numpydoc)
5625 ("python-jinja2" ,python-jinja2)
5626 ("python-mistune" ,python-mistune)
5627 ("python-pexpect" ,python-pexpect)
5628 ("python-pickleshare" ,python-pickleshare)
5629 ("python-simplegeneric" ,python-simplegeneric)
5630 ("python-jsonschema" ,python-jsonschema)
5631 ("python-traitlets" ,python-traitlets)
5632 ("python-ipykernel" ,python-ipykernel)
5633 ("python-nbformat" ,python-nbformat)
5634 ("python-pygments" ,python-pygments)))
5635 (inputs
5636 `(("readline" ,readline)
5637 ("which" ,which)))
5638 (native-inputs
5639 `(("graphviz" ,graphviz)
5640 ("pkg-config" ,pkg-config)
5641 ("python-requests" ,python-requests) ;; for tests
5642 ("python-testpath" ,python-testpath)
5643 ("python-nose" ,python-nose)
5644 ("python-sphinx" ,python-sphinx)
5645 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5646 ;; FIXME: It's possible that a smaller union would work just as well.
5647 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5648 texlive-fonts-ec
5649 texlive-generic-ifxetex
5650 texlive-generic-pdftex
5651 texlive-latex-amsfonts
5652 texlive-latex-capt-of
5653 texlive-latex-cmap
5654 texlive-latex-environ
5655 texlive-latex-eqparbox
5656 texlive-latex-etoolbox
5657 texlive-latex-expdlist
5658 texlive-latex-fancyhdr
5659 texlive-latex-fancyvrb
5660 texlive-latex-fncychap
5661 texlive-latex-float
5662 texlive-latex-framed
5663 texlive-latex-geometry
5664 texlive-latex-graphics
5665 texlive-latex-hyperref
5666 texlive-latex-mdwtools
5667 texlive-latex-multirow
5668 texlive-latex-oberdiek
5669 texlive-latex-parskip
5670 texlive-latex-preview
5671 texlive-latex-tabulary
5672 texlive-latex-threeparttable
5673 texlive-latex-titlesec
5674 texlive-latex-trimspaces
5675 texlive-latex-ucs
5676 texlive-latex-upquote
5677 texlive-latex-url
5678 texlive-latex-varwidth
5679 texlive-latex-wrapfig)))
5680 ("texinfo" ,texinfo)))
5681 (arguments
5682 `(#:phases
5683 (modify-phases %standard-phases
5684 (add-after
5685 'install 'install-doc
5686 (lambda* (#:key inputs outputs #:allow-other-keys)
5687 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5688 (doc (string-append data "/doc/" ,name "-" ,version))
5689 (html (string-append doc "/html"))
5690 (man1 (string-append data "/man/man1"))
5691 (info (string-append data "/info"))
5692 (examples (string-append doc "/examples"))
5693 (python-arg (string-append "PYTHON=" (which "python"))))
5694 (setenv "LANG" "en_US.utf8")
5695 ;; Make installed package available for running the tests
5696 (add-installed-pythonpath inputs outputs)
5697 (with-directory-excursion "docs"
5698 ;; FIXME: pdf fails to build
5699 ;;(system* "make" "pdf" "PAPER=a4")
5700 (system* "make" python-arg "html")
5701 (system* "make" python-arg "info"))
5702 (copy-recursively "docs/man" man1)
5703 (copy-recursively "examples" examples)
5704 (copy-recursively "docs/build/html" html)
5705 ;; (copy-file "docs/build/latex/ipython.pdf"
5706 ;; (string-append doc "/ipython.pdf"))
5707 (mkdir-p info)
5708 (copy-file "docs/build/texinfo/ipython.info"
5709 (string-append info "/ipython.info"))
5710 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5711 ;; Tests can only be run after the library has been installed and not
5712 ;; within the source directory.
5713 (delete 'check)
5714 (add-after
5715 'install 'check
5716 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5717 (if tests?
5718 (with-directory-excursion "/tmp"
5719 ;; Make installed package available for running the tests
5720 (add-installed-pythonpath inputs outputs)
5721 (setenv "HOME" "/tmp/") ;; required by a test
5722 (zero? (system* (string-append (assoc-ref outputs "out")
5723 "/bin/iptest"))))
5724 #t)))
5725 (add-before
5726 'install 'fix-tests
5727 (lambda* (#:key inputs #:allow-other-keys)
5728 (substitute* "./IPython/utils/_process_posix.py"
5729 (("/usr/bin/env', 'which") (which "which")))
5730 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5731 (("#!/usr/bin/env python")
5732 (string-append "#!" (which "python"))))
5733 ;; Disable 1 failing test
5734 (substitute* "./IPython/core/tests/test_magic.py"
5735 (("def test_dirops\\(\\):" all)
5736 (string-append "@dec.skipif(True)\n" all))))))))
5737 (home-page "http://ipython.org")
5738 (synopsis "IPython is a tool for interactive computing in Python")
5739 (description
5740 "IPython provides a rich architecture for interactive computing with:
5741 Powerful interactive shells, a browser-based notebook, support for interactive
5742 data visualization, embeddable interpreters and tools for parallel
5743 computing.")
5744 (license license:bsd-3)
5745 (properties `((python2-variant . ,(delay python2-ipython))))))
5746
5747 (define-public python2-ipython
5748 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5749 (package
5750 (inherit ipython)
5751 ;; FIXME: add pyreadline once available.
5752 (propagated-inputs
5753 `(("python2-backports-shutil-get-terminal-size"
5754 ,python2-backports-shutil-get-terminal-size)
5755 ("python2-pathlib2" ,python2-pathlib2)
5756 ,@(package-propagated-inputs ipython)))
5757 (native-inputs
5758 `(("python2-mock" ,python2-mock)
5759 ,@(package-native-inputs ipython))))))
5760
5761 (define-public python-isodate
5762 (package
5763 (name "python-isodate")
5764 (version "0.5.4")
5765 (source
5766 (origin
5767 (method url-fetch)
5768 (uri (pypi-uri "isodate" version))
5769 (sha256
5770 (base32
5771 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5772 (build-system python-build-system)
5773 (home-page
5774 "http://cheeseshop.python.org/pypi/isodate")
5775 (synopsis
5776 "Python date parser and formatter")
5777 (description
5778 "Python-isodate is a python module for parsing and formatting
5779 ISO 8601 dates, time and duration.")
5780 (license license:bsd-3)))
5781
5782 (define-public python2-isodate
5783 (package-with-python2 python-isodate))
5784
5785 (define-public python-html5lib
5786 (package
5787 (name "python-html5lib")
5788 (version "1.0b10")
5789 (source
5790 (origin
5791 (method url-fetch)
5792 (uri (pypi-uri "html5lib" version))
5793 (sha256
5794 (base32
5795 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5796 (build-system python-build-system)
5797 (propagated-inputs
5798 `(("python-six" ,python-six)
5799 ("python-webencodings" ,python-webencodings)))
5800 (arguments
5801 `(#:test-target "check"))
5802 (home-page
5803 "https://github.com/html5lib/html5lib-python")
5804 (synopsis
5805 "Python HTML parser based on the WHATWG HTML specifcation")
5806 (description
5807 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5808 and written in Python.")
5809 (license license:expat)))
5810
5811 (define-public python2-html5lib
5812 (package-with-python2 python-html5lib))
5813
5814 ;; Needed for python-bleach, a dependency of python-notebook
5815 (define-public python-html5lib-0.9
5816 (package
5817 (inherit python-html5lib)
5818 (version "0.999")
5819 (source
5820 (origin
5821 (method url-fetch)
5822 (uri (pypi-uri "html5lib" version))
5823 (sha256
5824 (base32
5825 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5826
5827 (define-public python2-html5lib-0.9
5828 (package-with-python2 python-html5lib-0.9))
5829
5830 (define-public python-webencodings
5831 (package
5832 (name "python-webencodings")
5833 (version "0.5")
5834 (source (origin
5835 (method url-fetch)
5836 (uri (pypi-uri "webencodings" version))
5837 (sha256
5838 (base32
5839 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5840 (build-system python-build-system)
5841 (arguments
5842 '(#:phases
5843 (modify-phases %standard-phases
5844 (replace 'check
5845 (lambda _
5846 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5847 (native-inputs
5848 `(("python-pytest" ,python-pytest)))
5849 (home-page "https://github.com/SimonSapin/python-webencodings")
5850 (synopsis "Character encoding aliases for legacy web content")
5851 (description
5852 "In order to be compatible with legacy web content when interpreting
5853 something like @code{Content-Type: text/html; charset=latin1}, tools need
5854 to use a particular set of aliases for encoding labels as well as some
5855 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5856 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5857 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5858 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5859 defines all such details so that implementations do not have to
5860 reverse-engineer each other.
5861
5862 This module implements the Encoding standard and has encoding labels and
5863 BOM detection, but the actual implementation for encoders and decoders
5864 is Python’s.")
5865 (license license:bsd-3)))
5866
5867 (define-public python2-webencodings
5868 (package-with-python2 python-webencodings))
5869
5870 (define-public python-urwid
5871 (package
5872 (name "python-urwid")
5873 (version "1.3.1")
5874 (source
5875 (origin
5876 (method url-fetch)
5877 (uri (pypi-uri "urwid" version))
5878 (sha256
5879 (base32
5880 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5881 (build-system python-build-system)
5882 (arguments
5883 `(#:phases
5884 (modify-phases %standard-phases
5885 ;; Disable failing test. Bug filed upstream:
5886 ;; https://github.com/wardi/urwid/issues/164
5887 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5888 (add-after 'unpack 'disable-failing-test
5889 (lambda _
5890 (substitute* "urwid/tests/test_event_loops.py"
5891 (("test_remove_watch_file")
5892 "disable_remove_watch_file")))))))
5893 (home-page "http://urwid.org")
5894 (synopsis "Console user interface library for Python")
5895 (description
5896 "Urwid is a curses-based UI/widget library for Python. It includes many
5897 features useful for text console applications.")
5898 (license license:lgpl2.1+)))
5899
5900 (define-public python2-urwid
5901 (let ((python2-urwid (package-with-python2 python-urwid)))
5902 (package
5903 (inherit python2-urwid)
5904 (arguments
5905 (append
5906 `(;; Explicitly using Python 2 is necessary due the argument list being
5907 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
5908 ;; package arguments, which by default assumes the use of Python 3.
5909 #:python ,python-2
5910 #:phases
5911 (modify-phases %standard-phases
5912 ;; Disable the vterm tests because of non-deterministic failures
5913 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5914 (add-after 'unpack 'delete-test_vterm.py
5915 (delete-file "urwid/tests/test_vterm.py"))))
5916 (package-arguments python-urwid))))))
5917
5918 (define-public python-openid
5919 (package
5920 (name "python-openid")
5921 (version "3.0.10")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "python3-openid" version))
5926 (sha256
5927 (base32
5928 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5929 (build-system python-build-system)
5930 (arguments
5931 `(#:phases
5932 (modify-phases %standard-phases
5933 (replace 'check
5934 (lambda _
5935 (zero? (system* "./admin/runtests")))))))
5936 (properties `((python2-variant . ,(delay python2-openid))))
5937 (propagated-inputs
5938 `(("python-defusedxml" ,python-defusedxml)))
5939 (native-inputs
5940 `(("python-psycopg2" ,python-psycopg2)
5941 ("python-django" ,python-django)))
5942 (home-page "https://github.com/necaris/python3-openid")
5943 (synopsis "OpenID support for servers and consumers")
5944 (description "This library provides OpenID authentication for Python, both
5945 for clients and servers.")
5946 (license license:asl2.0)))
5947
5948 (define-public python2-openid
5949 (package
5950 (name "python2-openid")
5951 (version "2.2.5")
5952 (source
5953 (origin
5954 (method url-fetch)
5955 (uri (pypi-uri "python-openid" version))
5956 (sha256
5957 (base32
5958 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5959 (build-system python-build-system)
5960 (arguments
5961 ;; Python 3 support is in `python3-openid`, a separate package.
5962 `(#:python ,python-2))
5963 (home-page "https://github.com/openid/python-openid")
5964 (synopsis "OpenID support for servers and consumers")
5965 (description "This library provides OpenID authentication for Python, both
5966 for clients and servers.")
5967 (license license:asl2.0)))
5968
5969 (define-public python-urwidtrees
5970 (package
5971 (name "python-urwidtrees")
5972 (version "1.0.2")
5973 (source
5974 (origin
5975 (method url-fetch)
5976 ;; package author intends on distributing via github rather than pypi:
5977 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5978 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5979 version ".tar.gz"))
5980 (file-name (string-append name "-" version ".tar.gz"))
5981 (sha256
5982 (base32
5983 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5984 (build-system python-build-system)
5985 (arguments
5986 '(#:tests? #f)) ; no tests
5987 (propagated-inputs `(("python-urwid" ,python-urwid)))
5988 (home-page "https://github.com/pazz/urwidtrees")
5989 (synopsis "Tree widgets for urwid")
5990 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5991 toolkit. Use it to build trees of widgets.")
5992 (license license:gpl3+)))
5993
5994 (define-public python2-urwidtrees
5995 (package-with-python2 python-urwidtrees))
5996
5997 (define-public python-dbus
5998 (package
5999 (name "python-dbus")
6000 (version "1.2.0")
6001 (source
6002 (origin
6003 (method url-fetch)
6004 (uri (string-append
6005 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
6006 version ".tar.gz"))
6007 (sha256
6008 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
6009 (build-system gnu-build-system)
6010 (arguments
6011 '(#:phases
6012 (modify-phases %standard-phases
6013 (add-before
6014 'check 'pre-check
6015 (lambda _
6016 ;; XXX: For the missing '/etc/machine-id'.
6017 (substitute* "test/run-test.sh"
6018 (("DBUS_FATAL_WARNINGS=1")
6019 "DBUS_FATAL_WARNINGS=0"))
6020 #t)))))
6021 (native-inputs
6022 `(("pkg-config" ,pkg-config)))
6023 (inputs
6024 `(("python" ,python)
6025 ("dbus-glib" ,dbus-glib)))
6026 (synopsis "Python bindings for D-bus")
6027 (description "python-dbus provides bindings for libdbus, the reference
6028 implementation of D-Bus.")
6029 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
6030 (license license:expat)))
6031
6032 (define-public python2-dbus
6033 (package (inherit python-dbus)
6034 (name "python2-dbus")
6035 (inputs `(("python" ,python-2)
6036 ,@(alist-delete "python"
6037 (package-inputs python-dbus)
6038 equal?)))
6039 ;; FIXME: on Python 2, the test_utf8 fails with:
6040 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
6041 (arguments `(#:tests? #f))))
6042
6043 (define-public python-apsw
6044 (package
6045 (name "python-apsw")
6046 (version "3.9.2-r1")
6047 (source
6048 (origin
6049 (method url-fetch)
6050 (uri (pypi-uri "apsw" version))
6051 (sha256
6052 (base32
6053 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
6054 (build-system python-build-system)
6055 (inputs
6056 `(("sqlite" ,sqlite)))
6057 (arguments
6058 `(#:phases
6059 (modify-phases %standard-phases
6060 (delete 'check)
6061 (add-after 'install 'check
6062 (lambda* (#:key inputs outputs #:allow-other-keys)
6063 (add-installed-pythonpath inputs outputs)
6064 (zero? (system* "python" "setup.py" "test")))))))
6065 (home-page "https://github.com/rogerbinns/apsw/")
6066 (synopsis "Another Python SQLite Wrapper")
6067 (description "APSW is a Python wrapper for the SQLite
6068 embedded relational database engine. In contrast to other wrappers such as
6069 pysqlite it focuses on being a minimal layer over SQLite attempting just to
6070 translate the complete SQLite API into Python.")
6071 (license license:zlib)))
6072
6073 (define-public python2-apsw
6074 (package-with-python2 python-apsw))
6075
6076 (define-public python-lxml
6077 (package
6078 (name "python-lxml")
6079 (version "3.6.0")
6080 (source
6081 (origin
6082 (method url-fetch)
6083 (uri (pypi-uri "lxml" version))
6084 (sha256
6085 (base32
6086 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
6087 (build-system python-build-system)
6088 (inputs
6089 `(("libxml2" ,libxml2)
6090 ("libxslt" ,libxslt)))
6091 (home-page "http://lxml.de/")
6092 (synopsis
6093 "Python XML processing library")
6094 (description
6095 "The lxml XML toolkit is a Pythonic binding for the C libraries
6096 libxml2 and libxslt.")
6097 (license license:bsd-3))) ; and a few more, see LICENSES.txt
6098
6099 (define-public python2-lxml
6100 (package-with-python2 python-lxml))
6101
6102 ;; beautifulsoup4 has a totally different namespace than 3.x,
6103 ;; and pypi seems to put it under its own name, so I guess we should too
6104 (define-public python-beautifulsoup4
6105 (package
6106 (name "python-beautifulsoup4")
6107 (version "4.5.3")
6108 (source
6109 (origin
6110 (method url-fetch)
6111 (uri (pypi-uri "beautifulsoup4" version))
6112 (sha256
6113 (base32
6114 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
6115 (build-system python-build-system)
6116 (arguments
6117 `(#:phases
6118 (modify-phases %standard-phases
6119 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6120 ;; must use this conversion script when building with Python 3. The
6121 ;; conversion script also runs the tests.
6122 ;; For more information, see the file 'convert-py3k' in the source
6123 ;; distribution.
6124 (replace 'check
6125 (lambda _ (zero? (system* "./convert-py3k")))))))
6126 (home-page
6127 "http://www.crummy.com/software/BeautifulSoup/bs4/")
6128 (synopsis
6129 "Python screen-scraping library")
6130 (description
6131 "Beautiful Soup is a Python library designed for rapidly setting up
6132 screen-scraping projects. It offers Pythonic idioms for navigating,
6133 searching, and modifying a parse tree, providing a toolkit for
6134 dissecting a document and extracting what you need. It automatically
6135 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6136 (license license:expat)
6137 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6138
6139 (define-public python2-beautifulsoup4
6140 (package
6141 (inherit (package-with-python2
6142 (strip-python2-variant python-beautifulsoup4)))
6143 (arguments `(#:python ,python-2))))
6144
6145 (define-public python-cssutils
6146 (package
6147 (name "python-cssutils")
6148 (version "1.0.1")
6149 (source
6150 (origin
6151 (method url-fetch)
6152 (uri (pypi-uri "cssutils" version))
6153 (sha256
6154 (base32
6155 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
6156 (build-system python-build-system)
6157 (native-inputs
6158 `(("unzip" ,unzip))) ; for unpacking the source
6159 (arguments
6160 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
6161 (home-page "http://cthedot.de/cssutils/")
6162 (synopsis
6163 "CSS Cascading Style Sheets library for Python")
6164 (description
6165 "Cssutils is a Python package for parsing and building CSS
6166 Cascading Style Sheets. Currently it provides a DOM only and no rendering
6167 options.")
6168 (license license:lgpl3+)))
6169
6170 (define-public python2-cssutils
6171 (package-with-python2 python-cssutils))
6172
6173 (define-public python-cssselect
6174 (package
6175 (name "python-cssselect")
6176 (version "0.9.2")
6177 (source
6178 (origin
6179 (method url-fetch)
6180 (uri (pypi-uri "cssselect" version))
6181 (sha256
6182 (base32
6183 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
6184 (build-system python-build-system)
6185 (arguments
6186 ;; tests fail with message
6187 ;; AttributeError: 'module' object has no attribute 'tests'
6188 `(#:tests? #f))
6189 (home-page
6190 "https://pythonhosted.org/cssselect/")
6191 (synopsis
6192 "CSS3 selector parser and translator to XPath 1.0")
6193 (description
6194 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6195 them to XPath 1.0 expressions. Such expressions can be used in lxml or
6196 another XPath engine to find the matching elements in an XML or HTML document.")
6197 (license license:bsd-3)))
6198
6199 (define-public python2-cssselect
6200 (package-with-python2 python-cssselect))
6201
6202 (define-public python-openid-cla
6203 (package
6204 (name "python-openid-cla")
6205 (version "1.2")
6206 (source
6207 (origin
6208 (method url-fetch)
6209 (uri (pypi-uri "python-openid-cla" version))
6210 (sha256
6211 (base32
6212 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6213 (build-system python-build-system)
6214 (arguments '(#:tests? #f)) ; No tests.
6215 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6216 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6217 (description "@code{openid-cla} is an implementation of the OpenID
6218 contributor license agreement extension for python-openid.")
6219 (license license:bsd-3)))
6220
6221 (define-public python2-openid-cla
6222 (package-with-python2 python-openid-cla))
6223
6224 (define-public python-openid-teams
6225 (package
6226 (name "python-openid-teams")
6227 (version "1.1")
6228 (source
6229 (origin
6230 (method url-fetch)
6231 (uri (pypi-uri "python-openid-teams" version))
6232 (sha256
6233 (base32
6234 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6235 (build-system python-build-system)
6236 (arguments '(#:tests? #f)) ; No tests.
6237 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6238 (synopsis "Implementation of the OpenID teams extension for python-openid")
6239 (description
6240 "@code{openid-teams} is an implementation of the OpenID
6241 teams extension for python-openid.")
6242 (license license:bsd-3)))
6243
6244 (define-public python2-openid-teams
6245 (package-with-python2 python-openid-teams))
6246
6247 (define-public python-netifaces
6248 (package
6249 (name "python-netifaces")
6250 (version "0.10.4")
6251 (source
6252 (origin
6253 (method url-fetch)
6254 (uri (string-append
6255 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6256 version
6257 ".tar.gz"))
6258 (sha256
6259 (base32
6260 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6261 (build-system python-build-system)
6262 (home-page
6263 "https://bitbucket.org/al45tair/netifaces")
6264 (synopsis
6265 "Python module for portable network interface information")
6266 (description
6267 "Netifaces is a Python module providing information on network
6268 interfaces in an easy and portable manner.")
6269 (license license:expat)))
6270
6271 (define-public python2-netifaces
6272 (package-with-python2 python-netifaces))
6273
6274 (define-public python-networkx
6275 (package
6276 (name "python-networkx")
6277 (version "1.11")
6278 (source
6279 (origin
6280 (method url-fetch)
6281 (uri (pypi-uri "networkx" version))
6282 (sha256
6283 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
6284 (build-system python-build-system)
6285 ;; python-decorator is needed at runtime
6286 (propagated-inputs
6287 `(("python-decorator" ,python-decorator)))
6288 (native-inputs
6289 `(("python-nose" ,python-nose)))
6290 (home-page "http://networkx.github.io/")
6291 (synopsis "Python module for creating and manipulating graphs and networks")
6292 (description
6293 "NetworkX is a Python package for the creation, manipulation, and study
6294 of the structure, dynamics, and functions of complex networks.")
6295 (license license:bsd-3)))
6296
6297 (define-public python2-networkx
6298 (package-with-python2 python-networkx))
6299
6300 (define-public snakemake
6301 (package
6302 (name "snakemake")
6303 (version "3.13.3")
6304 (source
6305 (origin
6306 (method url-fetch)
6307 (uri (pypi-uri "snakemake" version))
6308 (sha256
6309 (base32 "1nixb944r4hlskwkzc4wjs34b40xpxpw9gmhhm5p09gvmm22ap5d"))))
6310 (build-system python-build-system)
6311 (arguments
6312 ;; TODO: Package missing test dependencies.
6313 '(#:tests? #f
6314 #:phases
6315 (modify-phases %standard-phases
6316 ;; For cluster execution Snakemake will call Python. Since there is
6317 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6318 ;; this by calling the snakemake wrapper instead.
6319 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6320 (lambda* (#:key outputs #:allow-other-keys)
6321 (substitute* "snakemake/executors.py"
6322 (("\\{sys.executable\\} -m snakemake")
6323 (string-append (assoc-ref outputs "out")
6324 "/bin/snakemake")))
6325 #t)))))
6326 (propagated-inputs
6327 `(("python-wrapt" ,python-wrapt)
6328 ("python-requests" ,python-requests)))
6329 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6330 (synopsis "Python-based execution environment for make-like workflows")
6331 (description
6332 "Snakemake aims to reduce the complexity of creating workflows by
6333 providing a clean and modern domain specific specification language (DSL) in
6334 Python style, together with a fast and comfortable execution environment.")
6335 (license license:expat)))
6336
6337 (define-public python-seaborn
6338 (package
6339 (name "python-seaborn")
6340 (version "0.7.1")
6341 (source
6342 (origin
6343 (method url-fetch)
6344 (uri (pypi-uri "seaborn" version))
6345 (sha256
6346 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6347 (build-system python-build-system)
6348 (arguments
6349 '(#:tests? #f)) ; Tests requires a running X11 server.
6350 (propagated-inputs
6351 `(("python-pandas" ,python-pandas)
6352 ("python-matplotlib" ,python-matplotlib)
6353 ("python-scipy" ,python-scipy)))
6354 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6355 (synopsis "Statistical data visualization")
6356 (description
6357 "Seaborn is a library for making attractive and informative statistical
6358 graphics in Python. It is built on top of matplotlib and tightly integrated
6359 with the PyData stack, including support for numpy and pandas data structures
6360 and statistical routines from scipy and statsmodels.")
6361 (license license:bsd-3)
6362 (properties `((python2-variant . ,(delay python2-seaborn))))))
6363
6364 (define-public python2-seaborn
6365 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6366 (package
6367 (inherit base)
6368 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6369 ,@(package-propagated-inputs base))))))
6370
6371 (define-public python-mpmath
6372 (package
6373 (name "python-mpmath")
6374 (version "0.19")
6375 (source (origin
6376 (method url-fetch)
6377 (uri (string-append "http://mpmath.org/files/mpmath-"
6378 version ".tar.gz"))
6379 (sha256
6380 (base32
6381 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6382 (build-system python-build-system)
6383 (arguments
6384 '(#:phases
6385 (modify-phases %standard-phases
6386 (replace 'check
6387 (lambda _
6388 (zero?
6389 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6390 (home-page "http://mpmath.org")
6391 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6392 (description
6393 "@code{mpmath} can be used as an arbitrary-precision substitute for
6394 Python's float/complex types and math/cmath modules, but also does much
6395 more advanced mathematics.")
6396 (license license:bsd-3)))
6397
6398 (define-public python2-mpmath
6399 (package-with-python2 python-mpmath))
6400
6401 (define-public python-sympy
6402 (package
6403 (name "python-sympy")
6404 (version "1.0")
6405 (source
6406 (origin
6407 (method url-fetch)
6408 (uri (string-append
6409 "https://github.com/sympy/sympy/releases/download/sympy-"
6410 version "/sympy-" version ".tar.gz"))
6411 (sha256
6412 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6413 (build-system python-build-system)
6414 (propagated-inputs
6415 `(("python-mpmath" ,python-mpmath)))
6416 (home-page "http://www.sympy.org/")
6417 (synopsis "Python library for symbolic mathematics")
6418 (description
6419 "SymPy is a Python library for symbolic mathematics. It aims to become a
6420 full-featured computer algebra system (CAS) while keeping the code as simple
6421 as possible in order to be comprehensible and easily extensible.")
6422 (license license:bsd-3)))
6423
6424 (define-public python2-sympy
6425 (package-with-python2 python-sympy))
6426
6427 (define-public python-q
6428 (package
6429 (name "python-q")
6430 (version "2.6")
6431 (source
6432 (origin
6433 (method url-fetch)
6434 (uri (pypi-uri "q" version))
6435 (sha256
6436 (base32
6437 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6438 (build-system python-build-system)
6439 (home-page "https://github.com/zestyping/q")
6440 (synopsis "Quick-and-dirty debugging output for tired programmers")
6441 (description
6442 "q is a Python module for \"print\" style of debugging Python code. It
6443 provides convenient short API for print out of values, tracebacks, and
6444 falling into the Python interpreter.")
6445 (license license:asl2.0)))
6446
6447 (define-public python2-q
6448 (package-with-python2 python-q))
6449
6450 (define-public python-testlib
6451 (package
6452 (name "python-testlib")
6453 (version "0.6.5")
6454 (source
6455 (origin
6456 (method url-fetch)
6457 (uri (string-append
6458 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6459 version ".zip"))
6460 (sha256
6461 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6462 (build-system python-build-system)
6463 (native-inputs
6464 `(("unzip" ,unzip))) ; for unpacking the source
6465 (synopsis "Python micro test suite harness")
6466 (description "A micro unittest suite harness for Python.")
6467 (home-page "https://github.com/trentm/testlib")
6468 (license license:expat)))
6469
6470 (define-public python2-testlib
6471 (package-with-python2 python-testlib))
6472
6473 (define-public python2-xlib
6474 (package
6475 (name "python2-xlib")
6476 (version "0.14")
6477 (source (origin
6478 (method url-fetch)
6479 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6480 "/" version "/"
6481 "python-xlib-" version ".tar.gz"))
6482 (sha256
6483 (base32
6484 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6485 (build-system python-build-system)
6486 (arguments
6487 `(#:python ,python-2 ;Python 2 only
6488 #:tests? #f)) ;no tests
6489 (home-page "http://python-xlib.sourceforge.net/")
6490 (synopsis "Python X11 client library")
6491 (description
6492 "The Python X Library is intended to be a fully functional X client
6493 library for Python programs. It is useful to implement low-level X clients.
6494 It is written entirely in Python.")
6495 (license license:gpl2+)))
6496
6497 (define-public python-singledispatch
6498 (package
6499 (name "python-singledispatch")
6500 (version "3.4.0.3")
6501 (source
6502 (origin
6503 (method url-fetch)
6504 (uri (pypi-uri "singledispatch" version))
6505 (sha256
6506 (base32
6507 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6508 (build-system python-build-system)
6509 (native-inputs
6510 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6511 (home-page
6512 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6513 (synopsis "Backport of singledispatch feature from Python 3.4")
6514 (description
6515 "This library brings functools.singledispatch from Python 3.4 to Python
6516 2.6-3.3.")
6517 (license license:expat)))
6518
6519 (define-public python2-singledispatch
6520 (package-with-python2 python-singledispatch))
6521
6522 (define-public python-tornado
6523 (package
6524 (name "python-tornado")
6525 (version "4.5.1")
6526 (source
6527 (origin
6528 (method url-fetch)
6529 (uri (pypi-uri "tornado" version))
6530 (sha256
6531 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6532 (build-system python-build-system)
6533 (arguments
6534 '(;; FIXME: Two tests error out with:
6535 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6536 ;; #:phases
6537 ;; (modify-phases %standard-phases
6538 ;; (replace 'check
6539 ;; (lambda _
6540 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6541 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6542 ;; (zero? (system* "python" "-m" "tornado.test")))))
6543 #:tests? #f))
6544 (native-inputs
6545 `(("python-certifi" ,python-certifi)))
6546 (propagated-inputs
6547 `(("python-backports-abc" ,python-backports-abc)))
6548 (home-page "http://www.tornadoweb.org/")
6549 (synopsis "Python web framework and asynchronous networking library")
6550 (description
6551 "Tornado is a Python web framework and asynchronous networking library,
6552 originally developed at FriendFeed. By using non-blocking network I/O,
6553 Tornado can scale to tens of thousands of open connections, making it ideal
6554 for long polling, WebSockets, and other applications that require a long-lived
6555 connection to each user.")
6556 (license license:asl2.0)
6557 (properties `((python2-variant . ,(delay python2-tornado))))))
6558
6559 (define-public python2-tornado
6560 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6561 (package (inherit tornado)
6562 (propagated-inputs
6563 `(("python2-backport-ssl-match-hostname"
6564 ,python2-backport-ssl-match-hostname)
6565 ("python2-singledispatch" ,python2-singledispatch)
6566 ,@(package-propagated-inputs tornado))))))
6567
6568 ;; the python- version can be removed with python-3.5
6569 (define-public python-backports-abc
6570 (package
6571 (name "python-backports-abc")
6572 (version "0.5")
6573 (source
6574 (origin
6575 (method url-fetch)
6576 (uri (pypi-uri "backports_abc" version))
6577 (sha256
6578 (base32
6579 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6580 (build-system python-build-system)
6581 (home-page "https://github.com/cython/backports_abc")
6582 (synopsis "Backport of additions to the 'collections.abc' module")
6583 (description
6584 "Python-backports-abc provides a backport of additions to the
6585 'collections.abc' module in Python-3.5.")
6586 (license license:psfl)))
6587
6588 (define-public python2-backports-abc
6589 (package-with-python2 python-backports-abc))
6590
6591 (define-public python-backports-csv
6592 (package
6593 (name "python-backports-csv")
6594 (version "1.0.5")
6595 (source
6596 (origin
6597 (method url-fetch)
6598 (uri (pypi-uri "backports.csv" version))
6599 (sha256
6600 (base32
6601 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6602 (build-system python-build-system)
6603 (home-page "https://github.com/ryanhiebert/backports.csv")
6604 (synopsis "Backport of Python 3's csv module for Python 2")
6605 (description
6606 "Provides a backport of Python 3's @code{csv} module for parsing
6607 comma separated values. The API of the @code{csv} module in Python 2
6608 is drastically different from the @code{csv} module in Python 3.
6609 This is due, for the most part, to the difference between str in
6610 Python 2 and Python 3.")
6611 (license license:psfl)))
6612
6613 (define-public python2-backports-csv
6614 (package-with-python2 python-backports-csv))
6615
6616 (define-public python2-backports-shutil-get-terminal-size
6617 (package
6618 (name "python2-backports-shutil-get-terminal-size")
6619 (version "1.0.0")
6620 (source
6621 (origin
6622 (method url-fetch)
6623 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6624 (sha256
6625 (base32
6626 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6627 (build-system python-build-system)
6628 (arguments
6629 `(#:python ,python-2
6630 #:phases
6631 (modify-phases %standard-phases
6632 (replace 'check
6633 (lambda _
6634 (zero? (system* "py.test" "-v")))))))
6635 (native-inputs
6636 `(("python2-pytest" ,python2-pytest)))
6637 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6638 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6639 (description
6640 "This package provides a backport of the @code{get_terminal_size
6641 function} from Python 3.3's @code{shutil}.
6642 Unlike the original version it is written in pure Python rather than C,
6643 so it might be a tiny bit slower.")
6644 (license license:expat)))
6645
6646 (define-public python-waf
6647 (package
6648 (name "python-waf")
6649 (version "1.9.8")
6650 (source (origin
6651 (method url-fetch)
6652 (uri (string-append "https://waf.io/"
6653 "waf-" version ".tar.bz2"))
6654 (sha256
6655 (base32
6656 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6657 (build-system python-build-system)
6658 (arguments
6659 '(#:phases
6660 (modify-phases %standard-phases
6661 (replace 'build
6662 (lambda _
6663 (zero? (system* "python" "waf-light" "configure" "build"))))
6664 (replace 'check
6665 (lambda _
6666 (zero? (system* "python" "waf" "--version"))))
6667 (replace 'install
6668 (lambda _
6669 (copy-file "waf" %output))))))
6670 (home-page "https://waf.io/")
6671 (synopsis "Python-based build system")
6672 (description
6673 "Waf is a Python-based framework for configuring, compiling and installing
6674 applications.")
6675 (license license:bsd-3)))
6676
6677 (define-public python2-waf
6678 (package-with-python2 python-waf))
6679
6680 (define-public python-pyzmq
6681 (package
6682 (name "python-pyzmq")
6683 (version "15.1.0")
6684 (source
6685 (origin
6686 (method url-fetch)
6687 (uri (pypi-uri "pyzmq" version))
6688 (sha256
6689 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6690 (build-system python-build-system)
6691 (arguments
6692 `(#:configure-flags
6693 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6694 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6695 ;; --inplace' for 'python setup.py test' to work.
6696 #:tests? #f))
6697 (inputs
6698 `(("zeromq" ,zeromq)))
6699 (native-inputs
6700 `(("pkg-config" ,pkg-config)
6701 ("python-nose" ,python-nose)))
6702 (home-page "https://github.com/zeromq/pyzmq")
6703 (synopsis "Python bindings for 0MQ")
6704 (description
6705 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6706 (license license:bsd-4)))
6707
6708 (define-public python2-pyzmq
6709 (package-with-python2 python-pyzmq))
6710
6711 (define-public python-pep8
6712 (package
6713 (name "python-pep8")
6714 (version "1.7.0")
6715 (source
6716 (origin
6717 (method url-fetch)
6718 (uri (pypi-uri "pep8" version))
6719 (sha256
6720 (base32
6721 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6722 (build-system python-build-system)
6723 (home-page "http://pep8.readthedocs.org/")
6724 (synopsis "Python style guide checker")
6725 (description
6726 "This tools checks Python code against some of the style conventions in
6727 PEP 8.")
6728 (license license:expat)))
6729
6730 (define-public python2-pep8
6731 (package-with-python2 python-pep8))
6732
6733 (define-public python-pyflakes
6734 (package
6735 (name "python-pyflakes")
6736 (version "1.0.0")
6737 (source
6738 (origin
6739 (method url-fetch)
6740 (uri (pypi-uri "pyflakes" version))
6741 (sha256
6742 (base32
6743 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6744 (build-system python-build-system)
6745 (home-page
6746 "https://github.com/pyflakes/pyflakes")
6747 (synopsis "Passive checker of Python programs")
6748 (description
6749 "Pyflakes statically checks Python source code for common errors.")
6750 (license license:expat)))
6751
6752 (define-public python2-pyflakes
6753 (package-with-python2 python-pyflakes))
6754
6755 (define-public python-mccabe
6756 (package
6757 (name "python-mccabe")
6758 (version "0.4.0")
6759 (source
6760 (origin
6761 (method url-fetch)
6762 (uri (pypi-uri "mccabe" version))
6763 (sha256
6764 (base32
6765 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6766 (build-system python-build-system)
6767 (native-inputs
6768 `(("python-pytest" ,python-pytest)
6769 ("python-pytest-runner" ,python-pytest-runner)))
6770 (home-page "https://github.com/flintwork/mccabe")
6771 (synopsis "McCabe checker, plugin for flake8")
6772 (description
6773 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6774 complexity of Python source code.")
6775 (license license:expat)))
6776
6777 (define-public python2-mccabe
6778 (package-with-python2 python-mccabe))
6779
6780 (define-public python-mccabe-0.2.1
6781 (package (inherit python-mccabe)
6782 (version "0.2.1")
6783 (source
6784 (origin
6785 (method url-fetch)
6786 (uri (pypi-uri "mccabe" version))
6787 (sha256
6788 (base32
6789 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6790
6791 (define-public python2-mccabe-0.2.1
6792 (package-with-python2 python-mccabe-0.2.1))
6793
6794 ;; Flake8 2.4.1 requires an older version of pep8.
6795 ;; This should be removed ASAP.
6796 (define-public python-pep8-1.5.7
6797 (package (inherit python-pep8)
6798 (version "1.5.7")
6799 (source
6800 (origin
6801 (method url-fetch)
6802 (uri (string-append
6803 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6804 version
6805 ".tar.gz"))
6806 (sha256
6807 (base32
6808 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6809 (arguments
6810 ;; XXX Tests not compatible with Python 3.5.
6811 '(#:tests? #f))))
6812
6813 (define-public python2-pep8-1.5.7
6814 (package-with-python2 python-pep8-1.5.7))
6815
6816 ;; Flake8 2.4.1 requires an older version of pyflakes.
6817 ;; This should be removed ASAP.
6818 (define-public python-pyflakes-0.8.1
6819 (package (inherit python-pyflakes)
6820 (version "0.8.1")
6821 (source
6822 (origin
6823 (method url-fetch)
6824 (uri (string-append
6825 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6826 version
6827 ".tar.gz"))
6828 (sha256
6829 (base32
6830 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6831 (arguments
6832 ;; XXX Tests not compatible with Python 3.5.
6833 '(#:tests? #f))))
6834
6835 (define-public python2-pyflakes-0.8.1
6836 (package-with-python2 python-pyflakes-0.8.1))
6837
6838 (define-public python-flake8
6839 (package
6840 (name "python-flake8")
6841 (version "2.5.4")
6842 (source
6843 (origin
6844 (method url-fetch)
6845 (uri (pypi-uri "flake8" version))
6846 (sha256
6847 (base32
6848 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6849 (modules '((guix build utils)))
6850 (snippet
6851 '(begin
6852 ;; Remove pre-compiled .pyc files from source.
6853 (for-each delete-file-recursively
6854 (find-files "." "__pycache__" #:directories? #t))
6855 (for-each delete-file (find-files "." "\\.pyc$"))
6856 #t))))
6857 (build-system python-build-system)
6858 (propagated-inputs
6859 `(("python-pep8" ,python-pep8)
6860 ("python-pyflakes" ,python-pyflakes)
6861 ("python-mccabe" ,python-mccabe)))
6862 (native-inputs
6863 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6864 ("python-nose" ,python-nose)))
6865 (home-page "https://gitlab.com/pycqa/flake8")
6866 (synopsis
6867 "The modular source code checker: pep8, pyflakes and co")
6868 (description
6869 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6870 (license license:expat)))
6871
6872 (define-public python2-flake8
6873 (package-with-python2 python-flake8))
6874
6875 (define-public python-flake8-polyfill
6876 (package
6877 (name "python-flake8-polyfill")
6878 (version "1.0.1")
6879 (source
6880 (origin
6881 (method url-fetch)
6882 (uri (pypi-uri "flake8-polyfill" version))
6883 (sha256
6884 (base32
6885 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6886 (build-system python-build-system)
6887 (arguments
6888 '(#:phases
6889 (modify-phases %standard-phases
6890 (replace 'check
6891 (lambda _
6892 (setenv "PYTHONPATH"
6893 (string-append (getcwd) "/build/lib:"
6894 (getenv "PYTHONPATH")))
6895 (zero? (system* "py.test" "-v")))))))
6896 (native-inputs
6897 `(("python-flake8" ,python-flake8)
6898 ("python-mock" ,python-mock)
6899 ("python-pycodestyle" ,python-pycodestyle)
6900 ("python-pytest" ,python-pytest)))
6901 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6902 (synopsis "Polyfill package for Flake8 plugins")
6903 (description
6904 "This package that provides some compatibility helpers for Flake8
6905 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6906 (license license:expat)))
6907
6908 (define-public python2-flake8-polyfill
6909 (package-with-python2 python-flake8-polyfill))
6910
6911 (define-public python-mistune
6912 (package
6913 (name "python-mistune")
6914 (version "0.7.3")
6915 (source
6916 (origin
6917 (method url-fetch)
6918 (uri (pypi-uri "mistune" version))
6919 (sha256
6920 (base32
6921 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6922 (build-system python-build-system)
6923 (native-inputs
6924 `(("python-nose" ,python-nose)
6925 ("python-cython" ,python-cython)))
6926 (home-page "https://github.com/lepture/mistune")
6927 (synopsis "Markdown parser in pure Python")
6928 (description "This package provides a fast markdown parser in pure
6929 Python.")
6930 (license license:bsd-3)))
6931
6932 (define-public python2-mistune
6933 (package-with-python2 python-mistune))
6934
6935 (define-public python-markdown
6936 (package
6937 (name "python-markdown")
6938 (version "2.6.8")
6939 (source
6940 (origin
6941 (method url-fetch)
6942 (uri (pypi-uri "Markdown" version))
6943 (sha256
6944 (base32
6945 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6946 (build-system python-build-system)
6947 (arguments
6948 `(#:phases
6949 (modify-phases %standard-phases
6950 (replace 'check
6951 (lambda _
6952 (zero? (system* "python" "run-tests.py")))))))
6953 (native-inputs
6954 `(("python-nose" ,python-nose)
6955 ("python-pyyaml" ,python-pyyaml)))
6956 (home-page "https://pythonhosted.org/Markdown/")
6957 (synopsis "Python implementation of Markdown")
6958 (description
6959 "This package provides a Python implementation of John Gruber's
6960 Markdown. The library features international input, various Markdown
6961 extensions, and several HTML output formats. A command line wrapper
6962 markdown_py is also provided to convert Markdown files to HTML.")
6963 (license license:bsd-3)))
6964
6965 (define-public python2-markdown
6966 (package-with-python2 python-markdown))
6967
6968 (define-public python-ptyprocess
6969 (package
6970 (name "python-ptyprocess")
6971 (version "0.5.1")
6972 (source
6973 (origin
6974 (method url-fetch)
6975 (uri (string-append
6976 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6977 version ".tar.gz"))
6978 (sha256
6979 (base32
6980 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6981 (build-system python-build-system)
6982 (native-inputs
6983 `(("python-nose" ,python-nose)))
6984 (arguments
6985 `(#:phases
6986 (modify-phases %standard-phases
6987 (replace 'check
6988 (lambda _
6989 (zero? (system* "nosetests")))))))
6990 (home-page "https://github.com/pexpect/ptyprocess")
6991 (synopsis "Run a subprocess in a pseudo terminal")
6992 (description
6993 "This package provides a Python library used to launch a subprocess in a
6994 pseudo terminal (pty), and interact with both the process and its pty.")
6995 (license license:isc)))
6996
6997 (define-public python2-ptyprocess
6998 (package-with-python2 python-ptyprocess))
6999
7000 (define-public python-cram
7001 (package
7002 (name "python-cram")
7003 (version "0.7")
7004 (home-page "https://bitheap.org/cram/")
7005 (source (origin
7006 (method url-fetch)
7007 (uri (list (string-append home-page "cram-"
7008 version ".tar.gz")
7009 (pypi-uri "cram" version)))
7010 (sha256
7011 (base32
7012 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7013 (arguments
7014 '(#:phases
7015 (modify-phases %standard-phases
7016 (add-after 'unpack 'patch-source
7017 (lambda _
7018 (substitute* (find-files "cram" ".*\\.py$")
7019 ;; Replace default shell path.
7020 (("/bin/sh") (which "sh")))
7021 (substitute* (find-files "tests" ".*\\.t$")
7022 (("md5") "md5sum")
7023 (("/bin/bash") (which "bash"))
7024 (("/bin/sh") (which "sh")))
7025 (substitute* "cram/_test.py"
7026 ;; This hack works around a bug triggered by substituting
7027 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7028 ;; "cram -h", which breaks the output at 80 characters. This
7029 ;; causes the line showing the default shell to break into two
7030 ;; lines, but the test expects a single line...
7031 (("env\\['COLUMNS'\\] = '80'")
7032 "env['COLUMNS'] = '160'"))
7033 #t))
7034 (delete 'check)
7035 (add-after 'install 'check
7036 ;; The test phase uses the built library and executable.
7037 ;; It's easier to run it after install since the build
7038 ;; directory contains version-specific PATH.
7039 (lambda* (#:key inputs outputs #:allow-other-keys)
7040 (add-installed-pythonpath inputs outputs)
7041 (setenv "PATH" (string-append (getenv "PATH") ":"
7042 (assoc-ref outputs "out") "/bin"))
7043 (zero? (system* "make" "test")))))))
7044 (build-system python-build-system)
7045 (native-inputs
7046 `(("python-coverage" ,python-coverage)
7047 ("which" ,which)))
7048 (synopsis "Simple testing framework for command line applications")
7049 (description
7050 "Cram is a functional testing framework for command line applications.
7051 Cram tests look like snippets of interactive shell sessions. Cram runs each
7052 command and compares the command output in the test with the command’s actual
7053 output.")
7054 (license license:gpl2+)))
7055
7056 (define-public python2-cram
7057 (package-with-python2 python-cram))
7058
7059 (define-public python-terminado
7060 (package
7061 (name "python-terminado")
7062 (version "0.6")
7063 (source
7064 (origin
7065 (method url-fetch)
7066 (uri (pypi-uri "terminado" version))
7067 (sha256
7068 (base32
7069 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
7070 (build-system python-build-system)
7071 (propagated-inputs
7072 `(("python-tornado" ,python-tornado)
7073 ("python-ptyprocess" ,python-ptyprocess)))
7074 (native-inputs
7075 `(("python-nose" ,python-nose)))
7076 (arguments
7077 `(#:phases
7078 (modify-phases %standard-phases
7079 (replace 'check
7080 (lambda _
7081 (zero? (system* "nosetests")))))))
7082 (home-page "https://github.com/takluyver/terminado")
7083 (synopsis "Terminals served to term.js using Tornado websockets")
7084 (description "This package provides a Tornado websocket backend for the
7085 term.js Javascript terminal emulator library.")
7086 (license license:bsd-2)
7087 (properties `((python2-variant . ,(delay python2-terminado))))))
7088
7089 (define-public python2-terminado
7090 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
7091 (package (inherit terminado)
7092 (propagated-inputs
7093 `(("python2-backport-ssl-match-hostname"
7094 ,python2-backport-ssl-match-hostname)
7095 ,@(package-propagated-inputs terminado))))))
7096
7097 (define-public python-straight-plugin
7098 (package
7099 (name "python-straight-plugin")
7100 (version "1.4.1")
7101 (source
7102 (origin
7103 (method url-fetch)
7104 (uri (pypi-uri "straight.plugin" version))
7105 (sha256
7106 (base32
7107 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7108 (build-system python-build-system)
7109 (home-page "https://github.com/ironfroggy/straight.plugin")
7110 (synopsis "Simple namespaced plugin facility")
7111 (description "Straight Plugin provides a type of plugin you can create from
7112 almost any existing Python modules, and an easy way for outside developers to
7113 add functionality and customization to your projects with their own plugins.")
7114 (license license:expat)))
7115
7116 (define-public python2-straight-plugin
7117 (package-with-python2 python-straight-plugin))
7118
7119 (define-public python-fonttools
7120 (package
7121 (name "python-fonttools")
7122 (version "2.5")
7123 (source (origin
7124 (method url-fetch)
7125 (uri (string-append
7126 "https://pypi.python.org/packages/source/F/FontTools/"
7127 "fonttools-" version ".tar.gz"))
7128 (sha256
7129 (base32
7130 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
7131 (build-system python-build-system)
7132 (arguments
7133 '(#:test-target "check"
7134 #:phases
7135 (modify-phases %standard-phases
7136 (add-after 'unpack 'patch-setuppy
7137 ;; Remove the undocumented "extra_path" argument, which adds an
7138 ;; intervening directories between site-packages and the package
7139 ;; directory.
7140 (lambda _
7141 (substitute* "setup.py"
7142 (("^[ \t]*extra_path *= *'FontTools',") ""))
7143 #t)))))
7144 (home-page "https://github.com/behdad/fonttools")
7145 (synopsis "Tools to manipulate font files")
7146 (description
7147 "FontTools/TTX is a library to manipulate font files from Python. It
7148 supports reading and writing of TrueType/OpenType fonts, reading and writing
7149 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7150 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7151 from an XML-based format.")
7152 (license (license:non-copyleft
7153 "file://LICENSE.txt"
7154 "See LICENSE.txt in the distribution."))))
7155
7156 (define-public python2-fonttools
7157 (package-with-python2 python-fonttools))
7158
7159 (define-public python-ly
7160 (package
7161 (name "python-ly")
7162 (version "0.9.4")
7163 (source
7164 (origin
7165 (method url-fetch)
7166 (uri (string-append "https://pypi.python.org/packages/57/4f/"
7167 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
7168 "/python-ly-" version ".tar.gz"))
7169 (sha256
7170 (base32
7171 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
7172 (build-system python-build-system)
7173 (arguments
7174 ;; FIXME: Some tests need network access.
7175 '(#:tests? #f))
7176 (synopsis "Tool and library for manipulating LilyPond files")
7177 (description "This package provides a Python library to parse, manipulate
7178 or create documents in LilyPond format. A command line program ly is also
7179 provided that can be used to do various manipulations with LilyPond files.")
7180 (home-page "https://pypi.python.org/pypi/python-ly")
7181 (license license:gpl2+)))
7182
7183 (define-public python-appdirs
7184 (package
7185 (name "python-appdirs")
7186 (version "1.4.3")
7187 (source
7188 (origin
7189 (method url-fetch)
7190 (uri (pypi-uri "appdirs" version))
7191 (sha256
7192 (base32
7193 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7194 (build-system python-build-system)
7195 (home-page "https://github.com/ActiveState/appdirs")
7196 (synopsis
7197 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7198 (description
7199 "This module provides a portable way of finding out where user data
7200 should be stored on various operating systems.")
7201 (license license:expat)))
7202
7203 (define-public python2-appdirs
7204 (package-with-python2 python-appdirs))
7205
7206 (define-public python-llfuse
7207 (package
7208 (name "python-llfuse")
7209 (version "1.2")
7210 (source (origin
7211 (method url-fetch)
7212 (uri (string-append
7213 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7214 "llfuse-" version ".tar.bz2"))
7215 (sha256
7216 (base32
7217 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
7218 (build-system python-build-system)
7219 (inputs
7220 `(("fuse" ,fuse)
7221 ("attr" ,attr)))
7222 (native-inputs
7223 `(("pkg-config" ,pkg-config)))
7224 (synopsis "Python bindings for FUSE")
7225 (description
7226 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7227 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7228 (license license:lgpl2.0+)
7229 (properties `((python2-variant . ,(delay python2-llfuse))))))
7230
7231 (define-public python2-llfuse
7232 (package (inherit (package-with-python2
7233 (strip-python2-variant python-llfuse)))
7234 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7235
7236 ;; For attic-0.16
7237 (define-public python-llfuse-0.41
7238 (package (inherit python-llfuse)
7239 (version "0.41.1")
7240 (source (origin
7241 (method url-fetch)
7242 (uri (string-append
7243 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7244 "llfuse-" version ".tar.bz2"))
7245 (sha256
7246 (base32
7247 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7248 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7249 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7250 (license (list license:expat license:lgpl2.0+))))
7251
7252 (define-public python-msgpack
7253 (package
7254 (name "python-msgpack")
7255 (version "0.4.8")
7256 (source (origin
7257 (method url-fetch)
7258 (uri (pypi-uri "msgpack-python" version))
7259 (sha256
7260 (base32
7261 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
7262 (build-system python-build-system)
7263 (synopsis "MessagePack (de)serializer")
7264 (description "MessagePack is a fast, compact binary serialization format,
7265 suitable for similar data to JSON. This package provides CPython bindings for
7266 reading and writing MessagePack data.")
7267 (home-page "https://pypi.python.org/pypi/msgpack-python/")
7268 (license license:asl2.0)))
7269
7270 (define-public python2-msgpack
7271 (package-with-python2 python-msgpack))
7272
7273 (define-public python-netaddr
7274 (package
7275 (name "python-netaddr")
7276 (version "0.7.18")
7277 (source
7278 (origin
7279 (method url-fetch)
7280 (uri (string-append
7281 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
7282 version
7283 ".tar.gz"))
7284 (sha256
7285 (base32
7286 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
7287 (build-system python-build-system)
7288 (arguments `(#:tests? #f)) ;; No tests.
7289 (home-page "https://github.com/drkjam/netaddr/")
7290 (synopsis "Pythonic manipulation of network addresses")
7291 (description
7292 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7293 and MAC network addresses.")
7294 (license license:bsd-3)))
7295
7296 (define-public python2-netaddr
7297 (package-with-python2 python-netaddr))
7298
7299 (define-public python-wrapt
7300 (package
7301 (name "python-wrapt")
7302 (version "1.10.8")
7303 (source
7304 (origin
7305 (method url-fetch)
7306 (uri (pypi-uri "wrapt" version))
7307 (sha256
7308 (base32
7309 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
7310 (build-system python-build-system)
7311 (arguments
7312 ;; Tests are not included in the tarball, they are only available in the
7313 ;; git repository.
7314 `(#:tests? #f))
7315 (home-page "https://github.com/GrahamDumpleton/wrapt")
7316 (synopsis "Module for decorators, wrappers and monkey patching")
7317 (description
7318 "The aim of the wrapt module is to provide a transparent object proxy for
7319 Python, which can be used as the basis for the construction of function
7320 wrappers and decorator functions.")
7321 (license license:bsd-2)))
7322
7323 (define-public python2-wrapt
7324 (package-with-python2 python-wrapt))
7325
7326 (define-public python-iso8601
7327 (package
7328 (name "python-iso8601")
7329 (version "0.1.11")
7330 (source
7331 (origin
7332 (method url-fetch)
7333 (uri (pypi-uri "iso8601" version))
7334 (sha256
7335 (base32
7336 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7337 (build-system python-build-system)
7338 (native-inputs
7339 `(("python-pytest" ,python-pytest)))
7340 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7341 (synopsis "Module to parse ISO 8601 dates")
7342 (description
7343 "This module parses the most common forms of ISO 8601 date strings (e.g.
7344 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7345 (license license:expat)))
7346
7347 (define-public python2-iso8601
7348 (package-with-python2 python-iso8601))
7349
7350 (define-public python-monotonic
7351 (package
7352 (name "python-monotonic")
7353 (version "0.3")
7354 (source
7355 (origin
7356 (method url-fetch)
7357 (uri (string-append
7358 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7359 version
7360 ".tar.gz"))
7361 (sha256
7362 (base32
7363 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7364 (build-system python-build-system)
7365 (home-page "https://github.com/atdt/monotonic")
7366 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7367 (description
7368 "This module provides a monotonic() function which returns the value (in
7369 fractional seconds) of a clock which never goes backwards.")
7370 (license license:asl2.0)))
7371
7372 (define-public python2-monotonic
7373 (package-with-python2 python-monotonic))
7374
7375 (define-public python-webob
7376 (package
7377 (name "python-webob")
7378 (version "1.5.1")
7379 (source
7380 (origin
7381 (method url-fetch)
7382 (uri (pypi-uri "WebOb" version))
7383 (sha256
7384 (base32
7385 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7386 (build-system python-build-system)
7387 (native-inputs
7388 `(("python-nose" ,python-nose)))
7389 (home-page "http://webob.org/")
7390 (synopsis "WSGI request and response object")
7391 (description
7392 "WebOb provides wrappers around the WSGI request environment, and an
7393 object to help create WSGI responses.")
7394 (license license:expat)))
7395
7396 (define-public python2-webob
7397 (package-with-python2 python-webob))
7398
7399 (define-public python-xlrd
7400 (package
7401 (name "python-xlrd")
7402 (version "1.0.0")
7403 (source (origin
7404 (method url-fetch)
7405 (uri (pypi-uri "xlrd" version))
7406 (sha256
7407 (base32
7408 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7409 (build-system python-build-system)
7410 (arguments
7411 `(#:phases
7412 (modify-phases %standard-phases
7413 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7414 ;; run tests instead for now.
7415 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7416 (native-inputs `(("python-nose" ,python-nose)))
7417 (home-page "http://www.python-excel.org/")
7418 (synopsis "Library for extracting data from Excel files")
7419 (description "This packages provides a library to extract data from
7420 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7421 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7422 Unicode-aware. It is not intended as an end-user tool.")
7423 (license license:bsd-3)))
7424
7425 (define-public python2-xlrd
7426 (package-with-python2 python-xlrd))
7427
7428 (define-public python-prettytable
7429 (package
7430 (name "python-prettytable")
7431 (version "0.7.2")
7432 (source
7433 (origin
7434 (method url-fetch)
7435 (uri (string-append
7436 "https://pypi.python.org/packages/source/P/PrettyTable/"
7437 "prettytable-" version ".tar.bz2"))
7438 (sha256
7439 (base32
7440 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7441 (build-system python-build-system)
7442 (home-page "http://code.google.com/p/prettytable/")
7443 (synopsis "Display tabular data in an ASCII table format")
7444 (description
7445 "A library designed to represent tabular data in visually appealing ASCII
7446 tables. PrettyTable allows for selection of which columns are to be printed,
7447 independent alignment of columns (left or right justified or centred) and
7448 printing of sub-tables by specifying a row range.")
7449 (license license:bsd-3)))
7450
7451 (define-public python2-prettytable
7452 (package-with-python2 python-prettytable))
7453
7454 (define-public python-tables
7455 (package
7456 (name "python-tables")
7457 (version "3.2.2")
7458 (source
7459 (origin
7460 (method url-fetch)
7461 (uri (pypi-uri "tables" version))
7462 (sha256
7463 (base32
7464 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7465 (modules '((guix build utils)))
7466 (snippet
7467 '(begin
7468 ;; Remove pre-compiled .pyc files from source.
7469 (for-each delete-file-recursively
7470 (find-files "." "__pycache__" #:directories? #t))
7471 (for-each delete-file (find-files "." "\\.pyc$"))
7472 #t))))
7473 (build-system python-build-system)
7474 (arguments
7475 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7476 ;; or "check", so we must override the build and check phases.
7477 #:phases
7478 (modify-phases %standard-phases
7479 (add-after 'unpack 'use-gcc
7480 (lambda _
7481 (substitute* "setup.py"
7482 (("compiler = new_compiler\\(\\)" line)
7483 (string-append line
7484 "\ncompiler.set_executables(compiler='gcc',"
7485 "compiler_so='gcc',"
7486 "linker_exe='gcc',"
7487 "linker_so='gcc -shared')")))
7488 #t))
7489 (replace 'build
7490 (lambda* (#:key inputs #:allow-other-keys)
7491 (zero? (system* "python" "setup.py" "build"
7492 (string-append "--hdf5="
7493 (assoc-ref inputs "hdf5"))))))
7494 (replace 'check
7495 (lambda* (#:key inputs #:allow-other-keys)
7496 (zero? (system* "python" "setup.py" "check"
7497 (string-append "--hdf5="
7498 (assoc-ref inputs "hdf5")))))))))
7499 (propagated-inputs
7500 `(("python-numexpr" ,python-numexpr)
7501 ("python-numpy" ,python-numpy)))
7502 (native-inputs
7503 `(("python-cython" ,python-cython)
7504 ("pkg-config" ,pkg-config)))
7505 (inputs
7506 `(("hdf5" ,hdf5)
7507 ("bzip2" ,bzip2)
7508 ("zlib" ,zlib)))
7509 (home-page "http://www.pytables.org/")
7510 (synopsis "Hierarchical datasets for Python")
7511 (description "PyTables is a package for managing hierarchical datasets and
7512 designed to efficiently cope with extremely large amounts of data.")
7513 (license license:bsd-3)))
7514
7515 (define-public python2-tables
7516 (package-with-python2 python-tables))
7517
7518 (define-public python-pyasn1
7519 (package
7520 (name "python-pyasn1")
7521 (version "0.2.3")
7522 (source
7523 (origin
7524 (method url-fetch)
7525 (uri (pypi-uri "pyasn1" version))
7526 (sha256
7527 (base32
7528 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7529 (build-system python-build-system)
7530 (home-page "http://pyasn1.sourceforge.net/")
7531 (synopsis "ASN.1 types and codecs")
7532 (description
7533 "This is an implementation of ASN.1 types and codecs in Python. It is
7534 suitable for a wide range of protocols based on the ASN.1 specification.")
7535 (license license:bsd-2)))
7536
7537 (define-public python2-pyasn1
7538 (package-with-python2 python-pyasn1))
7539
7540 (define-public python-pyasn1-modules
7541 (package
7542 (name "python-pyasn1-modules")
7543 (version "0.0.8")
7544 (source
7545 (origin
7546 (method url-fetch)
7547 (uri (pypi-uri "pyasn1-modules" version))
7548 (sha256
7549 (base32
7550 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7551 (build-system python-build-system)
7552 (propagated-inputs
7553 `(("python-pyasn1" ,python-pyasn1)))
7554 (home-page "https://sourceforge.net/projects/pyasn1/")
7555 (synopsis "ASN.1 codec implementations")
7556 (description
7557 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7558 implementations of ASN.1-based codecs and protocols.")
7559 (license license:bsd-3)))
7560
7561 (define-public python2-pyasn1-modules
7562 (package-with-python2 python-pyasn1-modules))
7563
7564 (define-public python-ipaddress
7565 (package
7566 (name "python-ipaddress")
7567 (version "1.0.18")
7568 (source (origin
7569 (method url-fetch)
7570 (uri (pypi-uri "ipaddress" version))
7571 (sha256
7572 (base32
7573 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7574 (build-system python-build-system)
7575 (home-page "https://github.com/phihag/ipaddress")
7576 (synopsis "IP address manipulation library")
7577 (description
7578 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7579 in Python. This library is used to create, poke at, and manipulate IPv4 and
7580 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7581 module to older versions of Python.")
7582 (license license:psfl)))
7583
7584 (define-public python2-ipaddress
7585 (package-with-python2 python-ipaddress))
7586
7587 (define-public python2-ipaddr
7588 (package
7589 (name "python2-ipaddr")
7590 (version "2.1.11")
7591 (source
7592 (origin
7593 (method url-fetch)
7594 (uri (pypi-uri "ipaddr" version))
7595 (sha256
7596 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7597 (build-system python-build-system)
7598 (arguments
7599 `(#:python ,python-2 ;version 2 only
7600 #:phases
7601 (modify-phases %standard-phases
7602 (replace 'check
7603 (lambda* _
7604 (zero? (system* "python" "ipaddr_test.py")))))))
7605 (home-page "https://github.com/google/ipaddr-py")
7606 (synopsis "IP address manipulation library")
7607 (description
7608 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7609 IPv6 addresses and networks.
7610
7611 For new implementations you may prefer to use the standard module
7612 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7613 versions of Python.")
7614 (license license:asl2.0)))
7615
7616 (define-public python-idna
7617 (package
7618 (name "python-idna")
7619 (version "2.5")
7620 (source
7621 (origin
7622 (method url-fetch)
7623 (uri (pypi-uri "idna" version))
7624 (sha256
7625 (base32
7626 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7627 (build-system python-build-system)
7628 (home-page "https://github.com/kjd/idna")
7629 (synopsis "Internationalized domain names in applications")
7630 (description
7631 "This is a library to support the Internationalised Domain Names in
7632 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7633 protocol is often referred to as “IDNA2008” and can produce different results
7634 from the earlier standard from 2003. The library is also intended to act as a
7635 suitable drop-in replacement for the “encodings.idna” module that comes with
7636 the Python standard library but currently only supports the older 2003
7637 specification.")
7638 (license license:bsd-4)))
7639
7640 (define-public python2-idna
7641 (package-with-python2 python-idna))
7642
7643 (define-public python-pretend
7644 (package
7645 (name "python-pretend")
7646 (version "1.0.8")
7647 (source
7648 (origin
7649 (method url-fetch)
7650 (uri (string-append "https://pypi.python.org/packages/source/p/"
7651 "pretend/pretend-" version ".tar.gz"))
7652 (sha256
7653 (base32
7654 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7655 (build-system python-build-system)
7656 (home-page "https://github.com/alex/pretend")
7657 (synopsis "Library for stubbing in Python")
7658 (description
7659 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7660 technique for writing tests. You may hear the term mixed up with mocks,
7661 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7662 responses, rather than doing any computation.")
7663 (license license:bsd-3)))
7664
7665 (define-public python2-pretend
7666 (package-with-python2 python-pretend))
7667
7668 (define-public python-cryptography-vectors
7669 (package
7670 (name "python-cryptography-vectors")
7671 (version "2.0.2")
7672 (source
7673 (origin
7674 (method url-fetch)
7675 (uri (pypi-uri "cryptography_vectors" version))
7676 (sha256
7677 (base32
7678 "0yvi2cp23rg20bq3hd47ixbvjh0zgxnxrriqx5v17d7vkmliwbsi"))))
7679 (build-system python-build-system)
7680 (home-page "https://github.com/pyca/cryptography")
7681 (synopsis "Test vectors for the cryptography package")
7682 (description
7683 "This package contains test vectors for the cryptography package.")
7684 ;; Distributed under either BSD-3 or ASL2.0
7685 (license (list license:bsd-3 license:asl2.0))))
7686
7687 (define-public python2-cryptography-vectors
7688 (package-with-python2 python-cryptography-vectors))
7689
7690 (define-public python-cryptography
7691 (package
7692 (name "python-cryptography")
7693 (version "2.0.2")
7694 (source
7695 (origin
7696 (method url-fetch)
7697 (uri (pypi-uri "cryptography" version))
7698 (sha256
7699 (base32
7700 "1aq6ilnf2zdqshwqai4w8gmb5y6p7ip34qrjp1yb7sz77rkb501p"))))
7701 (build-system python-build-system)
7702 (inputs
7703 `(("openssl" ,openssl)))
7704 (propagated-inputs
7705 `(("python-asn1crypto" ,python-asn1crypto)
7706 ("python-cffi" ,python-cffi)
7707 ("python-six" ,python-six)
7708 ("python-idna" ,python-idna)
7709 ("python-iso8601" ,python-iso8601)))
7710 (native-inputs
7711 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7712 ("python-hypothesis" ,python-hypothesis)
7713 ("python-pretend" ,python-pretend)
7714 ("python-pytz" ,python-pytz)
7715 ("python-pytest" ,python-pytest-3.0)))
7716 (home-page "https://github.com/pyca/cryptography")
7717 (synopsis "Cryptographic recipes and primitives for Python")
7718 (description
7719 "cryptography is a package which provides cryptographic recipes and
7720 primitives to Python developers. It aims to be the “cryptographic standard
7721 library” for Python. The package includes both high level recipes, and low
7722 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7723 message digests and key derivation functions.")
7724 ;; Distributed under either BSD-3 or ASL2.0
7725 (license (list license:bsd-3 license:asl2.0))
7726 (properties `((python2-variant . ,(delay python2-cryptography))))))
7727
7728 (define-public python2-cryptography
7729 (let ((crypto (package-with-python2
7730 (strip-python2-variant python-cryptography))))
7731 (package (inherit crypto)
7732 (propagated-inputs
7733 `(("python2-ipaddress" ,python2-ipaddress)
7734 ("python2-backport-ssl-match-hostname"
7735 ,python2-backport-ssl-match-hostname)
7736 ("python2-enum34" ,python2-enum34)
7737 ,@(package-propagated-inputs crypto))))))
7738
7739 (define-public python-pyopenssl
7740 (package
7741 (name "python-pyopenssl")
7742 (version "17.2.0")
7743 (source
7744 (origin
7745 (method url-fetch)
7746 (uri (pypi-uri "pyOpenSSL" version))
7747 (sha256
7748 (base32
7749 "0d283g4zi0hr9papd24mjl70mi15gyzq6fx618rizi87dgipqqax"))))
7750 (build-system python-build-system)
7751 (arguments
7752 '(#:phases
7753 (modify-phases %standard-phases
7754 (delete 'check)
7755 (add-after 'install 'check
7756 (lambda* (#:key inputs outputs #:allow-other-keys)
7757 (add-installed-pythonpath inputs outputs)
7758 (zero? (system* "py.test" "-v" "-k"
7759 (string-append
7760 ;; This test tries to look up certificates from
7761 ;; the compiled-in default path in OpenSSL, which
7762 ;; does not exist in the build environment.
7763 "not test_fallback_default_verify_paths "
7764 ;; This test attempts to make a connection to
7765 ;; an external web service.
7766 "and not test_set_default_verify_paths"))))))))
7767 (propagated-inputs
7768 `(("python-cryptography" ,python-cryptography)
7769 ("python-six" ,python-six)))
7770 (inputs
7771 `(("openssl" ,openssl)))
7772 (native-inputs
7773 `(("python-flaky" ,python-flaky)
7774 ("python-pretend" ,python-pretend)
7775 ("python-pytest" ,python-pytest-3.0)))
7776 (home-page "https://github.com/pyca/pyopenssl")
7777 (synopsis "Python wrapper module around the OpenSSL library")
7778 (description
7779 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7780 library.")
7781 (license license:asl2.0)))
7782
7783 (define-public python2-pyopenssl
7784 (package-with-python2 python-pyopenssl))
7785
7786 (define-public python-pip
7787 (package
7788 (name "python-pip")
7789 (version "9.0.1")
7790 (source
7791 (origin
7792 (method url-fetch)
7793 (uri (pypi-uri "pip" version))
7794 (sha256
7795 (base32
7796 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7797 (build-system python-build-system)
7798 (arguments
7799 '(#:tests? #f)) ; there are no tests in the pypi archive.
7800 (home-page "https://pip.pypa.io/")
7801 (synopsis "Package manager for Python software")
7802 (description
7803 "Pip is a package manager for Python software, that finds packages on the
7804 Python Package Index (PyPI).")
7805 (license license:expat)))
7806
7807 (define-public python2-pip
7808 (package-with-python2 python-pip))
7809
7810 (define-public python-tlsh
7811 (package
7812 (name "python-tlsh")
7813 (version "3.4.4")
7814 (home-page "https://github.com/trendmicro/tlsh")
7815 (source (origin
7816 (method url-fetch)
7817 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7818 version ".tar.gz"))
7819 (sha256
7820 (base32
7821 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7822 (file-name (string-append name "-" version ".tar.gz"))))
7823 (build-system cmake-build-system)
7824 (arguments
7825 '(#:out-of-source? #f
7826 #:phases (modify-phases %standard-phases
7827 (replace
7828 'install
7829 (lambda* (#:key outputs #:allow-other-keys)
7830 ;; Build and install the Python bindings. The underlying
7831 ;; C++ library is apparently not meant to be installed.
7832 (let ((out (assoc-ref outputs "out")))
7833 (with-directory-excursion "py_ext"
7834 (and (system* "python" "setup.py" "build")
7835 (system* "python" "setup.py" "install"
7836 (string-append "--prefix=" out))))))))))
7837 (inputs `(("python" ,python-wrapper))) ;for the bindings
7838 (synopsis "Fuzzy matching library for Python")
7839 (description
7840 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7841 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7842 value which can be used for similarity comparisons. Similar objects have
7843 similar hash values, which allows for the detection of similar objects by
7844 comparing their hash values. The byte stream should have a sufficient amount
7845 of complexity; for example, a byte stream of identical bytes will not generate
7846 a hash value.")
7847 (license license:asl2.0)))
7848
7849 (define-public python2-tlsh
7850 (package
7851 (inherit python-tlsh)
7852 (name "python2-tlsh")
7853 (inputs `(("python" ,python-2)))))
7854
7855 (define-public python-termcolor
7856 (package
7857 (name "python-termcolor")
7858 (version "1.1.0")
7859 (source
7860 (origin
7861 (method url-fetch)
7862 (uri (pypi-uri "termcolor" version))
7863 (sha256
7864 (base32
7865 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7866 (build-system python-build-system)
7867 (arguments
7868 ;; There are no tests.
7869 `(#:tests? #f))
7870 (home-page "http://pypi.python.org/pypi/termcolor")
7871 (synopsis "ANSII Color formatting for terminal output")
7872 (description
7873 "This package provides ANSII Color formatting for output in terminals.")
7874 (license license:expat)))
7875
7876 (define-public python2-termcolor
7877 (package-with-python2 python-termcolor))
7878
7879 (define-public python-libarchive-c
7880 (package
7881 (name "python-libarchive-c")
7882 (version "2.2")
7883 (source (origin
7884 (method url-fetch)
7885 (uri (pypi-uri "libarchive-c" version))
7886 (sha256
7887 (base32
7888 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7889 (build-system python-build-system)
7890 (arguments
7891 '(#:phases (modify-phases %standard-phases
7892 (add-before
7893 'build 'reference-libarchive
7894 (lambda* (#:key inputs #:allow-other-keys)
7895 ;; Retain the absolute file name of libarchive.so.
7896 (let ((libarchive (assoc-ref inputs "libarchive")))
7897 (substitute* "libarchive/ffi.py"
7898 (("find_library\\('archive'\\)")
7899 (string-append "'" libarchive
7900 "/lib/libarchive.so'")))))))))
7901 (inputs
7902 `(("libarchive" ,libarchive)))
7903 (home-page "https://github.com/Changaco/python-libarchive-c")
7904 (synopsis "Python interface to libarchive")
7905 (description
7906 "This package provides Python bindings to libarchive, a C library to
7907 access possibly compressed archives in many different formats. It uses
7908 Python's @code{ctypes} foreign function interface (FFI).")
7909 (license license:lgpl2.0+)))
7910
7911 (define-public python2-libarchive-c
7912 (package-with-python2 python-libarchive-c))
7913
7914 (define-public python-file
7915 (package
7916 (inherit file)
7917 (name "python-file")
7918 (build-system python-build-system)
7919 (arguments
7920 '(#:tests? #f ;no tests
7921 #:configure-flags '("--single-version-externally-managed" "--root=/")
7922 #:phases (modify-phases %standard-phases
7923 (add-before 'build 'change-directory
7924 (lambda _
7925 (chdir "python")
7926 #t))
7927 (add-before 'build 'set-library-file-name
7928 (lambda* (#:key inputs #:allow-other-keys)
7929 (let ((file (assoc-ref inputs "file")))
7930 (substitute* "magic.py"
7931 (("find_library\\('magic'\\)")
7932 (string-append "'" file "/lib/libmagic.so'")))
7933 #t))))))
7934 (inputs `(("file" ,file)))
7935 (self-native-input? #f)
7936 (synopsis "Python bindings to the libmagic file type guesser. Note that
7937 this module and the python-magic module both provide a \"magic.py\" file;
7938 these two modules, which are different and were developed separately, both
7939 serve the same purpose: provide Python bindings for libmagic.")))
7940
7941 (define-public python2-file
7942 (package-with-python2 python-file))
7943
7944 (define-public python-debian
7945 (package
7946 (name "python-debian")
7947 (version "0.1.28")
7948 (source
7949 (origin
7950 (method url-fetch)
7951 (uri (pypi-uri name version))
7952 (sha256
7953 (base32
7954 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7955 (build-system python-build-system)
7956 (propagated-inputs
7957 `(("python-six" ,python-six)))
7958 (home-page "http://packages.debian.org/sid/python-debian")
7959 (synopsis "Debian package related modules")
7960 (description
7961 ;; XXX: Use @enumerate instead of @itemize to work around
7962 ;; <http://bugs.gnu.org/21772>.
7963 "This package provides Python modules that abstract many formats of
7964 Debian-related files, such as:
7965
7966 @enumerate
7967 @item Debtags information;
7968 @item @file{debian/changelog} files;
7969 @item packages files, pdiffs;
7970 @item control files of single or multiple RFC822-style paragraphs---e.g.
7971 @file{debian/control}, @file{.changes}, @file{.dsc};
7972 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7973 contained files and meta-information.
7974 @end enumerate\n")
7975
7976 ;; Modules are either GPLv2+ or GPLv3+.
7977 (license license:gpl3+)))
7978
7979 (define-public python2-debian
7980 (package-with-python2 python-debian))
7981
7982 (define-public python-nbformat
7983 (package
7984 (name "python-nbformat")
7985 (version "4.1.0")
7986 (source
7987 (origin
7988 (method url-fetch)
7989 (uri (pypi-uri "nbformat" version))
7990 (sha256
7991 (base32
7992 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7993 (build-system python-build-system)
7994 (arguments `(#:tests? #f)) ; no test target
7995 (propagated-inputs
7996 `(("python-ipython-genutils" ,python-ipython-genutils)
7997 ("python-jsonschema" ,python-jsonschema)
7998 ("python-jupyter-core" ,python-jupyter-core)
7999 ("python-traitlets" ,python-traitlets)))
8000 (home-page "http://jupyter.org")
8001 (synopsis "Jupyter Notebook format")
8002 (description "This package provides the reference implementation of the
8003 Jupyter Notebook format and Python APIs for working with notebooks.")
8004 (license license:bsd-3)))
8005
8006 (define-public python2-nbformat
8007 (package-with-python2 python-nbformat))
8008
8009 (define-public python-bleach
8010 (package
8011 (name "python-bleach")
8012 (version "1.4.3")
8013 (source
8014 (origin
8015 (method url-fetch)
8016 (uri (pypi-uri "bleach" version))
8017 (sha256
8018 (base32
8019 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
8020 (build-system python-build-system)
8021 (propagated-inputs
8022 `(("python-html5lib" ,python-html5lib-0.9)
8023 ("python-six" ,python-six)))
8024 (native-inputs
8025 `(("python-nose" ,python-nose)))
8026 (home-page "https://github.com/jsocol/bleach")
8027 (synopsis "Whitelist-based HTML-sanitizing tool")
8028 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8029 (license license:asl2.0)))
8030
8031 (define-public python2-bleach
8032 (package-with-python2 python-bleach))
8033
8034 (define-public python-entrypoints
8035 (package
8036 (name "python-entrypoints")
8037 (version "0.2.2")
8038 (source
8039 (origin
8040 (method url-fetch)
8041 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
8042 version ".tar.gz"))
8043 (file-name (string-append name "-" version ".tar.gz"))
8044 (sha256
8045 (base32
8046 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
8047 (build-system python-build-system)
8048 ;; The package does not come with a setup.py file, so we have to generate
8049 ;; one ourselves.
8050 (arguments
8051 `(#:tests? #f
8052 #:phases
8053 (modify-phases %standard-phases
8054 (add-after 'unpack 'create-setup.py
8055 (lambda _
8056 (call-with-output-file "setup.py"
8057 (lambda (port)
8058 (format port "\
8059 from setuptools import setup
8060 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8061 " ,version))))))))
8062 (home-page "https://github.com/takluyver/entrypoints")
8063 (synopsis "Discover and load entry points from installed Python packages")
8064 (description "Entry points are a way for Python packages to advertise
8065 objects with some common interface. The most common examples are
8066 @code{console_scripts} entry points, which define shell commands by
8067 identifying a Python function to run. The @code{entrypoints} module contains
8068 functions to find and load entry points.")
8069 (license license:expat)))
8070
8071 (define-public python2-entrypoints
8072 (package-with-python2 python-entrypoints))
8073
8074 (define-public python-nbconvert
8075 (package
8076 (name "python-nbconvert")
8077 (version "5.0.0b1")
8078 (source
8079 (origin
8080 (method url-fetch)
8081 (uri (pypi-uri "nbconvert" version))
8082 (sha256
8083 (base32
8084 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8085 (build-system python-build-system)
8086 (arguments
8087 `(;; The "bdist_egg" target is disabled by default, causing the installation
8088 ;; to fail.
8089 #:configure-flags (list "bdist_egg")
8090 ;; FIXME: 5 failures, 40 errors.
8091 #:tests? #f))
8092 ;; #:phases
8093 ;; (modify-phases %standard-phases
8094 ;; (replace 'check
8095 ;; (lambda _
8096 ;; (zero? (system* "py.test" "-v")))))
8097 (native-inputs
8098 `(("python-pytest" ,python-pytest)))
8099 (propagated-inputs
8100 `(("python-bleach" ,python-bleach)
8101 ("python-entrypoints" ,python-entrypoints)
8102 ("python-jinja2" ,python-jinja2)
8103 ("python-jupyter-core" ,python-jupyter-core)
8104 ("python-mistune" ,python-mistune)
8105 ("python-nbformat" ,python-nbformat)
8106 ("python-pygments" ,python-pygments)
8107 ("python-traitlets" ,python-traitlets)))
8108 (home-page "http://jupyter.org")
8109 (synopsis "Converting Jupyter Notebooks")
8110 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8111 notebooks to various other formats via Jinja templates. It allows you to
8112 convert an @code{.ipynb} notebook file into various static formats including:
8113
8114 @enumerate
8115 @item HTML
8116 @item LaTeX
8117 @item PDF
8118 @item Reveal JS
8119 @item Markdown (md)
8120 @item ReStructured Text (rst)
8121 @item executable script
8122 @end enumerate\n")
8123 (license license:bsd-3)))
8124
8125 (define-public python2-nbconvert
8126 (package-with-python2 python-nbconvert))
8127
8128 (define-public python-notebook
8129 (package
8130 (name "python-notebook")
8131 (version "4.2.3")
8132 (source (origin
8133 (method url-fetch)
8134 (uri (pypi-uri "notebook" version))
8135 (sha256
8136 (base32
8137 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
8138 (build-system python-build-system)
8139 (arguments
8140 `(#:phases
8141 (modify-phases %standard-phases
8142 (replace 'check
8143 (lambda _
8144 ;; HOME must be set for tests
8145 (setenv "HOME" "/tmp")
8146 (zero? (system* "nosetests")))))))
8147 (propagated-inputs
8148 `(("python-jupyter-core" ,python-jupyter-core)
8149 ("python-nbformat" ,python-nbformat)
8150 ("python-nbconvert" ,python-nbconvert)
8151 ("python-ipython" ,python-ipython)))
8152 (native-inputs
8153 `(("python-nose" ,python-nose)
8154 ("python-sphinx" ,python-sphinx)
8155 ("python-requests" ,python-requests)))
8156 (home-page "http://jupyter.org/")
8157 (synopsis "Web-based notebook environment for interactive computing")
8158 (description
8159 "The Jupyter HTML notebook is a web-based notebook environment for
8160 interactive computing.")
8161 (properties `((python2-variant . ,(delay python2-notebook))))
8162 (license license:bsd-3)))
8163
8164 (define-public python2-notebook
8165 (let ((base (package-with-python2
8166 (strip-python2-variant python-notebook))))
8167 (package (inherit base)
8168 (native-inputs
8169 `(("python2-mock" ,python2-mock)
8170 ,@(package-native-inputs base)))
8171 (arguments
8172 (substitute-keyword-arguments (package-arguments base)
8173 ((#:phases phases)
8174 `(modify-phases ,phases
8175 (add-before 'check 'disable-test-case
8176 ;; The test requires network access to localhost. Curiously it
8177 ;; fails with Python 2 only. Simply make the test-case return
8178 ;; immediately.
8179 (lambda _
8180 (substitute*
8181 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8182 (("formats = self.nbconvert_api") "return #")))))))))))
8183
8184 (define-public python-widgetsnbextension
8185 (package
8186 (name "python-widgetsnbextension")
8187 (version "1.2.6")
8188 (source
8189 (origin
8190 (method url-fetch)
8191 (uri (pypi-uri "widgetsnbextension" version))
8192 (sha256
8193 (base32
8194 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8195 (build-system python-build-system)
8196 (propagated-inputs
8197 `(("python-notebook" ,python-notebook)))
8198 (native-inputs
8199 `(("python-certifi" ,python-certifi)
8200 ("python-nose" ,python-nose)))
8201 (home-page "http://ipython.org")
8202 (synopsis "IPython HTML widgets for Jupyter")
8203 (description "This package provides interactive HTML widgets for Jupyter
8204 notebooks.")
8205 (license license:bsd-3)))
8206
8207 (define-public python2-widgetsnbextension
8208 (package-with-python2 python-widgetsnbextension))
8209
8210 (define-public python-ipywidgets
8211 (package
8212 (name "python-ipywidgets")
8213 (version "5.2.2")
8214 (source
8215 (origin
8216 (method url-fetch)
8217 (uri (pypi-uri "ipywidgets" version))
8218 (sha256
8219 (base32
8220 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8221 (build-system python-build-system)
8222 ;; FIXME: it's not clear how to run the tests.
8223 (arguments `(#:tests? #f))
8224 (propagated-inputs
8225 `(("python-ipykernel" ,python-ipykernel)
8226 ("python-ipython" ,python-ipython)
8227 ("python-traitlets" ,python-traitlets)
8228 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8229 (home-page "http://ipython.org")
8230 (synopsis "IPython HTML widgets for Jupyter")
8231 (description "Ipywidgets are interactive HTML widgets for Jupyter
8232 notebooks and the IPython kernel. Notebooks come alive when interactive
8233 widgets are used. Users gain control of their data and can visualize changes
8234 in the data.")
8235 (license license:bsd-3)))
8236
8237 (define-public python2-ipywidgets
8238 (package-with-python2 python-ipywidgets))
8239
8240 (define-public python-jupyter-console
8241 (package
8242 (name "python-jupyter-console")
8243 (version "5.0.0")
8244 (source
8245 (origin
8246 (method url-fetch)
8247 (uri (pypi-uri "jupyter_console" version))
8248 (sha256
8249 (base32
8250 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8251 (build-system python-build-system)
8252 ;; FIXME: it's not clear how to run the tests.
8253 (arguments `(#:tests? #f))
8254 (propagated-inputs
8255 `(("python-ipykernel" ,python-ipykernel)
8256 ("python-ipython" ,python-ipython)
8257 ("python-jupyter-client" ,python-jupyter-client)
8258 ("python-prompt-toolkit" ,python-prompt-toolkit)
8259 ("python-pygments" ,python-pygments)))
8260 (home-page "https://jupyter.org")
8261 (synopsis "Jupyter terminal console")
8262 (description "This package provides a terminal-based console frontend for
8263 Jupyter kernels. It also allows for console-based interaction with non-Python
8264 Jupyter kernels such as IJulia and IRKernel.")
8265 (license license:bsd-3)))
8266
8267 (define-public python2-jupyter-console
8268 (package-with-python2 python-jupyter-console))
8269
8270 (define-public jupyter
8271 (package
8272 (name "jupyter")
8273 (version "1.0.0")
8274 (source
8275 (origin
8276 (method url-fetch)
8277 (uri (pypi-uri "jupyter" version))
8278 (sha256
8279 (base32
8280 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8281 (build-system python-build-system)
8282 ;; FIXME: it's not clear how to run the tests.
8283 (arguments `(#:tests? #f))
8284 (propagated-inputs
8285 `(("python-ipykernel" ,python-ipykernel)
8286 ("python-ipywidgets" ,python-ipywidgets)
8287 ("python-jupyter-console" ,python-jupyter-console)
8288 ("python-nbconvert" ,python-nbconvert)
8289 ("python-notebook" ,python-notebook)))
8290 (home-page "http://jupyter.org")
8291 (synopsis "Web application for interactive documents")
8292 (description
8293 "The Jupyter Notebook is a web application that allows you to create and
8294 share documents that contain live code, equations, visualizations and
8295 explanatory text. Uses include: data cleaning and transformation, numerical
8296 simulation, statistical modeling, machine learning and much more.")
8297 (license license:bsd-3)))
8298
8299 (define-public python-chardet
8300 (package
8301 (name "python-chardet")
8302 (version "2.3.0")
8303 (source
8304 (origin
8305 (method url-fetch)
8306 (uri (string-append
8307 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8308 version
8309 ".tar.gz"))
8310 (sha256
8311 (base32
8312 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8313 (build-system python-build-system)
8314 (home-page "https://github.com/chardet/chardet")
8315 (synopsis "Universal encoding detector for Python 2 and 3")
8316 (description
8317 "This package provides @code{chardet}, a Python module that can
8318 automatically detect a wide range of file encodings.")
8319 (license license:lgpl2.1+)))
8320
8321 (define-public python2-chardet
8322 (package-with-python2 python-chardet))
8323
8324 (define-public python-docopt
8325 (package
8326 (name "python-docopt")
8327 (version "0.6.2")
8328 (source
8329 (origin
8330 (method url-fetch)
8331 ;; The release on PyPI does not include tests.
8332 (uri (string-append
8333 "https://github.com/docopt/docopt/archive/"
8334 version ".tar.gz"))
8335 (file-name (string-append name "-" version ".tar.gz"))
8336 (sha256
8337 (base32
8338 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8339 (build-system python-build-system)
8340 (native-inputs
8341 `(("python-pytest" ,python-pytest)))
8342 (arguments
8343 `(#:phases (alist-replace
8344 'check
8345 (lambda _ (zero? (system* "py.test")))
8346 %standard-phases)))
8347 (home-page "http://docopt.org")
8348 (synopsis "Command-line interface description language for Python")
8349 (description "This library allows the user to define a command-line
8350 interface from a program's help message rather than specifying it
8351 programatically with command-line parsers like @code{getopt} and
8352 @code{argparse}.")
8353 (license license:expat)))
8354
8355 (define-public python2-docopt
8356 (package-with-python2 python-docopt))
8357
8358 (define-public python-zope-event
8359 (package
8360 (name "python-zope-event")
8361 (version "4.1.0")
8362 (source
8363 (origin
8364 (method url-fetch)
8365 (uri (string-append "https://pypi.python.org/packages/source/z"
8366 "/zope.event/zope.event-" version ".tar.gz"))
8367 (sha256
8368 (base32
8369 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8370 (build-system python-build-system)
8371 (home-page "http://pypi.python.org/pypi/zope.event")
8372 (synopsis "Event publishing system for Python")
8373 (description "Zope.event provides an event publishing API, intended for
8374 use by applications which are unaware of any subscribers to their events. It
8375 is a simple event-dispatching system on which more sophisticated event
8376 dispatching systems can be built.")
8377 (license license:zpl2.1)))
8378
8379 (define-public python2-zope-event
8380 (package-with-python2 python-zope-event))
8381
8382 (define-public python-zope-interface
8383 (package
8384 (name "python-zope-interface")
8385 (version "4.1.3")
8386 (source
8387 (origin
8388 (method url-fetch)
8389 (uri (string-append "https://pypi.python.org/packages/source/z"
8390 "/zope.interface/zope.interface-" version ".tar.gz"))
8391 (sha256
8392 (base32
8393 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8394 (build-system python-build-system)
8395 (native-inputs
8396 `(("python-zope-event" ,python-zope-event)))
8397 (home-page "https://github.com/zopefoundation/zope.interface")
8398 (synopsis "Python implementation of the \"design by contract\"
8399 methodology")
8400 (description "Zope.interface provides an implementation of \"object
8401 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8402 conforming to a given API or contract.")
8403 (license license:zpl2.1)))
8404
8405 (define-public python2-zope-interface
8406 (package-with-python2 python-zope-interface))
8407
8408 (define-public python-zope-exceptions
8409 (package
8410 (name "python-zope-exceptions")
8411 (version "4.0.8")
8412 (source
8413 (origin
8414 (method url-fetch)
8415 (uri (string-append "https://pypi.python.org/packages/source/z"
8416 "/zope.exceptions/zope.exceptions-"
8417 version ".tar.gz"))
8418 (sha256
8419 (base32
8420 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8421 (build-system python-build-system)
8422 (arguments
8423 '(#:tests? #f)) ; circular dependency with zope.testrunner
8424 (propagated-inputs
8425 `(("python-zope-interface" ,python-zope-interface)))
8426 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8427 (synopsis "Zope exceptions")
8428 (description "Zope.exceptions provides general-purpose exception types
8429 that have uses outside of the Zope framework.")
8430 (license license:zpl2.1)))
8431
8432 (define-public python2-zope-exceptions
8433 (package-with-python2 python-zope-exceptions))
8434
8435 (define-public python-zope-testing
8436 (package
8437 (name "python-zope-testing")
8438 (version "4.5.0")
8439 (source
8440 (origin
8441 (method url-fetch)
8442 (uri (string-append "https://pypi.python.org/packages/source/z"
8443 "/zope.testing/zope.testing-" version ".tar.gz"))
8444 (sha256
8445 (base32
8446 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8447 (modules '((guix build utils)))
8448 (snippet
8449 '(begin
8450 ;; Remove pre-compiled .pyc files backup files from source.
8451 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8452 #t))))
8453 (build-system python-build-system)
8454 (native-inputs
8455 `(("python-zope-exceptions" ,python-zope-exceptions)))
8456 (propagated-inputs
8457 `(("python-zope-interface" ,python-zope-interface)))
8458 (home-page "http://pypi.python.org/pypi/zope.testing")
8459 (synopsis "Zope testing helpers")
8460 (description "Zope.testing provides a number of testing utilities for HTML
8461 forms, HTTP servers, regular expressions, and more.")
8462 (license license:zpl2.1)))
8463
8464 (define-public python2-zope-testing
8465 (package-with-python2 python-zope-testing))
8466
8467 (define-public python-zope-testrunner
8468 (package
8469 (name "python-zope-testrunner")
8470 (version "4.4.9")
8471 (source
8472 (origin
8473 (method url-fetch)
8474 (uri (string-append "https://pypi.python.org/packages/source/z"
8475 "/zope.testrunner/zope.testrunner-"
8476 version ".zip"))
8477 (sha256
8478 (base32
8479 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8480 (build-system python-build-system)
8481 (arguments
8482 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8483 (native-inputs
8484 `(("python-six" ,python-six)
8485 ;("python-zope-interface" ,python-zope-interface)
8486 ("python-zope-exceptions" ,python-zope-exceptions)
8487 ("python-zope-testing" ,python-zope-testing)
8488 ("unzip" ,unzip)))
8489 (propagated-inputs
8490 `(("python-zope-interface" ,python-zope-interface)))
8491 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8492 (synopsis "Zope testrunner script")
8493 (description "Zope.testrunner provides a script for running Python
8494 tests.")
8495 (license license:zpl2.1)))
8496
8497 (define-public python2-zope-testrunner
8498 (let ((base (package-with-python2 python-zope-testrunner)))
8499 (package
8500 (inherit base)
8501 (native-inputs
8502 (append (package-native-inputs base)
8503 `(("python2-subunit" ,python2-subunit)
8504 ("python2-mimeparse" ,python2-mimeparse)))))))
8505
8506 (define-public python-zope-i18nmessageid
8507 (package
8508 (name "python-zope-i18nmessageid")
8509 (version "4.0.3")
8510 (source
8511 (origin
8512 (method url-fetch)
8513 (uri (string-append
8514 "https://pypi.python.org/packages/source/z"
8515 "/zope.i18nmessageid/zope.i18nmessageid-"
8516 version ".tar.gz"))
8517 (sha256
8518 (base32
8519 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8520 (build-system python-build-system)
8521 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8522 (synopsis "Message identifiers for internationalization")
8523 (description "Zope.i18nmessageid provides facilities for declaring
8524 internationalized messages within program source text.")
8525 (license license:zpl2.1)))
8526
8527 (define-public python2-zope-i18nmessageid
8528 (package-with-python2 python-zope-i18nmessageid))
8529
8530 (define-public python-zope-schema
8531 (package
8532 (name "python-zope-schema")
8533 (version "4.4.2")
8534 (source
8535 (origin
8536 (method url-fetch)
8537 (uri (string-append "https://pypi.python.org/packages/source/z"
8538 "/zope.schema/zope.schema-" version ".tar.gz"))
8539 (sha256
8540 (base32
8541 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8542 (build-system python-build-system)
8543 (arguments
8544 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8545 (propagated-inputs
8546 `(("python-zope-event" ,python-zope-event)
8547 ("python-zope-exceptions", python-zope-exceptions)
8548 ("python-zope-interface" ,python-zope-interface)))
8549 (native-inputs
8550 `(("python-zope-testing" ,python-zope-testing)
8551 ("python-coverage" ,python-coverage)
8552 ("python-nose" ,python-nose)))
8553 (home-page "http://pypi.python.org/pypi/zope.schema")
8554 (synopsis "Zope data schemas")
8555 (description "Zope.scheme provides extensions to zope.interface for
8556 defining data schemas.")
8557 (license license:zpl2.1)))
8558
8559 (define-public python2-zope-schema
8560 (package-with-python2 python-zope-schema))
8561
8562 (define-public python-zope-configuration
8563 (package
8564 (name "python-zope-configuration")
8565 (version "4.0.3")
8566 (source (origin
8567 (method url-fetch)
8568 (uri (string-append "https://pypi.python.org/packages/source/z"
8569 "/zope.configuration/zope.configuration-"
8570 version ".tar.gz"))
8571 (sha256
8572 (base32
8573 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8574 (build-system python-build-system)
8575 (arguments
8576 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8577 (propagated-inputs
8578 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8579 ("python-zope-schema" ,python-zope-schema)))
8580 (home-page "http://pypi.python.org/pypi/zope.configuration")
8581 (synopsis "Zope Configuration Markup Language")
8582 (description "Zope.configuration implements ZCML, the Zope Configuration
8583 Markup Language.")
8584 (license license:zpl2.1)))
8585
8586 (define-public python2-zope-configuration
8587 (package-with-python2 python-zope-configuration))
8588
8589 (define-public python-zope-proxy
8590 (package
8591 (name "python-zope-proxy")
8592 (version "4.1.6")
8593 (source
8594 (origin
8595 (method url-fetch)
8596 (uri (string-append "https://pypi.python.org/packages/source/z"
8597 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8598 (sha256
8599 (base32
8600 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8601 (build-system python-build-system)
8602 (arguments
8603 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8604 (propagated-inputs
8605 `(("python-zope-interface" ,python-zope-interface)))
8606 (home-page "http://pypi.python.org/pypi/zope.proxy")
8607 (synopsis "Generic, transparent proxies")
8608 (description "Zope.proxy provides generic, transparent proxies for Python.
8609 Proxies are special objects which serve as mostly-transparent wrappers around
8610 another object, intervening in the apparent behavior of the wrapped object
8611 only when necessary to apply the policy (e.g., access checking, location
8612 brokering, etc.) for which the proxy is responsible.")
8613 (license license:zpl2.1)))
8614
8615 (define-public python2-zope-proxy
8616 (package-with-python2 python-zope-proxy))
8617
8618 (define-public python-zope-location
8619 (package
8620 (name "python-zope-location")
8621 (version "4.0.3")
8622 (source
8623 (origin
8624 (method url-fetch)
8625 (uri (string-append "https://pypi.python.org/packages/source/z"
8626 "/zope.location/zope.location-" version ".tar.gz"))
8627 (sha256
8628 (base32
8629 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8630 (build-system python-build-system)
8631 (arguments
8632 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8633 (propagated-inputs
8634 `(("python-zope-proxy" ,python-zope-proxy)
8635 ("python-zope-schema" ,python-zope-schema)))
8636 (home-page "http://pypi.python.org/pypi/zope.location/")
8637 (synopsis "Zope location library")
8638 (description "Zope.location implements the concept of \"locations\" in
8639 Zope3, which are are special objects that have a structural location.")
8640 (license license:zpl2.1)))
8641
8642 (define-public python2-zope-location
8643 (package-with-python2 python-zope-location))
8644
8645 (define-public python-zope-security
8646 (package
8647 (name "python-zope-security")
8648 (version "4.0.3")
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (string-append "https://pypi.python.org/packages/source/z"
8653 "/zope.security/zope.security-" version ".tar.gz"))
8654 (sha256
8655 (base32
8656 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8657 (build-system python-build-system)
8658 (arguments
8659 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8660 (propagated-inputs
8661 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8662 ("python-zope-proxy" ,python-zope-proxy)
8663 ("python-zope-schema" ,python-zope-schema)))
8664 (native-inputs
8665 `(("python-six" ,python-six)
8666 ("python-zope-component" ,python-zope-component)
8667 ("python-zope-configuration" ,python-zope-configuration)
8668 ("python-zope-location" ,python-zope-location)
8669 ("python-zope-testrunner" ,python-zope-testrunner)
8670 ("python-zope-testing" ,python-zope-testing)))
8671 (home-page "http://pypi.python.org/pypi/zope.security")
8672 (synopsis "Zope security framework")
8673 (description "Zope.security provides a generic mechanism to implement
8674 security policies on Python objects.")
8675 (license license:zpl2.1)))
8676
8677 (define-public python2-zope-security
8678 (let ((zope-security (package-with-python2 python-zope-security)))
8679 (package (inherit zope-security)
8680 (propagated-inputs
8681 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8682 ,@(alist-delete
8683 "python-zope-testrunner"
8684 (package-propagated-inputs zope-security)))))))
8685
8686 (define-public python-zope-component
8687 (package
8688 (name "python-zope-component")
8689 (version "4.3.0")
8690 (source
8691 (origin
8692 (method url-fetch)
8693 (uri (pypi-uri "zope.component" version))
8694 (sha256
8695 (base32
8696 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8697 (build-system python-build-system)
8698 (arguments
8699 ;; Skip tests due to circular dependency with python-zope-security.
8700 '(#:tests? #f))
8701 (native-inputs
8702 `(("python-zope-testing" ,python-zope-testing)))
8703 (propagated-inputs
8704 `(("python-zope-event" ,python-zope-event)
8705 ("python-zope-interface" ,python-zope-interface)
8706 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8707 ("python-zope-configuration" ,python-zope-configuration)))
8708 (home-page "https://github.com/zopefoundation/zope.component")
8709 (synopsis "Zope Component Architecture")
8710 (description "Zope.component represents the core of the Zope Component
8711 Architecture. Together with the zope.interface package, it provides
8712 facilities for defining, registering and looking up components.")
8713 (license license:zpl2.1)))
8714
8715 (define-public python2-zope-component
8716 (package-with-python2 python-zope-component))
8717
8718 (define-public python-pythondialog
8719 (package
8720 (name "python-pythondialog")
8721 (version "3.4.0")
8722 (source
8723 (origin
8724 (method url-fetch)
8725 (uri (pypi-uri "pythondialog" version))
8726 (sha256
8727 (base32
8728 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8729 (build-system python-build-system)
8730 (arguments
8731 `(#:phases
8732 (modify-phases %standard-phases
8733 (add-after 'unpack 'patch-path
8734 (lambda* (#:key inputs #:allow-other-keys)
8735 (let* ((dialog (assoc-ref inputs "dialog")))
8736 ;; Since this library really wants to grovel the search path, we
8737 ;; must hardcode dialog's store path into it.
8738 (substitute* "dialog.py"
8739 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8740 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8741 #t))))
8742 #:tests? #f)) ; no test suite
8743 (propagated-inputs
8744 `(("dialog" ,dialog)))
8745 (home-page "http://pythondialog.sourceforge.net/")
8746 (synopsis "Python interface to the UNIX dialog utility")
8747 (description "A Python wrapper for the dialog utility. Its purpose is to
8748 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8749 This allows one to make simple text-mode user interfaces on Unix-like systems")
8750 (license license:lgpl2.1)
8751 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8752
8753 (define-public python2-pythondialog
8754 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8755 (package
8756 (inherit base)
8757 (version (package-version python-pythondialog))
8758 (source (origin
8759 (method url-fetch)
8760 (uri (pypi-uri "python2-pythondialog" version))
8761 (sha256
8762 (base32
8763 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8764
8765 (define-public python-pyrfc3339
8766 (package
8767 (name "python-pyrfc3339")
8768 (version "1.0")
8769 (source
8770 (origin
8771 (method url-fetch)
8772 (uri (pypi-uri "pyRFC3339" version))
8773 (sha256
8774 (base32
8775 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8776 (build-system python-build-system)
8777 (propagated-inputs
8778 `(("python-pytz" ,python-pytz)))
8779 (native-inputs
8780 `(("python-nose" ,python-nose)))
8781 (home-page "https://github.com/kurtraschke/pyRFC3339")
8782 (synopsis "Python timestamp library")
8783 (description "Python library for generating and parsing RFC 3339-compliant
8784 timestamps.")
8785 (license license:expat)))
8786
8787 (define-public python2-pyrfc3339
8788 (package-with-python2 python-pyrfc3339))
8789
8790 (define-public python-werkzeug
8791 (package
8792 (name "python-werkzeug")
8793 (version "0.11.15")
8794 (source
8795 (origin
8796 (method url-fetch)
8797 (uri (pypi-uri "Werkzeug" version))
8798 (sha256
8799 (base32
8800 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8801 (build-system python-build-system)
8802 (native-inputs
8803 `(("python-pytest" ,python-pytest)))
8804 (home-page "http://werkzeug.pocoo.org/")
8805 (synopsis "Utilities for WSGI applications")
8806 (description "One of the most advanced WSGI utility modules. It includes a
8807 powerful debugger, full-featured request and response objects, HTTP utilities to
8808 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8809 uploads, a powerful URL routing system and a bunch of community-contributed
8810 addon modules.")
8811 (license license:x11)))
8812
8813 (define-public python2-werkzeug
8814 (package-with-python2 python-werkzeug))
8815
8816 (define-public python-configobj
8817 (package
8818 (name "python-configobj")
8819 (version "5.0.6")
8820 (source (origin
8821 (method url-fetch)
8822 (uri (string-append
8823 "https://pypi.python.org/packages/source/c/configobj/"
8824 "configobj-" version ".tar.gz"))
8825 (sha256
8826 (base32
8827 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8828 ;; Patch setup.py so it looks for python-setuptools, which is
8829 ;; required to parse the keyword 'install_requires' in setup.py.
8830 (patches (search-patches "python-configobj-setuptools.patch"))))
8831 (build-system python-build-system)
8832 (propagated-inputs
8833 `(("python-six" ,python-six)))
8834 (synopsis "Config file reading, writing and validation")
8835 (description "ConfigObj is a simple but powerful config file reader and
8836 writer: an ini file round tripper. Its main feature is that it is very easy to
8837 use, with a straightforward programmer’s interface and a simple syntax for
8838 config files.")
8839 (home-page "https://github.com/DiffSK/configobj")
8840 (license license:bsd-3)))
8841
8842 (define-public python2-configobj
8843 (package-with-python2 python-configobj))
8844
8845 (define-public python-configargparse
8846 (package
8847 (name "python-configargparse")
8848 (version "0.10.0")
8849 (source (origin
8850 (method url-fetch)
8851 (uri (string-append
8852 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8853 "ConfigArgParse-" version ".tar.gz"))
8854 (sha256
8855 (base32
8856 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8857 (build-system python-build-system)
8858 (arguments
8859 ;; FIXME: Bug in test suite filed upstream:
8860 ;; https://github.com/bw2/ConfigArgParse/issues/32
8861 '(#:tests? #f))
8862 (synopsis "Replacement for argparse")
8863 (description "A drop-in replacement for argparse that allows options to also
8864 be set via config files and/or environment variables.")
8865 (home-page "https://github.com/bw2/ConfigArgParse")
8866 (license license:expat)))
8867
8868 (define-public python2-configargparse
8869 (package-with-python2 python-configargparse))
8870
8871 (define-public python-ndg-httpsclient
8872 (package
8873 (name "python-ndg-httpsclient")
8874 (version "0.4.2")
8875 (source (origin
8876 (method url-fetch)
8877 (uri (pypi-uri "ndg_httpsclient" version))
8878 (sha256
8879 (base32
8880 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8881 (build-system python-build-system)
8882 (arguments
8883 '(;; The tests appear to require networking.
8884 #:tests? #f))
8885 (propagated-inputs
8886 `(("python-pyopenssl" ,python-pyopenssl)))
8887 (synopsis "HTTPS support for Python's httplib and urllib2")
8888 (description "This is a HTTPS client implementation for httplib and urllib2
8889 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8890 over the default provided with Python and importantly enables full verification
8891 of the SSL peer.")
8892 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8893 (license license:bsd-3)))
8894
8895 ;; python2-openssl requires special care, so package-with-python2 is
8896 ;; insufficient.
8897 (define-public python2-ndg-httpsclient
8898 (package (inherit python-ndg-httpsclient)
8899 (name "python2-ndg-httpsclient")
8900 (arguments `(#:python ,python-2))
8901 (propagated-inputs
8902 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8903
8904 (define-public python-contextlib2
8905 (package
8906 (name "python-contextlib2")
8907 (version "0.4.0")
8908 (source
8909 (origin
8910 (method url-fetch)
8911 (uri (pypi-uri "contextlib2" version))
8912 (sha256
8913 (base32
8914 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8915 (build-system python-build-system)
8916 (arguments
8917 `(#:phases
8918 (modify-phases %standard-phases
8919 (replace 'check
8920 (lambda _ (zero?
8921 (system*
8922 "python" "test_contextlib2.py" "-v")))))))
8923 (home-page "http://contextlib2.readthedocs.org/")
8924 (synopsis "Tools for decorators and context managers")
8925 (description "This module is primarily a backport of the Python
8926 3.2 contextlib to earlier Python versions. Like contextlib, it
8927 provides utilities for common tasks involving decorators and context
8928 managers. It also contains additional features that are not part of
8929 the standard library.")
8930 (license license:psfl)))
8931
8932 (define-public python2-contextlib2
8933 (package-with-python2 python-contextlib2))
8934
8935 (define-public python-texttable
8936 (package
8937 (name "python-texttable")
8938 (version "0.8.7")
8939 (source
8940 (origin
8941 (method url-fetch)
8942 (uri (pypi-uri "texttable" version))
8943 (sha256
8944 (base32
8945 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8946 (build-system python-build-system)
8947 (arguments '(#:tests? #f)) ; no tests
8948 (home-page "https://github.com/foutaise/texttable/")
8949 (synopsis "Python module for creating simple ASCII tables")
8950 (description "Texttable is a Python module for creating simple ASCII
8951 tables.")
8952 (license license:lgpl2.1+)))
8953
8954 (define-public python2-texttable
8955 (package-with-python2 python-texttable))
8956
8957 (define-public python-websocket-client
8958 (package
8959 (name "python-websocket-client")
8960 (version "0.37.0")
8961 (source
8962 (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "websocket_client" version))
8965 (sha256
8966 (base32
8967 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8968 (build-system python-build-system)
8969 (propagated-inputs
8970 `(("python-six" ,python-six)))
8971 (home-page "https://github.com/liris/websocket-client")
8972 (synopsis "WebSocket client for Python")
8973 (description "The Websocket-client module provides the low level APIs for
8974 WebSocket usage in Python programs.")
8975 (license license:lgpl2.1+)))
8976
8977 (define-public python2-websocket-client
8978 (package-with-python2 python-websocket-client))
8979
8980 (define-public python-atomicwrites
8981 (package
8982 (name "python-atomicwrites")
8983 (version "1.1.5")
8984 (source (origin
8985 (method url-fetch)
8986 (uri (pypi-uri "atomicwrites" version))
8987 (sha256
8988 (base32
8989 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8990 (build-system python-build-system)
8991 (synopsis "Atomic file writes in Python")
8992 (description "Library for atomic file writes using platform dependent tools
8993 for atomic file system operations.")
8994 (home-page "https://github.com/untitaker/python-atomicwrites")
8995 (license license:expat)))
8996
8997 (define-public python2-atomicwrites
8998 (package-with-python2 python-atomicwrites))
8999
9000 (define-public python-requests-toolbelt
9001 (package
9002 (name "python-requests-toolbelt")
9003 (version "0.6.2")
9004 (source (origin
9005 (method url-fetch)
9006 (uri (string-append
9007 "https://pypi.python.org/packages/"
9008 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
9009 "requests-toolbelt-" version ".tar.gz"))
9010 (sha256
9011 (base32
9012 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
9013 (build-system python-build-system)
9014 (native-inputs
9015 `(("python-betamax" ,python-betamax)
9016 ("python-mock" ,python-mock)
9017 ("python-pytest" ,python-pytest)))
9018 (propagated-inputs
9019 `(("python-requests" ,python-requests)))
9020 (synopsis "Extensions to python-requests")
9021 (description "This is a toolbelt of useful classes and functions to be used
9022 with python-requests.")
9023 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
9024 (license license:asl2.0)))
9025
9026 (define-public python-click-threading
9027 (package
9028 (name "python-click-threading")
9029 (version "0.2.0")
9030 (source (origin
9031 (method url-fetch)
9032 (uri (string-append
9033 "https://pypi.python.org/packages/"
9034 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
9035 "click-threading-" version ".tar.gz"))
9036 (sha256
9037 (base32
9038 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
9039 (build-system python-build-system)
9040 (propagated-inputs
9041 `(("python-click" ,python-click)))
9042 (synopsis "Utilities for multithreading in Click")
9043 (description "This package provides utilities for multithreading in Click
9044 applications.")
9045 (home-page "https://github.com/click-contrib/click-threading")
9046 (license license:expat)))
9047
9048 (define-public python-click-log
9049 (package
9050 (name "python-click-log")
9051 (version "0.1.8")
9052 (source (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "click-log" version))
9055 (sha256
9056 (base32
9057 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
9058 (build-system python-build-system)
9059 (propagated-inputs
9060 `(("python-click" ,python-click)))
9061 (synopsis "Logging for click applications")
9062 (description "This package provides a Python library for logging Click
9063 applications.")
9064 (home-page "https://github.com/click-contrib/click-log")
9065 (license license:expat)))
9066
9067 (define-public python-apipkg
9068 (package
9069 (name "python-apipkg")
9070 (version "1.4")
9071 (source (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "apipkg" version))
9074 (sha256
9075 (base32
9076 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9077 (build-system python-build-system)
9078 (native-inputs
9079 `(("python-pytest" ,python-pytest)))
9080 (synopsis "Namespace control and lazy-import mechanism")
9081 (description "With apipkg you can control the exported namespace of a Python
9082 package and greatly reduce the number of imports for your users. It is a small
9083 pure Python module that works on virtually all Python versions.")
9084 (home-page "https://bitbucket.org/hpk42/apipkg")
9085 (license license:expat)))
9086
9087 (define-public python2-apipkg
9088 (package-with-python2 python-apipkg))
9089
9090 (define-public python-execnet
9091 (package
9092 (name "python-execnet")
9093 (version "1.4.1")
9094 (source (origin
9095 (method url-fetch)
9096 (uri (pypi-uri "execnet" version))
9097 (sha256
9098 (base32
9099 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9100 (build-system python-build-system)
9101 (arguments
9102 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9103 ;; The two test failures are caused by the lack of an `ssh` executable.
9104 ;; The test suite can be run with pytest after the 'install' phase.
9105 #:tests? #f))
9106 (native-inputs
9107 `(("python-pytest" ,python-pytest)
9108 ("python-setuptools-scm" ,python-setuptools-scm)))
9109 (propagated-inputs
9110 `(("python-apipkg" ,python-apipkg)))
9111 (synopsis "Rapid multi-Python deployment")
9112 (description "Execnet provides a share-nothing model with
9113 channel-send/receive communication for distributing execution across many
9114 Python interpreters across version, platform and network barriers. It has a
9115 minimal and fast API targeting the following uses:
9116 @enumerate
9117 @item distribute tasks to (many) local or remote CPUs
9118 @item write and deploy hybrid multi-process applications
9119 @item write scripts to administer multiple environments
9120 @end enumerate")
9121 (home-page "http://codespeak.net/execnet/")
9122 (license license:expat)))
9123
9124 (define-public python2-execnet
9125 (package-with-python2 python-execnet))
9126
9127 (define-public python-trollius-redis
9128 (package
9129 (name "python-trollius-redis")
9130 (version "0.1.4")
9131 (source
9132 (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "trollius_redis" version))
9135 (sha256
9136 (base32
9137 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
9138 (build-system python-build-system)
9139 ;; TODO: Tests require packaging 'hiredis'.
9140 (arguments '(#:tests? #f))
9141 (home-page "https://github.com/benjolitz/trollius-redis")
9142 (synopsis "Port of asyncio-redis to trollius")
9143 (description "@code{trollius-redis} is a Redis client for Python
9144 trollius. It is an asynchronious IO (PEP 3156) implementation of the
9145 Redis protocol.")
9146 (license license:bsd-2)))
9147
9148 (define-public python2-trollius-redis
9149 (package-with-python2 python-trollius-redis))
9150
9151 ;;; The software provided by this package was integrated into pytest 2.8.
9152 (define-public python-pytest-cache
9153 (package
9154 (name "python-pytest-cache")
9155 (version "1.0")
9156 (source (origin
9157 (method url-fetch)
9158 (uri (pypi-uri "pytest-cache" version))
9159 (sha256
9160 (base32
9161 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
9162 (build-system python-build-system)
9163 (propagated-inputs
9164 `(("python-apipkg" ,python-apipkg)
9165 ("python-execnet" ,python-execnet)
9166 ("python-py" ,python-py)
9167 ("python-pytest" ,python-pytest)))
9168 (synopsis "Py.test plugin with mechanisms for caching across test runs")
9169 (description "The pytest-cache plugin provides tools to rerun failures from
9170 the last py.test invocation.")
9171 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
9172 (license license:expat)))
9173
9174 (define-public python2-pytest-cache
9175 (package-with-python2 python-pytest-cache))
9176
9177 (define-public python-pytest-localserver
9178 (package
9179 (name "python-pytest-localserver")
9180 (version "0.3.5")
9181 (source (origin
9182 (method url-fetch)
9183 (uri (pypi-uri "pytest-localserver" version))
9184 (sha256
9185 (base32
9186 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
9187 (build-system python-build-system)
9188 (arguments
9189 `(#:phases (modify-phases %standard-phases
9190 (replace 'check
9191 (lambda _
9192 (zero? (system* "py.test" "--genscript=runtests.py"))
9193 (zero? (system* "py.test")))))))
9194 (native-inputs
9195 `(("python-pytest" ,python-pytest)
9196 ("python-requests" ,python-requests)
9197 ("python-six" ,python-six)))
9198 (propagated-inputs
9199 `(("python-werkzeug" ,python-werkzeug)))
9200 (synopsis "Py.test plugin to test server connections locally")
9201 (description "Pytest-localserver is a plugin for the pytest testing
9202 framework which enables you to test server connections locally.")
9203 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9204 (license license:expat)))
9205
9206 (define-public python-wsgi-intercept
9207 (package
9208 (name "python-wsgi-intercept")
9209 (version "1.2.2")
9210 (source (origin
9211 (method url-fetch)
9212 (uri (string-append
9213 "https://pypi.python.org/packages/"
9214 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9215 "wsgi_intercept-" version ".tar.gz"))
9216 (sha256
9217 (base32
9218 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
9219 (build-system python-build-system)
9220 (propagated-inputs
9221 `(("python-six" ,python-six)))
9222 (native-inputs
9223 `(("python-pytest" ,python-pytest)
9224 ("python-httplib2" ,python-httplib2)
9225 ("python-requests" ,python-requests)
9226 ("python-urllib3" ,python-urllib3)))
9227 (synopsis "Puts a WSGI application in place of a real URI for testing")
9228 (description "Wsgi_intercept installs a WSGI application in place of a real
9229 URI for testing. Testing a WSGI application normally involves starting a
9230 server at a local host and port, then pointing your test code to that address.
9231 Instead, this library lets you intercept calls to any specific host/port
9232 combination and redirect them into a WSGI application importable by your test
9233 program. Thus, you can avoid spawning multiple processes or threads to test
9234 your Web app.")
9235 (home-page "https://github.com/cdent/wsgi-intercept")
9236 (license license:expat)))
9237
9238 (define-public python-pytest-xprocess
9239 (package
9240 (name "python-pytest-xprocess")
9241 (version "0.9.1")
9242 (source (origin
9243 (method url-fetch)
9244 (uri (pypi-uri "pytest-xprocess" version))
9245 (sha256
9246 (base32
9247 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9248 (build-system python-build-system)
9249 (propagated-inputs
9250 `(("python-pytest" ,python-pytest)
9251 ("python-pytest-cache" ,python-pytest-cache)
9252 ("python-psutil" ,python-psutil)))
9253 (synopsis "Pytest plugin to manage external processes across test runs")
9254 (description "Pytest-xprocess is an experimental py.test plugin for managing
9255 processes across test runs.")
9256 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9257 (license license:expat)))
9258
9259 (define-public python-icalendar
9260 (package
9261 (name "python-icalendar")
9262 (version "3.11.6")
9263 (source (origin
9264 (method url-fetch)
9265 (uri (pypi-uri "icalendar" version))
9266 (sha256
9267 (base32
9268 "1ny9mbm9zgghl612b8wc4ap52bz3kgl486d7f307gxjmlqgz3i64"))))
9269 (build-system python-build-system)
9270 (propagated-inputs
9271 `(("python-dateutil" ,python-dateutil)
9272 ("python-pytz" ,python-pytz)))
9273 (synopsis "Python library for parsing iCalendar files")
9274 (description "The icalendar package is a parser/generator of iCalendar
9275 files for use with Python.")
9276 (home-page "https://github.com/collective/icalendar")
9277 (license license:bsd-2)))
9278
9279 (define-public python-sphinxcontrib-newsfeed
9280 (package
9281 (name "python-sphinxcontrib-newsfeed")
9282 (version "0.1.4")
9283 (source (origin
9284 (method url-fetch)
9285 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9286 (sha256
9287 (base32
9288 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
9289 (arguments '(#:tests? #f)) ; No tests.
9290 (build-system python-build-system)
9291 (propagated-inputs
9292 `(("python-sphinx" ,python-sphinx)))
9293 (synopsis "News Feed extension for Sphinx")
9294 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9295 Blog, News or Announcements section to a Sphinx website.")
9296 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
9297 (license license:bsd-2)))
9298
9299 (define-public python-args
9300 (package
9301 (name "python-args")
9302 (version "0.1.0")
9303 (source (origin
9304 (method url-fetch)
9305 (uri (pypi-uri "args" version))
9306 (sha256
9307 (base32
9308 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9309 (build-system python-build-system)
9310 (home-page "https://github.com/kennethreitz/args")
9311 (synopsis "Command-line argument parser")
9312 (description
9313 "This library provides a Python module to parse command-line arguments.")
9314 (license license:bsd-3)))
9315
9316 (define-public python2-args
9317 (package-with-python2 python-args))
9318
9319 (define-public python-clint
9320 (package
9321 (name "python-clint")
9322 (version "0.5.1")
9323 (source (origin
9324 (method url-fetch)
9325 (uri (pypi-uri "clint" version))
9326 (sha256
9327 (base32
9328 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9329 (build-system python-build-system)
9330 (arguments
9331 '(#:phases
9332 (modify-phases %standard-phases
9333 (replace 'check
9334 (lambda _
9335 (zero? (system* "py.test" "-v")))))))
9336 (native-inputs
9337 `(("python-pytest" ,python-pytest)))
9338 (propagated-inputs
9339 `(("python-args" ,python-args)))
9340 (home-page "https://github.com/kennethreitz/clint")
9341 (synopsis "Command-line interface tools")
9342 (description
9343 "Clint is a Python module filled with a set of tools for developing
9344 command-line applications, including tools for colored and indented
9345 output, progress bar display, and pipes.")
9346 (license license:isc)))
9347
9348 (define-public python2-clint
9349 (package-with-python2 python-clint))
9350
9351 (define-public python-astor
9352 (package
9353 (name "python-astor")
9354 (version "0.5")
9355 (source (origin
9356 (method url-fetch)
9357 (uri (pypi-uri "astor" version))
9358 (sha256
9359 (base32
9360 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9361 (build-system python-build-system)
9362 (home-page "https://github.com/berkerpeksag/astor")
9363 (synopsis "Read and write Python ASTs")
9364 (description
9365 "Astor is designed to allow easy manipulation of Python source via the
9366 Abstract Syntax Tree.")
9367 (license license:bsd-3)))
9368
9369 (define-public python2-astor
9370 (package-with-python2 python-astor))
9371
9372 (define-public python-rply
9373 (package
9374 (name "python-rply")
9375 (version "0.7.4")
9376 (source (origin
9377 (method url-fetch)
9378 (uri (pypi-uri "rply" version))
9379 (sha256
9380 (base32
9381 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9382 (build-system python-build-system)
9383 (propagated-inputs
9384 `(("python-appdirs" ,python-appdirs)))
9385 (home-page "https://github.com/alex/rply")
9386 (synopsis "Parser generator for Python")
9387 (description
9388 "This package provides a pure Python based parser generator, that also
9389 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9390 with a new public API, and RPython support.")
9391 (license license:bsd-3)))
9392
9393 (define-public python2-rply
9394 (package-with-python2 python-rply))
9395
9396 (define-public python-hy
9397 (package
9398 (name "python-hy")
9399 (version "0.11.1")
9400 (source (origin
9401 (method url-fetch)
9402 (uri (pypi-uri "hy" version))
9403 (sha256
9404 (base32
9405 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9406 (build-system python-build-system)
9407 (arguments
9408 '(#:phases
9409 (modify-phases %standard-phases
9410 (replace 'check
9411 (lambda _
9412 ;; Tests require write access to HOME.
9413 (setenv "HOME" "/tmp")
9414 (zero? (system* "nosetests")))))))
9415 (native-inputs
9416 `(("python-coverage" ,python-coverage)
9417 ("python-nose" ,python-nose)))
9418 (propagated-inputs
9419 `(("python-astor" ,python-astor)
9420 ("python-clint" ,python-clint)
9421 ("python-rply" ,python-rply)))
9422 (home-page "http://hylang.org/")
9423 (synopsis "Lisp frontend to Python")
9424 (description
9425 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9426 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9427 Python at your fingertips, in Lisp form.")
9428 (license license:expat)))
9429
9430 (define-public python2-hy
9431 (package-with-python2 python-hy))
9432
9433 (define-public python-rauth
9434 (package
9435 (name "python-rauth")
9436 (version "0.7.3")
9437 (source
9438 (origin
9439 (method url-fetch)
9440 (uri (pypi-uri "rauth" version))
9441 (sha256
9442 (base32
9443 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9444 (build-system python-build-system)
9445 (arguments
9446 `(#:test-target "check"))
9447 (propagated-inputs
9448 `(("python-requests" ,python-requests)))
9449 (home-page "https://github.com/litl/rauth")
9450 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9451 (description
9452 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9453 provides service wrappers for convenient connection initialization and
9454 authenticated session objects providing things like keep-alive.")
9455 (license license:expat)
9456 (properties `((python2-variant . ,(delay python2-rauth))))))
9457
9458 (define-public python2-rauth
9459 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9460 (package
9461 (inherit base)
9462 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9463 ,@(package-native-inputs base))))))
9464
9465 (define-public python2-functools32
9466 (package
9467 (name "python2-functools32")
9468 (version "3.2.3-2")
9469 (source
9470 (origin
9471 (method url-fetch)
9472 (uri (pypi-uri "functools32" version))
9473 (sha256
9474 (base32
9475 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9476 (build-system python-build-system)
9477 (arguments
9478 `(#:python ,python-2
9479 #:tests? #f)) ; no test target
9480 (home-page "https://github.com/MiCHiLU/python-functools32")
9481 (synopsis
9482 "Backport of the functools module from Python 3.2.3")
9483 (description
9484 "This package is a backport of the @code{functools} module from Python
9485 3.2.3 for use with older versions of Python and PyPy.")
9486 (license license:expat)))
9487
9488 (define-public python2-subprocess32
9489 (package
9490 (name "python2-subprocess32")
9491 (version "3.2.7")
9492 (source (origin
9493 (method url-fetch)
9494 (uri (pypi-uri "subprocess32" version))
9495 (sha256
9496 (base32
9497 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9498 (patches
9499 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9500 (build-system python-build-system)
9501 (arguments
9502 `(#:python ,python-2
9503 #:phases
9504 (modify-phases %standard-phases
9505 (add-after 'unpack 'patch-/bin/sh
9506 (lambda _
9507 (substitute* '("subprocess32.py"
9508 "test_subprocess32.py")
9509 (("/bin/sh") (which "sh")))
9510 #t))
9511 (delete 'check)
9512 (add-after 'install 'check
9513 (lambda* (#:key inputs outputs #:allow-other-keys)
9514 ;; For some reason this package fails to import
9515 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9516 ;; directory. Running tests after install is easier.
9517 (add-installed-pythonpath inputs outputs)
9518 (zero? (system* "python" "test_subprocess32.py")))))))
9519 (home-page "https://github.com/google/python-subprocess32")
9520 (synopsis "Backport of the subprocess module from Python 3.2")
9521 (description
9522 "This is a backport of the @code{subprocess} standard library module
9523 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9524 new features. On POSIX systems it is guaranteed to be reliable when used
9525 in threaded applications. It includes timeout support from Python 3.3 but
9526 otherwise matches 3.2’s API.")
9527 (license license:psfl)))
9528
9529 (define-public python2-futures
9530 (package
9531 (name "python2-futures")
9532 (version "3.0.5")
9533 (source
9534 (origin
9535 (method url-fetch)
9536 (uri (pypi-uri "futures" version))
9537 (sha256
9538 (base32
9539 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9540 (build-system python-build-system)
9541 (arguments `(#:python ,python-2))
9542 (home-page "https://github.com/agronholm/pythonfutures")
9543 (synopsis
9544 "Backport of the concurrent.futures package from Python 3.2")
9545 (description
9546 "The concurrent.futures module provides a high-level interface for
9547 asynchronously executing callables. This package backports the
9548 concurrent.futures package from Python 3.2")
9549 (license license:bsd-3)))
9550
9551 (define-public python-promise
9552 (package
9553 (name "python-promise")
9554 (version "0.4.2")
9555 (source
9556 (origin
9557 (method url-fetch)
9558 (uri (pypi-uri "promise" version))
9559 (sha256
9560 (base32
9561 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9562 (build-system python-build-system)
9563 ;; Tests wants python-futures, which is a python2 only program, and
9564 ;; can't be found by python-promise at test time.
9565 (arguments `(#:tests? #f))
9566 (home-page "https://github.com/syrusakbary/promise")
9567 (synopsis "Promises/A+ implementation for Python")
9568 (description
9569 "Promises/A+ implementation for Python")
9570 (properties `((python2-variant . ,(delay python2-promise))))
9571 (license license:expat)))
9572
9573 (define-public python2-promise
9574 (let ((promise (package-with-python2
9575 (strip-python2-variant python-promise))))
9576 (package (inherit promise)
9577 (arguments (substitute-keyword-arguments (package-arguments promise)
9578 ((#:tests? _) #t)))
9579 (native-inputs
9580 `(("python2-futures" ,python2-futures)
9581 ("python2-pytest" ,python2-pytest)
9582 ,@(package-native-inputs promise))))))
9583
9584 (define-public python-urllib3
9585 (package
9586 (name "python-urllib3")
9587 (version "1.18.1")
9588 (source
9589 (origin
9590 (method url-fetch)
9591 (uri (pypi-uri "urllib3" version))
9592 (sha256
9593 (base32
9594 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9595 (build-system python-build-system)
9596 (arguments `(#:tests? #f))
9597 (native-inputs
9598 `(;; some packages for tests
9599 ("python-nose" ,python-nose)
9600 ("python-mock" ,python-mock)
9601 ("python-tornado" ,python-tornado)))
9602 (propagated-inputs
9603 `(;; extra packages for https security
9604 ("python-certifi" ,python-certifi)
9605 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9606 ("python-pyasn1" ,python-pyasn1)
9607 ("python-pyopenssl" ,python-pyopenssl)))
9608 (home-page "https://urllib3.readthedocs.org/")
9609 (synopsis "HTTP library with thread-safe connection pooling")
9610 (description
9611 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9612 can reuse the same socket connection for multiple requests, it can POST files,
9613 supports url redirection and retries, and also gzip and deflate decoding.")
9614 (license license:expat)))
9615
9616 (define-public python2-urllib3
9617 (package-with-python2 python-urllib3))
9618
9619 (define-public python-colorama
9620 (package
9621 (name "python-colorama")
9622 (version "0.3.7")
9623 (source
9624 (origin
9625 (method url-fetch)
9626 (uri (pypi-uri "colorama" version))
9627 (sha256
9628 (base32
9629 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9630 (build-system python-build-system)
9631 (synopsis "Colored terminal text rendering for Python")
9632 (description "Colorama is a Python library for rendering colored terminal
9633 text.")
9634 (home-page "https://pypi.python.org/pypi/colorama")
9635 (license license:bsd-3)))
9636
9637 (define-public python2-colorama
9638 (package-with-python2 python-colorama))
9639
9640 (define-public python-rsa
9641 (package
9642 (name "python-rsa")
9643 (version "3.4.2")
9644 (source
9645 (origin
9646 (method url-fetch)
9647 (uri (pypi-uri "rsa" version))
9648 (sha256
9649 (base32
9650 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9651 (build-system python-build-system)
9652 (propagated-inputs
9653 `(("python-pyasn1" ,python-pyasn1)))
9654 (synopsis "Pure-Python RSA implementation")
9655 (description "Python-RSA is a pure-Python RSA implementation. It supports
9656 encryption and decryption, signing and verifying signatures, and key
9657 generation according to PKCS#1 version 1.5. It can be used as a Python
9658 library as well as on the command line.")
9659 (home-page "http://stuvel.eu/rsa")
9660 (license license:asl2.0)))
9661
9662 (define-public python2-rsa
9663 (package-with-python2 python-rsa))
9664
9665 (define-public python-pluggy
9666 (package
9667 (name "python-pluggy")
9668 (version "0.3.1")
9669 (source
9670 (origin
9671 (method url-fetch)
9672 (uri (pypi-uri "pluggy" version))
9673 (sha256
9674 (base32
9675 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9676 (build-system python-build-system)
9677 (synopsis "Plugin and hook calling mechanism for Python")
9678 (description "Pluggy is an extraction of the plugin manager as used by
9679 Pytest but stripped of Pytest specific details.")
9680 (home-page "https://pypi.python.org/pypi/pluggy")
9681 (license license:expat)))
9682
9683 (define-public python2-pluggy
9684 (package-with-python2 python-pluggy))
9685
9686 (define-public python-tox
9687 (package
9688 (name "python-tox")
9689 (version "2.3.1")
9690 (source
9691 (origin
9692 (method url-fetch)
9693 (uri (pypi-uri "tox" version))
9694 (sha256
9695 (base32
9696 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9697 (build-system python-build-system)
9698 (arguments
9699 ;; FIXME: Tests require pytest-timeout, which itself requires
9700 ;; pytest>=2.8.0 for installation.
9701 '(#:tests? #f))
9702 (propagated-inputs
9703 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9704 ("python-py" ,python-py)
9705 ("python-virtualenv" ,python-virtualenv)))
9706 (native-inputs
9707 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9708 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9709 (home-page "http://tox.testrun.org/")
9710 (synopsis "Virtualenv-based automation of test activities")
9711 (description "Tox is a generic virtualenv management and test command line
9712 tool. It can be used to check that a package installs correctly with
9713 different Python versions and interpreters, or run tests in each type of
9714 supported environment, or act as a frontend to continuous integration
9715 servers.")
9716 (license license:expat)))
9717
9718 (define-public python2-tox
9719 (package-with-python2 python-tox))
9720
9721 (define-public python-jmespath
9722 (package
9723 (name "python-jmespath")
9724 (version "0.9.0")
9725 (source
9726 (origin
9727 (method url-fetch)
9728 (uri (pypi-uri "jmespath" version))
9729 (sha256
9730 (base32
9731 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9732 (build-system python-build-system)
9733 (native-inputs
9734 `(("python-nose" ,python-nose)))
9735 (synopsis "JSON Matching Expressions")
9736 (description "JMESPath (pronounced “james path”) is a Python library that
9737 allows one to declaratively specify how to extract elements from a JSON
9738 document.")
9739 (home-page "https://github.com/jmespath/jmespath.py")
9740 (license license:expat)))
9741
9742 (define-public python2-jmespath
9743 (package-with-python2 python-jmespath))
9744
9745 (define-public python-botocore
9746 (package
9747 (name "python-botocore")
9748 (version "1.5.26")
9749 (source
9750 (origin
9751 (method url-fetch)
9752 (uri (pypi-uri "botocore" version))
9753 (sha256
9754 (base32
9755 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9756 (build-system python-build-system)
9757 (arguments
9758 ;; FIXME: Many tests are failing.
9759 '(#:tests? #f))
9760 (propagated-inputs
9761 `(("python-dateutil" ,python-dateutil)
9762 ("python-docutils" ,python-docutils)
9763 ("python-jmespath" ,python-jmespath)))
9764 (native-inputs
9765 `(("python-mock" ,python-mock)
9766 ("python-nose" ,python-nose)
9767 ("behave" ,behave)
9768 ("python-tox" ,python-tox)
9769 ("python-wheel" ,python-wheel)))
9770 (home-page "https://github.com/boto/botocore")
9771 (synopsis "Low-level interface to AWS")
9772 (description "Botocore is a Python library that provides a low-level
9773 interface to the Amazon Web Services (AWS) API.")
9774 (license license:asl2.0)))
9775
9776 (define-public python2-botocore
9777 (package-with-python2 python-botocore))
9778
9779 (define-public awscli
9780 (package
9781 (name "awscli")
9782 (version "1.11.63")
9783 (source
9784 (origin
9785 (method url-fetch)
9786 (uri (pypi-uri name version))
9787 (sha256
9788 (base32
9789 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9790 (build-system python-build-system)
9791 (propagated-inputs
9792 `(("python-colorama" ,python-colorama)
9793 ("python-botocore" ,python-botocore)
9794 ("python-s3transfer" ,python-s3transfer)
9795 ("python-docutils" ,python-docutils)
9796 ("python-pyyaml" ,python-pyyaml)
9797 ("python-rsa" ,python-rsa)))
9798 (arguments
9799 ;; FIXME: The 'pypi' release does not contain tests.
9800 '(#:tests? #f))
9801 (home-page "https://aws.amazon.com/cli/")
9802 (synopsis "Command line client for AWS")
9803 (description "AWS CLI provides a unified command line interface to the
9804 Amazon Web Services (AWS) API.")
9805 (license license:asl2.0)))
9806
9807 (define-public python-hypothesis
9808 (package
9809 (name "python-hypothesis")
9810 (version "3.1.0")
9811 (source (origin
9812 (method url-fetch)
9813 (uri (pypi-uri "hypothesis" version))
9814 (sha256
9815 (base32
9816 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9817 (build-system python-build-system)
9818 (native-inputs
9819 `(("python-flake8" ,python-flake8)
9820 ("python-pytest" ,python-pytest)))
9821 (synopsis "Library for property based testing")
9822 (description "Hypothesis is a library for testing your Python code against a
9823 much larger range of examples than you would ever want to write by hand. It’s
9824 based on the Haskell library, Quickcheck, and is designed to integrate
9825 seamlessly into your existing Python unit testing work flow.")
9826 (home-page "https://github.com/DRMacIver/hypothesis")
9827 (license license:mpl2.0)
9828 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9829
9830 (define-public python2-hypothesis
9831 (let ((hypothesis (package-with-python2
9832 (strip-python2-variant python-hypothesis))))
9833 (package (inherit hypothesis)
9834 (native-inputs
9835 `(("python2-enum34" ,python2-enum34)
9836 ,@(package-native-inputs hypothesis))))))
9837
9838 (define-public python-pytest-subtesthack
9839 (package
9840 (name "python-pytest-subtesthack")
9841 (version "0.1.1")
9842 (source (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "pytest-subtesthack" version))
9845 (sha256
9846 (base32
9847 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9848 (build-system python-build-system)
9849 (propagated-inputs
9850 `(("python-pytest" ,python-pytest)))
9851 (synopsis "Set-up and tear-down fixtures for unit tests")
9852 (description "This plugin allows you to set up and tear down fixtures within
9853 unit test functions that use @code{py.test}. This is useful for using
9854 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9855 function multiple times, without setting up or tearing down fixture state as is
9856 normally the case.")
9857 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9858 (license license:unlicense)))
9859
9860 (define-public python2-pytest-subtesthack
9861 (package-with-python2 python-pytest-subtesthack))
9862
9863 (define-public python-xdo
9864 (package
9865 (name "python-xdo")
9866 (version "0.3")
9867 (source (origin
9868 (method url-fetch)
9869 (uri (string-append
9870 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9871 "python-xdo_" version ".orig.tar.gz"))
9872 (sha256
9873 (base32
9874 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9875 (build-system python-build-system)
9876 (arguments
9877 '(#:phases
9878 (modify-phases %standard-phases
9879 (add-before 'install 'patch-libxdo-path
9880 ;; Hardcode the path of dynamically loaded libxdo library.
9881 (lambda* (#:key inputs #:allow-other-keys)
9882 (let ((libxdo (string-append
9883 (assoc-ref inputs "xdotool")
9884 "/lib/libxdo.so")))
9885 (substitute* "xdo/_xdo.py"
9886 (("find_library\\(\"xdo\"\\)")
9887 (simple-format #f "\"~a\"" libxdo)))
9888 #t))))
9889 #:tests? #f)) ; no tests provided
9890 (propagated-inputs
9891 `(("python-six" ,python-six)))
9892 (inputs
9893 `(("xdotool" ,xdotool)
9894 ("libX11" ,libx11)))
9895 (home-page "https://tracker.debian.org/pkg/python-xdo")
9896 (synopsis "Python library for simulating X11 keyboard/mouse input")
9897 (description "Provides bindings to libxdo for manipulating X11 via simulated
9898 input. (Note that this is mostly a legacy library; you may wish to look at
9899 python-xdo for newer bindings.)")
9900 (license license:bsd-3)))
9901
9902 (define-public python2-xdo
9903 (package-with-python2 python-xdo))
9904
9905 (define-public python-wtforms
9906 (package
9907 (name "python-wtforms")
9908 (version "2.1")
9909 (source
9910 (origin
9911 (method url-fetch)
9912 (uri (pypi-uri "WTForms" version ".zip"))
9913 (sha256
9914 (base32
9915 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9916 (build-system python-build-system)
9917 (arguments
9918 '(#:phases
9919 (modify-phases %standard-phases
9920 (add-after 'unpack 'remove-django-test
9921 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9922 (lambda _
9923 (substitute*
9924 "tests/runtests.py"
9925 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9926 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9927 #t)))))
9928 (native-inputs
9929 `(("unzip" ,unzip)))
9930 (home-page "http://wtforms.simplecodes.com/")
9931 (synopsis
9932 "Form validation and rendering library for Python web development")
9933 (description
9934 "WTForms is a flexible forms validation and rendering library
9935 for Python web development. It is very similar to the web form API
9936 available in Django, but is a standalone package.")
9937 (license license:bsd-3)))
9938
9939 (define-public python2-wtforms
9940 (package-with-python2 python-wtforms))
9941
9942 (define-public python-mako
9943 (package
9944 (name "python-mako")
9945 (version "1.0.6")
9946 (source
9947 (origin
9948 (method url-fetch)
9949 (uri (pypi-uri "Mako" version))
9950 (sha256
9951 (base32
9952 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9953 (build-system python-build-system)
9954 (propagated-inputs
9955 `(("python-markupsafe" ,python-markupsafe)))
9956 (native-inputs
9957 `(("python-mock" ,python-mock)
9958 ("python-nose" ,python-nose)
9959 ("python-pytest" ,python-pytest)))
9960 (home-page "http://www.makotemplates.org/")
9961 (synopsis "Templating language for Python")
9962 (description "Mako is a templating language for Python that compiles
9963 templates into Python modules.")
9964 (license license:expat)))
9965
9966 (define-public python2-mako
9967 (package-with-python2 python-mako))
9968
9969 (define-public python-waitress
9970 (package
9971 (name "python-waitress")
9972 (version "0.8.10")
9973 (source
9974 (origin
9975 (method url-fetch)
9976 (uri (pypi-uri "waitress" version))
9977 (sha256
9978 (base32
9979 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9980 (build-system python-build-system)
9981 (home-page "https://github.com/Pylons/waitress")
9982 (synopsis "Waitress WSGI server")
9983 (description "Waitress is meant to be a production-quality pure-Python WSGI
9984 server with very acceptable performance.")
9985 (license license:zpl2.1)))
9986
9987 (define-public python2-waitress
9988 (package-with-python2 python-waitress))
9989
9990 (define-public python-wsgiproxy2
9991 (package
9992 (name "python-wsgiproxy2")
9993 (version "0.4.2")
9994 (source
9995 (origin
9996 (method url-fetch)
9997 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9998 (sha256
9999 (base32
10000 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
10001 (build-system python-build-system)
10002 (arguments
10003 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
10004 ;; support Python 3:
10005 ;; https://github.com/benoitc/restkit/issues/140
10006 #:tests? #f))
10007 (native-inputs
10008 `(("unzip" ,unzip)
10009 ("python-nose" ,python-nose)
10010 ("python-coverage" ,python-coverage)))
10011 (propagated-inputs
10012 `(("python-six" ,python-six)
10013 ("python-webob" ,python-webob)))
10014 (home-page
10015 "https://github.com/gawel/WSGIProxy2/")
10016 (synopsis "WSGI Proxy with various http client backends")
10017 (description "WSGI turns HTTP requests into WSGI function calls.
10018 WSGIProxy turns WSGI function calls into HTTP requests.
10019 It also includes code to sign requests and pass private data,
10020 and to spawn subprocesses to handle requests.")
10021 (license license:expat)))
10022
10023 (define-public python2-wsgiproxy2
10024 (package-with-python2 python-wsgiproxy2))
10025
10026 (define-public python-pastedeploy
10027 (package
10028 (name "python-pastedeploy")
10029 (version "1.5.2")
10030 (source
10031 (origin
10032 (method url-fetch)
10033 (uri (pypi-uri "PasteDeploy" version))
10034 (sha256
10035 (base32
10036 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
10037 (build-system python-build-system)
10038 (native-inputs
10039 `(("python-nose" ,python-nose)))
10040 (home-page "http://pythonpaste.org/deploy/")
10041 (synopsis
10042 "Load, configure, and compose WSGI applications and servers")
10043 (description
10044 "This tool provides code to load WSGI applications and servers from URIs;
10045 these URIs can refer to Python Eggs for INI-style configuration files. Paste
10046 Script provides commands to serve applications based on this configuration
10047 file.")
10048 (license license:expat)))
10049
10050 (define-public python2-pastedeploy
10051 (package-with-python2 python-pastedeploy))
10052
10053 (define-public python-paste
10054 (package
10055 (name "python-paste")
10056 (version "2.0.3")
10057 (source
10058 (origin
10059 (method url-fetch)
10060 (uri (pypi-uri "Paste" version))
10061 (sha256
10062 (base32
10063 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
10064 (patches (search-patches "python-paste-remove-website-test.patch"
10065 "python-paste-remove-timing-test.patch"))))
10066 (build-system python-build-system)
10067 (native-inputs
10068 `(("python-nose" ,python-nose)))
10069 (propagated-inputs
10070 `(("python-six" ,python-six)))
10071 (home-page "http://pythonpaste.org")
10072 (synopsis
10073 "Python web development tools, focusing on WSGI")
10074 (description
10075 "Paste provides a variety of web development tools and middleware which
10076 can be nested together to build web applications. Paste's design closely
10077 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
10078 (license license:expat)))
10079
10080 (define-public python2-paste
10081 (package-with-python2 python-paste))
10082
10083 (define-public python-pastescript
10084 (package
10085 (name "python-pastescript")
10086 (version "2.0.2")
10087 (source
10088 (origin
10089 (method url-fetch)
10090 (uri (pypi-uri "PasteScript" version))
10091 (sha256
10092 (base32
10093 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
10094 (build-system python-build-system)
10095 (native-inputs
10096 `(("python-nose" ,python-nose)))
10097 (propagated-inputs
10098 `(("python-paste" ,python-paste)
10099 ("python-pastedeploy" ,python-pastedeploy)))
10100 (home-page "http://pythonpaste.org/script/")
10101 (arguments
10102 '(;; Unfortunately, this requires the latest unittest2,
10103 ;; but that requires traceback2 which requires linecache2 which requires
10104 ;; unittest2. So we're skipping tests for now.
10105 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
10106 ;; so in theory we could get around this situation somehow.)
10107 #:tests? #f))
10108 (synopsis
10109 "Pluggable command line tool for serving web applications and more")
10110 (description
10111 "PasteScript is a plugin-friendly command line tool which provides a
10112 variety of features, from launching web applications to bootstrapping project
10113 layouts.")
10114 (license license:expat)))
10115
10116 (define-public python2-pastescript
10117 (package-with-python2 python-pastescript))
10118
10119 (define-public python-pyquery
10120 (package
10121 (name "python-pyquery")
10122 (version "1.2.17")
10123 (source
10124 (origin
10125 (method url-fetch)
10126 (uri (pypi-uri "pyquery" version))
10127 (sha256
10128 (base32
10129 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10130 (build-system python-build-system)
10131 (native-inputs
10132 `(("python-webob" ,python-webob)
10133 ("python-webtest" ,python-webtest)))
10134 (propagated-inputs
10135 `(("python-lxml" ,python-lxml)
10136 ("python-cssselect" ,python-cssselect)))
10137 (home-page "https://github.com/gawel/pyquery")
10138 (synopsis "Make jQuery-like queries on xml documents")
10139 (description "pyquery allows you to make jQuery queries on xml documents.
10140 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10141 fast xml and html manipulation.")
10142 (license license:bsd-3)))
10143
10144 (define-public python2-pyquery
10145 (package-with-python2 python-pyquery))
10146
10147 (define-public python-webtest
10148 (package
10149 (name "python-webtest")
10150 (version "2.0.20")
10151 (source
10152 (origin
10153 (method url-fetch)
10154 (uri (pypi-uri "WebTest" version))
10155 (sha256
10156 (base32
10157 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
10158 (build-system python-build-system)
10159 (arguments
10160 `(;; Unfortunately we have to disable tests!
10161 ;; This release of WebTest is pinned to python-nose < 1.3,
10162 ;; but older versions of python-nose are plagued with the following
10163 ;; bug(s), which rears its ugly head during test execution:
10164 ;; https://github.com/nose-devs/nose/issues/759
10165 ;; https://github.com/nose-devs/nose/pull/811
10166 #:tests? #f))
10167 ;; Commented out code is no good, but in this case, once tests
10168 ;; are ready to be enabled again, we should put the following
10169 ;; in place:
10170 ;; (native-inputs
10171 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
10172 ;; ; but see above comment
10173 ;; ("python-coverage" ,python-coverage)
10174 ;; ("python-mock" ,python-mock)
10175 ;; ("python-pastedeploy" ,python-pastedeploy)
10176 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10177 ;; ("python-pyquery" ,python-pyquery)))
10178 (propagated-inputs
10179 `(("python-waitress" ,python-waitress)
10180 ("python-webob" ,python-webob)
10181 ("python-six" ,python-six)
10182 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10183 (home-page "http://webtest.pythonpaste.org/")
10184 (synopsis "Helper to test WSGI applications")
10185 (description "Webtest allows you to test your Python web applications
10186 without starting an HTTP server. It supports anything that supports the
10187 minimum of WSGI.")
10188 (license license:expat)))
10189
10190 (define-public python2-webtest
10191 (package-with-python2 python-webtest))
10192
10193 (define-public python-anyjson
10194 (package
10195 (name "python-anyjson")
10196 (version "0.3.3")
10197 (source
10198 (origin
10199 (method url-fetch)
10200 (uri (pypi-uri "anyjson" version))
10201 (sha256
10202 (base32
10203 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10204 (build-system python-build-system)
10205 (arguments
10206 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10207 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10208 ;; whatever) so this transformation needs to be done before the tests
10209 ;; can be run. Maybe we could add a build step to transform beforehand
10210 ;; but it could be annoying/difficult.
10211 ;; We can enable tests for the Python 2 version, though, and do below.
10212 #:tests? #f))
10213 (home-page "http://bitbucket.org/runeh/anyjson/")
10214 (synopsis
10215 "Wraps best available JSON implementation in a common interface")
10216 (description
10217 "Anyjson loads whichever is the fastest JSON module installed
10218 and provides a uniform API regardless of which JSON implementation is used.")
10219 (license license:bsd-3)
10220 (properties `((python2-variant . ,(delay python2-anyjson))))))
10221
10222 (define-public python2-anyjson
10223 (let ((anyjson (package-with-python2
10224 (strip-python2-variant python-anyjson))))
10225 (package
10226 (inherit anyjson)
10227 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10228 #:tests? #t
10229 ,@(package-arguments anyjson)))
10230 (native-inputs `(("python2-nose" ,python2-nose))))))
10231
10232 (define-public python-amqp
10233 (package
10234 (name "python-amqp")
10235 (version "1.4.9")
10236 (source
10237 (origin
10238 (method url-fetch)
10239 (uri (pypi-uri "amqp" version))
10240 (sha256
10241 (base32
10242 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10243 (build-system python-build-system)
10244 (native-inputs
10245 `(("python-nose" ,python-nose)
10246 ("python-mock" ,python-mock)))
10247 (home-page "https://github.com/celery/py-amqp")
10248 (synopsis
10249 "Low-level AMQP client for Python (fork of amqplib)")
10250 (description
10251 "This is a fork of amqplib which was originally written by Barry Pederson.
10252 It is maintained by the Celery project, and used by kombu as a pure python
10253 alternative when librabbitmq is not available.")
10254 (license license:lgpl2.1+)
10255 (properties `((python2-variant . ,(delay python2-amqp))))))
10256
10257 (define-public python2-amqp
10258 (let ((amqp (package-with-python2
10259 (strip-python2-variant python-amqp))))
10260 (package
10261 (inherit amqp)
10262 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10263 ;; unmaintained. Weirdly, does not do this on the python 3
10264 ;; version?
10265 #:tests? #f
10266 ,@(package-arguments amqp))))))
10267
10268 (define-public python-kombu
10269 (package
10270 (name "python-kombu")
10271 (version "3.0.37")
10272 (source
10273 (origin
10274 (method url-fetch)
10275 (uri (pypi-uri "kombu" version))
10276 (sha256
10277 (base32
10278 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
10279 (build-system python-build-system)
10280 (native-inputs
10281 `(("python-mock" ,python-mock)
10282 ("python-nose" ,python-nose)))
10283 (propagated-inputs
10284 `(("python-anyjson" ,python-anyjson)
10285 ("python-amqp" ,python-amqp)
10286 ("python-redis" ,python-redis)))
10287 (home-page "http://kombu.readthedocs.org")
10288 (synopsis "Message passing library for Python")
10289 (description "The aim of Kombu is to make messaging in Python as easy as
10290 possible by providing an idiomatic high-level interface for the AMQ protocol,
10291 and also provide proven and tested solutions to common messaging problems.
10292 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10293 message orientation, queuing, routing, reliability and security, for which the
10294 RabbitMQ messaging server is the most popular implementation.")
10295 (license license:bsd-3)
10296 (properties `((python2-variant . ,(delay python2-kombu))))))
10297
10298 (define-public python2-kombu
10299 (let ((kombu (package-with-python2
10300 (strip-python2-variant python-kombu))))
10301 (package
10302 (inherit kombu)
10303 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10304 ;; It works fine on the python3 variant.
10305 #:tests? #f
10306 ,@(package-arguments kombu)))
10307 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10308 ,@(package-native-inputs kombu))))))
10309
10310 (define-public python-billiard
10311 (package
10312 (name "python-billiard")
10313 (version "3.3.0.23")
10314 (source
10315 (origin
10316 (method url-fetch)
10317 (uri (pypi-uri "billiard" version))
10318 (sha256
10319 (base32
10320 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10321 (build-system python-build-system)
10322 (native-inputs
10323 `(("python-nose" ,python-nose)))
10324 (home-page "https://github.com/celery/billiard")
10325 (synopsis
10326 "Python multiprocessing fork with improvements and bugfixes")
10327 (description
10328 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10329 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10330 pyprocessing package. This standalone variant is intended to be compatible with
10331 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10332 (license license:bsd-3)
10333 (properties `((python2-variant . ,(delay python2-billiard))))))
10334
10335 (define-public python2-billiard
10336 (let ((billiard (package-with-python2
10337 (strip-python2-variant python-billiard))))
10338 (package
10339 (inherit billiard)
10340 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10341 ("python2-mock" ,python2-mock)
10342 ,@(package-native-inputs billiard))))))
10343
10344 (define-public python-celery
10345 (package
10346 (name "python-celery")
10347 (version "3.1.24")
10348 (source
10349 (origin
10350 (method url-fetch)
10351 (uri (pypi-uri "celery" version))
10352 (sha256
10353 (base32
10354 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10355 (build-system python-build-system)
10356 (arguments
10357 `(#:phases
10358 (modify-phases %standard-phases
10359 ;; These tests break with Python 3.5:
10360 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10361 (replace 'check
10362 (lambda _
10363 (zero?
10364 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10365 (native-inputs
10366 `(("python-nose" ,python-nose)))
10367 (propagated-inputs
10368 `(("python-pytz" ,python-pytz)
10369 ("python-billiard" ,python-billiard)
10370 ("python-kombu" ,python-kombu)))
10371 (home-page "http://celeryproject.org")
10372 (synopsis "Distributed Task Queue")
10373 (description "Celery is an asynchronous task queue/job queue based on
10374 distributed message passing. It is focused on real-time operation, but
10375 supports scheduling as well. The execution units, called tasks, are executed
10376 concurrently on a single or more worker servers using multiprocessing,
10377 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10378 synchronously (wait until ready).")
10379 (license license:bsd-3)
10380 (properties `((python2-variant . ,(delay python2-celery))))))
10381
10382 (define-public python2-celery
10383 (let ((celery (package-with-python2
10384 (strip-python2-variant python-celery))))
10385 (package
10386 (inherit celery)
10387 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10388 ("python2-mock" ,python2-mock)
10389 ,@(package-native-inputs celery))))))
10390
10391 (define-public python-translitcodec
10392 (package
10393 (name "python-translitcodec")
10394 (version "0.4.0")
10395 (source
10396 (origin
10397 (method url-fetch)
10398 (uri (pypi-uri "translitcodec" version))
10399 (sha256
10400 (base32
10401 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10402 (build-system python-build-system)
10403 (arguments
10404 `(#:tests? #f)) ; no tests provided
10405 (home-page
10406 "https://github.com/claudep/translitcodec")
10407 (synopsis
10408 "Unicode to 8-bit charset transliteration codec")
10409 (description
10410 "This package contains codecs for transliterating ISO 10646 texts into
10411 best-effort representations using smaller coded character sets (ASCII,
10412 ISO 8859, etc.).")
10413 (license license:expat)))
10414
10415 (define-public python2-translitcodec
10416 (package-with-python2 python-translitcodec))
10417
10418 (define-public python-editor
10419 (package
10420 (name "python-editor")
10421 (version "0.5")
10422 (source
10423 (origin
10424 (method url-fetch)
10425 (uri (pypi-uri "python-editor" version))
10426 (sha256
10427 (base32
10428 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10429 (build-system python-build-system)
10430 (home-page
10431 "https://github.com/fmoo/python-editor")
10432 (synopsis
10433 "Programmatically open an editor, capture the result")
10434 (description
10435 "python-editor is a library that provides the editor module for
10436 programmatically interfacing with your system's $EDITOR.")
10437 (license license:asl2.0)))
10438
10439 (define-public python2-editor
10440 (package-with-python2 python-editor))
10441
10442 (define-public python-sphinxcontrib-programoutput
10443 (package
10444 (name "python-sphinxcontrib-programoutput")
10445 (version "0.10")
10446 (source (origin
10447 (method url-fetch)
10448 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10449 (sha256
10450 (base32
10451 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10452 (build-system python-build-system)
10453 (arguments
10454 ;; FIXME: Many tests are failing and the upstream is gone.
10455 '(#:tests? #f))
10456 (propagated-inputs
10457 `(("python-sphinx" ,python-sphinx)))
10458 (synopsis "Sphinx extension to include program output")
10459 (description "A Sphinx extension to literally insert the output of arbitrary
10460 commands into documents, helping you to keep your command examples up to date.")
10461 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10462 (license license:bsd-2)))
10463
10464 (define-public python2-sphinxcontrib-programoutput
10465 (package-with-python2 python-sphinxcontrib-programoutput))
10466
10467 (define-public python-sphinx-repoze-autointerface
10468 (package
10469 (name "python-sphinx-repoze-autointerface")
10470 (version "0.8")
10471 (source (origin
10472 (method url-fetch)
10473 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10474 (sha256
10475 (base32
10476 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10477 (build-system python-build-system)
10478 (arguments '(#:tests? #f)) ; No tests.
10479 (propagated-inputs
10480 `(("python-sphinx" ,python-sphinx)
10481 ("python-zope-interface" ,python-zope-interface)))
10482 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10483 (description "This package defines an extension for the Sphinx documentation
10484 system. The extension allows generation of API documentation by
10485 introspection of @code{zope.interface} instances in code.")
10486 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10487 (license license:repoze)))
10488
10489 (define-public python2-sphinx-repoze-autointerface
10490 (package-with-python2 python-sphinx-repoze-autointerface))
10491
10492 (define-public python-psycopg2
10493 (package
10494 (name "python-psycopg2")
10495 (version "2.6.2")
10496 (source
10497 (origin
10498 (method url-fetch)
10499 (uri (pypi-uri "psycopg2" version))
10500 (sha256
10501 (base32
10502 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10503 (build-system python-build-system)
10504 (arguments
10505 ;; Tests would require a postgresql database "psycopg2_test"
10506 ;; and a running postgresql database management service.
10507 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10508 (inputs
10509 `(("postgresql" ,postgresql))) ; libpq
10510 (home-page "http://initd.org/psycopg/")
10511 (synopsis "Python PostgreSQL adapter")
10512 (description
10513 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10514 (license license:lgpl3+)))
10515
10516 (define-public python2-psycopg2
10517 (package-with-python2 python-psycopg2))
10518
10519 (define-public python-vobject
10520 (package
10521 (name "python-vobject")
10522 (version "0.9.5")
10523 (source (origin
10524 (method url-fetch)
10525 (uri (pypi-uri "vobject" version))
10526 (sha256
10527 (base32
10528 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
10529 (build-system python-build-system)
10530 (arguments
10531 '(;; The test suite relies on some non-portable Windows interfaces.
10532 #:tests? #f))
10533 (propagated-inputs
10534 `(("python-dateutil" ,python-dateutil)
10535 ("python-pyicu" ,python-pyicu)))
10536 (synopsis "Parse and generate vCard and vCalendar files")
10537 (description "Vobject is intended to be a full featured Python package for
10538 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10539 are supported and well tested. vCard 3.0 files are supported, and all data
10540 should be imported, but only a few components are understood in a sophisticated
10541 way.")
10542 (home-page "http://eventable.github.io/vobject/")
10543 (license license:asl2.0)))
10544
10545 (define-public python2-vobject
10546 (package-with-python2 python-vobject))
10547
10548 (define-public python-munkres
10549 (package
10550 (name "python-munkres")
10551 (version "1.0.8")
10552 (source (origin
10553 (method url-fetch)
10554 (uri (pypi-uri "munkres" version))
10555 (sha256
10556 (base32
10557 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10558 (build-system python-build-system)
10559 (arguments
10560 '(#:tests? #f)) ; no test suite
10561 (home-page "http://software.clapper.org/munkres/")
10562 (synopsis "Implementation of the Munkres algorithm")
10563 (description "The Munkres module provides an implementation of the Munkres
10564 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10565 useful for solving the Assignment Problem.")
10566 (license license:bsd-3)))
10567
10568 (define-public python2-munkres
10569 (package-with-python2 python-munkres))
10570
10571 (define-public python-flask
10572 (package
10573 (name "python-flask")
10574 (version "0.11.1")
10575 (source (origin
10576 (method url-fetch)
10577 (uri (pypi-uri "Flask" version))
10578 (sha256
10579 (base32
10580 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10581 (build-system python-build-system)
10582 (propagated-inputs
10583 `(("python-itsdangerous" ,python-itsdangerous)
10584 ("python-jinja2" ,python-jinja2)
10585 ("python-click" ,python-click)
10586 ("python-werkzeug" ,python-werkzeug)))
10587 (home-page "https://github.com/mitsuhiko/flask/")
10588 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10589 (description "Flask is a micro web framework based on the Werkzeug toolkit
10590 and Jinja2 template engine. It is called a micro framework because it does not
10591 presume or force a developer to use a particular tool or library.")
10592 (license license:bsd-3)))
10593
10594 (define-public python2-flask
10595 (package-with-python2 python-flask))
10596
10597 (define-public python-flask-wtf
10598 (package
10599 (name "python-flask-wtf")
10600 (version "0.13.1")
10601 (source
10602 (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "Flask-WTF" version))
10605 (sha256
10606 (base32
10607 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10608 (build-system python-build-system)
10609 (arguments
10610 '(#:phases
10611 (modify-phases %standard-phases
10612 (add-before 'check 'drop-failing-test
10613 (lambda _
10614 ;; FIXME: This file tries resolving an external server, which
10615 ;; fails. Try to patch out the offending section instead of
10616 ;; deleting the whole thing.
10617 (delete-file "tests/test_recaptcha.py")
10618 #t)))))
10619 (propagated-inputs
10620 `(("python-flask-babel" ,python-flask-babel)
10621 ("python-babel" ,python-babel)
10622 ("python-wtforms" ,python-wtforms)))
10623 (native-inputs
10624 `(("python-nose" ,python-nose)))
10625 (home-page "https://github.com/lepture/flask-wtf")
10626 (synopsis "Simple integration of Flask and WTForms")
10627 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10628 upload, and reCAPTCHA.")
10629 (license license:bsd-3)))
10630
10631 (define-public python2-flask-wtf
10632 (package-with-python2 python-flask-wtf))
10633
10634 (define-public python-flask-multistatic
10635 (package
10636 (name "python-flask-multistatic")
10637 (version "1.0")
10638 (source
10639 (origin
10640 (method url-fetch)
10641 (uri (pypi-uri "flask-multistatic" version))
10642 (sha256
10643 (base32
10644 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10645 (build-system python-build-system)
10646 (propagated-inputs
10647 `(("python-flask" ,python-flask)))
10648 (home-page "https://pagure.io/flask-multistatic")
10649 (synopsis "Flask plugin to allow overriding static files")
10650 (description "@code{flask-multistatic} is a flask plugin that adds support
10651 for overriding static files.")
10652 (license license:gpl3+)))
10653
10654 (define-public python2-flask-multistatic
10655 (package-with-python2 python-flask-multistatic))
10656
10657 (define-public python-cookies
10658 (package
10659 (name "python-cookies")
10660 (version "2.2.1")
10661 (source (origin
10662 (method url-fetch)
10663 (uri (pypi-uri "cookies" version))
10664 (sha256
10665 (base32
10666 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10667 (build-system python-build-system)
10668 (arguments
10669 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10670 #:tests? #f))
10671 (native-inputs
10672 `(("python-pytest" ,python2-pytest)))
10673 (synopsis "HTTP cookie parser and renderer")
10674 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10675 Python.")
10676 (home-page "https://gitlab.com/sashahart/cookies")
10677 (license license:expat)))
10678
10679 (define-public python2-cookies
10680 (package-with-python2 python-cookies))
10681
10682 (define-public python-responses
10683 (package
10684 (name "python-responses")
10685 (version "0.5.1")
10686 (source (origin
10687 (method url-fetch)
10688 (uri (pypi-uri "responses" version))
10689 (sha256
10690 (base32
10691 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10692 (build-system python-build-system)
10693 (arguments
10694 `(;; Test suite is not distributed:
10695 ;; https://github.com/getsentry/responses/issues/38
10696 #:tests? #f))
10697 (native-inputs
10698 `(("python-mock" ,python-mock)))
10699 (propagated-inputs
10700 `(("python-requests" ,python-requests)
10701 ("python-cookies" ,python-cookies)
10702 ("python-six" ,python-six)))
10703 (home-page "https://github.com/getsentry/responses")
10704 (synopsis "Utility for mocking out the `requests` Python library")
10705 (description "A utility library for mocking out the `requests` Python
10706 library.")
10707 (license license:asl2.0)))
10708
10709 (define-public python2-responses
10710 (package-with-python2 python-responses))
10711
10712 (define-public python-whoosh
10713 (package
10714 (name "python-whoosh")
10715 (version "2.7.4")
10716 (source
10717 (origin
10718 (method url-fetch)
10719 (uri (pypi-uri "Whoosh" version))
10720 (sha256
10721 (base32
10722 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10723 (build-system python-build-system)
10724 (native-inputs
10725 `(("python-pytest" ,python-pytest)))
10726 (home-page "http://bitbucket.org/mchaput/whoosh")
10727 (synopsis "Full text indexing, search, and spell checking library")
10728 (description
10729 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10730 checking library.")
10731 (license license:bsd-2)))
10732
10733 (define-public python2-whoosh
10734 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10735 (package (inherit whoosh)
10736 (propagated-inputs
10737 `(("python2-backport-ssl-match-hostname"
10738 ,python2-backport-ssl-match-hostname)
10739 ,@(package-propagated-inputs whoosh))))))
10740
10741 (define-public python-pathlib
10742 (package
10743 (name "python-pathlib")
10744 (version "1.0.1")
10745 (source (origin
10746 (method url-fetch)
10747 (uri (pypi-uri "pathlib" version))
10748 (sha256
10749 (base32
10750 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10751 (build-system python-build-system)
10752 ;; The tests depend on the internal "test" module, which does not provide
10753 ;; a stable interface.
10754 (arguments `(#:tests? #f))
10755 (home-page "https://pathlib.readthedocs.org/")
10756 (synopsis "Object-oriented file system paths")
10757 (description "Pathlib offers a set of classes to handle file system paths.
10758 It offers the following advantages over using string objects:
10759
10760 @enumerate
10761 @item No more cumbersome use of os and os.path functions. Everything can
10762 be done easily through operators, attribute accesses, and method calls.
10763 @item Embodies the semantics of different path types. For example,
10764 comparing Windows paths ignores casing.
10765 @item Well-defined semantics, eliminating any inconsistencies or
10766 ambiguities (forward vs. backward slashes, etc.).
10767 @end enumerate
10768
10769 Note: In Python 3.4, pathlib is now part of the standard library. For other
10770 Python versions please consider python-pathlib2 instead, which tracks the
10771 standard library module. This module (python-pathlib) isn't maintained
10772 anymore.")
10773 (license license:expat)))
10774
10775 (define-public python2-pathlib
10776 (package-with-python2 python-pathlib))
10777
10778 (define-public python2-pathlib2
10779 (package
10780 (name "python2-pathlib2")
10781 (version "2.1.0")
10782 (source (origin
10783 (method url-fetch)
10784 (uri (pypi-uri "pathlib2" version))
10785 (sha256
10786 (base32
10787 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10788 (build-system python-build-system)
10789 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10790 ;; version is 3.4 which already includes this package as part of the
10791 ;; standard library.
10792 (arguments
10793 `(#:python ,python-2))
10794 (native-inputs
10795 `(("python2-six" ,python2-six)))
10796 (home-page "http://pypi.python.org/pypi/pathlib2/")
10797 (synopsis "Object-oriented file system paths - backport of standard
10798 pathlib module")
10799 (description "The goal of pathlib2 is to provide a backport of standard
10800 pathlib module which tracks the standard library module, so all the newest
10801 features of the standard pathlib can be used also on older Python versions.
10802
10803 Pathlib offers a set of classes to handle file system paths. It offers the
10804 following advantages over using string objects:
10805
10806 @enumerate
10807 @item No more cumbersome use of os and os.path functions. Everything can
10808 be done easily through operators, attribute accesses, and method calls.
10809 @item Embodies the semantics of different path types. For example,
10810 comparing Windows paths ignores casing.
10811 @item Well-defined semantics, eliminating any inconsistencies or
10812 ambiguities (forward vs. backward slashes, etc.).
10813 @end enumerate")
10814 (license license:expat)))
10815
10816 (define-public python-jellyfish
10817 (package
10818 (name "python-jellyfish")
10819 (version "0.5.6")
10820 (source (origin
10821 (method url-fetch)
10822 (uri (pypi-uri "jellyfish" version))
10823 (sha256
10824 (base32
10825 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10826 (build-system python-build-system)
10827 (native-inputs
10828 `(("python-pytest" ,python-pytest)))
10829 (home-page "https://github.com/jamesturk/jellyfish")
10830 (synopsis "Approximate and phonetic matching of strings")
10831 (description "Jellyfish uses a variety of string comparison and phonetic
10832 encoding algorithms to do fuzzy string matching.")
10833 (license license:bsd-2)
10834 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10835
10836 (define-public python2-jellyfish
10837 (let ((jellyfish (package-with-python2
10838 (strip-python2-variant python-jellyfish))))
10839 (package (inherit jellyfish)
10840 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10841 ,@(package-native-inputs jellyfish))))))
10842
10843 (define-public python2-unicodecsv
10844 (package
10845 (name "python2-unicodecsv")
10846 (version "0.14.1")
10847 (source (origin
10848 (method url-fetch)
10849 ;; The test suite is not included in the PyPi release.
10850 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10851 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10852 "archive/" version ".tar.gz"))
10853 (file-name (string-append name "-" version ".tar.gz"))
10854 (sha256
10855 (base32
10856 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10857 (build-system python-build-system)
10858 (arguments
10859 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10860 #:python ,python-2))
10861 (native-inputs
10862 `(("python2-unittest2" ,python2-unittest2)))
10863 (home-page "https://github.com/jdunck/python-unicodecsv")
10864 (synopsis "Unicode CSV module for Python 2")
10865 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10866 module, adding support for Unicode strings.")
10867 (license license:bsd-2)))
10868
10869 (define-public python-rarfile
10870 (package
10871 (name "python-rarfile")
10872 (version "2.8")
10873 (source (origin
10874 (method url-fetch)
10875 (uri (pypi-uri "rarfile" version))
10876 (sha256
10877 (base32
10878 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10879 (build-system python-build-system)
10880 (arguments
10881 '(#:phases
10882 (modify-phases %standard-phases
10883 (replace 'check
10884 ;; Many tests fail, but the installation proceeds.
10885 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10886 (native-inputs
10887 `(("which" ,which))) ; required for tests
10888 (propagated-inputs
10889 `(("libarchive" ,libarchive)))
10890 (home-page "https://github.com/markokr/rarfile")
10891 (synopsis "RAR archive reader for Python")
10892 (description "This is Python module for RAR archive reading. The interface
10893 is made as zipfile like as possible.")
10894 (license license:isc)))
10895
10896 (define-public python2-rarfile
10897 (package-with-python2 python-rarfile))
10898
10899 (define-public python-magic
10900 (package
10901 (name "python-magic")
10902 (version "0.4.3")
10903 (source
10904 (origin
10905 (method url-fetch)
10906 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10907 version ".tar.gz"))
10908 (sha256
10909 (base32
10910 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10911 (file-name (string-append name "-" version "-checkout"))))
10912 (build-system python-build-system)
10913 (arguments
10914 ;; The tests are unreliable, so don't run them. The tests fail
10915 ;; under Python3 because they were written for Python2 and
10916 ;; contain import statements that do not work in Python3. One of
10917 ;; the tests fails under Python2 because its assertions are
10918 ;; overly stringent; it relies on comparing output strings which
10919 ;; are brittle and can change depending on the version of
10920 ;; libmagic being used and the system on which the test is
10921 ;; running. In my case, under GuixSD 0.10.0, only one test
10922 ;; failed, and it seems to have failed only because the version
10923 ;; of libmagic that is packaged in Guix outputs a slightly
10924 ;; different (but not wrong) string than the one that the test
10925 ;; expected.
10926 '(#:tests? #f
10927 #:phases (modify-phases %standard-phases
10928 ;; Replace a specific method call with a hard-coded
10929 ;; path to the necessary libmagic.so file in the
10930 ;; store. If we don't do this, then the method call
10931 ;; will fail to find the libmagic.so file, which in
10932 ;; turn will cause any application using
10933 ;; python-magic to fail.
10934 (add-before 'build 'hard-code-path-to-libmagic
10935 (lambda* (#:key inputs #:allow-other-keys)
10936 (let ((file (assoc-ref inputs "file")))
10937 (substitute* "magic.py"
10938 (("ctypes.util.find_library\\('magic'\\)")
10939 (string-append "'" file "/lib/libmagic.so'")))
10940 #t)))
10941 (add-before 'install 'disable-egg-compression
10942 (lambda _
10943 (let ((port (open-file "setup.cfg" "a")))
10944 (display "\n[easy_install]\nzip_ok = 0\n"
10945 port)
10946 (close-port port)
10947 #t))))))
10948 (inputs
10949 ;; python-magic needs to be able to find libmagic.so.
10950 `(("file" ,file)))
10951 (home-page "https://github.com/ahupp/python-magic")
10952 (synopsis "File type identification using libmagic")
10953 (description
10954 "This module uses ctypes to access the libmagic file type
10955 identification library. It makes use of the local magic database and
10956 supports both textual and MIME-type output. Note that this module and
10957 the python-file module both provide a \"magic.py\" file; these two
10958 modules, which are different and were developed separately, both serve
10959 the same purpose: to provide Python bindings for libmagic.")
10960 (license license:expat)))
10961
10962 (define-public python2-magic
10963 (package-with-python2 python-magic))
10964
10965 (define-public python2-s3cmd
10966 (package
10967 (name "python2-s3cmd")
10968 (version "1.6.1")
10969 (source
10970 (origin
10971 (method url-fetch)
10972 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10973 "s3cmd-" version ".tar.gz"))
10974 (sha256
10975 (base32
10976 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10977 (build-system python-build-system)
10978 (arguments
10979 ;; s3cmd is written for python2 only and contains no tests.
10980 `(#:python ,python-2
10981 #:tests? #f))
10982 (propagated-inputs
10983 `(("python2-dateutil" ,python2-dateutil)
10984 ;; The python-file package also provides a magic.py module.
10985 ;; This is an unfortunate state of affairs; however, s3cmd
10986 ;; fails to install if it cannot find specifically the
10987 ;; python-magic package. Thus we include it, instead of using
10988 ;; python-file. Ironically, s3cmd sometimes works better
10989 ;; without libmagic bindings at all:
10990 ;; https://github.com/s3tools/s3cmd/issues/198
10991 ("python2-magic" ,python2-magic)))
10992 (home-page "http://s3tools.org/s3cmd")
10993 (synopsis "Command line tool for S3-compatible storage services")
10994 (description
10995 "S3cmd is a command line tool for uploading, retrieving and managing data
10996 in storage services that are compatible with the Amazon Simple Storage
10997 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10998 GnuPG encryption, and more. It also supports management of Amazon's
10999 CloudFront content delivery network.")
11000 (license license:gpl2+)))
11001
11002 (define-public python-pkgconfig
11003 (package
11004 (name "python-pkgconfig")
11005 (version "1.1.0")
11006 (source
11007 (origin
11008 (method url-fetch)
11009 (uri (pypi-uri "pkgconfig" version))
11010 (sha256
11011 (base32
11012 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
11013 (build-system python-build-system)
11014 (native-inputs
11015 `(("python-nose" ,python-nose)))
11016 (inputs
11017 `(("pkg-config" ,pkg-config)))
11018 (arguments
11019 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
11020 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
11021 #:tests? #f
11022 ;; Hard-code the path to pkg-config.
11023 #:phases
11024 (modify-phases %standard-phases
11025 (add-before
11026 'build 'patch
11027 (lambda _
11028 (substitute* "pkgconfig/pkgconfig.py"
11029 (("cmd = 'pkg-config")
11030 (string-append "cmd = '" (which "pkg-config"))))
11031 #t)))))
11032 (home-page "https://github.com/matze/pkgconfig")
11033 (synopsis "Python interface for pkg-config")
11034 (description "This module provides a Python interface to pkg-config. It
11035 can be used to find all pkg-config packages, check if a package exists,
11036 check if a package meets certain version requirements, query CFLAGS and
11037 LDFLAGS and parse the output to build extensions with setup.py.")
11038 (license license:expat)))
11039
11040 (define-public python2-pkgconfig
11041 (package-with-python2 python-pkgconfig))
11042
11043 (define-public python-bz2file
11044 (package
11045 (name "python-bz2file")
11046 (version "0.98")
11047 (source
11048 (origin
11049 (method url-fetch)
11050 (uri (pypi-uri "bz2file" version))
11051 (sha256
11052 (base32
11053 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11054 (build-system python-build-system)
11055 (arguments
11056 `(#:tests? #f)) ; Tests use deprecated python modules.
11057 (home-page "https://github.com/nvawda/bz2file")
11058 (synopsis "Read and write bzip2-compressed files")
11059 (description
11060 "Bz2file is a Python library for reading and writing bzip2-compressed
11061 files. It contains a drop-in replacement for the I/O interface in the
11062 standard library's @code{bz2} module, including features from the latest
11063 development version of CPython that are not available in older releases.")
11064 (license license:asl2.0)
11065 (properties `((python2-variant . ,(delay python2-bz2file))))))
11066
11067 (define-public python2-bz2file
11068 (let ((base (package-with-python2
11069 (strip-python2-variant python-bz2file))))
11070 (package
11071 (inherit base)
11072 (arguments
11073 `(#:python ,python-2
11074 #:phases
11075 (modify-phases %standard-phases
11076 ;; 'python setup.py test' does not work as of 0.98.
11077 ;; There is only the one test file, so we run it directly.
11078 (replace 'check
11079 (lambda _ (zero? (system* "python"
11080 "test_bz2file.py"))))))))))
11081
11082 (define-public python-future
11083 (package
11084 (name "python-future")
11085 (version "0.16.0")
11086 (source
11087 (origin
11088 (method url-fetch)
11089 (uri (pypi-uri "future" version))
11090 (sha256
11091 (base32
11092 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
11093 (build-system python-build-system)
11094 ;; Many tests connect to the network or are otherwise flawed.
11095 ;; https://github.com/PythonCharmers/python-future/issues/210
11096 (arguments
11097 `(#:tests? #f))
11098 (home-page "http://python-future.org")
11099 (synopsis "Single-source support for Python 3 and 2")
11100 (description
11101 "@code{python-future} is the missing compatibility layer between Python 2 and
11102 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11103 to support both Python 2 and Python 3 with minimal overhead.")
11104 (license license:expat)))
11105
11106 (define-public python2-future
11107 (package-with-python2 python-future))
11108
11109 (define-public python-cysignals
11110 (package
11111 (name "python-cysignals")
11112 (version "1.1.0")
11113 (source
11114 (origin
11115 (method url-fetch)
11116 (uri (pypi-uri "cysignals" version ".tar.bz2"))
11117 (sha256
11118 (base32
11119 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
11120 (build-system python-build-system)
11121 (native-inputs
11122 `(("python-cython" ,python-cython)
11123 ("python-sphinx" ,python-sphinx)))
11124 (inputs
11125 `(("pari-gp" ,pari-gp)))
11126 (arguments
11127 `(#:modules ((guix build python-build-system)
11128 ((guix build gnu-build-system) #:prefix gnu:)
11129 (guix build utils))
11130 ;; FIXME: Tests are executed after installation and currently fail
11131 ;; when not installing into standard locations; the author is working
11132 ;; on a fix.
11133 #:tests? #f
11134 #:phases
11135 (modify-phases %standard-phases
11136 (add-before
11137 'build 'configure
11138 (assoc-ref gnu:%standard-phases 'configure)))))
11139 (home-page
11140 "https://github.com/sagemath/cysignals")
11141 (synopsis
11142 "Handling of interrupts and signals for Cython")
11143 (description
11144 "The cysignals package provides mechanisms to handle interrupts (and
11145 other signals and errors) in Cython code, using two related approaches,
11146 for mixed Cython/Python code or external C libraries and pure Cython code,
11147 respectively.")
11148 (license license:lgpl3+)))
11149
11150 (define-public python2-cysignals
11151 (package-with-python2 python-cysignals))
11152
11153 (define-public python2-shedskin
11154 (package
11155 (name "python2-shedskin")
11156 (version "0.9.4")
11157 (source
11158 (origin
11159 (method url-fetch)
11160 (uri (string-append "https://github.com/shedskin/shedskin/"
11161 "releases/download/v" version
11162 "/shedskin-" version ".tgz"))
11163 (sha256
11164 (base32
11165 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11166 (build-system python-build-system)
11167 (arguments
11168 `(#:python ,python-2
11169 #:phases (modify-phases %standard-phases
11170 (add-after 'unpack 'fix-resulting-include-libs
11171 (lambda* (#:key inputs #:allow-other-keys)
11172 (let ((libgc (assoc-ref inputs "libgc"))
11173 (pcre (assoc-ref inputs "pcre")))
11174 (substitute* "shedskin/makefile.py"
11175 (("variable == 'CCFLAGS':[ ]*")
11176 (string-append "variable == 'CCFLAGS':\n"
11177 " line += ' -I " pcre "/include"
11178 " -I " libgc "/include'"))
11179 (("variable == 'LFLAGS':[ ]*")
11180 (string-append "variable == 'LFLAGS':\n"
11181 " line += ' -L" pcre "/lib"
11182 " -L " libgc "/lib'")))
11183 #t))))))
11184 (inputs `(("pcre" ,pcre)
11185 ("libgc" ,libgc)))
11186 (home-page "https://shedskin.github.io/")
11187 (synopsis "Experimental Python-2 to C++ Compiler")
11188 (description (string-append "This is an experimental compiler for a subset of
11189 Python. It generates C++ code and a Makefile."))
11190 (license (list license:gpl3 license:bsd-3 license:expat))))
11191
11192 (define-public python2-rope
11193 (package
11194 (name "python2-rope")
11195 (version "0.10.3")
11196 (source
11197 (origin
11198 (method url-fetch)
11199 (uri (pypi-uri "rope" version))
11200 (sha256
11201 (base32
11202 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11203 (arguments
11204 ;; Rope is currently python-2 only.
11205 ;; https://github.com/python-rope/rope/issues/57
11206 `(#:python ,python-2))
11207 (build-system python-build-system)
11208 (native-inputs
11209 `(("python2-unittest2" ,python2-unittest2)))
11210 (home-page "https://github.com/python-rope/rope")
11211 (synopsis "Refactoring library for Python")
11212 (description "Rope is a refactoring library for Python. It facilitates
11213 the renaming, moving and extracting of attributes, functions, modules, fields
11214 and parameters in Python 2 source code. These refactorings can also be applied
11215 to occurrences in strings and comments.")
11216 (license license:gpl2)))
11217
11218 (define-public python-py3status
11219 (package
11220 (name "python-py3status")
11221 (version "3.1")
11222 (source
11223 (origin
11224 (method url-fetch)
11225 (uri (pypi-uri "py3status" version))
11226 (sha256
11227 (base32
11228 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
11229 (build-system python-build-system)
11230 (arguments
11231 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
11232 (home-page "https://github.com/ultrabug/py3status")
11233 (synopsis "Extensible i3status wrapper written in Python")
11234 (description "py3status is an i3status wrapper which extends i3status
11235 functionality in a modular way, allowing you to extend your panel with your
11236 own code, responding to click events and updating clock every second.")
11237 (license license:bsd-3)))
11238
11239 (define-public python-tblib
11240 (package
11241 (name "python-tblib")
11242 (version "1.3.0")
11243 (source (origin
11244 (method url-fetch)
11245 (uri (pypi-uri "tblib" version))
11246 (sha256 (base32
11247 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11248 (build-system python-build-system)
11249 (arguments
11250 `(#:phases
11251 (modify-phases %standard-phases
11252 (replace 'check
11253 (lambda _
11254 ;; Upstream runs tests after installation and the package itself
11255 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11256 ;; found.
11257 (setenv "PYTHONPATH"
11258 (string-append (getcwd) "/build/lib:"
11259 (getenv "PYTHONPATH")))
11260 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11261 (native-inputs
11262 `(("python-pytest" ,python-pytest)
11263 ("python-six" ,python-six)))
11264 (home-page "https://github.com/ionelmc/python-tblib")
11265 (synopsis "Traceback serialization library")
11266 (description
11267 "Traceback serialization allows you to:
11268
11269 @enumerate
11270 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11271 different processes. This allows better error handling when running code over
11272 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11273
11274 @item Parse traceback strings and raise with the parsed tracebacks.
11275 @end enumerate\n")
11276 (license license:bsd-3)))
11277
11278 (define-public python2-tblib
11279 (package-with-python2 python-tblib))
11280
11281 (define-public python-sqlparse
11282 (package
11283 (name "python-sqlparse")
11284 (version "0.1.19")
11285 (source (origin
11286 (method url-fetch)
11287 (uri (pypi-uri "sqlparse" version))
11288 (sha256
11289 (base32
11290 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11291 (build-system python-build-system)
11292 (arguments
11293 `(#:phases
11294 (modify-phases %standard-phases
11295 (replace 'check
11296 (lambda* _
11297 ;; setup.py-integrated 2to3 only affects the build files, but
11298 ;; py.test is using the source files. So we need to convert them
11299 ;; manually.
11300 (when (zero? (system* "python3"))
11301 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11302 (zero? (system* "py.test")))))))
11303 (native-inputs
11304 `(("python-pytest" ,python-pytest)))
11305 (home-page "https://github.com/andialbrecht/sqlparse")
11306 (synopsis "Non-validating SQL parser")
11307 (description "Sqlparse is a non-validating SQL parser for Python. It
11308 provides support for parsing, splitting and formatting SQL statements.")
11309 (license license:bsd-3)))
11310
11311 (define-public python2-sqlparse
11312 (package-with-python2 python-sqlparse))
11313
11314 (define-public python-greenlet
11315 (package
11316 (name "python-greenlet")
11317 (version "0.4.11")
11318 (source (origin
11319 (method url-fetch)
11320 (uri (pypi-uri "greenlet" version))
11321 (sha256
11322 (base32
11323 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11324 (build-system python-build-system)
11325 (home-page "https://greenlet.readthedocs.io/")
11326 (synopsis "Lightweight in-process concurrent programming")
11327 (description
11328 "Greenlet package is a spin-off of Stackless, a version of CPython
11329 that supports micro-threads called \"tasklets\". Tasklets run
11330 pseudo-concurrently (typically in a single or a few OS-level threads) and
11331 are synchronized with data exchanges on \"channels\".")
11332 (license (list license:psfl license:expat))))
11333
11334 (define-public python2-greenlet
11335 (package-with-python2 python-greenlet))
11336
11337 (define-public python-gevent
11338 (package
11339 (name "python-gevent")
11340 (version "1.1.1")
11341 (source (origin
11342 (method url-fetch)
11343 (uri (pypi-uri "gevent" version))
11344 (sha256
11345 (base32
11346 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11347 (modules '((guix build utils)))
11348 (snippet
11349 '(begin
11350 ;; unbunding libev and c-ares
11351 (for-each delete-file-recursively '("libev" "c-ares"))
11352 ;; fixing testsuite
11353 (call-with-output-file "greentest/__init__.py" noop)
11354 (substitute* "greentest/testrunner.py"
11355 (("import util") "from . import util")
11356 (("from util import log") "from .util import log"))))))
11357 (build-system python-build-system)
11358 (propagated-inputs
11359 `(("python-greenlet" ,python-greenlet)))
11360 (native-inputs
11361 `(("python-six" ,python-six)))
11362 (inputs
11363 `(("c-ares" ,c-ares)
11364 ("libev" ,libev)))
11365 (home-page "http://www.gevent.org/")
11366 (synopsis "Coroutine-based network library")
11367 (description
11368 "gevent is a coroutine-based Python networking library that uses greenlet
11369 to provide a high-level synchronous API on top of the libev event loop.")
11370 (license license:expat)))
11371
11372 (define-public python2-gevent
11373 (package-with-python2 python-gevent))
11374
11375 (define-public python-geventhttpclient
11376 (package
11377 (name "python-geventhttpclient")
11378 (version "1.3.1")
11379 (source (origin
11380 (method url-fetch)
11381 (uri (pypi-uri "geventhttpclient" version))
11382 (sha256
11383 (base32
11384 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11385 (modules '((guix build utils)))
11386 (snippet
11387 '(begin
11388 ;; Delete pre-compiled files.
11389 (for-each delete-file (find-files "src/geventhttpclient"
11390 ".*\\.pyc"))
11391 #t))))
11392 (build-system python-build-system)
11393 (arguments
11394 '(#:phases
11395 (modify-phases %standard-phases
11396 (add-after 'unpack 'delete-network-tests
11397 (lambda _
11398 (delete-file "src/geventhttpclient/tests/test_client.py")
11399 #t))
11400 (delete 'check)
11401 (add-after 'install 'check
11402 (lambda* (#:key inputs outputs #:allow-other-keys)
11403 (add-installed-pythonpath inputs outputs)
11404 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11405 (native-inputs
11406 `(("python-pytest" ,python-pytest)))
11407 (propagated-inputs
11408 `(("python-certifi" ,python-certifi)
11409 ("python-gevent" ,python-gevent)
11410 ("python-six" ,python-six)))
11411 (home-page "https://github.com/gwik/geventhttpclient")
11412 (synopsis "HTTP client library for gevent")
11413 (description "@code{python-geventhttpclient} is a high performance,
11414 concurrent HTTP client library for python using @code{gevent}.")
11415 (license license:expat)))
11416
11417 (define-public python2-geventhttpclient
11418 (package-with-python2 python-geventhttpclient))
11419
11420 (define-public python-fastimport
11421 (package
11422 (name "python-fastimport")
11423 (version "0.9.6")
11424 (source
11425 (origin
11426 (method url-fetch)
11427 (uri (pypi-uri "fastimport" version))
11428 (sha256
11429 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11430 (build-system python-build-system)
11431 (home-page "https://github.com/jelmer/python-fastimport")
11432 (synopsis "VCS fastimport parser and generator in Python")
11433 (description "This package provides a parser for and generator of the Git
11434 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11435 format.")
11436 (license license:gpl2+)))
11437
11438 (define-public python2-fastimport
11439 (package-with-python2 python-fastimport))
11440
11441 (define-public python-twisted
11442 (package
11443 (name "python-twisted")
11444 (version "16.2.0")
11445 (source (origin
11446 (method url-fetch)
11447 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11448 (sha256
11449 (base32
11450 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11451 (build-system python-build-system)
11452 (arguments
11453 '(#:tests? #f)) ; FIXME: Some tests are failing.
11454 ;; #:phases
11455 ;; (modify-phases %standard-phases
11456 ;; (replace 'check
11457 ;; (lambda _
11458 ;; (zero? (system* "./bin/trial" "twisted")))))
11459 (propagated-inputs
11460 `(("python-zope-interface" ,python-zope-interface)))
11461 (home-page "https://twistedmatrix.com/")
11462 (synopsis "Asynchronous networking framework written in Python")
11463 (description
11464 "Twisted is an extensible framework for Python programming, with special
11465 focus on event-based network programming and multiprotocol integration.")
11466 (license license:expat)))
11467
11468 (define-public python2-twisted
11469 (package-with-python2 python-twisted))
11470
11471 (define-public python-pika
11472 (package
11473 (name "python-pika")
11474 (version "0.10.0")
11475 (source
11476 (origin
11477 (method url-fetch)
11478 (uri (pypi-uri "pika" version))
11479 (sha256
11480 (base32
11481 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11482 (build-system python-build-system)
11483 (native-inputs
11484 `(("python-pyev" ,python-pyev)
11485 ("python-tornado" ,python-tornado)
11486 ("python-twisted" ,python-twisted)))
11487 (home-page "https://pika.readthedocs.org")
11488 (synopsis "Pure Python AMQP Client Library")
11489 (description
11490 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11491 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11492 network support library.")
11493 (license license:bsd-3)))
11494
11495 (define-public python2-pika
11496 (package-with-python2 python-pika))
11497
11498 (define-public python-ply
11499 (package
11500 (name "python-ply")
11501 (version "3.9")
11502 (source
11503 (origin
11504 (method url-fetch)
11505 (uri (pypi-uri "ply" version))
11506 (sha256
11507 (base32
11508 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11509 (build-system python-build-system)
11510 (home-page "http://www.dabeaz.com/ply/")
11511 (synopsis "Python Lex & Yacc")
11512 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11513 It uses LR parsing and does extensive error checking.")
11514 (license license:bsd-3)))
11515
11516 (define-public python2-ply
11517 (package-with-python2 python-ply))
11518
11519 (define-public python-tabulate
11520 (package
11521 (name "python-tabulate")
11522 (version "0.7.7")
11523 (source (origin
11524 (method url-fetch)
11525 (uri (pypi-uri "tabulate" version))
11526 (sha256
11527 (base32
11528 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11529 (build-system python-build-system)
11530 (arguments
11531 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11532 ;; and the latest release is not tagged in the upstream repository.
11533 '(#:tests? #f))
11534 (home-page "https://bitbucket.org/astanin/python-tabulate")
11535 (synopsis "Pretty-print tabular data")
11536 (description
11537 "Tabulate is a library and command-line utility to pretty-print tabular
11538 data in Python.")
11539 (license license:expat)))
11540
11541 (define-public python2-tabulate
11542 (package-with-python2 python-tabulate))
11543
11544 (define-public python-kazoo
11545 (package
11546 (name "python-kazoo")
11547 (version "2.2.1")
11548 (source
11549 (origin
11550 (method url-fetch)
11551 (uri (pypi-uri "kazoo" version))
11552 (sha256
11553 (base32
11554 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11555 (build-system python-build-system)
11556 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11557 (propagated-inputs
11558 `(("python-six" ,python-six)))
11559 (home-page "https://kazoo.readthedocs.org")
11560 (synopsis "High-level Zookeeper client library")
11561 (description
11562 "Kazoo is a Python client library for the Apache Zookeeper distributed
11563 application service. It is designed to be easy to use and to avoid common
11564 programming errors.")
11565 (license license:asl2.0)))
11566
11567 (define-public python2-kazoo
11568 (package-with-python2 python-kazoo))
11569
11570 (define-public python-pykafka
11571 (package
11572 (name "python-pykafka")
11573 (version "2.4.0")
11574 (source (origin
11575 (method url-fetch)
11576 (uri (string-append
11577 "https://pypi.python.org/packages/8b/3e/"
11578 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11579 "pykafka-" version ".tar.gz"))
11580 (sha256
11581 (base32
11582 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11583 (build-system python-build-system)
11584 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11585 (propagated-inputs
11586 `(("python-gevent" ,python-gevent)
11587 ("python-kazoo" ,python-kazoo)
11588 ("python-tabulate" ,python-tabulate)))
11589 (inputs
11590 `(("librdkafka" ,librdkafka)))
11591 (home-page "https://pykafka.readthedocs.io/")
11592 (synopsis "Apache Kafka client for Python")
11593 (description
11594 "PyKafka is a client for the Apache Kafka distributed messaging system.
11595 It includes Python implementations of Kafka producers and consumers, which
11596 are optionally backed by a C extension built on librdkafka.")
11597 (license license:asl2.0)))
11598
11599 (define-public python2-pykafka
11600 (package-with-python2 python-pykafka))
11601
11602 (define-public python-wcwidth
11603 (package
11604 (name "python-wcwidth")
11605 (version "0.1.7")
11606 (source
11607 (origin
11608 (method url-fetch)
11609 (uri (pypi-uri "wcwidth" version))
11610 (sha256
11611 (base32
11612 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11613 (build-system python-build-system)
11614 (home-page "https://github.com/jquast/wcwidth")
11615 (synopsis "Measure number of terminal column cells of wide-character codes")
11616 (description "Wcwidth measures the number of terminal column cells of
11617 wide-character codes. It is useful for those implementing a terminal emulator,
11618 or programs that carefully produce output to be interpreted by one. It is a
11619 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11620 specified in POSIX.1-2001 and POSIX.1-2008.")
11621 (license license:expat)))
11622
11623 (define-public python2-wcwidth
11624 (package-with-python2 python-wcwidth))
11625
11626 (define-public python2-jsonrpclib
11627 (package
11628 (name "python2-jsonrpclib")
11629 (version "0.1.7")
11630 (source (origin
11631 (method url-fetch)
11632 (uri (string-append
11633 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11634 "jsonrpclib-" version ".tar.gz"))
11635 (sha256
11636 (base32
11637 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11638 (build-system python-build-system)
11639 (arguments
11640 `(#:tests? #f
11641 #:python ,python-2))
11642 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11643 (synopsis "Implementation of JSON-RPC specification for Python")
11644 (description
11645 "This library is an implementation of the JSON-RPC specification.
11646 It supports both the original 1.0 specification, as well as the
11647 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11648 etc.")
11649 (license license:asl2.0)))
11650
11651 (define-public python-chai
11652 (package
11653 (name "python-chai")
11654 (version "1.1.1")
11655 (source (origin
11656 (method url-fetch)
11657 (uri (pypi-uri "chai" version))
11658 (sha256
11659 (base32
11660 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11661 (build-system python-build-system)
11662 (home-page "https://github.com/agoragames/chai")
11663 (synopsis "Mocking framework for Python")
11664 (description
11665 "Chai provides an api for mocking, stubbing and spying your python
11666 objects, patterned after the Mocha library for Ruby.")
11667 (license license:bsd-3)))
11668
11669 (define-public python2-chai
11670 (package-with-python2 python-chai))
11671
11672 (define-public python-arrow
11673 (package
11674 (name "python-arrow")
11675 (version "0.8.0")
11676 (source (origin
11677 (method url-fetch)
11678 (uri (pypi-uri "arrow" version))
11679 (sha256
11680 (base32
11681 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11682 (build-system python-build-system)
11683 (native-inputs
11684 `(;; For testing
11685 ("python-chai" ,python-chai)
11686 ("python-simplejson" ,python-simplejson)))
11687 (propagated-inputs
11688 `(("python-dateutil" ,python-dateutil)))
11689 (home-page "https://github.com/crsmithdev/arrow/")
11690 (synopsis "Dates and times for Python")
11691 (description
11692 "Arrow is a Python library to creating, manipulating, formatting and
11693 converting dates, times, and timestamps. It implements and updates the
11694 datetime type.")
11695 (license license:asl2.0)))
11696
11697 (define-public python2-arrow
11698 (package-with-python2 python-arrow))
11699
11700 (define-public python-inflection
11701 (package
11702 (name "python-inflection")
11703 (version "0.3.1")
11704 (source
11705 (origin (method url-fetch)
11706 (uri (pypi-uri "inflection" version))
11707 (sha256
11708 (base32
11709 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11710 (build-system python-build-system)
11711 (native-inputs
11712 `(("python-pytest" ,python-pytest)))
11713 (home-page "https://github.com/jpvanhal/inflection")
11714 (synopsis "Python string transformation library")
11715 (description
11716 "Inflection is a string transformation library. It singularizes
11717 and pluralizes English words, and transforms strings from CamelCase to
11718 underscored string.")
11719 (license license:expat)))
11720
11721 (define-public python2-inflection
11722 (package-with-python2 python-inflection))
11723
11724 (define-public python-pylev
11725 (package
11726 (name "python-pylev")
11727 (version "1.3.0")
11728 (source (origin
11729 (method url-fetch)
11730 (uri (pypi-uri "pylev" version))
11731 (sha256
11732 (base32
11733 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11734 (build-system python-build-system)
11735 (home-page "https://github.com/toastdriven/pylev")
11736 (synopsis "Levenshtein distance implementation in Python")
11737 (description "Pure Python Levenshtein implementation, based off the
11738 Wikipedia code samples at
11739 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11740 (license license:bsd-3)))
11741
11742 (define-public python2-pylev
11743 (package-with-python2 python-pylev))
11744
11745 (define-public python-cleo
11746 (package
11747 (name "python-cleo")
11748 (version "0.4.1")
11749 (source (origin
11750 (method url-fetch)
11751 (uri (pypi-uri "cleo" version))
11752 (sha256
11753 (base32
11754 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11755 (build-system python-build-system)
11756 (native-inputs
11757 `(;; For testing
11758 ("python-mock" ,python-mock)
11759 ("python-pytest" ,python-pytest)))
11760 (propagated-inputs
11761 `(("python-psutil" ,python-psutil)
11762 ("python-pylev" ,python-pylev)))
11763 (home-page "https://github.com/sdispater/cleo")
11764 (synopsis "Command-line arguments library for Python")
11765 (description
11766 "Cleo allows you to create command-line commands with signature in
11767 docstring and colored output.")
11768 (license license:expat)))
11769
11770 (define-public python2-cleo
11771 (package-with-python2 python-cleo))
11772
11773 (define-public python-lazy-object-proxy
11774 (package
11775 (name "python-lazy-object-proxy")
11776 (version "1.2.2")
11777 (source (origin
11778 (method url-fetch)
11779 (uri (pypi-uri "lazy-object-proxy" version))
11780 (sha256
11781 (base32
11782 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11783 (build-system python-build-system)
11784 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11785 (synopsis "Lazy object proxy for python")
11786 (description
11787 "Lazy object proxy is an object that wraps a callable but defers the call
11788 until the object is actually required, and caches the result of said call.")
11789 (license license:bsd-2)))
11790
11791 (define-public python2-lazy-object-proxy
11792 (package-with-python2 python-lazy-object-proxy))
11793
11794 (define-public python-dnspython
11795 (package
11796 (name "python-dnspython")
11797 (version "1.15.0")
11798 (source (origin
11799 (method url-fetch)
11800 (uri (string-append "http://www.dnspython.org/kits/"
11801 version "/dnspython-" version ".tar.gz"))
11802 (sha256
11803 (base32
11804 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11805 (build-system python-build-system)
11806 (arguments '(#:tests? #f)) ; XXX: requires internet access
11807 (home-page "http://www.dnspython.org")
11808 (synopsis "DNS toolkit for Python")
11809 (description
11810 "dnspython is a DNS toolkit for Python. It supports almost all record
11811 types. It can be used for queries, zone transfers, and dynamic updates.
11812 It supports TSIG authenticated messages and EDNS0.")
11813 (license license:expat)))
11814
11815 (define-public python2-dnspython
11816 (package-with-python2 python-dnspython))
11817
11818 (define-public python-email-validator
11819 (package
11820 (name "python-email-validator")
11821 (version "1.0.2")
11822 (source
11823 (origin (method url-fetch)
11824 (uri (pypi-uri "email_validator" version))
11825 (sha256
11826 (base32
11827 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11828 (build-system python-build-system)
11829 (arguments
11830 '(#:phases
11831 (modify-phases %standard-phases
11832 (add-before 'build 'use-dnspython
11833 (lambda _
11834 (substitute* "setup.py"
11835 (("dnspython3") "dnspython"))
11836 #t)))))
11837 (propagated-inputs
11838 `(("python-dnspython" ,python-dnspython)
11839 ("python-idna" ,python-idna)))
11840 (home-page "https://github.com/JoshData/python-email-validator")
11841 (synopsis "Email address validation library for Python")
11842 (description
11843 "This library validates email address syntax and deliverability.")
11844 (license license:cc0)))
11845
11846 (define-public python2-email-validator
11847 (package-with-python2 python-email-validator))
11848
11849 (define-public python-ukpostcodeparser
11850 (package
11851 (name "python-ukpostcodeparser")
11852 (version "1.0.3")
11853 (source (origin
11854 (method url-fetch)
11855 (uri (pypi-uri "UkPostcodeParser" version))
11856 (sha256
11857 (base32
11858 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11859 (build-system python-build-system)
11860 (home-page "https://github.com/hamstah/ukpostcodeparser")
11861 (synopsis "UK Postcode parser for Python")
11862 (description
11863 "This library provides the @code{parse_uk_postcode} function for
11864 parsing UK postcodes.")
11865 (license license:expat)))
11866
11867 (define-public python2-ukpostcodeparser
11868 (package-with-python2 python-ukpostcodeparser))
11869
11870 (define-public python-faker
11871 (package
11872 (name "python-faker")
11873 (version "0.7.9")
11874 (source (origin
11875 (method url-fetch)
11876 (uri (pypi-uri "Faker" version))
11877 (sha256
11878 (base32
11879 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11880 (patches
11881 (search-patches "python-faker-fix-build-32bit.patch"))
11882 (modules '((guix build utils)))
11883 (snippet
11884 '(begin
11885 (for-each delete-file (find-files "." "\\.pyc$"))
11886 #t))))
11887 (build-system python-build-system)
11888 (arguments
11889 '(#:phases
11890 (modify-phases %standard-phases
11891 (replace 'check
11892 (lambda _
11893 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11894 (native-inputs
11895 `(;; For testing
11896 ("python-email-validator" ,python-email-validator)
11897 ("python-mock" ,python-mock)
11898 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11899 (propagated-inputs
11900 `(("python-dateutil" ,python-dateutil)
11901 ("python-six" ,python-six)))
11902 (home-page "https://github.com/joke2k/faker")
11903 (synopsis "Python package that generates fake data")
11904 (description
11905 "Faker is a Python package that generates fake data such as names,
11906 addresses, and phone numbers.")
11907 (license license:expat)
11908 (properties `((python2-variant . ,(delay python2-faker))))))
11909
11910 (define-public python2-faker
11911 (let ((base (package-with-python2 (strip-python2-variant
11912 python-faker))))
11913 (package
11914 (inherit base)
11915 (propagated-inputs
11916 `(("python2-ipaddress" ,python2-ipaddress)
11917 ,@(package-propagated-inputs base))))))
11918
11919 (define-public python-pyaml
11920 (package
11921 (name "python-pyaml")
11922 (version "15.8.2")
11923 (source (origin
11924 (method url-fetch)
11925 (uri (pypi-uri "pyaml" version))
11926 (sha256
11927 (base32
11928 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11929 (build-system python-build-system)
11930 (native-inputs
11931 `(("python-unidecode" ,python-unidecode)))
11932 (propagated-inputs
11933 `(("python-pyyaml" ,python-pyyaml)))
11934 (home-page "https://github.com/mk-fg/pretty-yaml")
11935 (synopsis "YAML pretty-print library for Python")
11936 (description
11937 "pyaml is a PyYAML based python module to produce pretty and readable
11938 YAML-serialized data.")
11939 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11940
11941 (define-public python2-pyaml
11942 (package-with-python2 python-pyaml))
11943
11944 (define-public python-flexmock
11945 (package
11946 (name "python-flexmock")
11947 (version "0.10.2")
11948 (source (origin
11949 (method url-fetch)
11950 (uri (pypi-uri "flexmock" version))
11951 (sha256
11952 (base32
11953 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11954 (build-system python-build-system)
11955 (home-page "https://flexmock.readthedocs.org")
11956 (synopsis "Testing library for Python")
11957 (description
11958 "flexmock is a testing library for Python that makes it easy to create
11959 mocks, stubs and fakes.")
11960 (license license:bsd-3)))
11961
11962 (define-public python2-flexmock
11963 (package-with-python2 python-flexmock))
11964
11965 (define-public python-orator
11966 (package
11967 (name "python-orator")
11968 (version "0.8.2")
11969 (source (origin
11970 (method url-fetch)
11971 (uri (pypi-uri "orator" version))
11972 (sha256
11973 (base32
11974 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11975 (build-system python-build-system)
11976 (arguments '(#:tests? #f)) ; no tests
11977 (propagated-inputs
11978 `(("python-arrow" ,python-arrow)
11979 ("python-blinker" ,python-blinker)
11980 ("python-cleo" ,python-cleo)
11981 ("python-faker" ,python-faker)
11982 ("python-inflection" ,python-inflection)
11983 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11984 ("python-pyaml" ,python-pyaml)
11985 ("python-simplejson" ,python-simplejson)
11986 ("python-wrapt" ,python-wrapt)))
11987 (home-page "https://orator-orm.com/")
11988 (synopsis "ActiveRecord ORM for Python")
11989 (description
11990 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11991 implementation for Python.")
11992 (license license:expat)
11993 (properties `((python2-variant . ,(delay python2-orator))))))
11994
11995 (define-public python2-orator
11996 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11997 (package
11998 (inherit base)
11999 (propagated-inputs
12000 `(("python2-ipaddress" ,python2-ipaddress)
12001 ,@(package-propagated-inputs base))))))
12002
12003 (define-public python-prompt-toolkit
12004 (package
12005 (name "python-prompt-toolkit")
12006 (version "1.0.9")
12007 (source
12008 (origin
12009 (method url-fetch)
12010 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
12011 (sha256
12012 (base32
12013 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
12014 (build-system python-build-system)
12015 (arguments
12016 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
12017 (propagated-inputs
12018 `(("python-wcwidth" ,python-wcwidth)
12019 ("python-six" ,python-six)
12020 ("python-pygments" ,python-pygments)))
12021 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
12022 (synopsis "Library for building command line interfaces in Python")
12023 (description
12024 "Prompt-Toolkit is a library for building interactive command line
12025 interfaces in Python. It's like GNU Readline but it also features syntax
12026 highlighting while typing, out-of-the-box multi-line input editing, advanced
12027 code completion, incremental search, support for Chinese double-width
12028 characters, mouse support, and auto suggestions.")
12029 (license license:bsd-3)))
12030
12031 (define-public python2-prompt-toolkit
12032 (package-with-python2 python-prompt-toolkit))
12033
12034 (define-public python-jedi
12035 (package
12036 (name "python-jedi")
12037 (version "0.9.0")
12038 (source
12039 (origin
12040 (method url-fetch)
12041 (uri (pypi-uri "jedi" version))
12042 (sha256
12043 (base32
12044 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
12045 (build-system python-build-system)
12046 (arguments
12047 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
12048 '(#:tests? #f))
12049 (native-inputs
12050 `(("python-pytest" ,python-pytest)))
12051 (home-page "https://github.com/davidhalter/jedi")
12052 (synopsis
12053 "Autocompletion for Python that can be used for text editors")
12054 (description
12055 "Jedi is an autocompletion tool for Python that can be used for text editors.")
12056 (license license:expat)))
12057
12058 (define-public python2-jedi
12059 (package-with-python2 python-jedi))
12060
12061 (define-public ptpython
12062 (package
12063 (name "ptpython")
12064 (version "0.34")
12065 (source (origin
12066 (method url-fetch)
12067 (uri (pypi-uri "ptpython" version))
12068 (sha256
12069 (base32
12070 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12071 (build-system python-build-system)
12072 (arguments
12073 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
12074 (propagated-inputs
12075 `(("python-docopt" ,python-docopt)
12076 ("python-jedi" ,python-jedi)
12077 ("python-prompt-toolkit" ,python-prompt-toolkit)
12078 ("python-pygments" ,python-pygments)))
12079 (home-page "https://github.com/jonathanslenders/ptpython")
12080 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12081 (description
12082 "ptpython is a Python read-eval-print loop with IDE-like features.
12083 It supports syntax highlighting, multiline editing, autocompletion, mouse,
12084 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12085 etc.")
12086 (license license:bsd-3)
12087 (properties `((python2-variant . ,(delay ptpython-2))))))
12088
12089 (define-public ptpython-2
12090 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12091 (package
12092 (inherit base)
12093 (name "ptpython2"))))
12094
12095 (define-public python-requests-oauthlib
12096 (package
12097 (name "python-requests-oauthlib")
12098 (version "0.6.2")
12099 (source
12100 (origin
12101 (method url-fetch)
12102 (uri (pypi-uri "requests-oauthlib" version))
12103 (sha256
12104 (base32
12105 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
12106 (build-system python-build-system)
12107 (arguments
12108 `(#:phases
12109 (modify-phases %standard-phases
12110 ;; removes tests that require network access
12111 (add-before 'check 'pre-check
12112 (lambda _
12113 (delete-file "tests/test_core.py")
12114 #t)))))
12115 (native-inputs
12116 `(("python-requests-mock" ,python-requests-mock)
12117 ("python-mock" ,python-mock)))
12118 (propagated-inputs
12119 `(("python-oauthlib" ,python-oauthlib)
12120 ("python-requests" ,python-requests)))
12121 (home-page
12122 "https://github.com/requests/requests-oauthlib")
12123 (synopsis
12124 "OAuthlib authentication support for Requests")
12125 (description
12126 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
12127 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
12128 (license license:isc)))
12129
12130 (define-public python2-requests-oauthlib
12131 (package-with-python2 python-requests-oauthlib))
12132
12133 (define-public python-stem
12134 (package
12135 (name "python-stem")
12136 (version "1.5.4")
12137 (source
12138 (origin
12139 (method url-fetch)
12140 (uri (pypi-uri "stem" version))
12141 (sha256
12142 (base32
12143 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
12144 (build-system python-build-system)
12145 (arguments
12146 `(#:phases
12147 (modify-phases %standard-phases
12148 (replace 'check
12149 (lambda _
12150 (zero? (system* "./run_tests.py" "--unit")))))))
12151 (native-inputs
12152 `(("python-mock" ,python-mock)
12153 ("python-pep8" ,python-pep8)
12154 ("python-pyflakes" ,python-pyflakes)))
12155 (home-page "https://stem.torproject.org/")
12156 (synopsis
12157 "Python controller library that allows applications to interact with Tor")
12158 (description
12159 "Stem is a Python controller library for Tor. With it you can use Tor's
12160 control protocol to script against the Tor process and read descriptor data
12161 relays publish about themselves.")
12162 (license license:lgpl3)))
12163
12164 (define-public python2-stem
12165 (package-with-python2 python-stem))
12166
12167 (define-public python-pyserial
12168 (package
12169 (name "python-pyserial")
12170 (version "3.1.1")
12171 (source
12172 (origin
12173 (method url-fetch)
12174 (uri (pypi-uri "pyserial" version))
12175 (sha256
12176 (base32
12177 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12178 (build-system python-build-system)
12179 (arguments
12180 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12181 ;; #:phases
12182 ;; (modify-phases %standard-phases
12183 ;; (replace 'check
12184 ;; (lambda _
12185 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12186 (home-page
12187 "https://github.com/pyserial/pyserial")
12188 (synopsis "Python Serial Port Bindings")
12189 (description "@code{pyserial} provide serial port bindings for Python. It
12190 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12191 and/or Xon/Xoff. The port is accessed in RAW mode.")
12192 (license license:bsd-3)))
12193
12194 (define-public python2-pyserial
12195 (package-with-python2 python-pyserial))
12196
12197 (define-public python-kivy
12198 (package
12199 (name "python-kivy")
12200 (version "1.9.1")
12201 (source
12202 (origin
12203 (method url-fetch)
12204 (uri (pypi-uri "kivy" version))
12205 (file-name (string-append name "-" version ".tar.gz"))
12206 (sha256
12207 (base32
12208 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12209 (build-system python-build-system)
12210 (arguments
12211 `(#:tests? #f ; Tests require many optional packages
12212 #:phases
12213 (modify-phases %standard-phases
12214 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12215 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12216 (lambda* (#:key inputs #:allow-other-keys)
12217 (setenv "KIVY_SDL2_PATH"
12218 (string-append (assoc-ref inputs "sdl-union")
12219 "/include/SDL2"))
12220 #t)))))
12221 (native-inputs
12222 `(("pkg-config" ,pkg-config)
12223 ("python-cython" ,python-cython)))
12224 (inputs
12225 `(("gstreamer" ,gstreamer)
12226 ("mesa" ,mesa)
12227 ("sdl-union"
12228 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12229 (home-page "http://kivy.org")
12230 (synopsis
12231 "Multitouch application framework")
12232 (description
12233 "A software library for rapid development of
12234 hardware-accelerated multitouch applications.")
12235 (license license:expat)))
12236
12237 (define-public python2-kivy
12238 (package-with-python2 python-kivy))
12239
12240 (define-public python-kivy-next
12241 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12242 (revision "1"))
12243 (package (inherit python-kivy)
12244 (name "python-kivy-next")
12245 (version (string-append "1.9.1-" revision "."
12246 (string-take commit 7)))
12247 (source
12248 (origin
12249 (method git-fetch)
12250 (uri (git-reference
12251 (url "https://github.com/kivy/kivy")
12252 (commit commit)))
12253 (file-name (string-append name "-" version "-checkout"))
12254 (sha256
12255 (base32
12256 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12257
12258 (define-public python2-kivy-next
12259 (package-with-python2 python-kivy-next))
12260
12261 (define-public python-binaryornot
12262 (package
12263 (name "python-binaryornot")
12264 (version "0.4.0")
12265 (source (origin
12266 (method url-fetch)
12267 (uri (pypi-uri "binaryornot" version))
12268 (sha256
12269 (base32
12270 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12271 (build-system python-build-system)
12272 (propagated-inputs
12273 `(("python-chardet" ,python-chardet)
12274 ("python-hypothesis" ,python-hypothesis)))
12275 (home-page "https://github.com/audreyr/binaryornot")
12276 (synopsis "Package to check if a file is binary or text")
12277 (description "Ultra-lightweight pure Python package to check if a file is
12278 binary or text.")
12279 (license license:bsd-3)
12280 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12281
12282 (define-public python2-binaryornot
12283 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12284 (package (inherit base)
12285 (propagated-inputs
12286 `(("python2-enum34" ,python2-enum34)
12287 ,@(package-propagated-inputs base))))))
12288
12289 (define-public python-nltk
12290 (package
12291 (name "python-nltk")
12292 (version "3.2.1")
12293 (source (origin
12294 (method url-fetch)
12295 (uri (pypi-uri "nltk" version))
12296 (sha256
12297 (base32
12298 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12299 (build-system python-build-system)
12300 (arguments
12301 '(;; The tests require some extra resources to be downloaded.
12302 ;; TODO Try packaging these resources.
12303 #:tests? #f))
12304 (home-page "http://nltk.org/")
12305 (synopsis "Natural Language Toolkit")
12306 (description "It provides interfaces to over 50 corpora and lexical
12307 resources such as WordNet, along with a suite of text processing libraries
12308 for classification, tokenization, stemming, tagging, parsing, and semantic
12309 reasoning, wrappers for natural language processing libraries.")
12310 (license license:asl2.0)))
12311
12312 (define-public python2-nltk
12313 (package-with-python2 python-nltk))
12314
12315 (define-public python-pymongo
12316 (package
12317 (name "python-pymongo")
12318 (version "3.3.0")
12319 (source (origin
12320 (method url-fetch)
12321 (uri (pypi-uri "pymongo" version))
12322 (sha256
12323 (base32
12324 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12325 (build-system python-build-system)
12326 (propagated-inputs
12327 `(("python-certifi" ,python-certifi)))
12328 (home-page "https://github.com/mongodb/mongo-python-driver")
12329 (synopsis "Python driver for MongoDB")
12330 (description "Python driver for MongoDB.")
12331 (license license:asl2.0)))
12332
12333 (define-public python2-pymongo
12334 (package-with-python2 python-pymongo))
12335
12336 (define-public python-sh
12337 (package
12338 (name "python-sh")
12339 (version "1.11")
12340 (source (origin
12341 (method url-fetch)
12342 (uri (pypi-uri "sh" version))
12343 (sha256
12344 (base32
12345 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12346 (build-system python-build-system)
12347 (arguments
12348 `(#:tests? #f)) ; no tests
12349 (home-page "https://github.com/amoffat/sh")
12350 (synopsis "Python subprocess interface")
12351 (description "Abstracts process invocation by providing a function
12352 interface for programs.")
12353 (license license:expat)))
12354
12355 (define-public python2-sh
12356 (package-with-python2 python-sh))
12357
12358 (define-public python-consul
12359 (package
12360 (name "python-consul")
12361 (version "0.6.1")
12362 (source
12363 (origin
12364 (method url-fetch)
12365 (uri (pypi-uri "python-consul" version))
12366 (sha256
12367 (base32
12368 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12369 (build-system python-build-system)
12370 (native-inputs
12371 `(("python-pytest" ,python-pytest)))
12372 (propagated-inputs
12373 `(("python-requests" ,python-requests)
12374 ("python-six" ,python-six)))
12375 (home-page "https://github.com/cablehead/python-consul")
12376 (synopsis "Python client for Consul")
12377 (description
12378 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12379 discovery, monitoring and configuration.")
12380 (license license:expat)))
12381
12382 (define-public python2-consul
12383 (package-with-python2 python-consul))
12384
12385 (define-public python-schematics
12386 (package
12387 (name "python-schematics")
12388 (version "1.1.1")
12389 (source
12390 (origin
12391 (method url-fetch)
12392 (uri (string-append
12393 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12394 (file-name (string-append name "-" version ".tar.gz"))
12395 (sha256
12396 (base32
12397 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12398 (build-system python-build-system)
12399 (propagated-inputs
12400 `(("python-six" ,python-six)))
12401 (arguments
12402 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12403 ; version requirements (eg python-coveralls)
12404 (home-page "https://github.com/schematics/schematics")
12405 (synopsis "Python Data Structures for Humans")
12406 (description "Python Data Structures for Humans.")
12407 (license license:bsd-3)))
12408
12409 (define-public python2-schematics
12410 (package-with-python2 python-schematics))
12411
12412 (define-public python-publicsuffix
12413 (package
12414 (name "python-publicsuffix")
12415 (version "1.1.0")
12416 (source (origin
12417 (method url-fetch)
12418 (uri (pypi-uri "publicsuffix" version))
12419 (sha256
12420 (base32
12421 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12422 (build-system python-build-system)
12423 (arguments
12424 `(#:tests? #f)) ; tests use the internet
12425 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12426 (synopsis "Get suffix for a domain name")
12427 (description "Get a public suffix for a domain name using the Public Suffix
12428 List.")
12429 (license license:expat)))
12430
12431 (define-public python2-publicsuffix
12432 (package-with-python2 python-publicsuffix))
12433
12434 (define-public python-publicsuffix2
12435 (package
12436 (name "python-publicsuffix2")
12437 (version "2.20160818")
12438 (source
12439 (origin
12440 (method url-fetch)
12441 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12442 (sha256
12443 (base32
12444 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12445 (build-system python-build-system)
12446 (arguments
12447 '(#:tests? #f)) ; The test suite requires network access.
12448 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12449 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12450 (description "Get a public suffix for a domain name using the Public Suffix
12451 List. Forked from and using the same API as the publicsuffix package.")
12452 (license (list license:expat license:mpl2.0))))
12453
12454 (define-public python2-publicsuffix2
12455 (package-with-python2 python-publicsuffix2))
12456
12457 (define-public python-url
12458 (package
12459 (name "python-url")
12460 (version "0.2.0")
12461 (source (origin
12462 (method url-fetch)
12463 (uri (pypi-uri "url" version))
12464 (sha256
12465 (base32
12466 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12467 (build-system python-build-system)
12468 (propagated-inputs
12469 `(("python-publicsuffix" ,python-publicsuffix)))
12470 (native-inputs
12471 `(("python-coverage" ,python-coverage)
12472 ("python-nose" ,python-nose)))
12473 (arguments
12474 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12475 (home-page "https://github.com/seomoz/url-py")
12476 (synopsis "URL Parsing")
12477 (description "Library for parsing urls.")
12478 (license license:expat)
12479 (properties `((python2-variant . ,(delay python2-url))))))
12480
12481 (define-public python2-url
12482 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12483 (package (inherit base)
12484 (propagated-inputs
12485 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12486
12487 (define-public python-freezegun
12488 (package
12489 (name "python-freezegun")
12490 (version "0.3.8")
12491 (source
12492 (origin
12493 (method url-fetch)
12494 (uri (pypi-uri "freezegun" version))
12495 (sha256
12496 (base32
12497 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12498 (build-system python-build-system)
12499 (native-inputs
12500 `(("python-mock" ,python-mock)
12501 ("python-nose" ,python-nose)
12502 ("python-coverage" ,python-coverage)))
12503 (propagated-inputs
12504 `(("python-six" ,python-six)
12505 ("python-dateutil" ,python-dateutil)))
12506 (arguments
12507 `(#:phases (modify-phases %standard-phases
12508 ;; The tests are normally executed via `make test`, but the PyPi
12509 ;; package does not include the Makefile.
12510 (replace 'check
12511 (lambda _
12512 (zero? (system* "nosetests" "./tests/")))))))
12513 (home-page "https://github.com/spulec/freezegun")
12514 (synopsis "Test utility for mocking the datetime module")
12515 (description
12516 "FreezeGun is a library that allows your python tests to travel through
12517 time by mocking the datetime module.")
12518 (license license:asl2.0)))
12519
12520 (define-public python2-freezegun
12521 (package-with-python2 python-freezegun))
12522
12523
12524 (define-public python-odfpy
12525 (package
12526 (name "python-odfpy")
12527 (version "1.3.3")
12528 (source (origin
12529 (method url-fetch)
12530 (uri (pypi-uri "odfpy" version))
12531 (sha256
12532 (base32
12533 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12534 (arguments
12535 `(#:modules ((srfi srfi-1)
12536 (guix build python-build-system)
12537 (guix build utils))
12538 #:phases
12539 (modify-phases %standard-phases
12540 (replace 'check
12541 ;; The test runner invokes python2 and python3 for test*.py.
12542 ;; To avoid having both in inputs, we replicate it here.
12543 (lambda _
12544 (every (lambda (test-file)
12545 (zero? (system* "python" test-file)))
12546 (find-files "tests" "^test.*\\.py$")))))))
12547 (build-system python-build-system)
12548 (home-page "https://github.com/eea/odfpy")
12549 (synopsis "Python API and tools to manipulate OpenDocument files")
12550 (description "Collection of libraries and utility programs written in
12551 Python to manipulate OpenDocument 1.2 files.")
12552 (license
12553 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12554 ;; number of files with other licenses.
12555 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12556
12557 (define-public python2-odfpy
12558 (package-with-python2 python-odfpy))
12559
12560 (define-public python-cachecontrol
12561 (package
12562 (name "python-cachecontrol")
12563 (version "0.11.6")
12564 (source
12565 (origin
12566 (method url-fetch)
12567 ;; Pypi does not have tests.
12568 (uri (string-append
12569 "https://github.com/ionrock/cachecontrol/archive/v"
12570 version ".tar.gz"))
12571 (file-name (string-append name "-" version ".tar.gz"))
12572 (sha256
12573 (base32
12574 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12575 (build-system python-build-system)
12576 (arguments
12577 `(#:phases
12578 (modify-phases %standard-phases
12579 (replace 'check
12580 (lambda _
12581 ;; Drop test that requires internet access.
12582 (delete-file "tests/test_regressions.py")
12583 (setenv "PYTHONPATH"
12584 (string-append (getcwd) "/build/lib:"
12585 (getenv "PYTHONPATH")))
12586 (zero? (system* "py.test" "-vv")))))))
12587 (native-inputs
12588 `(("python-pytest" ,python-pytest)
12589 ("python-redis" ,python-redis)
12590 ("python-webtest" ,python-webtest)
12591 ("python-mock" ,python-mock)))
12592 (propagated-inputs
12593 `(("python-requests" ,python-requests)
12594 ("python-lockfile" ,python-lockfile)))
12595 (home-page "https://github.com/ionrock/cachecontrol")
12596 (synopsis "The httplib2 caching algorithms for use with requests")
12597 (description "CacheControl is a port of the caching algorithms in
12598 @code{httplib2} for use with @code{requests} session objects.")
12599 (license license:asl2.0)))
12600
12601 (define-public python2-cachecontrol
12602 (package-with-python2 python-cachecontrol))
12603
12604 (define-public python-lit
12605 (package
12606 (name "python-lit")
12607 (version "0.5.0")
12608 (source
12609 (origin
12610 (method url-fetch)
12611 (uri (pypi-uri "lit" version))
12612 (sha256
12613 (base32
12614 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12615 (build-system python-build-system)
12616 (home-page "http://llvm.org/")
12617 (synopsis "LLVM Software Testing Tool")
12618 (description "@code{lit} is a portable tool for executing LLVM and Clang
12619 style test suites, summarizing their results, and providing indication of
12620 failures.")
12621 (license license:ncsa)))
12622
12623 (define-public python2-lit
12624 (package-with-python2 python-lit))
12625
12626 (define-public python-pytest-pep8
12627 (package
12628 (name "python-pytest-pep8")
12629 (version "1.0.6")
12630 (source (origin
12631 (method url-fetch)
12632 (uri (pypi-uri "pytest-pep8" version))
12633 (sha256
12634 (base32
12635 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12636 (build-system python-build-system)
12637 (arguments
12638 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12639 (native-inputs
12640 `(("python-pytest" ,python-pytest)))
12641 (propagated-inputs
12642 `(("python-pep8" ,python-pep8)))
12643 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12644 (synopsis "Py.test plugin to check PEP8 requirements")
12645 (description "Pytest plugin for checking PEP8 compliance.")
12646 (license license:expat)))
12647
12648 (define-public python2-pytest-pep8
12649 (package-with-python2 python-pytest-pep8))
12650
12651 (define-public python-pytest-flakes
12652 (package
12653 (name "python-pytest-flakes")
12654 (version "1.0.1")
12655 (source (origin
12656 (method url-fetch)
12657 (uri (pypi-uri "pytest-flakes" version))
12658 (sha256
12659 (base32
12660 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12661 (build-system python-build-system)
12662 (arguments
12663 `(#:phases
12664 (modify-phases %standard-phases
12665 (delete 'check)
12666 (add-after 'install 'check
12667 (lambda* (#:key outputs inputs #:allow-other-keys)
12668 ;; It's easier to run tests after install.
12669 ;; Make installed package available for running the tests
12670 (add-installed-pythonpath inputs outputs)
12671 (zero? (system* "py.test" "-vv")))))))
12672 (native-inputs
12673 `(("python-coverage" ,python-coverage)
12674 ("python-pytest" ,python-pytest)
12675 ("python-pytest-cache" ,python-pytest-cache)
12676 ("python-pytest-pep8" ,python-pytest-pep8)))
12677 (propagated-inputs
12678 `(("python-pyflakes" ,python-pyflakes)))
12679 (home-page "https://github.com/fschulze/pytest-flakes")
12680 (synopsis "Py.test plugin to check source code with pyflakes")
12681 (description "Pytest plugin for checking Python source code with pyflakes.")
12682 (license license:expat)))
12683
12684 (define-public python2-pytest-flakes
12685 (package-with-python2 python-pytest-flakes))
12686
12687 (define-public python-natsort
12688 (package
12689 (name "python-natsort")
12690 (version "5.0.2")
12691 (source (origin
12692 (method url-fetch)
12693 (uri (pypi-uri "natsort" version))
12694 (sha256
12695 (base32
12696 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12697 (build-system python-build-system)
12698 (arguments
12699 `(#:phases
12700 (modify-phases %standard-phases
12701 (add-before 'check 'set-cachedir
12702 ;; Tests require write access to $HOME by default
12703 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12704 (native-inputs
12705 `(("python-hypothesis" ,python-hypothesis)
12706 ("python-pytest-cache" ,python-pytest-cache)
12707 ("python-pytest-cov" ,python-pytest-cov)
12708 ("python-pytest-flakes" ,python-pytest-flakes)
12709 ("python-pytest-pep8" ,python-pytest-pep8)))
12710 (propagated-inputs ; TODO: Add python-fastnumbers.
12711 `(("python-pyicu" ,python-pyicu)))
12712 (home-page "https://github.com/SethMMorton/natsort")
12713 (synopsis "Natural sorting for python and shell")
12714 (description
12715 "Natsort lets you apply natural sorting on lists instead of
12716 lexicographical. If you use the built-in @code{sorted} method in python
12717 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12718 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12719 function @code{natsorted} that identifies numbers and sorts them separately
12720 from strings. It can also sort version numbers, real numbers, mixed types
12721 and more, and comes with a shell command @command{natsort} that exposes this
12722 functionality in the command line.")
12723 (license license:expat)
12724 (properties `((python2-variant . ,(delay python2-natsort))))))
12725
12726 (define-public python2-natsort
12727 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12728 (package (inherit base)
12729 (native-inputs
12730 `(("python2-pathlib" ,python2-pathlib)
12731 ("python2-mock" ,python2-mock)
12732 ("python2-enum34" ,python2-enum34)
12733 ,@(package-native-inputs base))))))
12734
12735 (define-public python-glances
12736 (package
12737 (name "python-glances")
12738 (version "2.7.1")
12739 (source
12740 (origin
12741 (method url-fetch)
12742 (uri (pypi-uri "Glances" version))
12743 (sha256
12744 (base32
12745 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12746 (build-system python-build-system)
12747 (propagated-inputs
12748 `(("python-psutil" ,python-psutil)))
12749 (home-page
12750 "https://github.com/nicolargo/glances")
12751 (synopsis
12752 "A cross-platform curses-based monitoring tool")
12753 (description
12754 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12755 Glances uses the PsUtil library to get information from your system. It monitors
12756 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12757 (license license:lgpl3+)))
12758
12759 (define-public python2-glances
12760 (package-with-python2 python-glances))
12761
12762 (define-public python-graphql-core
12763 (package
12764 (name "python-graphql-core")
12765 (version "0.5.3")
12766 (source
12767 (origin
12768 (method url-fetch)
12769 (uri (pypi-uri "graphql-core" version))
12770 (sha256
12771 (base32
12772 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12773 (build-system python-build-system)
12774 (arguments
12775 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12776 #:phases
12777 (modify-phases %standard-phases
12778 (add-after 'unpack 'patch-hardcoded-version
12779 (lambda _ (substitute*
12780 "setup.py"
12781 (("'gevent==1.1rc1'") "'gevent'"))
12782 #t)))))
12783 (native-inputs
12784 `(("python-gevent" ,python-gevent)
12785 ("python-mock" ,python-mock)
12786 ("python-pytest-mock" ,python-pytest-mock)))
12787 (propagated-inputs
12788 `(("python-promise" ,python-promise)
12789 ("python-six" ,python-six)))
12790 (home-page "https://github.com/graphql-python/graphql-core")
12791 (synopsis "GraphQL implementation for Python")
12792 (description
12793 "GraphQL implementation for Python. GraphQL is a data query language and
12794 runtime designed and used to request and deliver data to mobile and web apps.
12795 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12796 to Python.")
12797 (license license:expat)))
12798
12799 (define-public python2-graphql-core
12800 (package-with-python2 python-graphql-core))
12801
12802 (define-public python-graphql-relay
12803 (package
12804 (name "python-graphql-relay")
12805 (version "0.4.5")
12806 (source
12807 (origin
12808 (method url-fetch)
12809 (uri (pypi-uri "graphql-relay" version))
12810 (sha256
12811 (base32
12812 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12813 (build-system python-build-system)
12814 (native-inputs
12815 `(("python-pytest" ,python-pytest)))
12816 (propagated-inputs
12817 `(("python-graphql-core" ,python-graphql-core)
12818 ("python-promise" ,python-promise)
12819 ("python-six" ,python-six)))
12820 (home-page "https://github.com/graphql-python/graphql-relay-py")
12821 (synopsis "Relay implementation for Python")
12822 (description
12823 "This is a library to allow the easy creation of Relay-compliant servers
12824 using the GraphQL Python reference implementation of a GraphQL server. It
12825 should be noted that the code is a exact port of the original
12826 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12827 from Facebook.")
12828 (license license:expat)))
12829
12830 (define-public python2-graphql-relay
12831 (package-with-python2 python-graphql-relay))
12832
12833 (define-public python-graphene
12834 (package
12835 (name "python-graphene")
12836 (version "0.10.2")
12837 (source
12838 (origin
12839 (method url-fetch)
12840 (uri (pypi-uri "graphene" version))
12841 (sha256
12842 (base32
12843 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12844 (build-system python-build-system)
12845 (native-inputs
12846 `(("python-django-filter" ,python-django-filter)
12847 ("python-mock" ,python-mock)
12848 ("python-psycopg2" ,python-psycopg2)
12849 ("python-pytest-django" ,python-pytest-django)
12850 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12851 (propagated-inputs
12852 `(("python-graphql-core" ,python-graphql-core)
12853 ("python-graphql-relay" ,python-graphql-relay)
12854 ("python-iso8601" ,python-iso8601)
12855 ("python-promise" ,python-promise)
12856 ("python-six" ,python-six)))
12857 (home-page "http://graphene-python.org/")
12858 (synopsis "GraphQL Framework for Python")
12859 (description
12860 "Graphene is a Python library for building GraphQL schemas/types.
12861 A GraphQL schema describes your data model, and provides a GraphQL server
12862 with an associated set of resolve methods that know how to fetch data.")
12863 (properties `((python2-variant . ,(delay python2-graphene))))
12864 (license license:expat)))
12865
12866 (define-public python2-graphene
12867 (let ((base (package-with-python2
12868 (strip-python2-variant python-graphene))))
12869 (package (inherit base)
12870 (native-inputs
12871 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12872 ,@(package-native-inputs base))))))
12873
12874 (define-public python-nautilus
12875 (package
12876 (name "python-nautilus")
12877 (version "0.4.9")
12878 (source
12879 (origin
12880 (method url-fetch)
12881 (uri (pypi-uri "nautilus" version))
12882 (sha256
12883 (base32
12884 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12885 (build-system python-build-system)
12886 (arguments `(#:tests? #f)) ; fails to import test modules
12887 (propagated-inputs
12888 `(("python-bcrypt" ,python-bcrypt)
12889 ("python-click" ,python-click)
12890 ("python-consul" ,python-consul)
12891 ("python-graphene" ,python-graphene)
12892 ("python-jinja2" ,python-jinja2)
12893 ("python-peewee" ,python-peewee)
12894 ("python-pika" ,python-pika)
12895 ("python-tornado" ,python-tornado)
12896 ("python-wtforms" ,python-wtforms)))
12897 (native-inputs
12898 `(("python-nose2" ,python-nose2)))
12899 (home-page "https://github.com/AlecAivazis/nautilus")
12900 (synopsis "Library for creating microservice applications")
12901 (description
12902 "Nautilus is a framework for flux based microservices that looks to
12903 provide extendible implementations of common aspects of a cloud so that you can
12904 focus on building massively scalable web applications.")
12905 (license license:expat)))
12906
12907 (define-public python-snowballstemmer
12908 (package
12909 (name "python-snowballstemmer")
12910 (version "1.2.1")
12911 (source (origin
12912 (method url-fetch)
12913 (uri (pypi-uri "snowballstemmer" version))
12914 (sha256
12915 (base32
12916 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12917 (build-system python-build-system)
12918 (arguments
12919 `(;; No tests exist
12920 #:tests? #f))
12921 (home-page "https://github.com/shibukawa/snowball_py")
12922 (synopsis "Snowball stemming library collection for Python")
12923 (description "This package provides 16 word stemmer algorithms generated
12924 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12925 English stemmer.")
12926 (license license:bsd-3)))
12927
12928 (define-public python2-snowballstemmer
12929 (package-with-python2 python-snowballstemmer))
12930
12931 (define-public python-sphinx-cloud-sptheme
12932 (package
12933 (name "python-sphinx-cloud-sptheme")
12934 (version "1.8.0")
12935 (source (origin
12936 (method url-fetch)
12937 (uri (pypi-uri "cloud_sptheme" version))
12938 (sha256
12939 (base32
12940 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12941 (build-system python-build-system)
12942 ;; FIXME: The 'pypi' release archive does not contain tests.
12943 (arguments '(#:tests? #f))
12944 (native-inputs
12945 `(("python-sphinx" ,python-sphinx)))
12946 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12947 (synopsis "'Cloud' theme for Sphinx documenter")
12948 (description "This package contains the \"Cloud\" theme for Sphinx and some
12949 related extensions.")
12950 (license license:bsd-3)))
12951
12952 (define-public python2-sphinx-cloud-sptheme
12953 (package-with-python2 python-sphinx-cloud-sptheme))
12954
12955 (define-public python-sphinx-alabaster-theme
12956 (package
12957 (name "python-sphinx-alabaster-theme")
12958 (version "0.7.9")
12959 (source (origin
12960 (method url-fetch)
12961 (uri (pypi-uri "alabaster" version))
12962 (sha256
12963 (base32
12964 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12965 (build-system python-build-system)
12966 (propagated-inputs
12967 `(("python-pygments" ,python-pygments)))
12968 (home-page "https://alabaster.readthedocs.io/")
12969 (synopsis "Configurable sidebar-enabled Sphinx theme")
12970 (description "Alabaster is a visually (c)lean, responsive, configurable
12971 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12972 (license license:bsd-3)))
12973
12974 (define-public python2-sphinx-alabaster-theme
12975 (package-with-python2 python-sphinx-alabaster-theme))
12976
12977 (define-public python-betamax
12978 (package
12979 (name "python-betamax")
12980 (version "0.8.0")
12981 (source
12982 (origin
12983 (method url-fetch)
12984 (uri (pypi-uri "betamax" version))
12985 (sha256
12986 (base32
12987 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12988 (build-system python-build-system)
12989 (arguments
12990 '(;; Many tests fail because they require networking.
12991 #:tests? #f))
12992 (propagated-inputs
12993 `(("python-requests" ,python-requests)))
12994 (home-page "https://github.com/sigmavirus24/betamax")
12995 (synopsis "Record HTTP interactions with python-requests")
12996 (description "Betamax will record your test suite's HTTP interactions and
12997 replay them during future tests. It is designed to work with python-requests.")
12998 (license license:expat)))
12999
13000 (define-public python2-betamax
13001 (package-with-python2 python-betamax))
13002
13003 (define-public python-s3transfer
13004 (package
13005 (name "python-s3transfer")
13006 (version "0.1.10")
13007 (source (origin
13008 (method url-fetch)
13009 (uri (pypi-uri "s3transfer" version))
13010 (sha256
13011 (base32
13012 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
13013 (build-system python-build-system)
13014 (arguments
13015 `(#:phases
13016 (modify-phases %standard-phases
13017 (replace 'check
13018 (lambda _
13019 ;; 7 of the 'integration' tests require network access or login
13020 ;; credentials.
13021 (zero? (system* "nosetests" "--exclude=integration")))))))
13022 (native-inputs
13023 `(("python-docutils" ,python-docutils)
13024 ("python-mock" ,python-mock)
13025 ("python-nose" ,python-nose)))
13026 (propagated-inputs
13027 `(("python-botocore" ,python-botocore)))
13028 (synopsis "Amazon S3 Transfer Manager")
13029 (description "S3transfer is a Python library for managing Amazon S3
13030 transfers.")
13031 (home-page "https://github.com/boto/s3transfer")
13032 (license license:asl2.0)
13033 (properties `((python2-variant . ,(delay python2-s3transfer))))))
13034
13035 (define-public python2-s3transfer
13036 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
13037 (package
13038 (inherit base)
13039 (native-inputs
13040 `(("python2-futures" ,python2-futures)
13041 ,@(package-native-inputs base))))))
13042
13043 (define-public python-setproctitle
13044 (package
13045 (name "python-setproctitle")
13046 (version "1.1.10")
13047 (source
13048 (origin
13049 (method url-fetch)
13050 (uri (pypi-uri "setproctitle" version))
13051 (sha256
13052 (base32
13053 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13054 (build-system python-build-system)
13055 (arguments
13056 '(#:phases
13057 (modify-phases %standard-phases
13058 (add-before 'check 'patch-Makefile
13059 ;; Stricly this is only required for the python2 variant.
13060 ;; But adding a phase in an inherited package seems to be
13061 ;; cumbersum. So we patch even for python3.
13062 (lambda _
13063 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13064 (when nose
13065 (substitute* "Makefile"
13066 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13067 (string-append nose "/bin/nosetests "))))
13068 #t)))
13069 (replace 'check
13070 (lambda _
13071 (setenv "PYTHON" (or (which "python3") (which "python")))
13072 (setenv "PYCONFIG" (or (which "python3-config")
13073 (which "python-config")))
13074 (setenv "CC" "gcc")
13075 ;; No need to extend PYTHONPATH to find the built package, since
13076 ;; the Makefile will build anyway
13077 (zero? (system* "make" "check")))))))
13078 (native-inputs
13079 `(("procps" ,procps))) ; required for tests
13080 (home-page
13081 "https://github.com/dvarrazzo/py-setproctitle")
13082 (synopsis
13083 "Setproctitle implementation for Python to customize the process title")
13084 (description "The library allows a process to change its title (as displayed
13085 by system tools such as ps and top).
13086
13087 Changing the title is mostly useful in multi-process systems, for
13088 example when a master process is forked: changing the children's title
13089 allows to identify the task each process is busy with. The technique
13090 is used by PostgreSQL and the OpenSSH Server for example.")
13091 (license license:bsd-3)
13092 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13093
13094 (define-public python2-setproctitle
13095 (let ((base (package-with-python2
13096 (strip-python2-variant python-setproctitle))))
13097 (package
13098 (inherit base)
13099 (native-inputs `(("python2-nose" ,python2-nose)
13100 ,@(package-native-inputs base))))))
13101
13102 (define-public python-validictory
13103 (package
13104 (name "python-validictory")
13105 (version "1.0.1")
13106 (source
13107 (origin
13108 (method url-fetch)
13109 (uri (pypi-uri "validictory" version))
13110 (sha256
13111 (base32
13112 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13113 (build-system python-build-system)
13114 (arguments
13115 '(#:phases
13116 (modify-phases %standard-phases
13117 (add-after 'unpack 'bootstrap
13118 ;; Move the tests out of the package directory to avoid
13119 ;; packaging them.
13120 (lambda* _
13121 (rename-file "validictory/tests" "tests")
13122 (delete-file "tests/__init__.py")))
13123 (replace 'check
13124 (lambda _
13125 ;; Extend PYTHONPATH so the built package will be found.
13126 (setenv "PYTHONPATH"
13127 (string-append (getcwd) "/build/lib:"
13128 (getenv "PYTHONPATH")))
13129 (zero? (system* "py.test" "-vv" )))))))
13130 (native-inputs
13131 `(("python-pytest" ,python-pytest)))
13132 (home-page
13133 "https://github.com/jamesturk/validictory")
13134 (synopsis "General purpose Python data validator")
13135 (description "It allows validation of arbitrary Python data structures.
13136
13137 The schema format is based on the JSON Schema
13138 proposal (http://json-schema.org), so combined with json the library is also
13139 useful as a validator for JSON data.")
13140 (license license:expat)))
13141
13142 (define-public python2-validictory
13143 (package-with-python2 python-validictory))
13144
13145 (define-public python-aniso8601
13146 (package
13147 (name "python-aniso8601")
13148 (version "1.1.0")
13149 (source
13150 (origin
13151 (method url-fetch)
13152 (uri (pypi-uri "aniso8601" version))
13153 (sha256
13154 (base32
13155 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
13156 (build-system python-build-system)
13157 (propagated-inputs
13158 `(("python-dateutil" ,python-dateutil)))
13159 (home-page
13160 "https://bitbucket.org/nielsenb/aniso8601")
13161 (synopsis
13162 "Python library for parsing ISO 8601 strings")
13163 (description
13164 "This package contains a library for parsing ISO 8601 datetime strings.")
13165 (license license:bsd-3)))
13166
13167 (define-public python-flask-restful
13168 (package
13169 (name "python-flask-restful")
13170 (version "0.3.5")
13171 (source
13172 (origin
13173 (method url-fetch)
13174 (uri (pypi-uri "Flask-RESTful" version))
13175 (sha256
13176 (base32
13177 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13178 (build-system python-build-system)
13179 (propagated-inputs
13180 `(("python-aniso8601" ,python-aniso8601)
13181 ("python-flask" ,python-flask)
13182 ("python-pycrypto" ,python-pycrypto)
13183 ("python-pytz" ,python-pytz)))
13184 (native-inputs
13185 `(;; Optional dependency of Flask. Tests need it.
13186 ("python-blinker" ,python-blinker)
13187 ("python-mock" ,python-mock) ; For tests
13188 ("python-nose" ,python-nose) ; For tests
13189 ("python-sphinx" ,python-sphinx)))
13190 (home-page
13191 "https://www.github.com/flask-restful/flask-restful/")
13192 (synopsis
13193 "Flask module for creating REST APIs")
13194 (description
13195 "This package contains a Flask module for creating REST APIs.")
13196 (license license:bsd-3)))
13197
13198 (define-public python-flask-basicauth
13199 (package
13200 (name "python-flask-basicauth")
13201 (version "0.2.0")
13202 (source
13203 (origin
13204 (method url-fetch)
13205 (uri (pypi-uri "Flask-BasicAuth" version))
13206 (sha256
13207 (base32
13208 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13209 (build-system python-build-system)
13210 (propagated-inputs
13211 `(("python-flask" ,python-flask)))
13212 (home-page
13213 "https://github.com/jpvanhal/flask-basicauth")
13214 (synopsis
13215 "HTTP basic access authentication for Flask")
13216 (description
13217 "This package provides HTTP basic access authentication for Flask.")
13218 (license license:bsd-3)))
13219
13220 (define-public python-flask-sqlalchemy
13221 (package
13222 (name "python-flask-sqlalchemy")
13223 (version "2.1")
13224 (source
13225 (origin
13226 (method url-fetch)
13227 (uri (pypi-uri "Flask-SQLAlchemy" version))
13228 (sha256
13229 (base32
13230 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13231 (build-system python-build-system)
13232 (propagated-inputs
13233 `(("python-flask" ,python-flask)
13234 ("python-sqlalchemy" ,python-sqlalchemy)))
13235 (home-page
13236 "https://github.com/mitsuhiko/flask-sqlalchemy")
13237 (synopsis
13238 "Module adding SQLAlchemy support to your Flask application")
13239 (description
13240 "This package adds SQLAlchemy support to your Flask application.")
13241 (license license:bsd-3)))
13242
13243 (define-public python-pyev
13244 (package
13245 (name "python-pyev")
13246 (version "0.9.0")
13247 (source
13248 (origin
13249 (method url-fetch)
13250 (uri (pypi-uri "pyev" version))
13251 (sha256
13252 (base32
13253 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13254 (build-system python-build-system)
13255 (arguments
13256 `(#:tests? #f ; no test suite
13257 #:phases
13258 (modify-phases %standard-phases
13259 (add-after 'unpack 'patch
13260 (lambda* (#:key inputs #:allow-other-keys)
13261 (let ((libev (string-append (assoc-ref inputs "libev")
13262 "/lib/libev.so.4")))
13263 (substitute* "setup.py"
13264 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13265 (string-append "libev_dll_name = \"" libev "\"")))))))))
13266 (inputs
13267 `(("libev" ,libev)))
13268 (home-page "http://pythonhosted.org/pyev/")
13269 (synopsis "Python libev interface")
13270 (description "Pyev provides a Python interface to libev.")
13271 (license license:gpl3)))
13272
13273 (define-public python2-pyev
13274 (package-with-python2 python-pyev))
13275
13276 (define-public python-imagesize
13277 (package
13278 (name "python-imagesize")
13279 (version "0.7.1")
13280 (source
13281 (origin
13282 (method url-fetch)
13283 (uri (pypi-uri "imagesize" version))
13284 (sha256
13285 (base32
13286 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13287 (build-system python-build-system)
13288 (arguments
13289 '(;; Test files are not distributed on PyPi:
13290 ;; https://github.com/shibukawa/imagesize_py/issues/7
13291 #:tests? #f))
13292 (home-page "https://github.com/shibukawa/imagesize_py")
13293 (synopsis "Gets image size of files in variaous formats in Python")
13294 (description
13295 "This package allows determination of image size from
13296 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13297 (license license:expat)))
13298
13299 (define-public python2-imagesize
13300 (package-with-python2 python-imagesize))
13301
13302 (define-public python-axolotl-curve25519
13303 (package
13304 (name "python-axolotl-curve25519")
13305 (version "0.1")
13306 (source
13307 (origin
13308 (method git-fetch)
13309 (uri (git-reference
13310 (url "git://github.com/tgalal/python-axolotl-curve25519")
13311 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13312 (file-name (string-append name "-" version "-checkout"))
13313 (sha256
13314 (base32
13315 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13316 (build-system python-build-system)
13317 (arguments
13318 `(;; Prevent creation of the egg. This works around
13319 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13320 #:configure-flags '("--root=/")))
13321 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13322 (synopsis "Python wrapper for curve25519 library")
13323 (description "This is a python wrapper for the curve25519 library
13324 with ed25519 signatures. The C code was pulled from
13325 libaxolotl-android. At the moment this wrapper is meant for use by
13326 python-axolotl.")
13327 (license (list license:gpl3 ; Most files
13328 license:bsd-3)))) ; curve/curve25519-donna.c
13329
13330 (define-public python2-axolotl-curve25519
13331 (package-with-python2 python-axolotl-curve25519))
13332
13333 (define-public python-axolotl
13334 (package
13335 (name "python-axolotl")
13336 (version "0.1.35")
13337 (source
13338 (origin
13339 (method url-fetch)
13340 (uri (string-append
13341 "https://github.com/tgalal/python-axolotl/archive/"
13342 version ".tar.gz"))
13343 (file-name (string-append name "-" version ".tar.gz"))
13344 (sha256
13345 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13346 (build-system python-build-system)
13347 (arguments
13348 `(#:phases
13349 (modify-phases %standard-phases
13350 ;; Don't install tests
13351 (add-before 'install 'remove-tests
13352 (lambda _
13353 (for-each delete-file-recursively
13354 '("axolotl/tests" "build/lib/axolotl/tests"))
13355 #t)))))
13356 (propagated-inputs
13357 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13358 ("python-dateutil" ,python-dateutil)
13359 ("python-protobuf" ,python-protobuf)
13360 ("python-pycrypto" ,python-pycrypto)))
13361 (home-page "https://github.com/tgalal/python-axolotl")
13362 (synopsis "Python port of libaxolotl-android")
13363 (description "This is a python port of libaxolotl-android. This
13364 is a ratcheting forward secrecy protocol that works in synchronous and
13365 asynchronous messaging environments.")
13366 (license license:gpl3)))
13367
13368 (define-public python2-axolotl
13369 (package-with-python2 python-axolotl))
13370
13371 (define-public python-termstyle
13372 (package
13373 (name "python-termstyle")
13374 (version "0.1.11")
13375 (source
13376 (origin
13377 (method url-fetch)
13378 (uri (pypi-uri "termstyle" version))
13379 (sha256
13380 (base32
13381 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13382 (build-system python-build-system)
13383 (arguments
13384 '(#:phases
13385 (modify-phases %standard-phases
13386 (replace 'check
13387 (lambda _
13388 (zero? (system* "python" "test3.py")))))))
13389 (home-page "https://github.com/gfxmonk/termstyle")
13390 (synopsis "Console text coloring for Python")
13391 (description "This package provides console text coloring for Python.")
13392 (license license:bsd-3)))
13393
13394 (define-public python-rednose
13395 (package
13396 (name "python-rednose")
13397 (version "1.2.1")
13398 (source
13399 (origin
13400 (method url-fetch)
13401 (uri (pypi-uri "rednose" version))
13402 (sha256
13403 (base32
13404 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13405 (build-system python-build-system)
13406 (arguments
13407 `(#:phases
13408 (modify-phases %standard-phases
13409 (add-after 'unpack 'fix-deps
13410 (lambda _
13411 ;; See <https://github.com/JBKahn/rednose/issues/12>
13412 (substitute* "setup.py"
13413 (("python-termstyle") "termstyle"))
13414 #t)))))
13415 (propagated-inputs
13416 `(("python-colorama" ,python-colorama)
13417 ("python-termstyle" ,python-termstyle)))
13418 (native-inputs
13419 `(("python-six" ,python-six)
13420 ("python-nose" ,python-nose)))
13421 (home-page "https://github.com/JBKahn/rednose")
13422 (synopsis "Colored output for Python nosetests")
13423 (description "This package provides colored output for the
13424 @command{nosetests} command of the Python Nose unit test framework.")
13425 (license license:bsd-3)))
13426
13427 (define-public python2-rednose
13428 (package-with-python2 python-rednose))
13429
13430 (define-public python-flask-restplus
13431 (package
13432 (name "python-flask-restplus")
13433 (version "0.9.2")
13434 (source
13435 (origin
13436 (method url-fetch)
13437 (uri (pypi-uri "flask-restplus" version))
13438 (sha256
13439 (base32
13440 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13441 (build-system python-build-system)
13442 (arguments
13443 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13444 ;; #:phases
13445 ;; (modify-phases %standard-phases
13446 ;; (replace 'check
13447 ;; (lambda _
13448 ;; (zero? (system* "nosetests")))))))
13449 (propagated-inputs
13450 `(("python-aniso8601" ,python-aniso8601)
13451 ("python-flask" ,python-flask)
13452 ("python-jsonschema" ,python-jsonschema)
13453 ("python-pytz" ,python-pytz)
13454 ("python-six" ,python-six)))
13455 (native-inputs
13456 `(("python-tzlocal" ,python-tzlocal)
13457 ("python-blinker" ,python-blinker)
13458 ("python-nose" ,python-nose)
13459 ("python-rednose" ,python-rednose)))
13460 (home-page "https://github.com/noirbizarre/flask-restplus")
13461 (synopsis "Framework for documented API development with Flask")
13462 (description "This package provides a framework for API development with
13463 the Flask web framework in Python. It is similar to package
13464 @code{python-flask-restful} but supports the @code{python-swagger}
13465 documentation builder.")
13466 (license license:expat)))
13467
13468 (define-public python-sadisplay
13469 (package
13470 (name "python-sadisplay")
13471 (version "0.4.6")
13472 (source
13473 (origin
13474 (method url-fetch)
13475 (uri (pypi-uri "sadisplay" version))
13476 (sha256
13477 (base32
13478 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13479 (build-system python-build-system)
13480 (propagated-inputs
13481 `(("python-sqlalchemy" ,python-sqlalchemy)))
13482 (native-inputs
13483 `(("python-nose" ,python-nose)))
13484 (home-page "https://bitbucket.org/estin/sadisplay")
13485 (synopsis "SQLAlchemy schema displayer")
13486 (description "This package provides a program to build Entity
13487 Relationship diagrams from a SQLAlchemy model (or directly from the
13488 database).")
13489 (license license:bsd-3)))
13490
13491 (define-public python2-sadisplay
13492 (package-with-python2 python-sadisplay))
13493
13494 (define-public python-flask-restful-swagger
13495 (package
13496 (name "python-flask-restful-swagger")
13497 (version "0.19")
13498 (source
13499 (origin
13500 (method url-fetch)
13501 (uri (pypi-uri "flask-restful-swagger" version))
13502 (sha256
13503 (base32
13504 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13505 (build-system python-build-system)
13506 (propagated-inputs
13507 `(("python-flask-restful" ,python-flask-restful)))
13508 (home-page "https://github.com/rantav/flask-restful-swagger")
13509 (synopsis "Extract Swagger specs from Flask-Restful projects")
13510 (description "This package lets you extract Swagger API documentation
13511 specs from your Flask-Restful projects.")
13512 (license license:expat)))
13513
13514 (define-public python2-flask-restful-swagger
13515 (package-with-python2 python-flask-restful-swagger))
13516
13517 (define-public python-argcomplete
13518 (package
13519 (name "python-argcomplete")
13520 (version "1.7.0")
13521 (source
13522 (origin
13523 (method url-fetch)
13524 (uri (pypi-uri "argcomplete" version))
13525 (sha256
13526 (base32
13527 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13528 (build-system python-build-system)
13529 (native-inputs
13530 `(("python-pexpect" ,python-pexpect)
13531 ("tcsh" ,tcsh)
13532 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
13533 (home-page "https://github.com/kislyuk/argcomplete")
13534 (synopsis "Shell tab completion for Python argparse")
13535 (description "argcomplete provides extensible command line tab completion
13536 of arguments and options for Python scripts using @code{argparse}. It's
13537 particularly useful for programs with many options or sub-parsers that can
13538 dynamically suggest completions; for example, when browsing resources over the
13539 network.")
13540 (license license:asl2.0)))
13541
13542 (define-public python2-argcomplete
13543 (package-with-python2 python-argcomplete))
13544
13545 (define-public python-xopen
13546 (package
13547 (name "python-xopen")
13548 (version "0.1.1")
13549 (source
13550 (origin
13551 (method url-fetch)
13552 (uri (pypi-uri "xopen" version))
13553 (sha256
13554 (base32
13555 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13556 (file-name (string-append name "-" version ".tar.gz"))))
13557 (build-system python-build-system)
13558 (home-page "https://github.com/marcelm/xopen/")
13559 (synopsis "Open compressed files transparently")
13560 (description "This module provides an @code{xopen} function that works like
13561 Python's built-in @code{open} function, but can also deal with compressed files.
13562 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13563 recognized by their file extensions. The focus is on being as efficient as
13564 possible on all supported Python versions.")
13565 (license license:expat)))
13566
13567 (define-public python2-xopen
13568 (package-with-python2 python-xopen))
13569
13570 (define-public python2-cheetah
13571 (package
13572 (name "python2-cheetah")
13573 (version "2.4.4")
13574 (source
13575 (origin
13576 (method url-fetch)
13577 (uri (pypi-uri "Cheetah" version))
13578 (sha256
13579 (base32
13580 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13581 (build-system python-build-system)
13582 (arguments
13583 `(#:python ,python-2))
13584 (propagated-inputs
13585 `(("python2-markdown" ,python2-markdown)))
13586 (home-page "https://pythonhosted.org/Cheetah/")
13587 (synopsis "Template engine")
13588 (description "Cheetah is a text-based template engine and Python code
13589 generator.
13590
13591 Cheetah can be used as a standalone templating utility or referenced as
13592 a library from other Python applications. It has many potential uses,
13593 but web developers looking for a viable alternative to ASP, JSP, PHP and
13594 PSP are expected to be its principle user group.
13595
13596 Features:
13597 @enumerate
13598 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13599 text-based format.
13600 @item Cleanly separates content, graphic design, and program code.
13601 @item Blends the power and flexibility of Python with a simple template language
13602 that non-programmers can understand.
13603 @item Gives template writers full access to any Python data structure, module,
13604 function, object, or method in their templates.
13605 @item Makes code reuse easy by providing an object-orientated interface to
13606 templates that is accessible from Python code or other Cheetah templates.
13607 One template can subclass another and selectively reimplement sections of it.
13608 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13609 improve the performance of a dynamic website.
13610 @item Compiles templates into optimized, yet readable, Python code.
13611 @end enumerate")
13612 (license (license:x11-style "file://LICENSE"))))
13613
13614 (define-public python-dulwich
13615 (package
13616 (name "python-dulwich")
13617 (version "0.16.3")
13618 (source
13619 (origin
13620 (method url-fetch)
13621 (uri (list (string-append "https://www.dulwich.io/releases/"
13622 "dulwich-" version ".tar.gz")
13623 (pypi-uri "dulwich" version)))
13624 (sha256
13625 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13626 (build-system python-build-system)
13627 (arguments
13628 `(#:phases
13629 (modify-phases %standard-phases
13630 (add-before 'check 'fix-tests
13631 (lambda* (#:key inputs #:allow-other-keys)
13632 ;; The tests use Popen with a custom environment which doesn't
13633 ;; include PATH.
13634 (substitute* "dulwich/tests/compat/utils.py"
13635 (("'git'") (string-append "'"
13636 (which "git")
13637 "'")))
13638 (substitute* '("dulwich/tests/test_repository.py"
13639 "dulwich/tests/test_hooks.py")
13640 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13641 (setenv "TEST_RUNNER" "unittest")
13642 (setenv "PYTHONHASHSEED" "random")
13643 #t)))))
13644 (propagated-inputs
13645 `(("python-fastimport" ,python-fastimport)))
13646 (native-inputs
13647 `(("python-mock" ,python-mock)
13648 ("python-geventhttpclient" ,python-geventhttpclient)
13649 ("git" ,git)))
13650 (home-page "https://www.dulwich.io/")
13651 (synopsis "Git implementation in Python")
13652 (description "Dulwich is an implementation of the Git file formats and
13653 protocols written in pure Python.")
13654 ;; Can be used with either license.
13655 (license (list license:asl2.0 license:gpl2+))))
13656
13657 (define-public python2-dulwich
13658 (package-with-python2 python-dulwich))
13659
13660 (define-public python-pbkdf2
13661 (package
13662 (name "python-pbkdf2")
13663 (version "1.3")
13664 (source
13665 (origin
13666 (method url-fetch)
13667 (uri (pypi-uri "pbkdf2" version))
13668 (sha256
13669 (base32
13670 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13671 (build-system python-build-system)
13672 (arguments
13673 '(#:phases
13674 (modify-phases %standard-phases
13675 (replace 'check
13676 (lambda _
13677 (setenv "PYTHONPATH"
13678 (string-append (getcwd) "/build/lib:"
13679 (getenv "PYTHONPATH")))
13680 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13681 (propagated-inputs
13682 `(("python-pycrypto" ,python-pycrypto))) ; optional
13683 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13684 (synopsis "Password-based key derivation")
13685 (description "This module implements the password-based key derivation
13686 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13687
13688 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13689 is part of the RSA Public Key Cryptography Standards series. The provided
13690 implementation takes a password or a passphrase and a salt value (and
13691 optionally a iteration count, a digest module, and a MAC module) and provides
13692 a file-like object from which an arbitrarly-sized key can be read.")
13693 (license license:expat)))
13694
13695 (define-public python2-pbkdf2
13696 (package-with-python2 python-pbkdf2))
13697
13698 (define-public python-qrcode
13699 (package
13700 (name "python-qrcode")
13701 (version "5.3")
13702 (source
13703 (origin
13704 (method url-fetch)
13705 (uri (pypi-uri "qrcode" version))
13706 (sha256
13707 (base32
13708 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13709 (build-system python-build-system)
13710 (arguments
13711 ;; FIXME: Tests require packaging 'pymaging'.
13712 '(#:tests? #f))
13713 (propagated-inputs
13714 `(("python-lxml" ,python-lxml) ; for SVG output
13715 ("python-pillow" ,python-pillow) ; for PNG output
13716 ("python-six" ,python-six)))
13717 (home-page "https://github.com/lincolnloop/python-qrcode")
13718 (synopsis "QR Code image generator")
13719 (description "This package provides a pure Python QR Code generator
13720 module. It uses the Python Imaging Library (PIL) to allow for the generation
13721 of QR Codes.
13722
13723 In addition this package provides a command line tool to generate QR codes and
13724 either write these QR codes to a file or do the output as ascii art at the
13725 console.")
13726 (license license:bsd-3)))
13727
13728 (define-public python2-qrcode
13729 (package-with-python2 python-qrcode))
13730
13731 ;; SlowAES isn't compatible with Python 3.
13732 (define-public python2-slowaes
13733 (package
13734 (name "python2-slowaes")
13735 (version "0.1a1")
13736 (source
13737 (origin
13738 (method url-fetch)
13739 (uri (pypi-uri "slowaes" version))
13740 (sha256
13741 (base32
13742 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13743 (build-system python-build-system)
13744 (arguments `(#:python ,python-2))
13745 (home-page "http://code.google.com/p/slowaes/")
13746 (synopsis "Implementation of AES in Python")
13747 (description "This package contains an implementation of AES in Python.
13748 This implementation is slow (hence the project name) but still useful when
13749 faster ones are not available.")
13750 (license license:asl2.0)))
13751
13752 (define-public python-rst2ansi
13753 (package
13754 (name "python-rst2ansi")
13755 (version "0.1.5")
13756 (source
13757 (origin
13758 (method url-fetch)
13759 (uri (pypi-uri "rst2ansi" version))
13760 (sha256
13761 (base32
13762 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13763 (build-system python-build-system)
13764 (propagated-inputs
13765 `(("python-docutils" ,python-docutils)))
13766 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13767 (synopsis "Convert RST to ANSI-decorated console output")
13768 (description
13769 "Python module dedicated to rendering RST (reStructuredText) documents
13770 to ansi-escaped strings suitable for display in a terminal.")
13771 (license license:expat)))
13772
13773 (define-public python-ansi2html
13774 (package
13775 (name "python-ansi2html")
13776 (version "1.2.0")
13777 (source
13778 (origin
13779 (method url-fetch)
13780 (uri (pypi-uri "ansi2html" version))
13781 (sha256
13782 (base32
13783 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13784 (build-system python-build-system)
13785 (native-inputs
13786 `(("python-mock" ,python-mock)
13787 ("python-nose" ,python-nose)))
13788 (propagated-inputs
13789 `(("python-six" ,python-six)))
13790 (home-page "http://github.com/ralphbean/ansi2html")
13791 (synopsis "Convert ANSI-decorated console output to HTML")
13792 (description
13793 "@command{ansi2html} is a Python library and command line utility for
13794 convering text with ANSI color codes to HTML or LaTeX.")
13795 (license license:gpl3+)))
13796
13797 (define-public python2-ansi2html
13798 (package-with-python2 python-ansi2html))
13799
13800 (define-public python-ddt
13801 (package
13802 (name "python-ddt")
13803 (version "1.1.1")
13804 (source
13805 (origin
13806 (method url-fetch)
13807 (uri (pypi-uri "ddt" version))
13808 (sha256
13809 (base32
13810 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13811 (build-system python-build-system)
13812 (native-inputs
13813 `(("python-mock" ,python-mock)
13814 ("python-nose" ,python-nose)))
13815 (propagated-inputs
13816 `(("python-six" ,python-six)
13817 ("python-pyyaml" ,python-pyyaml)))
13818 (home-page "https://github.com/txels/ddt")
13819 (synopsis "Data-Driven Tests")
13820 (description
13821 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13822 it with different test data, and make it appear as multiple test cases.")
13823 (license license:expat)))
13824
13825 (define-public python2-ddt
13826 (package-with-python2 python-ddt))
13827
13828 (define-public python-pycosat
13829 (package
13830 (name "python-pycosat")
13831 (version "0.6.1")
13832 (source
13833 (origin
13834 (method url-fetch)
13835 (uri (pypi-uri "pycosat" version))
13836 (sha256
13837 (base32
13838 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13839 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13840 (build-system python-build-system)
13841 (home-page "https://github.com/ContinuumIO/pycosat")
13842 (synopsis "Bindings to picosat (a SAT solver)")
13843 (description
13844 "This package provides efficient Python bindings to @code{picosat} on
13845 the C level. When importing pycosat, the @code{picosat} solver becomes part
13846 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13847 Problem} (SAT) solver.")
13848 (license license:expat)))
13849
13850 (define-public python2-pycosat
13851 (package-with-python2 python-pycosat))
13852
13853 (define-public python2-ruamel.ordereddict
13854 (package
13855 (name "python2-ruamel.ordereddict")
13856 (version "0.4.9")
13857 (source
13858 (origin
13859 (method url-fetch)
13860 (uri (pypi-uri "ruamel.ordereddict" version))
13861 (sha256
13862 (base32
13863 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13864 (build-system python-build-system)
13865 (arguments
13866 `(#:python ,python-2
13867 #:phases
13868 (modify-phases %standard-phases
13869 (delete 'check)
13870 (add-after 'install 'check
13871 (lambda* (#:key inputs outputs #:allow-other-keys)
13872 (add-installed-pythonpath inputs outputs)
13873 (zero? (system* "python" "test/testordereddict.py")))))))
13874 (home-page "https://bitbucket.org/ruamel/ordereddict")
13875 (synopsis "Version of dict that keeps keys in insertion order")
13876 (description
13877 "This is an implementation of an ordered dictionary with @dfn{Key
13878 Insertion Order} (KIO: updates of values do not affect the position of the
13879 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13880 removed and put at the back). The standard library module @code{OrderedDict},
13881 implemented later, implements a subset of @code{ordereddict} functionality.
13882 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13883 Order} (KSO, no sorting function can be specified, but a transform can be
13884 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13885 (license license:expat)))
13886
13887 (define-public python-pypeg2
13888 (package
13889 (name "python-pypeg2")
13890 (version "2.15.2")
13891 (source
13892 (origin
13893 (method url-fetch)
13894 (uri (pypi-uri "pyPEG2" version))
13895 (sha256
13896 (base32
13897 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13898 (build-system python-build-system)
13899 (propagated-inputs `(("python-lxml" ,python-lxml)))
13900 (arguments
13901 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13902 '(#:tests? #f))
13903 (home-page "https://fdik.org/pyPEG/")
13904 (synopsis "Parsering Expression Grammars in Python")
13905 (description "PyPEG is an intrinsic parser interpreter framework for
13906 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13907 parse many formal languages.")
13908 (license license:gpl2)))
13909
13910 (define-public python2-cliapp
13911 (package
13912 (name "python2-cliapp")
13913 (version "1.20160724")
13914 (source
13915 (origin
13916 (method url-fetch)
13917 (uri (string-append
13918 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13919 version ".tar.gz"))
13920 (sha256
13921 (base32
13922 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13923 (build-system python-build-system)
13924 (arguments
13925 `(#:python ,python-2))
13926 (propagated-inputs
13927 `(("python2-pyaml" ,python2-pyaml)))
13928 (home-page "https://liw.fi/cliapp/")
13929 (synopsis "Python framework for command line programs")
13930 (description "@code{python2-cliapp} is a python framework for
13931 command line programs. It contains the typical stuff such programs
13932 need to do, such as parsing the command line for options, and
13933 iterating over input files.")
13934 (license license:gpl2+)))
13935
13936 (define-public python2-ttystatus
13937 (package
13938 (name "python2-ttystatus")
13939 (version "0.32")
13940 (source
13941 (origin
13942 (method url-fetch)
13943 (uri (string-append
13944 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13945 version ".tar.gz"))
13946 (sha256
13947 (base32
13948 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13949 (build-system python-build-system)
13950 (arguments
13951 `(#:python ,python-2))
13952 (home-page "https://liw.fi/ttystatus/")
13953 (synopsis "Python library for showing progress reporting and
13954 status updates on terminals")
13955 (description "@code{python2-ttystatus} is a python library for
13956 showing progress reporting and status updates on terminals, for
13957 command line programs. Output is automatically adapted to the width
13958 of the terminal: truncated if it does not fit, and resized if the
13959 terminal size changes.")
13960 (license license:gpl3+)))
13961
13962 (define-public python2-tracing
13963 (package
13964 (name "python2-tracing")
13965 (version "0.10")
13966 (source
13967 (origin
13968 (method url-fetch)
13969 (uri (string-append
13970 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13971 version ".tar.gz"))
13972 (sha256
13973 (base32
13974 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13975 (build-system python-build-system)
13976 (arguments
13977 `(#:python ,python-2))
13978 (home-page "https://liw.fi/tracing/")
13979 (synopsis "Python debug logging helper")
13980 (description "@code{python2-tracing} is a python library for
13981 logging debug messages. It provides a way to turn debugging messages
13982 on and off, based on the filename they occur in. It is much faster
13983 than using @code{logging.Filter} to accomplish the same thing, which
13984 matters when code is run in production mode. The actual logging still
13985 happens using the @code{logging} library.")
13986 (license license:gpl3+)))
13987
13988 (define-public python2-larch
13989 (package
13990 (name "python2-larch")
13991 (version "1.20151025")
13992 (source
13993 (origin
13994 (method url-fetch)
13995 (uri (string-append
13996 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13997 version ".tar.gz"))
13998 (sha256
13999 (base32
14000 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14001 (build-system python-build-system)
14002 (arguments
14003 `(#:python ,python-2))
14004 (propagated-inputs
14005 `(("python2-tracing" ,python2-tracing)))
14006 (home-page "https://liw.fi/larch/")
14007 (synopsis "Python copy-on-write B-tree library")
14008 (description "@code{python2-larch} is an implementation of
14009 particular kind of B-tree, based on research by Ohad Rodeh. See
14010 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14011 on the data structure.
14012
14013 The distinctive feature of this B-tree is that a node is never
14014 (conceptually) modified. Instead, all updates are done by
14015 copy-on-write. This makes it easy to clone a tree, and modify only the
14016 clone, while other processes access the original tree.")
14017 (license license:gpl3+)))
14018
14019 (define-public python-htmlmin
14020 (package
14021 (name "python-htmlmin")
14022 (version "0.1.10")
14023 (source
14024 (origin
14025 (method url-fetch)
14026 (uri (pypi-uri "htmlmin" version))
14027 (sha256
14028 (base32
14029 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
14030 (arguments
14031 `(#:tests? #f)) ;htmlmin has no tests
14032 (build-system python-build-system)
14033 (home-page "https://htmlmin.readthedocs.org/en/latest/")
14034 (synopsis "HTML minifier")
14035 (description "@code{htmlmin} is an HTML minifier that just works.
14036 It comes with safe defaults and easily configurable options.")
14037 (license license:bsd-3)))
14038
14039 (define-public python2-htmlmin
14040 (package-with-python2 python-htmlmin))
14041
14042 (define-public python-flask-htmlmin
14043 (package
14044 (name "python-flask-htmlmin")
14045 (version "1.2")
14046 (source
14047 (origin
14048 (method url-fetch)
14049 (uri (pypi-uri "Flask-HTMLmin" version))
14050 (sha256
14051 (base32
14052 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
14053 (propagated-inputs
14054 `(("python-flask" ,python-flask)
14055 ("python-htmlmin" ,python-htmlmin)))
14056 (build-system python-build-system)
14057 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
14058 (synopsis "HTML response minifier for Flask")
14059 (description
14060 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
14061 (license license:bsd-3)))
14062
14063 (define-public python2-flask-htmlmin
14064 (package-with-python2 python-flask-htmlmin))
14065
14066 (define-public python-flask-login
14067 (package
14068 (name "python-flask-login")
14069 (version "0.4.0")
14070 (source
14071 (origin
14072 (method url-fetch)
14073 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
14074 version ".tar.gz"))
14075 (file-name (string-append name "-" version ".tar.gz"))
14076 (sha256
14077 (base32
14078 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
14079 (arguments
14080 ;; Tests fail PEP8 compliance. See:
14081 ;; https://github.com/maxcountryman/flask-login/issues/340
14082 `(#:tests? #f))
14083 (build-system python-build-system)
14084 (home-page "https://github.com/maxcountryman/flask-login")
14085 (synopsis "User session management for Flask")
14086 (description
14087 "@code{Flask-Login} provides user session management for Flask. It
14088 handles the common tasks of logging in, logging out, and remembering your
14089 users' sessions over extended periods of time.")
14090 (license license:expat)))
14091
14092 (define-public python2-flask-login
14093 (package-with-python2 python-flask-login))
14094
14095 (define-public python-astroid
14096 (package
14097 (name "python-astroid")
14098 (version "1.5.3")
14099 (source
14100 (origin
14101 (method url-fetch)
14102 (uri (string-append
14103 "https://github.com/PyCQA/astroid/archive/astroid-"
14104 version ".tar.gz"))
14105 (sha256
14106 (base32
14107 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
14108 (build-system python-build-system)
14109 (propagated-inputs
14110 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14111 ("python-six" ,python-six)
14112 ("python-wrapt" ,python-wrapt)))
14113 (arguments
14114 `(#:phases
14115 (modify-phases %standard-phases
14116 (replace 'check
14117 (lambda _
14118 (zero? (system* "python" "-m" "unittest" "discover"
14119 "-p" "unittest*.py")))))))
14120 (home-page "https://github.com/PyCQA/astroid")
14121 (synopsis "Common base representation of python source code for pylint and
14122 other projects")
14123 (description "@code{python-astroid} provides a common base representation
14124 of python source code for projects such as pychecker, pyreverse, pylint, etc.
14125
14126 It provides a compatible representation which comes from the _ast module. It
14127 rebuilds the tree generated by the builtin _ast module by recursively walking
14128 down the AST and building an extended ast. The new node classes have
14129 additional methods and attributes for different usages. They include some
14130 support for static inference and local name scopes. Furthermore, astroid
14131 builds partial trees by inspecting living objects.")
14132 (license license:lgpl2.1+)
14133 (properties `((python2-variant . ,(delay python2-astroid))))))
14134
14135 (define-public python2-astroid
14136 (let ((base (package-with-python2
14137 (strip-python2-variant python-astroid))))
14138 (package (inherit base)
14139 (propagated-inputs
14140 `(("python2-backports-functools-lru-cache"
14141 ,python2-backports-functools-lru-cache)
14142 ("python2-enum34" ,python2-enum34)
14143 ("python2-singledispatch" ,python2-singledispatch)
14144 ,@(package-propagated-inputs base))))))
14145
14146 (define-public python-isort
14147 (package
14148 (name "python-isort")
14149 (version "4.2.5")
14150 (source
14151 (origin
14152 (method url-fetch)
14153 (uri (string-append
14154 "https://github.com/timothycrosley/isort/archive/"
14155 version ".tar.gz"))
14156 (file-name (string-append name "-" version ".tar.gz"))
14157 (sha256
14158 (base32
14159 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14160 (build-system python-build-system)
14161 (native-inputs
14162 `(("python-mock" ,python-mock)
14163 ("python-pytest" ,python-pytest)))
14164 (home-page "https://github.com/timothycrosley/isort")
14165 (synopsis "Python utility/library to sort python imports")
14166 (description "@code{python-isort} is a python utility/library to sort
14167 imports alphabetically, and automatically separated into sections. It
14168 provides a command line utility, a python library and plugins for various
14169 editors.")
14170 (license license:expat)))
14171
14172 (define-public python2-isort
14173 (package-with-python2 python-isort))
14174
14175 (define-public python2-backports-functools-lru-cache
14176 (package
14177 (name "python2-backports-functools-lru-cache")
14178 (version "1.3")
14179 (source
14180 (origin
14181 (method url-fetch)
14182 ;; only the pypi tarballs contain the necessary metadata
14183 (uri (pypi-uri "backports.functools_lru_cache" version))
14184 (sha256
14185 (base32
14186 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14187 (build-system python-build-system)
14188 (native-inputs
14189 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14190 (arguments
14191 `(#:python ,python-2))
14192 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14193 (synopsis "Backport of functools.lru_cache from Python 3.3")
14194 (description "@code{python2-backports-functools-lru-cache} is a backport
14195 of @code{functools.lru_cache} from python 3.3.")
14196 (license license:expat)))
14197
14198 (define-public python-configparser
14199 (package
14200 (name "python-configparser")
14201 (version "3.5.0")
14202 (source
14203 (origin
14204 (method url-fetch)
14205 (uri (string-append
14206 "https://bitbucket.org/ambv/configparser/get/"
14207 version ".tar.bz2"))
14208 (file-name (string-append name "-" version ".tar.gz"))
14209 (sha256
14210 (base32
14211 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14212 (build-system python-build-system)
14213 (home-page "http://docs.python.org/py3k/library/configparser.html")
14214 (synopsis "Backport of configparser from python 3.5")
14215 (description "@code{python-configparser} is a backport of
14216 @code{configparser} from Python 3.5 so that it can be used directly
14217 in other versions.")
14218 (license license:expat)))
14219
14220 (define-public python2-configparser
14221 (package-with-python2 python-configparser))
14222
14223 (define-public python2-coverage-test-runner
14224 (package
14225 (name "python2-coverage-test-runner")
14226 (version "1.11")
14227 (source
14228 (origin
14229 (method url-fetch)
14230 (uri (string-append
14231 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14232 "coverage-test-runner/snapshot/coverage-test-runner-"
14233 version ".tar.gz"))
14234 (sha256
14235 (base32
14236 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14237 (build-system python-build-system)
14238 (arguments
14239 `(#:python ,python-2
14240 #:phases
14241 (modify-phases %standard-phases
14242 (replace 'check
14243 (lambda _
14244 (zero? (system* "./testrun")))))))
14245 (propagated-inputs
14246 `(("python2-coverage" ,python2-coverage)))
14247 (home-page "https://liw.fi/coverage-test-runner/")
14248 (synopsis "Python module for running unit tests")
14249 (description "@code{CoverageTestRunner} is a python module for running
14250 unit tests and failing them if the unit test module does not exercise all
14251 statements in the module it tests.")
14252 (license license:gpl3+)))
14253
14254 (define-public python-pylint
14255 (package
14256 (name "python-pylint")
14257 (version "1.7.2")
14258 (source
14259 (origin
14260 (method url-fetch)
14261 (uri (string-append
14262 "https://github.com/PyCQA/pylint/archive/pylint-"
14263 version ".tar.gz"))
14264 (sha256
14265 (base32
14266 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
14267 (build-system python-build-system)
14268 (native-inputs
14269 `(("python-pytest" ,python-pytest)
14270 ("python-pytest-runner" ,python-pytest-runner)
14271 ("python-tox" ,python-tox)))
14272 (propagated-inputs
14273 `(("python-astroid" ,python-astroid)
14274 ("python-isort" ,python-isort)
14275 ("python-mccabe" ,python-mccabe)
14276 ("python-six" ,python-six)))
14277 (arguments
14278 `(#:phases
14279 (modify-phases %standard-phases
14280 (replace 'check
14281 (lambda _
14282 ;; Somehow, tests for python2-pylint
14283 ;; fail if run from the build directory
14284 (let ((work "/tmp/work"))
14285 (mkdir-p work)
14286 (setenv "PYTHONPATH"
14287 (string-append (getenv "PYTHONPATH") ":" work))
14288 (copy-recursively "." work)
14289 (with-directory-excursion "/tmp"
14290 (zero? (system* "python" "-m" "unittest" "discover"
14291 "-s" (string-append work "/pylint/test")
14292 "-p" "*test_*.py")))))))))
14293 (home-page "https://github.com/PyCQA/pylint")
14294 (synopsis "Python source code analyzer which looks for coding standard
14295 errors")
14296 (description "Pylint is a Python source code analyzer which looks
14297 for programming errors, helps enforcing a coding standard and sniffs
14298 for some code smells (as defined in Martin Fowler's Refactoring book).
14299
14300 Pylint has many rules enabled by default, way too much to silence them
14301 all on a minimally sized program. It's highly configurable and handle
14302 pragmas to control it from within your code. Additionally, it is
14303 possible to write plugins to add your own checks.")
14304 (license license:gpl2+)))
14305
14306 (define-public python2-pylint
14307 (let ((pylint (package-with-python2 python-pylint)))
14308 (package (inherit pylint)
14309 (propagated-inputs
14310 `(("python2-backports-functools-lru-cache"
14311 ,python2-backports-functools-lru-cache)
14312 ("python2-configparser" ,python2-configparser)
14313 ,@(package-propagated-inputs pylint))))))
14314
14315 (define-public python-paramunittest
14316 (package
14317 (name "python-paramunittest")
14318 (version "0.2")
14319 (source
14320 (origin
14321 (method url-fetch)
14322 (uri (pypi-uri "ParamUnittest" version))
14323 (sha256
14324 (base32
14325 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14326 (build-system python-build-system)
14327 (home-page
14328 "https://github.com/rik0/ParamUnittest")
14329 (synopsis
14330 "Simple extension to have parametrized unit tests")
14331 (description
14332 "This package allows to create parametrized unit-tests that work with the standard
14333 unittest package. A parametrized test case is automatically converted to multiple test
14334 cases. Since they are TestCase subclasses, they work with other test suites that
14335 recognize TestCases.")
14336 (license license:bsd-2)))
14337
14338 (define-public python2-python-paramunittest
14339 (package-with-python2 python-paramunittest))
14340
14341 (define-public python-mando
14342 (package
14343 (name "python-mando")
14344 (version "0.5")
14345 (source
14346 (origin
14347 (method url-fetch)
14348 (uri (pypi-uri "mando" version))
14349 (sha256
14350 (base32
14351 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14352 (build-system python-build-system)
14353 (propagated-inputs
14354 `(("python-rst2ansi" ,python-rst2ansi)))
14355 (native-inputs
14356 `(("python-sphinx" ,python-sphinx-1.5.3)
14357 ("python-paramunittest" ,python-paramunittest)))
14358 (home-page "https://mando.readthedocs.org/")
14359 (synopsis
14360 "Wrapper around argparse, allowing creation of complete CLI applications")
14361 (description
14362 "This package is a wrapper around argparse, allowing you to write complete CLI
14363 applications in seconds while maintaining all the flexibility.")
14364 (license license:expat)))
14365
14366 (define-public python2-mando
14367 (package-with-python2 python-mando))
14368
14369 (define-public python-mando-0.3.1
14370 ;; python-radon (version 1.5.0) has a requirement
14371 ;; for mando<0.4,>=0.3
14372 (package
14373 (inherit python-mando)
14374 (name "python-mando")
14375 (version "0.3.1")
14376 (source
14377 (origin
14378 (method url-fetch)
14379 (uri (string-append "https://github.com/rubik/mando/archive/v"
14380 version
14381 ".tar.gz"))
14382 (sha256
14383 (base32
14384 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14385
14386 (define-public python-fudge
14387 (package
14388 (name "python-fudge")
14389 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14390 ;; package, which is currently the only use of this package.
14391 (version "0.9.6")
14392 (source
14393 (origin
14394 (method url-fetch)
14395 (uri (pypi-uri "fudge" version))
14396 (sha256
14397 (base32
14398 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14399 (build-system python-build-system)
14400 (arguments
14401 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14402 (home-page "https://github.com/fudge-py/fudge")
14403 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14404 (description
14405 "Fudge is a Python module for using fake objects (mocks and stubs) to
14406 test real ones.
14407
14408 In readable Python code, you declare the methods available on your fake object
14409 and how they should be called. Then you inject that into your application and
14410 start testing. This declarative approach means you don’t have to record and
14411 playback actions and you don’t have to inspect your fakes after running code.
14412 If the fake object was used incorrectly then you’ll see an informative
14413 exception message with a traceback that points to the culprit.")
14414 (license license:expat)))
14415
14416 (define-public python2-fudge
14417 (package-with-python2 python-fudge))
14418
14419 (define-public python-oauth2client
14420 (package
14421 (name "python-oauth2client")
14422 (version "4.0.0")
14423 (source
14424 (origin
14425 (method url-fetch)
14426 (uri (pypi-uri "oauth2client" version))
14427 (sha256
14428 (base32
14429 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14430 (build-system python-build-system)
14431 (arguments
14432 `(#:tests? #f))
14433 (propagated-inputs
14434 `(("python-httplib2" ,python-httplib2)
14435 ("python-pyasn1" ,python-pyasn1)
14436 ("python-pyasn1-modules" ,python-pyasn1-modules)
14437 ("python-rsa" ,python-rsa)
14438 ("python-six" ,python-six)))
14439 (home-page "http://github.com/google/oauth2client/")
14440 (synopsis "OAuth 2.0 client library")
14441 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14442 library for Python")
14443 (license license:asl2.0)))
14444
14445 (define-public python-flask-oidc
14446 (package
14447 (name "python-flask-oidc")
14448 (version "1.1.1")
14449 (source
14450 (origin
14451 (method url-fetch)
14452 (uri (pypi-uri "flask-oidc" version))
14453 (sha256
14454 (base32
14455 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14456 (build-system python-build-system)
14457 (propagated-inputs
14458 `(("python-flask" ,python-flask)
14459 ("python-itsdangerous" ,python-itsdangerous)
14460 ("python-oauth2client" ,python-oauth2client)
14461 ("python-six" ,python-six)))
14462 (native-inputs
14463 `(("python-nose" ,python-nose)
14464 ("python-mock" ,python-mock)))
14465 (home-page "https://github.com/puiterwijk/flask-oidc")
14466 (synopsis "OpenID Connect extension for Flask")
14467 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14468 for Flask.")
14469 (license license:bsd-2)))
14470
14471 (define-public python-mwclient
14472 (package
14473 (name "python-mwclient")
14474 (version "0.8.4")
14475 (source
14476 (origin
14477 (method url-fetch)
14478 ;; The PyPI version wouldn't contain tests.
14479 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14480 "v" version ".tar.gz"))
14481 (sha256
14482 (base32
14483 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14484 (build-system python-build-system)
14485 (propagated-inputs
14486 `(("python-requests" ,python-requests)
14487 ("python-requests-oauthlib"
14488 ,python-requests-oauthlib)
14489 ("python-six" ,python-six)))
14490 (native-inputs
14491 `(("python-mock" ,python-mock)
14492 ("python-pytest" ,python-pytest)
14493 ("python-pytest-pep8" ,python-pytest-pep8)
14494 ("python-pytest-cache" ,python-pytest-cache)
14495 ("python-pytest-cov" ,python-pytest-cov)
14496 ("python-responses" ,python-responses)))
14497 (home-page "https://github.com/btongminh/mwclient")
14498 (synopsis "MediaWiki API client")
14499 (description "This package provides a MediaWiki API client.")
14500 (license license:expat)))
14501
14502 (define-public python2-mwclient
14503 (package-with-python2 python-mwclient))
14504
14505 (define-public python-pytest-warnings
14506 (package
14507 (name "python-pytest-warnings")
14508 (version "0.2.0")
14509 (source
14510 (origin
14511 (method url-fetch)
14512 (uri (pypi-uri "pytest-warnings" version))
14513 (sha256
14514 (base32
14515 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14516 (build-system python-build-system)
14517 (propagated-inputs
14518 `(("pytest" ,python-pytest-3.0)))
14519 (home-page "https://github.com/fschulze/pytest-warnings")
14520 (synopsis "Pytest plugin to list Python warnings in pytest report")
14521 (description
14522 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14523 pytest report.")
14524 (license license:expat)))
14525
14526 (define-public python2-pytest-warnings
14527 (package-with-python2 python-pytest-warnings))
14528
14529 (define-public python-pytest-capturelog
14530 (package
14531 (name "python-pytest-capturelog")
14532 (version "0.7")
14533 (source
14534 (origin
14535 (method url-fetch)
14536 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
14537 (sha256
14538 (base32
14539 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
14540 (build-system python-build-system)
14541 (propagated-inputs
14542 `(("pytest" ,python-pytest-3.0)))
14543 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
14544 (synopsis "Pytest plugin to catch log messages")
14545 (description
14546 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
14547 (license license:expat)))
14548
14549 (define-public python2-pytest-capturelog
14550 (package-with-python2 python-pytest-capturelog))
14551
14552 (define-public python-pytest-catchlog
14553 (package
14554 (name "python-pytest-catchlog")
14555 (version "1.2.2")
14556 (source
14557 (origin
14558 (method url-fetch)
14559 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14560 (sha256
14561 (base32
14562 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14563 (build-system python-build-system)
14564 (native-inputs
14565 `(("unzip" ,unzip)))
14566 (propagated-inputs
14567 `(("pytest" ,python-pytest-3.0)))
14568 (home-page "https://github.com/eisensheng/pytest-catchlog")
14569 (synopsis "Pytest plugin to catch log messages")
14570 (description
14571 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14572 a fork of pytest-capturelog.")
14573 (license license:expat)))
14574
14575 (define-public python2-pytest-catchlog
14576 (package-with-python2 python-pytest-catchlog))
14577
14578 (define-public python-utils
14579 (package
14580 (name "python-utils")
14581 (version "2.1.0")
14582 (source (origin
14583 (method url-fetch)
14584 (uri (pypi-uri "python-utils" version))
14585 (sha256
14586 (base32
14587 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14588 (build-system python-build-system)
14589 (native-inputs
14590 `(("pytest-runner" ,python-pytest-runner)
14591 ("pytest" ,python-pytest)
14592 ("six" ,python-six)))
14593 (home-page "https://github.com/WoLpH/python-utils")
14594 (synopsis "Convenient utilities not included with the standard Python install")
14595 (description
14596 "Python Utils is a collection of small Python functions and classes which
14597 make common patterns shorter and easier.")
14598 (license license:bsd-2)))
14599
14600 (define-public python2-utils
14601 (package-with-python2 python-utils))
14602
14603 (define-public python-webassets
14604 (package
14605 (name "python-webassets")
14606 (version "0.12.1")
14607 (source
14608 (origin
14609 (method url-fetch)
14610 (uri (pypi-uri "webassets" version))
14611 (sha256
14612 (base32
14613 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14614 (build-system python-build-system)
14615 (native-inputs
14616 `(("python-jinja2" ,python-jinja2)
14617 ("python-mock" ,python-mock)
14618 ("python-nose" ,python-nose)
14619 ("python-pytest" ,python-pytest)))
14620 (home-page "https://github.com/miracle2k/webassets")
14621 (synopsis "Media asset management")
14622 (description "Merges, minifies and compresses Javascript and CSS files,
14623 supporting a variety of different filters, including YUI, jsmin, jspacker or
14624 CSS tidy. Also supports URL rewriting in CSS files.")
14625 (license license:bsd-2)))
14626
14627 (define-public python-sphinx-me
14628 (package
14629 (name "python-sphinx-me")
14630 (version "0.3")
14631 (source
14632 (origin
14633 (method url-fetch)
14634 (uri (pypi-uri "sphinx-me" version))
14635 (sha256
14636 (base32
14637 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14638 (build-system python-build-system)
14639 (home-page "https://github.com/stephenmcd/sphinx-me")
14640 (synopsis "Create a Sphinx documentation shell")
14641 (description
14642 "Create a Sphinx documentation shell for your project and include the
14643 README file as the documentation index. It handles extracting the required
14644 meta data such as the project name, author and version from your project for
14645 use in your Sphinx docs.")
14646 (license license:bsd-2)))
14647
14648 (define-public python2-sphinx-me
14649 (package-with-python2 python-sphinx-me))
14650
14651 (define-public python-cssmin
14652 (package
14653 (name "python-cssmin")
14654 (version "0.2.0")
14655 (source
14656 (origin
14657 (method url-fetch)
14658 (uri (pypi-uri "cssmin" version))
14659 (sha256
14660 (base32
14661 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14662 (build-system python-build-system)
14663 (home-page "https://github.com/zacharyvoase/cssmin")
14664 (synopsis "Python port of the YUI CSS Compressor")
14665 (description "Python port of the YUI CSS Compressor.")
14666 (license (list license:expat license:bsd-3))))
14667
14668 (define-public python2-cssmin
14669 (package-with-python2 python-cssmin))
14670
14671 (define-public python-diff-match-patch
14672 (package
14673 (name "python-diff-match-patch")
14674 (version "20121119")
14675 (source
14676 (origin
14677 (method url-fetch)
14678 (uri (pypi-uri "diff-match-patch" version))
14679 (sha256
14680 (base32
14681 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14682 (build-system python-build-system)
14683 (home-page "https://code.google.com/p/google-diff-match-patch")
14684 (synopsis "Synchronize plain text")
14685 (description "Diff Match and Patch libraries offer robust algorithms to
14686 perform the operations required for synchronizing plain text.")
14687 (license license:asl2.0)))
14688
14689 (define-public python2-diff-match-patch
14690 (package-with-python2 python-diff-match-patch))
14691
14692 (define-public python-dirsync
14693 (package
14694 (name "python-dirsync")
14695 (version "2.2.2")
14696 (source
14697 (origin
14698 (method url-fetch)
14699 (uri (pypi-uri "dirsync" version ".zip"))
14700 (sha256
14701 (base32
14702 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14703 (build-system python-build-system)
14704 (native-inputs
14705 `(("unzip" ,unzip)))
14706 (propagated-inputs
14707 `(("six" ,python-six)))
14708 (home-page "https://bitbucket.org/tkhyn/dirsync")
14709 (synopsis "Advanced directory tree synchronisation tool")
14710 (description "Advanced directory tree synchronisation tool.")
14711 (license license:expat)))
14712
14713 (define-public python2-dirsync
14714 (package-with-python2 python-dirsync))
14715
14716 (define-public python-nosexcover
14717 (package
14718 (name "python-nosexcover")
14719 (version "1.0.11")
14720 (source (origin
14721 (method url-fetch)
14722 (uri (pypi-uri "nosexcover" version))
14723 (sha256
14724 (base32
14725 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14726 (build-system python-build-system)
14727 (propagated-inputs
14728 `(("python-coverage" ,python-coverage)
14729 ("python-nose" ,python-nose)))
14730 (home-page "http://github.com/cmheisel/nose-xcover")
14731 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14732 (description "Nose-xcover is a companion to the built-in
14733 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
14734 to a file named coverage.xml.
14735
14736 It will honor all the options you pass to the Nose coverage plugin,
14737 especially -cover-package.")
14738 (license license:expat)))
14739
14740 (define-public python2-nosexcover
14741 (package-with-python2 python-nosexcover))
14742
14743 (define-public python-elasticsearch
14744 (package
14745 (name "python-elasticsearch")
14746 (version "1.0.0")
14747 (source
14748 (origin
14749 (method url-fetch)
14750 (uri (pypi-uri "elasticsearch" version))
14751 (sha256
14752 (base32
14753 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14754 (build-system python-build-system)
14755 (native-inputs
14756 `(("python-mock" ,python-mock)
14757 ("python-nosexcover" ,python-nosexcover)
14758 ("python-pyaml" ,python-pyaml)
14759 ("python-requests" ,python-requests)))
14760 (propagated-inputs
14761 `(("urllib3" ,python-urllib3)))
14762 (arguments
14763 ;; tests require the test_elasticsearch module but it is not distributed.
14764 `(#:tests? #f))
14765 (home-page "https://github.com/elastic/elasticsearch-py")
14766 (synopsis "Low-level client for Elasticsearch")
14767 (description "Official low-level client for Elasticsearch. Its goal is to
14768 provide common ground for all Elasticsearch-related code in Python; because of
14769 this it tries to be opinion-free and very extendable.")
14770 (license license:expat)))
14771
14772 (define-public python2-elasticsearch
14773 (package-with-python2 python-elasticsearch))
14774
14775 (define-public python-levenshtein
14776 (package
14777 (name "python-levenshtein")
14778 (version "0.12.0")
14779 (source
14780 (origin
14781 (method url-fetch)
14782 (uri (pypi-uri "python-Levenshtein" version))
14783 (sha256
14784 (base32
14785 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14786 (build-system python-build-system)
14787 (home-page "https://github.com/ztane/python-Levenshtein")
14788 (synopsis "Fast computation of Levenshtein distance and string similarity")
14789 (description
14790 "The Levenshtein Python C extension module contains functions for fast computation of
14791 @enumerate
14792 @item Levenshtein (edit) distance, and edit operations
14793 @item string similarity
14794 @item approximate median strings, and generally string averaging
14795 @item string sequence and set similarity
14796 @end enumerate
14797 It supports both normal and Unicode strings.")
14798 (license license:gpl2+)))
14799
14800 (define-public python2-levenshtein
14801 (package-with-python2 python-levenshtein))
14802
14803 (define-public python-scandir
14804 (package
14805 (name "python-scandir")
14806 (version "1.4")
14807 (source
14808 (origin
14809 (method url-fetch)
14810 (uri (pypi-uri "scandir" version))
14811 (sha256
14812 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14813 (build-system python-build-system)
14814 (home-page "https://github.com/benhoyt/scandir")
14815 (synopsis "Directory iteration function")
14816 (description
14817 "Directory iteration function like os.listdir(), except that instead of
14818 returning a list of bare filenames, it yields DirEntry objects that include
14819 file type and stat information along with the name. Using scandir() increases
14820 the speed of os.walk() by 2-20 times (depending on the platform and file
14821 system) by avoiding unnecessary calls to os.stat() in most cases.")
14822 (license license:bsd-3)))
14823
14824 (define-public python2-scandir
14825 (package-with-python2 python-scandir))
14826
14827 (define-public python2-stemming
14828 (package
14829 (name "python2-stemming")
14830 (version "1.0.1")
14831 (source
14832 (origin
14833 (method url-fetch)
14834 (uri (pypi-uri "stemming" version))
14835 (sha256
14836 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14837 (build-system python-build-system)
14838 (arguments
14839 `(#:python ,python-2))
14840 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14841 (synopsis "Python implementations of various stemming algorithms")
14842 (description
14843 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14844 stemming algorithms for English. These implementations are straightforward and
14845 efficient, unlike some Python versions of the same algorithms available on the
14846 Web. This package is an extraction of the stemming code included in the Whoosh
14847 search engine.")
14848 (license license:public-domain)))
14849
14850 (define-public python-factory-boy
14851 (package
14852 (name "python-factory-boy")
14853 (version "2.8.1")
14854 (source
14855 (origin
14856 (method url-fetch)
14857 (uri (pypi-uri "factory_boy" version))
14858 (sha256
14859 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14860 (build-system python-build-system)
14861 (arguments
14862 ;; Tests are not included in the tarball.
14863 `(#:tests? #f))
14864 (propagated-inputs
14865 `(("faker" ,python-faker)))
14866 (home-page "https://github.com/benhoyt/scandir")
14867 (synopsis "Versatile test fixtures replacement")
14868 (description
14869 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14870
14871 As a fixtures replacement tool, it aims to replace static, hard to maintain
14872 fixtures with easy-to-use factories for complex object.
14873
14874 Instead of building an exhaustive test setup with every possible combination
14875 of corner cases, factory_boy allows you to use objects customized for the
14876 current test, while only declaring the test-specific fields")
14877 (license license:expat)))
14878
14879 (define-public python2-factory-boy
14880 (package-with-python2 python-factory-boy))
14881
14882 (define-public python-translate-toolkit
14883 (package
14884 (name "python-translate-toolkit")
14885 (version "2.1.0")
14886 (source
14887 (origin
14888 (method url-fetch)
14889 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14890 (sha256
14891 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14892 (build-system python-build-system)
14893 (native-inputs
14894 `(("python-pytest" ,python-pytest)
14895 ("python-sphinx" ,python-sphinx)))
14896 (propagated-inputs
14897 `(("python-babel" ,python-babel)
14898 ("python-beautifulsoup4" ,python-beautifulsoup4)
14899 ("python-chardet" ,python-chardet)
14900 ("python-diff-match-patch" ,python-diff-match-patch)
14901 ("python-levenshtein" ,python-levenshtein)
14902 ("python-lxml" ,python-lxml)
14903 ("python-six" ,python-six)
14904 ("python-vobject" ,python-vobject)
14905 ("python-pyyaml" ,python-pyyaml)))
14906 (arguments
14907 ;; TODO: tests are not run, because they end with
14908 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14909 ;; 'parse_funcs'
14910 ;; during test setup.
14911 `(#:tests? #f))
14912 (home-page "http://toolkit.translatehouse.org")
14913 (synopsis "Tools and API for translation and localization engineering")
14914 (description
14915 "Tools and API for translation and localization engineering. It contains
14916 several utilities, as well as an API for building localization tools.")
14917 (license license:gpl2+)))
14918
14919 (define-public python2-translate-toolkit
14920 (package-with-python2 python-translate-toolkit))
14921
14922 (define-public python-mysqlclient
14923 (package
14924 (name "python-mysqlclient")
14925 (version "1.3.10")
14926 (source
14927 (origin
14928 (method url-fetch)
14929 (uri (pypi-uri "mysqlclient" version))
14930 (sha256
14931 (base32
14932 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14933 (build-system python-build-system)
14934 (native-inputs
14935 `(("mariadb" ,mariadb)
14936 ("nose" ,python-nose)
14937 ("mock" ,python-mock)
14938 ("py.test" ,python-pytest)))
14939 (inputs
14940 `(("mysql" ,mysql)
14941 ("libz" ,zlib)
14942 ("openssl" ,openssl)))
14943 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14944 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14945 (description "MySQLdb is an interface to the popular MySQL database server
14946 for Python. The design goals are:
14947 @enumerate
14948 @item Compliance with Python database API version 2.0 [PEP-0249],
14949 @item Thread-safety,
14950 @item Thread-friendliness (threads will not block each other).
14951 @end enumerate")
14952 (license license:gpl2)))
14953
14954 (define-public python2-mysqlclient
14955 (package-with-python2 python-mysqlclient))
14956
14957 (define-public python-hiredis
14958 (package
14959 (name "python-hiredis")
14960 (version "0.2.0")
14961 (source
14962 (origin
14963 (method url-fetch)
14964 (uri (pypi-uri "hiredis" version))
14965 (sha256
14966 (base32
14967 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14968 (build-system python-build-system)
14969 (arguments
14970 ;; no tests
14971 `(#:tests? #f))
14972 (home-page "https://github.com/redis/hiredis-py")
14973 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14974 (description "Python-hiredis is a python extension that wraps protocol
14975 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14976 (license license:bsd-3)))
14977
14978 (define-public python2-hiredis
14979 (package-with-python2 python-hiredis))
14980
14981 (define-public python-fakeredis
14982 (package
14983 (name "python-fakeredis")
14984 (version "0.8.2")
14985 (source
14986 (origin
14987 (method url-fetch)
14988 (uri (pypi-uri "fakeredis" version))
14989 (sha256
14990 (base32
14991 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14992 (build-system python-build-system)
14993 (arguments
14994 ;; no tests
14995 `(#:tests? #f))
14996 (home-page "https://github.com/jamesls/fakeredis")
14997 (synopsis "Fake implementation of redis API for testing purposes")
14998 (description "Fakeredis is a pure python implementation of the redis-py
14999 python client that simulates talking to a redis server. This was created for a
15000 single purpose: to write unittests. Setting up redis is not hard, but many time
15001 you want to write unittests that do not talk to an external server (such as
15002 redis). This module now allows tests to simply use this module as a reasonable
15003 substitute for redis.")
15004 (license license:bsd-3)))
15005
15006 (define-public python2-fakeredis
15007 (package-with-python2 python-fakeredis))
15008
15009 (define-public python-behave-web-api
15010 (package
15011 (name "python-behave-web-api")
15012 (version "1.0.6")
15013 (source
15014 (origin
15015 (method url-fetch)
15016 (uri (pypi-uri "behave-web-api" version))
15017 (sha256
15018 (base32
15019 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
15020 (build-system python-build-system)
15021 (arguments
15022 `(#:phases
15023 (modify-phases %standard-phases
15024 (add-after 'unpack 'fix-dependencies
15025 (lambda _
15026 (substitute* "setup.py"
15027 (("'wheel'") "") ; We don't use it.
15028 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
15029 (propagated-inputs
15030 `(("behave" ,behave)
15031 ("python-requests" ,python-requests)))
15032 (home-page "https://github.com/jefersondaniel/behave-web-api")
15033 (synopsis "Provides testing for JSON APIs with Behave for Python")
15034 (description "This package provides testing utility modules for testing
15035 JSON APIs with Behave.")
15036 (license license:expat)))
15037
15038 (define-public python2-behave-web-api
15039 (package-with-python2 python-behave-web-api))
15040
15041 (define-public python-flask-script
15042 (package
15043 (name "python-flask-script")
15044 (version "2.0.5")
15045 (source
15046 (origin
15047 (method url-fetch)
15048 (uri (pypi-uri "Flask-Script" version))
15049 (sha256
15050 (base32
15051 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
15052 (build-system python-build-system)
15053 (propagated-inputs
15054 `(("python-flask" ,python-flask)
15055 ("python-argcomplete" ,python-argcomplete)
15056 ("python-werkzeug" ,python-werkzeug)))
15057 (native-inputs
15058 `(("python-pytest" ,python-pytest)))
15059 (home-page
15060 "http://github.com/smurfix/flask-script")
15061 (synopsis "Scripting support for Flask")
15062 (description "The Flask-Script extension provides support for writing
15063 external scripts in Flask. This includes running a development server,
15064 a customised Python shell, scripts to set up your database, cronjobs,
15065 and other command-line tasks that belong outside the web application
15066 itself.")
15067 (license license:bsd-3)))
15068
15069 (define-public python2-flask-script
15070 (package-with-python2 python-flask-script))
15071
15072 (define-public python-flask-migrate
15073 (package
15074 (name "python-flask-migrate")
15075 (version "2.0.3")
15076 (source
15077 (origin
15078 (method url-fetch)
15079 (uri (pypi-uri "Flask-Migrate" version))
15080 (sha256
15081 (base32
15082 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
15083 (build-system python-build-system)
15084 (propagated-inputs
15085 `(("python-flask" ,python-flask)
15086 ("python-alembic" ,python-alembic)
15087 ("python-sqlalchemy" ,python-sqlalchemy)
15088 ("python-flask-script" ,python-flask-script)
15089 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
15090 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
15091 (synopsis "SQLAlchemy database migrations for Flask programs using
15092 Alembic")
15093 (description "This package contains SQLAlchemy database migration tools
15094 for Flask programs that are using @code{python-alembic}.")
15095 (license license:expat)))
15096
15097 (define-public python2-flask-migrate
15098 (package-with-python2 python-flask-migrate))
15099
15100 (define-public python-packaging
15101 (package
15102 (name "python-packaging")
15103 (version "16.8")
15104 (source
15105 (origin
15106 (method url-fetch)
15107 (uri (pypi-uri "packaging" version))
15108 (sha256
15109 (base32
15110 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
15111 (build-system python-build-system)
15112 (native-inputs
15113 `(("python-pretend" ,python-pretend)
15114 ("python-pytest" ,python-pytest)))
15115 (propagated-inputs
15116 `(("python-pyparsing" ,python-pyparsing)
15117 ("python-six" ,python-six)))
15118 (home-page "https://github.com/pypa/packaging")
15119 (synopsis "Core utilities for Python packages")
15120 (description "Packaging is a Python module for dealing with Python packages.
15121 It offers an interface for working with package versions, names, and dependency
15122 information.")
15123 ;; From 'LICENSE': This software is made available under the terms of
15124 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15125 ;; Contributions to this software is made under the terms of *both* these
15126 ;; licenses.
15127 (license (list license:asl2.0 license:bsd-2))))
15128
15129 (define-public python2-packaging
15130 (package-with-python2 python-packaging))
15131
15132 (define-public python-sql
15133 (package
15134 (name "python-sql")
15135 (version "0.9")
15136 (source
15137 (origin
15138 (method url-fetch)
15139 (uri (pypi-uri "python-sql" version))
15140 (sha256
15141 (base32
15142 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15143 (build-system python-build-system)
15144 (home-page "https://python-sql.tryton.org/")
15145 (synopsis "Library to write SQL queries in a pythonic way")
15146 (description "@code{python-sql} is a library to write SQL queries, that
15147 transforms idiomatic python function calls to well-formed SQL queries.")
15148 (license license:bsd-3)))
15149
15150 (define-public python2-sql
15151 (package-with-python2 python-sql))
15152
15153 (define-public python-genshi
15154 (package
15155 (name "python-genshi")
15156 (version "0.7")
15157 (source
15158 (origin
15159 (method url-fetch)
15160 (uri (string-append
15161 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15162 version ".tar.gz"))
15163 (patches
15164 (search-patches
15165 ;; The first 4 patches are in the master branch upstream.
15166 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15167 ;; The last 2 are NOT in any branch.
15168 ;; They were sent as attachments to a ticket opened at
15169 ;; https://genshi.edgewall.org/ticket/602#no1
15170 "python-genshi-stripping-of-unsafe-script-tags.patch"
15171 "python-genshi-disable-speedups-on-python-3.3.patch"
15172 "python-genshi-isstring-helper.patch"
15173 "python-genshi-add-support-for-python-3.4-AST.patch"
15174 "python-genshi-fix-tests-on-python-3.5.patch"
15175 "python-genshi-buildable-on-python-2.7.patch"))
15176 (sha256
15177 (base32
15178 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15179 (build-system python-build-system)
15180 (home-page "https://genshi.edgewall.org/")
15181 (synopsis "Toolkit for generation of output for the web")
15182 (description "Genshi is a Python library that provides an integrated set
15183 of components for parsing, generating, and processing HTML, XML or other
15184 textual content for output generation on the web.")
15185 (license license:bsd-3)))
15186
15187 ;; The linter here claims that patch file names should start with the package
15188 ;; name. But, in this case the patches are inherited from python-genshi with
15189 ;; the "python-genshi-" prefix instead of "python2-genshi-".
15190 (define-public python2-genshi
15191 (package-with-python2 python-genshi))
15192
15193 (define-public python-relatorio
15194 (package
15195 (name "python-relatorio")
15196 (version "0.6.4")
15197 (source
15198 (origin
15199 (method url-fetch)
15200 (uri (pypi-uri "relatorio" version))
15201 (sha256
15202 (base32
15203 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15204 (build-system python-build-system)
15205 (propagated-inputs
15206 `(("python-lxml" ,python-lxml)
15207 ("python-genshi" ,python-genshi)))
15208 (home-page "https://relatorio.tryton.org/")
15209 (synopsis "Templating library able to output ODT and PDF files")
15210 (description "Relatorio is a templating library which provides a way to
15211 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15212 for more filetypes can be easily added by creating plugins for them.")
15213 (license license:gpl3+)))
15214
15215 (define-public python2-relatorio
15216 (package-with-python2 python-relatorio))
15217
15218 (define-public python-radon
15219 (package
15220 (name "python-radon")
15221 (version "1.5.0")
15222 (source
15223 (origin
15224 (method url-fetch)
15225 (uri (pypi-uri "radon" version))
15226 (sha256
15227 (base32
15228 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15229 (build-system python-build-system)
15230 (propagated-inputs
15231 `(("python-colorama" ,python-colorama)
15232 ("python-flake8-polyfill" ,python-flake8-polyfill)
15233 ("python-mando" ,python-mando-0.3.1)))
15234 (native-inputs
15235 `(("python-flake8" ,python-flake8)
15236 ("python-tox" ,python-tox)
15237 ("python-pytest" ,python-pytest)
15238 ("python-paramunittest" ,python-paramunittest)))
15239 (home-page "https://radon.readthedocs.org/")
15240 (synopsis "Code Metrics in Python")
15241 (description "Radon is a Python tool which computes various code metrics.
15242 Supported metrics are:
15243 @itemize @bullet
15244 @item raw metrics: SLOC, comment lines, blank lines, &c.
15245 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15246 @item Halstead metrics (all of them)
15247 @item the Maintainability Index (a Visual Studio metric)
15248 @end itemize")
15249 (license license:expat)))
15250
15251 (define-public python2-radon
15252 (package-with-python2 python-radon))
15253
15254 (define-public python-sure
15255 (package
15256 (name "python-sure")
15257 (version "1.4.6")
15258 (source
15259 (origin
15260 (method url-fetch)
15261 (uri (pypi-uri "sure" version))
15262 (sha256
15263 (base32
15264 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15265 (build-system python-build-system)
15266 (propagated-inputs
15267 `(("python-mock" ,python-mock)
15268 ("python-six" ,python-six)))
15269 (native-inputs
15270 `(("python-nose" ,python-nose)))
15271 (home-page "https://github.com/gabrielfalcao/sure")
15272 (synopsis "Automated testing library in python for python")
15273 (description
15274 "Sure is a python library that leverages a DSL for writing assertions.
15275 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15276 (license license:gpl3+)))
15277
15278 (define-public python2-sure
15279 (package-with-python2 python-sure))
15280
15281 (define-public python2-couleur
15282 ;; This package does not seem to support python3 at all, hence,
15283 ;; only the python2 variant definition is provided.
15284 (package
15285 (name "python2-couleur")
15286 (version "0.6.2")
15287 (source
15288 (origin
15289 (method url-fetch)
15290 (uri (pypi-uri "couleur" version))
15291 (sha256
15292 (base32
15293 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15294 (build-system python-build-system)
15295 (arguments
15296 `(#:python ,python-2))
15297 (home-page "https://github.com/gabrielfalcao/couleur")
15298 (synopsis
15299 "ANSI terminal tool for python, colored shell and other handy fancy features")
15300 (description
15301 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15302 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15303 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15304 ;; https://github.com/gabrielfalcao/couleur/issues/11
15305 (license license:lgpl3+)))
15306
15307 (define-public python-misaka
15308 (package
15309 (name "python-misaka")
15310 (version "2.1.0")
15311 (source
15312 (origin
15313 (method url-fetch)
15314 (uri (pypi-uri "misaka" version))
15315 (sha256
15316 (base32
15317 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15318 (build-system python-build-system)
15319 (arguments
15320 `(;; Line 37 of setup.py calls self.run_command('develop')
15321 ;; in the 'check' phase. This command seems to be trying
15322 ;; to write to
15323 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15324 ;; for which it does not have the permission to write.
15325 #:tests? #f))
15326 (propagated-inputs
15327 `(("python-cffi" ,python-cffi)))
15328 (home-page "https://github.com/FSX/misaka")
15329 (synopsis "Python binding for Hoedown")
15330 (description
15331 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15332 library written in C. It features a fast HTML renderer and functionality to make custom
15333 renderers (e.g. man pages or LaTeX).")
15334 (license license:expat)))
15335
15336 (define-public python2-misaka
15337 (package-with-python2 python-misaka))
15338
15339 (define-public python2-steadymark
15340 ;; This is forced into being a python2 only variant
15341 ;; due to its dependence on couleur that has no support
15342 ;; for python3
15343 (package
15344 (name "python2-steadymark")
15345 (version "0.7.3")
15346 (source
15347 (origin
15348 (method url-fetch)
15349 (uri (pypi-uri "steadymark" version))
15350 (sha256
15351 (base32
15352 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15353 (build-system python-build-system)
15354 (native-inputs
15355 `(("python-couleur" ,python2-couleur)
15356 ("python-sure" ,python2-sure)
15357 ("python-misaka" ,python2-misaka)))
15358 (arguments
15359 `(#:python ,python-2
15360 #:phases
15361 (modify-phases %standard-phases
15362 (add-before 'build 'patch-setup-py
15363 (lambda _
15364 ;; Update requirements from dependency==version
15365 ;; to dependency>=version
15366 (substitute* "setup.py"
15367 (("==") ">="))
15368 #t)))))
15369 (home-page "https://github.com/gabrielfalcao/steadymark")
15370 (synopsis "Markdown-based test runner for python")
15371 (description
15372 "@code{Steadymark} allows documentation to be written in github-flavoured
15373 markdown. The documentation may contain snippets of code surrounded by python
15374 code blocks and @code{Steadymark} will find these snippets and run them, making
15375 sure that there are no old malfunctional examples in the documentation examples.")
15376 (license license:expat)))
15377
15378 (define-public python-nose-randomly
15379 (package
15380 (name "python-nose-randomly")
15381 (version "1.2.5")
15382 (source
15383 (origin
15384 (method url-fetch)
15385 (uri (pypi-uri "nose-randomly" version))
15386 (sha256
15387 (base32
15388 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15389 (build-system python-build-system)
15390 (native-inputs
15391 `(("python-nose" ,python-nose)
15392 ("python-numpy" ,python-numpy)))
15393 (home-page "https://github.com/adamchainz/nose-randomly")
15394 (synopsis
15395 "Nose plugin to randomly order tests and control random.seed")
15396 (description
15397 "This is a @code{Nose} plugin to randomly order tests which can be quite
15398 powerful in discovering hidden flaws in the tests themselves, while helping to
15399 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15400 by resetting it to a repeatable number for each test, enabling the tests to
15401 create data based on random numbers and yet remain repeatable.")
15402 (license license:bsd-3)))
15403
15404 (define-public python2-nose-randomly
15405 (package-with-python2 python-nose-randomly))
15406
15407 (define-public python-jsonpointer
15408 (package
15409 (name "python-jsonpointer")
15410 (version "1.10")
15411 (source
15412 (origin
15413 (method url-fetch)
15414 (uri (pypi-uri "jsonpointer" version))
15415 (sha256
15416 (base32
15417 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15418 (build-system python-build-system)
15419 (home-page "https://github.com/stefankoegl/python-json-pointer")
15420 (synopsis "Identify specific nodes in a JSON document")
15421 (description "@code{jsonpointer} allows you to access specific nodes
15422 by path in a JSON document (see RFC 6901).")
15423 (license license:bsd-3)))
15424
15425 (define-public python2-jsonpointer
15426 (package-with-python2 python-jsonpointer))
15427
15428 (define-public python-jsonpatch
15429 (package
15430 (name "python-jsonpatch")
15431 (version "1.16")
15432 (source
15433 (origin
15434 (method url-fetch)
15435 ;; pypi version lacks tests.js
15436 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15437 "archive/v" version ".tar.gz"))
15438 (file-name (string-append name "-" version ".tar.gz"))
15439 (sha256
15440 (base32
15441 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
15442 (build-system python-build-system)
15443 (native-inputs
15444 `(("python-jsonpointer" ,python-jsonpointer)))
15445 (home-page "https://github.com/stefankoegl/python-json-patch")
15446 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15447 (description "@code{jsonpatch} is a library and program that allows
15448 applying JSON Patches according to RFC 6902.")
15449 (license license:bsd-3)))
15450
15451 (define-public python2-jsonpatch
15452 (package-with-python2 python-jsonpatch))
15453
15454 (define-public python-jsonpatch-0.4
15455 (package (inherit python-jsonpatch)
15456 (name "python-jsonpatch")
15457 (version "0.4")
15458 (source
15459 (origin
15460 (method url-fetch)
15461 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15462 "archive/v" version ".tar.gz"))
15463 (file-name (string-append name "-" version ".tar.gz"))
15464 (sha256
15465 (base32
15466 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
15467
15468 (define-public python2-jsonpatch-0.4
15469 (package-with-python2 python-jsonpatch-0.4))
15470
15471 (define-public python-rfc3987
15472 (package
15473 (name "python-rfc3987")
15474 (version "1.3.7")
15475 (source
15476 (origin
15477 (method url-fetch)
15478 (uri (pypi-uri "rfc3987" version))
15479 (sha256
15480 (base32
15481 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15482 (build-system python-build-system)
15483 (home-page "http://pypi.python.org/pypi/rfc3987")
15484 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15485 (description "@code{rfc3987} provides routines for parsing and
15486 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15487 (license license:gpl3+)))
15488
15489 (define-public python2-rfc3987
15490 (package-with-python2 python-rfc3987))
15491
15492 (define-public python-validate-email
15493 (package
15494 (name "python-validate-email")
15495 (version "1.3")
15496 (source
15497 (origin
15498 (method url-fetch)
15499 (uri (pypi-uri "validate_email" version))
15500 (sha256
15501 (base32
15502 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15503 (build-system python-build-system)
15504 (home-page "http://github.com/syrusakbary/validate_email")
15505 (synopsis "Verifies if an email address is valid and really exists")
15506 (description "@code{validate_email} can be used to verify if an email
15507 address is valid and really exists.")
15508 (license license:lgpl3+)))
15509
15510 (define-public python2-validate-email
15511 (package-with-python2 python-validate-email))
15512
15513 (define-public python-flex
15514 (package
15515 (name "python-flex")
15516 (version "6.10.0")
15517 (source
15518 (origin
15519 (method url-fetch)
15520 (uri (pypi-uri "flex" version))
15521 (sha256
15522 (base32
15523 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15524 (build-system python-build-system)
15525 (propagated-inputs
15526 `(("python-click" ,python-click)
15527 ("python-iso8601" ,python-iso8601)
15528 ("python-jsonpointer" ,python-jsonpointer)
15529 ("python-pyyaml" ,python-pyyaml)
15530 ("python-requests" ,python-requests)
15531 ("python-rfc3987" ,python-rfc3987)
15532 ("python-six" ,python-six)
15533 ("python-validate-email" ,python-validate-email)))
15534 (home-page "https://github.com/pipermerriam/flex")
15535 (synopsis "Validates Swagger schemata")
15536 (description "@code{flex} can be used to validate Swagger schemata.")
15537 (license license:bsd-3)))
15538
15539 (define-public python2-flex
15540 (package-with-python2 python-flex))
15541
15542 (define-public python-marshmallow
15543 (package
15544 (name "python-marshmallow")
15545 (version "3.0.0b2")
15546 (source
15547 (origin
15548 (method url-fetch)
15549 (uri (pypi-uri "marshmallow" version))
15550 (sha256
15551 (base32
15552 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15553 (build-system python-build-system)
15554 (propagated-inputs
15555 `(("python-dateutil" ,python-dateutil)
15556 ("python-simplejson" ,python-simplejson)))
15557 (native-inputs
15558 `(("python-pytest-3.0" ,python-pytest-3.0)
15559 ("python-pytz" ,python-pytz)))
15560 (home-page "https://github.com/marshmallow-code/marshmallow")
15561 (synopsis "Convert complex datatypes to and from native
15562 Python datatypes.")
15563 (description "@code{marshmallow} provides a library for converting
15564 complex datatypes to and from native Python datatypes.")
15565 (license license:expat)))
15566
15567 (define-public python2-marshmallow
15568 (package-with-python2 python-marshmallow))
15569
15570 (define-public python-bottle
15571 (package
15572 (name "python-bottle")
15573 (version "0.12.13")
15574 (source
15575 (origin
15576 (method url-fetch)
15577 (uri (pypi-uri "bottle" version))
15578 (sha256
15579 (base32
15580 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15581 (build-system python-build-system)
15582 (home-page "http://bottlepy.org/")
15583 (synopsis "WSGI framework for small web-applications.")
15584 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15585 (license license:expat)))
15586
15587 (define-public python2-bottle
15588 (package-with-python2 python-bottle))
15589
15590 (define-public python-apispec
15591 (package
15592 (name "python-apispec")
15593 (version "0.22.0")
15594 (source
15595 (origin
15596 (method url-fetch)
15597 (uri (pypi-uri "apispec" version))
15598 (sha256
15599 (base32
15600 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15601 (build-system python-build-system)
15602 (propagated-inputs
15603 `(("python-pyyaml" ,python-pyyaml)))
15604 (native-inputs
15605 `(("python-pytest-3.0" ,python-pytest-3.0)
15606 ("python-flask" ,python-flask)
15607 ("python-marshmallow" ,python-marshmallow)
15608 ("python-tornado" ,python-tornado)
15609 ("python-bottle" ,python-bottle)
15610 ("python-mock" ,python-mock)))
15611 (home-page "https://github.com/marshmallow-code/apispec")
15612 (synopsis "Swagger 2.0 API specification generator")
15613 (description "@code{python-apispec} is a pluggable API specification
15614 generator. Currently supports the OpenAPI specification (f.k.a.
15615 Swagger 2.0).")
15616 (license license:expat)))
15617
15618 (define-public python2-apispec
15619 (package-with-python2 python-apispec))
15620
15621 (define-public python-flasgger
15622 (package
15623 (name "python-flasgger")
15624 (version "0.6.3")
15625 (source
15626 (origin
15627 (method url-fetch)
15628 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15629 version ".tar.gz"))
15630 (file-name (string-append name "-" version ".tar.gz"))
15631 (sha256
15632 (base32
15633 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15634 (build-system python-build-system)
15635 (arguments
15636 `(#:phases
15637 (modify-phases %standard-phases
15638 (replace 'check
15639 (lambda* (#:key inputs outputs #:allow-other-keys)
15640 (substitute* "Makefile"
15641 (("flake8 flasgger --ignore=F403")
15642 "flake8 flasgger --ignore=E731,F403"))
15643 (setenv "PYTHONPATH" (string-append (getcwd)
15644 ":"
15645 (getenv "PYTHONPATH")))
15646 (zero? (system* "py.test")))))))
15647 (propagated-inputs
15648 `(("python-flask" ,python-flask)
15649 ("python-pyyaml" ,python-pyyaml)
15650 ("python-jsonschema" ,python-jsonschema)
15651 ("python-mistune" ,python-mistune)
15652 ("python-six" ,python-six)))
15653 (native-inputs
15654 `(("python-decorator" ,python-decorator)
15655 ("python-flake8" ,python-flake8)
15656 ("python-flask-restful" ,python-flask-restful)
15657 ("python-flex" ,python-flex)
15658 ("python-pytest-3.0" ,python-pytest-3.0)
15659 ("python-pytest-cov" ,python-pytest-cov)
15660 ("python-marshmallow" ,python-marshmallow)
15661 ("python-apispec" ,python-apispec)))
15662 (home-page "https://github.com/rochacbruno/flasgger/")
15663 (synopsis "Extract Swagger specs from your Flask project")
15664 (description "@code{python-flasgger} allows extracting Swagger specs
15665 from your Flask project. It is a fork of Flask-Swagger.")
15666 (license license:expat)))
15667
15668 (define-public python2-flasgger
15669 (package-with-python2 python-flasgger))
15670
15671 (define-public python-swagger-spec-validator
15672 (package
15673 (name "python-swagger-spec-validator")
15674 (version "2.1.0")
15675 (source
15676 (origin
15677 (method url-fetch)
15678 (uri (pypi-uri "swagger-spec-validator" version))
15679 (sha256
15680 (base32
15681 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15682 (build-system python-build-system)
15683 (propagated-inputs
15684 `(("python-jsonschema" ,python-jsonschema)
15685 ("python-six" ,python-six)))
15686 (home-page
15687 "http://github.com/Yelp/swagger_spec_validator")
15688 (synopsis "Validation of Swagger specifications")
15689 (description "@code{swagger_spec_validator} provides a library for
15690 validating Swagger API specifications.")
15691 (license license:asl2.0)))
15692
15693 (define-public python2-swagger-spec-validator
15694 (package-with-python2 python-swagger-spec-validator))
15695
15696 (define-public python-apache-libcloud
15697 (package
15698 (name "python-apache-libcloud")
15699 (version "2.0.0")
15700 (source
15701 (origin
15702 (method url-fetch)
15703 (uri (pypi-uri "apache-libcloud" version))
15704 (sha256
15705 (base32
15706 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15707 (build-system python-build-system)
15708 (arguments
15709 `(#:phases
15710 (modify-phases %standard-phases
15711 (add-after 'unpack 'patch-ssh
15712 (lambda* (#:key inputs #:allow-other-keys)
15713 (substitute* "libcloud/compute/ssh.py"
15714 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15715 "/bin/ssh" "'")))
15716 #t))
15717 (add-after 'unpack 'patch-tests
15718 (lambda _
15719 (substitute* "./libcloud/test/test_file_fixtures.py"
15720 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15721 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15722 return (httplib.OK,
15723 \"1234abcd\",
15724 {\"test\": \"value\"},
15725 httplib.responses[httplib.OK])
15726 def _ascii"))
15727 (substitute* "libcloud/test/compute/test_ssh_client.py"
15728 (("class ShellOutSSHClientTests")
15729 "@unittest.skip(\"Guix container doesn't have ssh service\")
15730 class ShellOutSSHClientTests")
15731 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15732 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15733 (("'.xF0', '.x90', '.x8D', '.x88'")
15734 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15735 #t)))))
15736 (inputs
15737 `(("openssh" ,openssh)))
15738 (propagated-inputs
15739 `(("python-paramiko" ,python-paramiko)
15740 ("python-requests" ,python-requests)))
15741 (native-inputs
15742 `(("python-lockfile" ,python-lockfile)
15743 ("python-mock" ,python-mock)
15744 ("python-requests-mock" ,python-requests-mock)))
15745 (home-page "https://libcloud.apache.org/")
15746 (synopsis "Unified Cloud API")
15747 (description "@code{libcloud} is a Python library for interacting with
15748 many of the popular cloud service providers using a unified API.")
15749 (license license:asl2.0)))
15750
15751 (define-public python2-apache-libcloud
15752 (package-with-python2 python-apache-libcloud))
15753
15754 (define-public python-smmap2
15755 (package
15756 (name "python-smmap2")
15757 (version "2.0.3")
15758 (source
15759 (origin
15760 (method url-fetch)
15761 (uri (pypi-uri "smmap2" version))
15762 (sha256
15763 (base32
15764 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
15765 (build-system python-build-system)
15766 (native-inputs
15767 `(("python-nosexcover" ,python-nosexcover)))
15768 (home-page "https://github.com/Byron/smmap")
15769 (synopsis "Python sliding window memory map manager")
15770 (description "@code{smmap2} is a pure Python implementation of a sliding
15771 window memory map manager.")
15772 (license license:bsd-3)))
15773
15774 (define-public python2-smmap2
15775 (package-with-python2 python-smmap2))
15776
15777 (define-public python-regex
15778 (package
15779 (name "python-regex")
15780 (version "2017.06.07")
15781 (source (origin
15782 (method url-fetch)
15783 (uri (pypi-uri "regex" version))
15784 (sha256
15785 (base32
15786 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
15787 (build-system python-build-system)
15788 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15789 (synopsis "Alternative regular expression module")
15790 (description "This regular expression implementation is backwards-
15791 compatible with the standard @code{re} module, but offers additional
15792 functionality like full case-folding for case-insensitive matches in Unicode.")
15793 (license license:psfl)))
15794
15795 (define-public python2-regex
15796 (package-with-python2 python-regex))
15797
15798 (define-public python2-pyopengl
15799 (package
15800 (name "python2-pyopengl")
15801 (version "3.1.0")
15802 (source
15803 (origin
15804 (method url-fetch)
15805 (uri (pypi-uri "PyOpenGL" version))
15806 (sha256
15807 (base32
15808 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15809 (arguments
15810 `(#:python ,python-2))
15811 (build-system python-build-system)
15812 (home-page "http://pyopengl.sourceforge.net")
15813 (synopsis "Standard OpenGL bindings for Python")
15814 (description
15815 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15816 related APIs. The binding is created using the standard @code{ctypes}
15817 library.")
15818 (license license:bsd-3)))
15819
15820 (define-public python-rencode
15821 (package
15822 (name "python-rencode")
15823 (version "1.0.3")
15824 (source
15825 (origin
15826 (method url-fetch)
15827 (uri (pypi-uri "rencode" version))
15828 (sha256
15829 (base32
15830 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
15831 (build-system python-build-system)
15832 (native-inputs `(("pkg-config" ,pkg-config)
15833 ("python-cython", python-cython)))
15834 (home-page "https://github.com/aresch/rencode")
15835 (synopsis "Serialization of heterogeneous data structures")
15836 (description
15837 "The @code{rencode} module is a data structure serialization library,
15838 similar to @code{bencode} from the BitTorrent project. For complex,
15839 heterogeneous data structures with many small elements, r-encoding stake up
15840 significantly less space than b-encodings. This version of rencode is a
15841 complete rewrite in Cython to attempt to increase the performance over the
15842 pure Python module.")
15843 (license license:bsd-3)))
15844
15845 (define-public python2-rencode
15846 (package-with-python2 python-rencode))
15847
15848 (define-public python-flask-principal
15849 (package
15850 (name "python-flask-principal")
15851 (version "0.4.0")
15852 (source
15853 (origin
15854 (method url-fetch)
15855 (uri (pypi-uri "Flask-Principal" version))
15856 (sha256
15857 (base32
15858 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
15859 (build-system python-build-system)
15860 (propagated-inputs
15861 `(("python-blinker" ,python-blinker)))
15862 (native-inputs
15863 `(("python-flask" ,python-flask)
15864 ("python-nose" ,python-nose)))
15865 (home-page "http://packages.python.org/Flask-Principal/")
15866 (synopsis "Identity management for Flask")
15867 (description "@code{flask_principal} is a identity management library for
15868 Flask. It supports managing both authentication and authorization data in a
15869 thread-local variable.")
15870 (license license:expat)))
15871
15872 (define-public python2-flask-principal
15873 (package-with-python2 python-flask-principal))
15874
15875 (define-public python-flask-httpauth
15876 (package
15877 (name "python-flask-httpauth")
15878 (version "3.2.3")
15879 (source
15880 (origin
15881 (method url-fetch)
15882 (uri (pypi-uri "Flask-HTTPAuth" version))
15883 (sha256
15884 (base32
15885 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
15886 (build-system python-build-system)
15887 (native-inputs
15888 `(("python-flask" ,python-flask)))
15889 (home-page "http://github.com/miguelgrinberg/flask-httpauth/")
15890 (synopsis "Basic and Digest HTTP authentication for Flask routes")
15891 (description "@code{flask_httpauth} provides Basic and Digest HTTP
15892 authentication for Flask routes.")
15893 (license license:expat)))
15894
15895 (define-public python2-flask-httpauth
15896 (package-with-python2 python-flask-httpauth))