gnu: Add python-clyent.
[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 '(delete-file
348 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
349 (arguments (substitute-keyword-arguments (package-arguments python-2)
350 ((#:tests? _) #t)))
351 (native-search-paths
352 (list (search-path-specification
353 (variable "PYTHONPATH")
354 (files (list (string-append "lib/python"
355 (version-major+minor version)
356 "/site-packages"))))))))
357
358 ;; Current 3.x version.
359 (define-public python-3 python-3.5)
360
361 ;; Current major version.
362 (define-public python python-3)
363
364 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
365 ;; Python (Tk -> libxcb -> Python.)
366
367 (define-public python2-minimal
368 (package (inherit python-2)
369 (name "python-minimal")
370 (outputs '("out"))
371
372 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
373 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
374 ;; libffi.
375 (inputs `(("libffi" ,libffi)
376 ("zlib" ,zlib)))))
377
378 (define-public python-minimal
379 (package (inherit python)
380 (name "python-minimal")
381 (outputs '("out"))
382
383 ;; Build fails due to missing ctypes without libffi.
384 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
385 ;; zlib is required by 'zipimport', used by pip.
386 (inputs `(("libffi" ,libffi)
387 ("openssl" ,openssl)
388 ("zlib" ,zlib)))))
389
390 (define* (wrap-python3 python
391 #:optional
392 (name (string-append (package-name python) "-wrapper")))
393 (package (inherit python)
394 (name name)
395 (source #f)
396 (build-system trivial-build-system)
397 (outputs '("out"))
398 (inputs `(("bash" ,bash)))
399 (propagated-inputs `(("python" ,python)))
400 (arguments
401 `(#:modules ((guix build utils))
402 #:builder
403 (begin
404 (use-modules (guix build utils))
405 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
406 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
407 (mkdir-p bin)
408 (for-each
409 (lambda (old new)
410 (symlink (string-append python old)
411 (string-append bin "/" new)))
412 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
413 `("python" ,"pydoc" ,"idle" ,"pip"))
414 ;; python-config outputs search paths based upon its location,
415 ;; use a bash wrapper to avoid changing its outputs.
416 (let ((bash (string-append (assoc-ref %build-inputs "bash")
417 "/bin/bash"))
418 (old (string-append python "python3-config"))
419 (new (string-append bin "/python-config")))
420 (with-output-to-file new
421 (lambda ()
422 (format #t "#!~a~%" bash)
423 (format #t "exec \"~a\" \"$@\"~%" old)
424 (chmod new #o755)
425 #t)))))))
426 (synopsis "Wrapper for the Python 3 commands")
427 (description
428 "This package provides wrappers for the commands of Python@tie{}3.x such
429 that they can be invoked under their usual name---e.g., @command{python}
430 instead of @command{python3}.")))
431
432 (define-public python-wrapper (wrap-python3 python))
433 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
434
435 (define-public python-psutil
436 (package
437 (name "python-psutil")
438 (version "4.3.0")
439 (source
440 (origin
441 (method url-fetch)
442 (uri (pypi-uri "psutil" version))
443 (sha256
444 (base32
445 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
446 (build-system python-build-system)
447 (arguments
448 ;; FIXME: some tests does not return and times out.
449 '(#:tests? #f))
450 (home-page "https://www.github.com/giampaolo/psutil")
451 (synopsis "Library for retrieving information on running processes")
452 (description
453 "psutil (Python system and process utilities) is a library for retrieving
454 information on running processes and system utilization (CPU, memory, disks,
455 network) in Python. It is useful mainly for system monitoring, profiling and
456 limiting process resources and management of running processes. It implements
457 many functionalities offered by command line tools such as: ps, top, lsof,
458 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
459 pidof, tty, taskset, pmap.")
460 (license license:bsd-3)))
461
462 (define-public python2-psutil
463 (package-with-python2 python-psutil))
464
465 (define-public python-passlib
466 (package
467 (name "python-passlib")
468 (version "1.7.1")
469 (source
470 (origin
471 (method url-fetch)
472 (uri (pypi-uri "passlib" version))
473 (sha256
474 (base32
475 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
476 (build-system python-build-system)
477 (native-inputs
478 `(("python-nose" ,python-nose)))
479 (propagated-inputs
480 `(("python-py-bcrypt" ,python-py-bcrypt)))
481 (arguments
482 `(#:phases
483 (alist-cons-before
484 'check 'set-PYTHON_EGG_CACHE
485 ;; some tests require access to "$HOME/.cython"
486 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
487 %standard-phases)))
488 (home-page "https://bitbucket.org/ecollins/passlib")
489 (synopsis
490 "Comprehensive password hashing framework")
491 (description
492 "Passlib is a password hashing library for Python 2 & 3, which provides
493 cross-platform implementations of over 30 password hashing algorithms, as well
494 as a framework for managing existing password hashes. It's designed to be
495 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
496 to providing full-strength password hashing for multi-user application.")
497 (license license:bsd-3)))
498
499 (define-public python2-passlib
500 (package-with-python2 python-passlib))
501
502 (define-public python-py-bcrypt
503 (package
504 (name "python-py-bcrypt")
505 (version "0.4")
506 (source
507 (origin
508 (method url-fetch)
509 (uri (string-append
510 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
511 version
512 ".tar.gz"))
513 (sha256
514 (base32
515 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
516 (build-system python-build-system)
517 (home-page "https://code.google.com/p/py-bcrypt")
518 (synopsis
519 "Bcrypt password hashing and key derivation")
520 (description
521 "A python wrapper of OpenBSD's Blowfish password hashing code. This
522 system hashes passwords using a version of Bruce Schneier's Blowfish block
523 cipher with modifications designed to raise the cost of off-line password
524 cracking and frustrate fast hardware implementation. The computation cost of
525 the algorithm is parametised, so it can be increased as computers get faster.
526 The intent is to make a compromise of a password database less likely to
527 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
528 John the Ripper).")
529 ;; "sha2.c" is under BSD-3;
530 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
531 ;; the rest is under ISC.
532 (license (list license:isc license:bsd-3 license:bsd-4))))
533
534 (define-public python2-py-bcrypt
535 (package-with-python2 python-py-bcrypt))
536
537
538 (define-public python-paramiko
539 (package
540 (name "python-paramiko")
541 (version "2.1.2")
542 (source
543 (origin
544 (method url-fetch)
545 (uri (pypi-uri "paramiko" version))
546 (sha256
547 (base32
548 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
549 (build-system python-build-system)
550 (arguments
551 '(#:phases
552 (modify-phases %standard-phases
553 (replace 'check
554 (lambda _
555 (zero? (system* "python" "test.py")))))))
556 (propagated-inputs
557 `(("python-pyasn1" ,python-pyasn1)
558 ("python-cryptography" ,python-cryptography)))
559 (home-page "http://www.paramiko.org/")
560 (synopsis "SSHv2 protocol library")
561 (description "Paramiko is a python implementation of the SSHv2 protocol,
562 providing both client and server functionality. While it leverages a Python C
563 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
564 Python interface around SSH networking concepts.")
565 (license license:lgpl2.1+)))
566
567 (define-public python2-paramiko
568 (package-with-python2 python-paramiko))
569
570
571 (define-public python-httplib2
572 (package
573 (name "python-httplib2")
574 (version "0.9.2")
575 (source
576 (origin
577 (method url-fetch)
578 (uri (pypi-uri "httplib2" version))
579 (sha256
580 (base32
581 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
582 (build-system python-build-system)
583 (home-page "https://github.com/jcgregorio/httplib2")
584 (synopsis "Comprehensive HTTP client library")
585 (description
586 "A comprehensive HTTP client library supporting many features left out of
587 other HTTP libraries.")
588 (license license:expat)))
589
590 (define-public python2-httplib2
591 (package-with-python2 python-httplib2))
592
593 (define-public python-ecdsa
594 (package
595 (name "python-ecdsa")
596 (version "0.13")
597 (source
598 (origin
599 (method url-fetch)
600 (uri (string-append
601 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
602 version
603 ".tar.gz"))
604 (sha256
605 (base32
606 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
607 (build-system python-build-system)
608 (inputs
609 `(("openssl" ,openssl)))
610 (home-page
611 "https://github.com/warner/python-ecdsa")
612 (synopsis
613 "ECDSA cryptographic signature library (pure python)")
614 (description
615 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
616 Curve Digital Signature Algorithm), implemented purely in Python. With this
617 library, you can quickly create keypairs (signing key and verifying key), sign
618 messages, and verify the signatures. The keys and signatures are very short,
619 making them easy to handle and incorporate into other protocols.")
620 (license license:expat)))
621
622 (define-public python2-ecdsa
623 (package-with-python2 python-ecdsa))
624
625 (define-public python-ccm
626 (package
627 (name "python-ccm")
628 (version "2.1.6")
629 (source
630 (origin
631 (method url-fetch)
632 (uri (pypi-uri "ccm" version))
633 (sha256
634 (base32
635 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
636 (build-system python-build-system)
637 (propagated-inputs
638 `(("python-pyyaml" ,python-pyyaml)
639 ;; Not listed in setup.py, but used in ccmlib/node.py for full
640 ;; functionality
641 ("python-psutil" ,python-psutil)
642 ("python-six" ,python-six)))
643 (home-page "https://github.com/pcmanus/ccm")
644 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
645 localhost")
646 (description "Cassandra Cluster Manager is a development tool for testing
647 local Cassandra clusters. It creates, launches and removes Cassandra clusters
648 on localhost.")
649 (license license:asl2.0)))
650
651 (define-public python2-ccm
652 (package-with-python2 python-ccm))
653
654 (define-public python-pytz
655 (package
656 (name "python-pytz")
657 (version "2017.2")
658 (source
659 (origin
660 (method url-fetch)
661 (uri (pypi-uri "pytz" version ".zip"))
662 (sha256
663 (base32
664 "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m"))))
665 (build-system python-build-system)
666 (native-inputs
667 `(("unzip" ,unzip)))
668 (home-page "http://pythonhosted.org/pytz")
669 (synopsis "Python timezone library")
670 (description "This library brings the Olson tz database into Python. It
671 allows accurate and cross platform timezone calculations using Python 2.4 or
672 higher. It also solves the issue of ambiguous times at the end of daylight
673 saving time. Almost all of the Olson timezones are supported.")
674 (license license:expat)))
675
676 (define-public python2-pytz
677 (package-with-python2 python-pytz))
678
679 (define-public python-clyent
680 (package
681 (name "python-clyent")
682 (version "1.2.1")
683 (source
684 (origin
685 (method url-fetch)
686 (uri (pypi-uri "clyent" version))
687 (sha256
688 (base32
689 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
690 (build-system python-build-system)
691 (native-inputs
692 `(("python-mock" ,python-mock)))
693 (home-page "https://github.com/binstar/clyent")
694 (synopsis "Command line client library")
695 (description "Clyent is a Python command line utiliy library. It is used
696 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
697 (license license:bsd-3)))
698
699 (define-public python2-clyent
700 (package-with-python2 python-clyent))
701
702 (define-public python-babel
703 (package
704 (name "python-babel")
705 (version "2.3.4")
706 (source
707 (origin
708 (method url-fetch)
709 (uri (pypi-uri "Babel" version))
710 (sha256
711 (base32
712 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
713 (build-system python-build-system)
714 (propagated-inputs
715 `(("python-pytz" ,python-pytz)))
716 (arguments `(#:tests? #f)) ; no test target
717 (home-page "http://babel.pocoo.org/")
718 (synopsis
719 "Tools for internationalizing Python applications")
720 (description
721 "Babel is composed of two major parts:
722 - tools to build and work with gettext message catalogs
723 - a Python interface to the CLDR (Common Locale Data Repository), providing
724 access to various locale display names, localized number and date formatting,
725 etc. ")
726 (license license:bsd-3)))
727
728 (define-public python2-babel
729 (package-with-python2 python-babel))
730
731 (define-public python2-backport-ssl-match-hostname
732 (package
733 (name "python2-backport-ssl-match-hostname")
734 (version "3.5.0.1")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (string-append
739 "https://pypi.python.org/packages/source/b/"
740 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
741 version ".tar.gz"))
742 (sha256
743 (base32
744 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
745 (build-system python-build-system)
746 (arguments
747 `(#:python ,python-2
748 #:tests? #f)) ; no test target
749 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
750 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
751 (description
752 "This backport brings the ssl.match_hostname() function to users of
753 earlier versions of Python. The function checks the hostname in the
754 certificate returned by the server to which a connection has been established,
755 and verifies that it matches the intended target hostname.")
756 (license license:psfl)))
757
758 (define-public python-hdf4
759 (package
760 (name "python-hdf4")
761 (version "0.9")
762 (source
763 (origin
764 (method url-fetch)
765 (uri (pypi-uri name version))
766 (sha256
767 (base32
768 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
769 (build-system python-build-system)
770 (native-inputs `(("nose" ,python-nose)))
771 (propagated-inputs `(("numpy" ,python-numpy)))
772 (inputs
773 `(("hdf4" ,hdf4)
774 ("libjpeg" ,libjpeg)
775 ("zlib" ,zlib)))
776 (arguments
777 `(#:phases
778 (modify-phases %standard-phases
779 (replace 'check
780 (lambda _
781 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
782 ;; on to import numpy. Somehow this works on their CI system.
783 ;; Let's just manage PYTHONPATH here instead.
784 (substitute* "runexamples.sh"
785 (("export PYTHONPATH=.*") ""))
786 (setenv "PYTHONPATH"
787 (string-append (getcwd) ":"
788 (getenv "PYTHONPATH")))
789 (and (zero? (system* "./runexamples.sh"))
790 (zero? (system* "nosetests" "-v"))))))))
791 (home-page "https://github.com/fhs/python-hdf4")
792 (synopsis "Python interface to the NCSA HDF4 library")
793 (description
794 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
795 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
796 NetCDF files can also be read and modified. Python-HDF4 is a fork of
797 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
798 (license license:expat)))
799
800 (define-public python2-hdf4
801 (package-with-python2 python-hdf4))
802
803 (define-public python-h5py
804 (package
805 (name "python-h5py")
806 (version "2.6.0")
807 (source
808 (origin
809 (method url-fetch)
810 (uri (pypi-uri "h5py" version))
811 (sha256
812 (base32
813 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
814 (build-system python-build-system)
815 (arguments
816 `(#:tests? #f ; no test target
817 #:phases
818 (modify-phases %standard-phases
819 (add-after 'unpack 'fix-hdf5-paths
820 (lambda* (#:key inputs #:allow-other-keys)
821 (let ((prefix (assoc-ref inputs "hdf5")))
822 (substitute* "setup_build.py"
823 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
824 (string-append "['" prefix "/lib" "']"))
825 (("'/opt/local/include', '/usr/local/include'")
826 (string-append "'" prefix "/include" "'")))
827 (substitute* "setup_configure.py"
828 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
829 (string-append "['" prefix "/lib" "']")))
830 #t))))))
831 (propagated-inputs
832 `(("python-six" ,python-six)
833 ("python-numpy" ,python-numpy)))
834 (inputs
835 `(("hdf5" ,hdf5)))
836 (native-inputs
837 `(("python-cython" ,python-cython)
838 ("python-pkgconfig" ,python-pkgconfig)))
839 (home-page "http://www.h5py.org/")
840 (synopsis "Read and write HDF5 files from Python")
841 (description
842 "The h5py package provides both a high- and low-level interface to the
843 HDF5 library from Python. The low-level interface is intended to be a
844 complete wrapping of the HDF5 API, while the high-level component supports
845 access to HDF5 files, datasets and groups using established Python and NumPy
846 concepts.")
847 (license license:bsd-3)))
848
849 (define-public python2-h5py
850 (package-with-python2 python-h5py))
851
852 (define-public python-netcdf4
853 (package
854 (name "python-netcdf4")
855 (version "1.2.7")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (pypi-uri "netCDF4" version))
860 (sha256
861 (base32
862 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
863 (build-system python-build-system)
864 (native-inputs
865 `(("python-cython" ,python-cython)))
866 (propagated-inputs
867 `(("python-numpy" ,python-numpy)))
868 (inputs
869 `(("netcdf" ,netcdf)
870 ("hdf4" ,hdf4)
871 ("hdf5" ,hdf5)))
872 (arguments
873 '(#:phases
874 (modify-phases %standard-phases
875 (replace 'check
876 (lambda _
877 (setenv "NO_NET" "1") ; disable opendap tests
878 (with-directory-excursion "test"
879 (setenv "PYTHONPATH" ; find and add the library we just built
880 (string-append
881 (car (find-files "../build" "lib.*"
882 #:directories? #:t
883 #:fail-on-error? #:t))
884 ":" (getenv "PYTHONPATH")))
885 (zero? (system* "python" "run_all.py"))))))))
886 (home-page
887 "https://github.com/Unidata/netcdf4-python")
888 (synopsis "Python/numpy interface to the netCDF library")
889 (description "Netcdf4-python is a Python interface to the netCDF C
890 library. netCDF version 4 has many features not found in earlier
891 versions of the library and is implemented on top of HDF5. This module
892 can read and write files in both the new netCDF 4 and the old netCDF 3
893 format, and can create files that are readable by HDF5 clients. The
894 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
895 to users of that module.")
896 ;; The software is mainly ISC, but includes some files covered
897 ;; by the Expat license.
898 (license (list license:isc license:expat))))
899
900 (define-public python2-netcdf4
901 (package-with-python2 python-netcdf4))
902
903 (define-public python-lockfile
904 (package
905 (name "python-lockfile")
906 (version "0.12.2")
907 (source
908 (origin
909 (method url-fetch)
910 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
911 "lockfile-" version ".tar.gz"))
912 (sha256
913 (base32
914 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
915 (build-system python-build-system)
916 (arguments '(#:test-target "check"))
917 (native-inputs
918 `(("python-pbr" ,python-pbr)))
919 (home-page "https://launchpad.net/pylockfile")
920 (synopsis "Platform-independent file locking module")
921 (description
922 "The lockfile package exports a LockFile class which provides a simple
923 API for locking files.")
924 (license license:expat)))
925
926 (define-public python2-lockfile
927 (package-with-python2 python-lockfile))
928
929 (define-public python-mock
930 (package
931 (name "python-mock")
932 (version "1.0.1")
933 (source
934 (origin
935 (method url-fetch)
936 (uri (pypi-uri "mock" version))
937 (sha256
938 (base32
939 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
940 (build-system python-build-system)
941 (arguments '(#:test-target "check"))
942 (home-page "https://github.com/testing-cabal/mock")
943 (synopsis "Python mocking and patching library for testing")
944 (description
945 "Mock is a library for testing in Python. It allows you to replace parts
946 of your system under test with mock objects and make assertions about how they
947 have been used.")
948 (license license:expat)))
949
950 (define-public python2-mock
951 (package-with-python2 python-mock))
952
953 ;;; Some packages (notably, certbot and python-acme) rely on this newer version
954 ;;; of python-mock. However, a large number of packages fail to build with
955 ;;; mock@2, so we add a new variable for now. Also, there may be a dependency
956 ;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
957 (define-public python-mock-2
958 (package
959 (inherit python-mock)
960 (version "2.0.0")
961 (source
962 (origin
963 (method url-fetch)
964 (uri (pypi-uri "mock" version))
965 (sha256
966 (base32
967 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
968 (propagated-inputs
969 `(("python-pbr" ,python-pbr-minimal)
970 ,@(package-propagated-inputs python-mock)))))
971
972 (define-public python-setuptools
973 (package
974 (name "python-setuptools")
975 (version "31.0.0")
976 (source
977 (origin
978 (method url-fetch)
979 (uri (pypi-uri "setuptools" version))
980 (sha256
981 (base32
982 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
983 (modules '((guix build utils)))
984 (snippet
985 '(begin
986 ;; Remove included binaries which are used to build self-extracting
987 ;; installers for Windows.
988 ;; TODO: Find some way to build them ourself so we can include them.
989 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
990 #t))))
991 (build-system python-build-system)
992 ;; FIXME: Tests require pytest, which itself relies on setuptools.
993 ;; One could bootstrap with an internal untested setuptools.
994 (arguments
995 `(#:tests? #f))
996 (home-page "https://pypi.python.org/pypi/setuptools")
997 (synopsis
998 "Library designed to facilitate packaging Python projects")
999 (description
1000 "Setuptools is a fully-featured, stable library designed to facilitate
1001 packaging Python projects, where packaging includes:
1002 Python package and module definitions,
1003 distribution package metadata,
1004 test hooks,
1005 project installation,
1006 platform-specific details,
1007 Python 3 support.")
1008 ;; TODO: setuptools now bundles the following libraries:
1009 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1010 (license (list license:psfl ; setuptools itself
1011 license:expat ; six, appdirs, pyparsing
1012 license:asl2.0 ; packaging is dual ASL2/BSD-2
1013 license:bsd-2))))
1014
1015 (define-public python2-setuptools
1016 (package-with-python2 python-setuptools))
1017
1018 (define-public python-uniseg
1019 (package
1020 (name "python-uniseg")
1021 (version "0.7.1")
1022 (source
1023 (origin
1024 (method url-fetch)
1025 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1026 "get/rel-" version ".tar.gz"))
1027 (file-name (string-append name "-" version ".tar.gz"))
1028 (sha256
1029 (base32
1030 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1031 (build-system python-build-system)
1032 (arguments
1033 '(#:tests? #f)) ; The test suite requires network access.
1034 (home-page
1035 "https://bitbucket.org/emptypage/uniseg-python")
1036 (synopsis
1037 "Python library to determine Unicode text segmentations")
1038 (description
1039 "Uniseg is a Python package used to determine Unicode text segmentations.
1040 Supported segmentations include:
1041 @enumerate
1042 @item @dfn{Code point} (any value in the Unicode codespace)
1043 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1044 multiple Unicode code points, e.g. \"G\" + acute-accent)
1045 @item Word break
1046 @item Sentence break
1047 @item Line break
1048 @end enumerate")
1049 (license license:expat)))
1050
1051 (define-public python2-uniseg
1052 (package-with-python2 python-uniseg))
1053
1054 ;;; Pycrypto is abandoned upstream:
1055 ;;;
1056 ;;; https://github.com/dlitz/pycrypto/issues/173
1057 ;;;
1058 ;;; TODO Remove this package from GNU Guix.
1059 (define-public python-pycrypto
1060 (package
1061 (name "python-pycrypto")
1062 (version "2.6.1")
1063 (source
1064 (origin
1065 (method url-fetch)
1066 (uri (pypi-uri "pycrypto" version))
1067 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
1068 (sha256
1069 (base32
1070 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1071 (build-system python-build-system)
1072 (inputs
1073 `(("python" ,python)
1074 ("gmp" ,gmp)))
1075 (arguments
1076 `(#:phases
1077 (alist-cons-before
1078 'build 'set-build-env
1079 ;; pycrypto runs an autoconf configure script behind the scenes
1080 (lambda _
1081 (setenv "CONFIG_SHELL" (which "bash")))
1082 %standard-phases)))
1083 (home-page "http://www.pycrypto.org/")
1084 (synopsis "Cryptographic modules for Python")
1085 (description
1086 "Pycrypto is a collection of both secure hash functions (such as SHA256
1087 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1088 etc.). The package is structured to make adding new modules easy.")
1089 (license license:public-domain)))
1090
1091 (define-public python2-pycrypto
1092 (let ((pycrypto (package-with-python2 python-pycrypto)))
1093 (package (inherit pycrypto)
1094 (inputs
1095 `(("python" ,python-2)
1096 ,@(alist-delete
1097 "python"
1098 (package-inputs pycrypto)))))))
1099
1100 (define-public python-eventlet
1101 (package
1102 (name "python-eventlet")
1103 (version "0.20.1")
1104 (source
1105 (origin
1106 (method url-fetch)
1107 (uri (pypi-uri "eventlet" version))
1108 (sha256
1109 (base32
1110 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1111 (build-system python-build-system)
1112 (propagated-inputs
1113 `(("python-greenlet" ,python-greenlet)))
1114 (arguments
1115 ;; TODO: Requires unpackaged 'enum-compat'.
1116 '(#:tests? #f))
1117 (home-page "http://eventlet.net")
1118 (synopsis "Concurrent networking library for Python")
1119 (description
1120 "Eventlet is a concurrent networking library for Python that
1121 allows you to change how you run your code, not how you write it.
1122 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1123 Coroutines ensure that the developer uses a blocking style of programming
1124 that is similar to threading, but provide the benefits of non-blocking I/O.
1125 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1126 from the Python interpreter, or as a small part of a larger application.")
1127 (license license:expat)))
1128
1129 (define-public python2-eventlet
1130 (let ((base (package-with-python2
1131 (strip-python2-variant python-eventlet))))
1132 (package (inherit base)
1133 (propagated-inputs
1134 `(("python2-enum34" ,python2-enum34)
1135 ,@(package-propagated-inputs base))))))
1136
1137 (define-public python-keyring
1138 (package
1139 (name "python-keyring")
1140 (version "8.7")
1141 (source
1142 (origin
1143 (method url-fetch)
1144 (uri (pypi-uri "keyring" version))
1145 (sha256
1146 (base32
1147 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1148 (build-system python-build-system)
1149 (native-inputs
1150 `(("python-setuptools-scm" ,python-setuptools-scm)))
1151 (propagated-inputs
1152 `(("python-pycrypto" ,python-pycrypto)))
1153 (arguments
1154 `(#:tests? #f)) ;TODO: tests require pytest
1155 (home-page "https://github.com/jaraco/keyring")
1156 (synopsis "Store and access your passwords safely")
1157 (description
1158 "The Python keyring lib provides a easy way to access the system keyring
1159 service from python. It can be used in any application that needs safe
1160 password storage.")
1161 ;; "MIT" and PSF dual license
1162 (license license:x11)))
1163
1164 (define-public python2-keyring
1165 (package-with-python2 python-keyring))
1166
1167 (define-public python-six
1168 (package
1169 (name "python-six")
1170 (version "1.10.0")
1171 (source
1172 (origin
1173 (method url-fetch)
1174 (uri (pypi-uri "six" version))
1175 (sha256
1176 (base32
1177 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1178 (build-system python-build-system)
1179 (native-inputs
1180 `(("python-py" ,python-py)
1181 ("python-pytest" ,python-pytest)))
1182 (home-page "http://pypi.python.org/pypi/six/")
1183 (synopsis "Python 2 and 3 compatibility utilities")
1184 (description
1185 "Six is a Python 2 and 3 compatibility library. It provides utility
1186 functions for smoothing over the differences between the Python versions with
1187 the goal of writing Python code that is compatible on both Python versions.
1188 Six supports every Python version since 2.5. It is contained in only one
1189 Python file, so it can be easily copied into your project.")
1190 (license license:x11)))
1191
1192 (define-public python2-six
1193 (package-with-python2 python-six))
1194
1195 (define-public python-dateutil
1196 (package
1197 (name "python-dateutil")
1198 (version "2.6.0")
1199 (source
1200 (origin
1201 (method url-fetch)
1202 (uri (pypi-uri "python-dateutil" version))
1203 (sha256
1204 (base32
1205 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1206 (build-system python-build-system)
1207 (propagated-inputs
1208 `(("python-six" ,python-six)))
1209 (home-page "https://dateutil.readthedocs.io/en/stable/")
1210 (synopsis "Extensions to the standard datetime module")
1211 (description
1212 "The dateutil module provides powerful extensions to the standard
1213 datetime module, available in Python 2.3+.")
1214 (license license:bsd-3)))
1215
1216 (define-public python2-dateutil
1217 (package-with-python2 python-dateutil))
1218
1219 (define-public python-parsedatetime
1220 (package
1221 (name "python-parsedatetime")
1222 (version "2.4")
1223 (source
1224 (origin
1225 (method url-fetch)
1226 (uri (pypi-uri "parsedatetime" version))
1227 (sha256
1228 (base32
1229 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
1230 (build-system python-build-system)
1231 (native-inputs
1232 `(("python-nose" ,python-nose)
1233 ("python-pyicu" ,python-pyicu)
1234 ("python-pytest" ,python-pytest)
1235 ("python-pytest-runner" ,python-pytest-runner)))
1236 (propagated-inputs
1237 `(("python-future" ,python-future)))
1238 (home-page "https://github.com/bear/parsedatetime/")
1239 (synopsis
1240 "Parse human-readable date/time text")
1241 (description
1242 "Parse human-readable date/time text.")
1243 (license license:asl2.0)))
1244
1245 (define-public python2-parsedatetime
1246 (package-with-python2 python-parsedatetime))
1247
1248 (define-public python-pandas
1249 (package
1250 (name "python-pandas")
1251 (version "0.19.2")
1252 (source
1253 (origin
1254 (method url-fetch)
1255 (uri (pypi-uri "pandas" version))
1256 (sha256
1257 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1258 (patches
1259 (search-patches "python-pandas-skip-failing-tests.patch"))))
1260 (build-system python-build-system)
1261 (propagated-inputs
1262 `(("python-numpy" ,python-numpy)
1263 ("python-pytz" ,python-pytz)
1264 ("python-dateutil" ,python-dateutil)))
1265 (native-inputs
1266 `(("python-nose" ,python-nose)
1267 ("python-cython" ,python-cython)))
1268 (home-page "http://pandas.pydata.org")
1269 (synopsis "Data structures for data analysis, time series, and statistics")
1270 (description
1271 "Pandas is a Python package providing fast, flexible, and expressive data
1272 structures designed to make working with structured (tabular,
1273 multidimensional, potentially heterogeneous) and time series data both easy
1274 and intuitive. It aims to be the fundamental high-level building block for
1275 doing practical, real world data analysis in Python.")
1276 (license license:bsd-3)))
1277
1278 (define-public python2-pandas
1279 (package-with-python2 python-pandas))
1280
1281 (define-public python-tzlocal
1282 (package
1283 (name "python-tzlocal")
1284 (version "1.2.2")
1285 (source
1286 (origin
1287 (method url-fetch)
1288 (uri (pypi-uri "tzlocal" version))
1289 (sha256
1290 (base32
1291 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1292 (build-system python-build-system)
1293 (propagated-inputs
1294 `(("python-pytz" ,python-pytz)))
1295 (home-page "https://github.com/regebro/tzlocal")
1296 (synopsis
1297 "Local timezone information for Python")
1298 (description
1299 "Tzlocal returns a tzinfo object with the local timezone information.
1300 This module attempts to fix a glaring hole in pytz, that there is no way to
1301 get the local timezone information, unless you know the zoneinfo name, and
1302 under several distributions that's hard or impossible to figure out.")
1303 (license license:cc0)))
1304
1305 (define-public python2-pysqlite
1306 (package
1307 (name "python2-pysqlite")
1308 (version "2.8.3")
1309 (source
1310 (origin
1311 (method url-fetch)
1312 (uri (pypi-uri "pysqlite" version))
1313 (sha256
1314 (base32
1315 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1316 (build-system python-build-system)
1317 (inputs
1318 `(("sqlite" ,sqlite)))
1319 (arguments
1320 `(#:python ,python-2 ; incompatible with Python 3
1321 #:tests? #f)) ; no test target
1322 (home-page "https://github.com/ghaering/pysqlite")
1323 (synopsis "SQLite bindings for Python")
1324 (description
1325 "Pysqlite provides SQLite bindings for Python that comply to the
1326 Database API 2.0T.")
1327 (license license:zlib)))
1328
1329
1330 (define-public python2-mechanize
1331 (package
1332 (name "python2-mechanize")
1333 (version "0.2.5")
1334 (source
1335 (origin
1336 (method url-fetch)
1337 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1338 version ".tar.gz"))
1339 (sha256
1340 (base32
1341 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1342 (build-system python-build-system)
1343 (arguments
1344 `(#:python ,python-2 ; apparently incompatible with Python 3
1345 #:tests? #f))
1346 ;; test fails with message
1347 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1348 ;; (python-3.3.2) or
1349 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1350 ;; (python-2.7.5).
1351 ;; The source code is from March 2011 and probably not up-to-date
1352 ;; with respect to python unit tests.
1353 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1354 (synopsis
1355 "Stateful programmatic web browsing in Python")
1356 (description
1357 "Mechanize implements stateful programmatic web browsing in Python,
1358 after Andy Lester’s Perl module WWW::Mechanize.")
1359 (license (license:non-copyleft
1360 "file://COPYING"
1361 "See COPYING in the distribution."))))
1362
1363
1364 (define-public python-simplejson
1365 (package
1366 (name "python-simplejson")
1367 (version "3.10.0")
1368 (source
1369 (origin
1370 (method url-fetch)
1371 (uri (pypi-uri "simplejson" version))
1372 (sha256
1373 (base32
1374 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1375 (build-system python-build-system)
1376 (home-page "http://simplejson.readthedocs.org/en/latest/")
1377 (synopsis
1378 "Json library for Python")
1379 (description
1380 "JSON (JavaScript Object Notation) is a subset of JavaScript
1381 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1382 format.
1383
1384 Simplejson exposes an API familiar to users of the standard library marshal
1385 and pickle modules. It is the externally maintained version of the json
1386 library contained in Python 2.6, but maintains compatibility with Python 2.5
1387 and (currently) has significant performance advantages, even without using
1388 the optional C extension for speedups. Simplejson is also supported on
1389 Python 3.3+.")
1390 (license license:x11)))
1391
1392 (define-public python2-simplejson
1393 (package-with-python2 python-simplejson))
1394
1395
1396 (define-public python-pyicu
1397 (package
1398 (name "python-pyicu")
1399 (version "1.9.5")
1400 (source
1401 (origin
1402 (method url-fetch)
1403 (uri (pypi-uri "PyICU" version))
1404 (sha256
1405 (base32
1406 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1407 (build-system python-build-system)
1408 (arguments
1409 '(#:phases
1410 (modify-phases %standard-phases
1411 (add-before 'check 'delete-failing-test
1412 (lambda _
1413 ;; XXX: These tests require locales that are unavailable
1414 ;; in the build environment.
1415 (delete-file "test/test_DateTimeParserGenerator.py")
1416 #t)))))
1417 (inputs
1418 `(("icu4c" ,icu4c)))
1419 (home-page "http://pyicu.osafoundation.org/")
1420 (synopsis "Python extension wrapping the ICU C++ API")
1421 (description
1422 "PyICU is a python extension wrapping the ICU C++ API.")
1423 (license license:x11)))
1424
1425 (define-public python2-pyicu
1426 (package-with-python2 python-pyicu))
1427
1428 (define-public python2-dogtail
1429 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1430 ;; spaces in indentation" with Python 3.
1431 (package
1432 (name "python2-dogtail")
1433 (version "0.9.9")
1434 (source (origin
1435 (method url-fetch)
1436 (uri (pypi-uri "dogtail" version))
1437 (sha256
1438 (base32
1439 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1440 (build-system python-build-system)
1441 (arguments `(#:python ,python-2
1442 #:tests? #f)) ; invalid command "test"
1443 ;; Currently no offical homepage.
1444 (home-page "https://pypi.python.org/pypi/dogtail/")
1445 (synopsis "GUI test tool and automation framework written in Python")
1446 (description
1447 "Dogtail is a GUI test tool and automation framework written in Python.
1448 It uses Accessibility (a11y) technologies to communicate with desktop
1449 applications. dogtail scripts are written in Python and executed like any
1450 other Python program.")
1451 (license license:gpl2+)))
1452
1453 (define-public python2-empy
1454 (package
1455 (name "python2-empy")
1456 (version "3.3")
1457 (source (origin
1458 (method url-fetch)
1459 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1460 version ".tar.gz"))
1461 (sha256
1462 (base32
1463 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1464 (build-system python-build-system)
1465 (arguments
1466 `(#:python ,python-2
1467 #:phases (alist-replace
1468 'check
1469 (lambda _
1470 (zero? (system* "./test.sh")))
1471 %standard-phases)))
1472 (home-page "http://www.alcyone.com/software/empy/")
1473 (synopsis "Templating system for Python")
1474 (description
1475 "EmPy is a system for embedding Python expressions and statements in
1476 template text; it takes an EmPy source file, processes it, and produces
1477 output. This is accomplished via expansions, which are special signals to the
1478 EmPy system and are set off by a special prefix (by default the at sign, @@).
1479 EmPy can expand arbitrary Python expressions and statements in this way, as
1480 well as a variety of special forms. Textual data not explicitly delimited in
1481 this way is sent unaffected to the output, allowing Python to be used in
1482 effect as a markup language. Also supported are callbacks via hooks,
1483 recording and playback via diversions, and dynamic, chainable filters. The
1484 system is highly configurable via command line options and embedded
1485 commands.")
1486 (license license:lgpl2.1+)))
1487
1488 (define-public python2-element-tree
1489 (package
1490 (name "python2-element-tree")
1491 (version "1.2.6")
1492 (source (origin
1493 (method url-fetch)
1494 (uri (string-append
1495 "http://effbot.org/media/downloads/elementtree-"
1496 version "-20050316.tar.gz"))
1497 (sha256
1498 (base32
1499 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1500 (build-system python-build-system)
1501 (arguments
1502 `(#:python ,python-2 ; seems to be part of Python 3
1503 #:tests? #f)) ; no 'test' sub-command
1504 (synopsis "Toolkit for XML processing in Python")
1505 (description
1506 "ElementTree is a Python library supporting lightweight XML processing.")
1507 (home-page "http://effbot.org/zone/element-index.htm")
1508 (license (license:x11-style
1509 "http://docs.python.org/2/license.html"
1510 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1511
1512 (define-public python2-pybugz
1513 (package
1514 (name "python2-pybugz")
1515 (version "0.6.11")
1516 (source (origin
1517 (method url-fetch)
1518 (uri (string-append
1519 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1520 version ".tar.gz"))
1521 (sha256
1522 (base32
1523 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1524 (patches (search-patches "pybugz-stty.patch"
1525 "pybugz-encode-error.patch"))))
1526 (build-system python-build-system)
1527 (arguments
1528 `(#:python ,python-2 ; SyntaxError with Python 3
1529 #:tests? #f)) ; no 'test' sub-command
1530 (propagated-inputs
1531 `(("element-tree" ,python2-element-tree)))
1532 (synopsis "Python and command-line interface to Bugzilla")
1533 (description
1534 "PyBugz is a Python library and command-line tool to query the Bugzilla
1535 bug tracking system. It is meant as an aid to speed up interaction with the
1536 bug tracker.")
1537 (home-page "http://www.liquidx.net/pybugz/")
1538 (license license:gpl2)))
1539
1540 (define-public python-enum34
1541 (package
1542 (name "python-enum34")
1543 (version "1.1.6")
1544 (source
1545 (origin
1546 (method url-fetch)
1547 (uri (pypi-uri "enum34" version))
1548 (sha256
1549 (base32
1550 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1551 (build-system python-build-system)
1552 (home-page "https://pypi.python.org/pypi/enum34")
1553 (synopsis "Backported Python 3.4 Enum")
1554 (description
1555 "Enum34 is the new Python stdlib enum module available in Python 3.4
1556 backported for previous versions of Python from 2.4 to 3.3.")
1557 (license license:bsd-3)))
1558
1559 (define-public python2-enum34
1560 (package-with-python2 python-enum34))
1561
1562 (define-public python-parse-type
1563 (package
1564 (name "python-parse-type")
1565 (version "0.3.4")
1566 (source
1567 (origin
1568 (method url-fetch)
1569 (uri (string-append "https://pypi.python.org/packages/source/p/"
1570 "parse_type/parse_type-" version ".tar.gz"))
1571 (sha256
1572 (base32
1573 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1574 (build-system python-build-system)
1575 (arguments
1576 `(#:phases
1577 (modify-phases %standard-phases
1578 (add-after 'unpack 'patch-tests
1579 (lambda _
1580 (substitute* "tests/test_parse_type_parse.py"
1581 ;; Newer Python versions don't have the problem this test tests.
1582 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1583 ""))
1584 #t)))))
1585 (propagated-inputs
1586 `(("python-six" ,python-six)
1587 ("python-parse" ,python-parse)))
1588 (native-inputs
1589 `(("python-pytest" ,python-pytest)
1590 ("python-pytest-runner" ,python-pytest-runner)))
1591 (home-page "https://github.com/jenisys/parse_type")
1592 (synopsis "Extended parse module")
1593 (description
1594 "Parse_type extends the python parse module.")
1595 (properties
1596 `((python2-variant . ,(delay python2-parse-type))))
1597 (license license:bsd-3)))
1598
1599 (define-public python2-parse-type
1600 (let ((base (package-with-python2
1601 (strip-python2-variant python-parse-type))))
1602 (package (inherit base)
1603 (propagated-inputs
1604 `(("python2-enum34" ,python2-enum34)
1605 ,@(package-propagated-inputs base))))))
1606
1607 (define-public python-parse
1608 (package
1609 (name "python-parse")
1610 (version "1.6.6")
1611 (source
1612 (origin
1613 (method url-fetch)
1614 (uri (pypi-uri "parse" version))
1615 (sha256
1616 (base32
1617 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1618 (patches (search-patches "python-parse-too-many-fields.patch"))))
1619 (build-system python-build-system)
1620 (arguments
1621 `(#:phases
1622 (modify-phases %standard-phases
1623 (replace 'check
1624 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1625 (home-page "https://github.com/r1chardj0n3s/parse")
1626 (synopsis "Parse strings")
1627 (description
1628 "Parse strings using a specification based on the Python format()
1629 syntax.")
1630 (license license:x11)))
1631
1632 (define-public python-polib
1633 (package
1634 (name "python-polib")
1635 (version "1.0.8")
1636 (source (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "polib" version))
1639 (sha256
1640 (base32
1641 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1642 (build-system python-build-system)
1643 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1644 (synopsis "Manipulate, create and modify gettext files")
1645 (description "Polib can manipulate any gettext format (po, pot and mo)
1646 files. It can be used to create po files from scratch or to modify
1647 existing ones.")
1648 (license license:expat)))
1649
1650 (define-public python2-polib
1651 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1652 (package
1653 (inherit base)
1654 (arguments `(,@(package-arguments base)
1655 ;; Tests don't work with python2.
1656 #:tests? #f)))))
1657
1658 (define-public scons
1659 (package
1660 (name "scons")
1661 (version "2.5.1")
1662 (source (origin
1663 (method url-fetch)
1664 (uri (string-append "mirror://sourceforge/scons/scons/" version
1665 "/scons-" version ".tar.gz"))
1666 (sha256
1667 (base32
1668 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1669 (build-system python-build-system)
1670 (arguments
1671 ;; With Python 3.x, fails to build with a syntax error.
1672 `(#:python ,python-2
1673 #:use-setuptools? #f ; still relies on distutils
1674 #:tests? #f)) ; no 'python setup.py test' command
1675 (home-page "http://scons.org/")
1676 (synopsis "Software construction tool written in Python")
1677 (description
1678 "SCons is a software construction tool. Think of SCons as an improved,
1679 cross-platform substitute for the classic Make utility with integrated
1680 functionality similar to autoconf/automake and compiler caches such as ccache.
1681 In short, SCons is an easier, more reliable and faster way to build
1682 software.")
1683 (license license:x11)))
1684
1685 (define-public python-extras
1686 (package
1687 (name "python-extras")
1688 (version "0.0.3")
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri (string-append
1693 "https://pypi.python.org/packages/source/e/extras/extras-"
1694 version ".tar.gz"))
1695 (sha256
1696 (base32
1697 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1698 (build-system python-build-system)
1699 (arguments
1700 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1701 '(#:tests? #f))
1702 (home-page "https://github.com/testing-cabal/extras")
1703 (synopsis "Useful extensions to the Python standard library")
1704 (description
1705 "Extras is a set of extensions to the Python standard library.")
1706 (license license:expat)))
1707
1708 (define-public python2-extras
1709 (package-with-python2 python-extras))
1710
1711 (define-public python-mimeparse
1712 (package
1713 (name "python-mimeparse")
1714 (version "0.1.4")
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (string-append
1719 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1720 version ".tar.gz"))
1721 (sha256
1722 (base32
1723 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1724 (build-system python-build-system)
1725 (arguments
1726 '(#:tests? #f)) ; no setup.py test command
1727 (home-page
1728 "https://github.com/dbtsai/python-mimeparse")
1729 (synopsis "Python library for parsing MIME types")
1730 (description
1731 "Mimeparse provides basic functions for parsing MIME type names and
1732 matching them against a list of media-ranges.")
1733 (license license:expat)))
1734
1735 (define-public python2-mimeparse
1736 (package-with-python2 python-mimeparse))
1737
1738 (define-public python-nose
1739 (package
1740 (name "python-nose")
1741 (version "1.3.7")
1742 (source
1743 (origin
1744 (method url-fetch)
1745 (uri (pypi-uri "nose" version))
1746 (sha256
1747 (base32
1748 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1749 (build-system python-build-system)
1750 (arguments
1751 '(#:tests? #f)) ; FIXME: test suite fails
1752 (home-page "http://readthedocs.org/docs/nose/")
1753 (synopsis "Python testing library")
1754 (description
1755 "Nose extends the unittest library to make testing easier.")
1756 (license license:lgpl2.0+)))
1757
1758 (define-public python2-nose
1759 (package-with-python2 python-nose))
1760
1761 (define-public python-nose2
1762 (package
1763 (name "python-nose2")
1764 (version "0.6.5")
1765 (source
1766 (origin
1767 (method url-fetch)
1768 (uri (pypi-uri "nose2" version))
1769 (sha256
1770 (base32
1771 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1772 (build-system python-build-system)
1773 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1774 (propagated-inputs
1775 `(("python-cov-core" ,python-cov-core)
1776 ("python-pytest-cov" ,python-pytest-cov)
1777 ("python-six" ,python-six)))
1778 (home-page "https://github.com/nose-devs/nose2")
1779 (synopsis "Next generation of nicer testing for Python")
1780 (description
1781 "Nose2 is the next generation of nicer testing for Python, based on the
1782 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1783 better plugin api, being easier for users to configure, and simplifying internal
1784 interfaces and processes.")
1785 (license license:bsd-2)))
1786
1787 (define-public python2-nose2
1788 (package-with-python2 python-nose2))
1789
1790 (define-public python-unittest2
1791 (package
1792 (name "python-unittest2")
1793 (version "0.5.1")
1794 (source
1795 (origin
1796 (method url-fetch)
1797 (uri (string-append
1798 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1799 version ".tar.gz"))
1800 (sha256
1801 (base32
1802 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1803 (build-system python-build-system)
1804 (home-page "http://pypi.python.org/pypi/unittest2")
1805 (synopsis "Python unit testing library")
1806 (description
1807 "Unittest2 is a replacement for the unittest module in the Python
1808 standard library.")
1809 (license license:psfl)))
1810
1811 (define-public python2-unittest2
1812 (package (inherit python-unittest2)
1813 (name "python2-unittest2")
1814 (version "0.5.1")
1815 (source
1816 (origin
1817 (method url-fetch)
1818 (uri (string-append
1819 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1820 version ".tar.gz"))
1821 (sha256
1822 (base32
1823 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1824 (arguments
1825 `(#:python ,python-2
1826 #:tests? #f)))) ; no setup.py test command
1827
1828 (define-public python-pafy
1829 (package
1830 (name "python-pafy")
1831 (version "0.5.3.1")
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "pafy" version))
1836 (sha256
1837 (base32
1838 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1839 (build-system python-build-system)
1840 (arguments
1841 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1842 (propagated-inputs
1843 ;; Youtube-dl is a python package which is imported in the file
1844 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1845 `(("youtube-dl" ,youtube-dl)))
1846 (home-page "https://np1.github.io/pafy/")
1847 (synopsis "Retrieve YouTube content and metadata")
1848 (description
1849 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1850 (license license:lgpl3+)))
1851
1852 (define-public python-py
1853 (package
1854 (name "python-py")
1855 (version "1.4.32")
1856 (source
1857 (origin
1858 (method url-fetch)
1859 (uri (pypi-uri "py" version))
1860 (sha256
1861 (base32
1862 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1863 (build-system python-build-system)
1864 (arguments
1865 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1866 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1867 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1868 ;; Is this module globally installed?"
1869 '(#:tests? #f))
1870 (home-page "http://pylib.readthedocs.org/")
1871 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1872 (description
1873 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1874 code introspection, and logging.")
1875 (license license:expat)))
1876
1877 (define-public python2-py
1878 (package-with-python2 python-py))
1879
1880 (define-public python-pytest
1881 (package
1882 (name "python-pytest")
1883 (version "2.7.3")
1884 (source
1885 (origin
1886 (method url-fetch)
1887 (uri (string-append
1888 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1889 version ".tar.gz"))
1890 (sha256
1891 (base32
1892 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1893 (modules '((guix build utils)))
1894 (snippet
1895 ;; One of the tests involves the /usr directory, so it fails.
1896 '(substitute* "testing/test_argcomplete.py"
1897 (("def test_remove_dir_prefix\\(self\\):")
1898 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1899 (build-system python-build-system)
1900 (propagated-inputs
1901 `(("python-py" ,python-py)))
1902 (native-inputs
1903 `(("python-nose" ,python-nose)
1904 ("python-mock" ,python-mock)))
1905 (home-page "http://pytest.org")
1906 (synopsis "Python testing library")
1907 (description
1908 "Pytest is a testing tool that provides auto-discovery of test modules
1909 and functions, detailed info on failing assert statements, modular fixtures,
1910 and many external plugins.")
1911 (license license:expat)))
1912
1913 (define-public python2-pytest
1914 (package-with-python2 python-pytest))
1915
1916 ;; Some packages require a newer pytest.
1917 (define-public python-pytest-3.0
1918 (package
1919 (inherit python-pytest)
1920 (name "python-pytest")
1921 (version "3.0.7")
1922 (source (origin
1923 (method url-fetch)
1924 (uri (pypi-uri "pytest" version))
1925 (sha256
1926 (base32
1927 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1928 (arguments
1929 `(#:phases
1930 (modify-phases %standard-phases
1931 (add-before 'check 'disable-invalid-test
1932 (lambda _
1933 (substitute* "testing/test_argcomplete.py"
1934 (("def test_remove_dir_prefix" line)
1935 (string-append "@pytest.mark.skip"
1936 "(reason=\"Assumes that /usr exists.\")\n "
1937 line)))
1938 #t)))))
1939 (native-inputs
1940 `(("python-nose" ,python-nose)
1941 ("python-mock" ,python-mock)
1942 ("python-hypothesis" ,python-hypothesis)))
1943 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1944
1945 (define-public python2-pytest-3.0
1946 (let ((base (package-with-python2
1947 (strip-python2-variant python-pytest-3.0))))
1948 (package (inherit base)
1949 (native-inputs
1950 `(("python2-enum34" ,python2-enum34)
1951 ,@(package-native-inputs base))))))
1952
1953 (define-public python-pytest-cov
1954 (package
1955 (name "python-pytest-cov")
1956 (version "2.4.0")
1957 (source
1958 (origin
1959 (method url-fetch)
1960 (uri (pypi-uri "pytest-cov" version))
1961 (sha256
1962 (base32
1963 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1964 (build-system python-build-system)
1965 (arguments
1966 `(#:phases
1967 (modify-phases %standard-phases
1968 (replace 'check
1969 (lambda _
1970 ;; options taken from tox.ini
1971 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1972 ;; with "Duplicate implicit target name"
1973 (zero? (system* "python" "./setup.py" "check"
1974 "--strict" "--metadata")))))))
1975 (propagated-inputs
1976 `(("python-coverage" ,python-coverage)
1977 ("python-pytest" ,python-pytest)))
1978 (home-page "https://github.com/pytest-dev/pytest-cov")
1979 (synopsis "Pytest plugin for measuring coverage")
1980 (description
1981 "Pytest-cov produces coverage reports. It supports centralised testing and
1982 distributed testing in both @code{load} and @code{each} modes. It also
1983 supports coverage of subprocesses.")
1984 (license license:expat)))
1985
1986 (define-public python2-pytest-cov
1987 (package-with-python2 python-pytest-cov))
1988
1989 (define-public python-pytest-runner
1990 (package
1991 (name "python-pytest-runner")
1992 (version "2.11.1")
1993 (source
1994 (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "pytest-runner" version))
1997 (sha256
1998 (base32
1999 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
2000 (build-system python-build-system)
2001 (arguments
2002 `(#:phases
2003 (modify-phases %standard-phases
2004 ;; The fancy way of setting the version with setuptools_scm does not
2005 ;; seem to work here.
2006 (add-after 'unpack 'set-version
2007 (lambda _
2008 (substitute* "docs/conf.py"
2009 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
2010 (string-append "version = \"" ,version "\"")))
2011 #t)))))
2012 (native-inputs
2013 `(("python-pytest" ,python-pytest)
2014 ("python-setuptools-scm" ,python-setuptools-scm)))
2015 (home-page "https://github.com/pytest-dev/pytest-runner")
2016 (synopsis "Invoke py.test as a distutils command")
2017 (description
2018 "This package provides a @command{pytest-runner} command that
2019 @file{setup.py} files can use to run tests.")
2020 (license license:expat)))
2021
2022 (define-public python2-pytest-runner
2023 (package-with-python2 python-pytest-runner))
2024
2025 (define-public python-pytest-mock
2026 (package
2027 (name "python-pytest-mock")
2028 (version "1.2")
2029 (source
2030 (origin
2031 (method url-fetch)
2032 (uri (pypi-uri "pytest-mock" version ".zip"))
2033 (sha256
2034 (base32
2035 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2036 (build-system python-build-system)
2037 (native-inputs
2038 `(("unzip" ,unzip)))
2039 (propagated-inputs
2040 `(("python-pytest" ,python-pytest)))
2041 (home-page "https://github.com/pytest-dev/pytest-mock/")
2042 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2043 (description
2044 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2045 around the patching API provided by the @code{mock} package, but with the
2046 benefit of not having to worry about undoing patches at the end of a test.
2047 The mocker fixture has the same API as @code{mock.patch}, supporting the
2048 same arguments.")
2049 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2050 (license license:expat)))
2051
2052 (define-public python2-pytest-mock
2053 (let ((base (package-with-python2
2054 (strip-python2-variant python-pytest-mock))))
2055 (package (inherit base)
2056 (propagated-inputs
2057 `(("python2-mock" ,python2-mock)
2058 ,@(package-propagated-inputs base))))))
2059
2060 (define-public python-pytest-xdist
2061 (package
2062 (name "python-pytest-xdist")
2063 (version "1.14")
2064 (source
2065 (origin
2066 (method url-fetch)
2067 (uri (pypi-uri "pytest-xdist" version ".zip"))
2068 (sha256
2069 (base32
2070 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2071 (modules '((guix build utils)))
2072 (snippet
2073 '(begin
2074 ;; Remove pre-compiled .pyc files from source.
2075 (for-each delete-file-recursively
2076 (find-files "." "__pycache__" #:directories? #t))
2077 (for-each delete-file (find-files "." "\\.pyc$"))
2078 #t))))
2079 (build-system python-build-system)
2080 (arguments
2081 '(#:tests? #f)) ;FIXME: Some tests are failing.
2082 ;; #:phases
2083 ;; (modify-phases %standard-phases
2084 ;; (delete 'check)
2085 ;; (add-after 'install 'check
2086 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2087 ;; (add-installed-pythonpath inputs outputs)
2088 ;; (zero? (system* "py.test" "-v")))))
2089 (native-inputs
2090 `(("unzip" ,unzip)
2091 ("python-setuptools-scm" ,python-setuptools-scm)))
2092 (propagated-inputs
2093 `(("python-execnet" ,python-execnet)
2094 ("python-pytest" ,python-pytest)
2095 ("python-py" ,python-py)))
2096 (home-page
2097 "https://github.com/pytest-dev/pytest-xdist")
2098 (synopsis
2099 "Plugin for py.test with distributed testing and loop-on-failing modes")
2100 (description
2101 "The pytest-xdist plugin extends py.test with some unique test execution
2102 modes: parallelization, running tests in boxed subprocesses, the ability
2103 to run tests repeatedly when failed, and the ability to run tests on multiple
2104 Python interpreters or platforms. It uses rsync to copy the existing
2105 program code to a remote location, executes there, and then syncs the
2106 result back.")
2107 (license license:expat)))
2108
2109 (define-public python2-pytest-xdist
2110 (package-with-python2 python-pytest-xdist))
2111
2112 (define-public python-scripttest
2113 (package
2114 (name "python-scripttest")
2115 (version "1.3")
2116 (source
2117 (origin
2118 (method url-fetch)
2119 (uri (string-append
2120 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2121 version ".tar.gz"))
2122 (sha256
2123 (base32
2124 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2125 (build-system python-build-system)
2126 (native-inputs
2127 `(("python-pytest" ,python-pytest)))
2128 (home-page "http://pythonpaste.org/scripttest/")
2129 (synopsis "Python library to test command-line scripts")
2130 (description "Scripttest is a Python helper library for testing
2131 interactive command-line applications. With it you can run a script in a
2132 subprocess and see the output as well as any file modifications.")
2133 (license license:expat)))
2134
2135 (define-public python2-scripttest
2136 (package-with-python2 python-scripttest))
2137
2138 (define-public python-testtools
2139 (package
2140 (name "python-testtools")
2141 (version "1.4.0")
2142 (source
2143 (origin
2144 (method url-fetch)
2145 (uri (pypi-uri "testtools" version))
2146 (sha256
2147 (base32
2148 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2149 (build-system python-build-system)
2150 (arguments
2151 `(#:phases
2152 (modify-phases %standard-phases
2153 (add-after 'unpack 'fix-module-imports
2154 (lambda _
2155 (substitute* "setup.py"
2156 (("'unittest2>=0.8.0',") ""))
2157 (substitute* '("testtools/testcase.py"
2158 "testtools/testsuite.py"
2159 "testtools/run.py"
2160 "testtools/tests/test_run.py"
2161 "testtools/tests/test_testsuite.py"
2162 "testtools/tests/test_deferredruntest.py")
2163 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2164 (("import unittest2 as unittest") "import unittest")
2165 (("import unittest2") "import unittest as unittest2")
2166 (("from unittest2 import") "from unittest import"))
2167 (substitute* "testtools/tests/test_testresult.py"
2168 ;; NUL in source code is not allowed (raises ValueError).
2169 (("\\x00\\x04") "\\x04"))
2170 #t)))))
2171 (propagated-inputs
2172 `(("python-mimeparse" ,python-mimeparse)
2173 ("python-extras" ,python-extras)))
2174 (home-page "https://github.com/testing-cabal/testtools")
2175 (synopsis
2176 "Extensions to the Python standard library unit testing framework")
2177 (description
2178 "Testtools extends the Python standard library unit testing framework to
2179 provide matchers, more debugging information, and cross-Python
2180 compatibility.")
2181 (license license:psfl)))
2182
2183 (define-public python2-testtools
2184 (package-with-python2 python-testtools))
2185
2186 (define-public python-testscenarios
2187 (package
2188 (name "python-testscenarios")
2189 (version "0.4")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri (string-append
2194 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2195 version ".tar.gz"))
2196 (sha256
2197 (base32
2198 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2199 (build-system python-build-system)
2200 (propagated-inputs
2201 `(("python-testtools" ,python-testtools)))
2202 (home-page "https://launchpad.net/testscenarios")
2203 (synopsis "Pyunit extension for dependency injection")
2204 (description
2205 "Testscenarios provides clean dependency injection for Python unittest
2206 style tests.")
2207 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2208
2209 (define-public python2-testscenarios
2210 (package-with-python2 python-testscenarios))
2211
2212 (define-public python-testresources
2213 (package
2214 (name "python-testresources")
2215 (version "0.2.7")
2216 (source
2217 (origin
2218 (method url-fetch)
2219 (uri (string-append
2220 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2221 version ".tar.gz"))
2222 (sha256
2223 (base32
2224 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2225 (build-system python-build-system)
2226 (home-page "https://launchpad.net/testresources")
2227 (synopsis
2228 "Pyunit extension for managing test resources")
2229 (description
2230 "Testresources is an extension to Python's unittest to allow declarative
2231 use of resources by test cases.")
2232 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2233
2234 (define-public python2-testresources
2235 (package-with-python2 python-testresources))
2236
2237 (define-public python-subunit
2238 (package
2239 (name "python-subunit")
2240 (version "0.0.21")
2241 (source
2242 (origin
2243 (method url-fetch)
2244 (uri (string-append
2245 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2246 version ".tar.gz"))
2247 (sha256
2248 (base32
2249 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2250 (build-system python-build-system)
2251 (propagated-inputs
2252 `(("python-extras" ,python-extras)
2253 ("python-mimeparse" ,python-mimeparse)))
2254 (native-inputs
2255 `(("python-testscenarios" ,python-testscenarios)))
2256 (home-page "http://launchpad.net/subunit")
2257 (synopsis "Python implementation of the subunit protocol")
2258 (description
2259 "Python-subunit is a Python implementation of the subunit test streaming
2260 protocol.")
2261 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2262
2263 (define-public python2-subunit
2264 (package-with-python2 python-subunit))
2265
2266 ;; Recent versions of python-fixtures and python-testrepository need
2267 ;; python-pbr for packaging, which itself needs these two packages for
2268 ;; testing.
2269 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2270 ;; same source, just without any test dependencies and with tests disabled.
2271 ;; python-pbr-minmal is then used to package python-fixtures and
2272 ;; python-testrepository.
2273 ;; Strictly speaking we currently could remove the test-requirements from the
2274 ;; normal python-pbr package (and save this package) since test are disabled
2275 ;; there anyway. But this may change in future.
2276 (define python-pbr-minimal
2277 (package
2278 (name "python-pbr-minimal")
2279 (version "1.10.0")
2280 (source
2281 (origin
2282 (method url-fetch)
2283 (uri (pypi-uri "pbr" version))
2284 (sha256
2285 (base32
2286 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2287 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2288 (build-system python-build-system)
2289 (arguments
2290 `(#:tests? #f))
2291 (home-page "http://docs.openstack.org/developer/pbr/")
2292 (synopsis "Minimal build of python-pbr used for bootstrapping")
2293 (description
2294 "Used only for bootstrapping python2-pbr, you should not need this.")
2295 (license license:asl2.0)))
2296
2297 (define python2-pbr-minimal
2298 (package-with-python2 python-pbr-minimal))
2299
2300 (define-public python-pbr
2301 (package
2302 (inherit python-pbr-minimal)
2303 (name "python-pbr")
2304 (arguments
2305 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2306 (propagated-inputs
2307 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2308 (native-inputs
2309 `(("python-fixtures" ,python-fixtures)
2310 ;; discover, coverage, hacking, subunit
2311 ("python-mock" ,python-mock)
2312 ("python-six" ,python-six)
2313 ("python-sphinx" ,python-sphinx)
2314 ("python-testrepository" ,python-testrepository)
2315 ("python-testresources" ,python-testresources)
2316 ("python-testscenarios" ,python-testscenarios)
2317 ("python-testtools" ,python-testtools)
2318 ("python-virtualenv" ,python-virtualenv)))
2319 (synopsis "Enhance the default behavior of Python’s setuptools")
2320 (description
2321 "Python Build Reasonableness (PBR) is a library that injects some useful
2322 and sensible default behaviors into your setuptools run. It will set
2323 versions, process requirements files and generate AUTHORS and ChangeLog file
2324 from git information.
2325 ")))
2326
2327 (define-public python2-pbr
2328 (package-with-python2 python-pbr))
2329
2330 (define-public python-fixtures
2331 (package
2332 (name "python-fixtures")
2333 (version "1.4.0")
2334 (source
2335 (origin
2336 (method url-fetch)
2337 (uri (pypi-uri "fixtures" version))
2338 (sha256
2339 (base32
2340 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2341 (build-system python-build-system)
2342 (arguments
2343 '(#:phases
2344 (modify-phases %standard-phases
2345 (replace 'check
2346 (lambda _
2347 (zero? (system* "python" "-m" "testtools.run"
2348 "fixtures.test_suite")))))))
2349 (propagated-inputs
2350 `(("python-six" ,python-six)))
2351 (native-inputs
2352 `(("python-mock" ,python-mock)
2353 ("python-pbr-minimal" ,python-pbr-minimal)
2354 ("python-testtools" ,python-testtools)))
2355 (home-page "https://launchpad.net/python-fixtures")
2356 (synopsis "Python test fixture library")
2357 (description
2358 "Fixtures provides a way to create reusable state, useful when writing
2359 Python tests.")
2360 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2361
2362 (define-public python2-fixtures
2363 (package-with-python2 python-fixtures))
2364
2365 (define-public python-testrepository
2366 (package
2367 (name "python-testrepository")
2368 (version "0.0.20")
2369 (source
2370 (origin
2371 (method url-fetch)
2372 (uri (string-append
2373 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2374 version ".tar.gz"))
2375 (sha256
2376 (base32
2377 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2378 (build-system python-build-system)
2379 (arguments
2380 ;; FIXME: Many tests are failing.
2381 '(#:tests? #f))
2382 (propagated-inputs
2383 `(("python-fixtures" ,python-fixtures)
2384 ("python-subunit" ,python-subunit)
2385 ("python-testtools" ,python-testtools)))
2386 (native-inputs
2387 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2388 ("python-mimeparse" ,python-mimeparse)))
2389 (home-page "https://launchpad.net/testrepository")
2390 (synopsis "Database for Python test results")
2391 (description "Testrepository provides a database of test results which can
2392 be used as part of a developer's workflow to check things such as what tests
2393 have failed since the last commit or what tests are currently failing.")
2394 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2395
2396 (define-public python2-testrepository
2397 (package-with-python2 python-testrepository))
2398
2399 (define-public python-coverage
2400 (package
2401 (name "python-coverage")
2402 (version "4.1")
2403 (source
2404 (origin
2405 (method url-fetch)
2406 (uri (pypi-uri "coverage" version))
2407 (sha256
2408 (base32
2409 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2410 (build-system python-build-system)
2411 (arguments
2412 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2413 '(#:tests? #f))
2414 (home-page "http://nedbatchelder.com/code/coverage")
2415 (synopsis "Code coverage measurement for Python")
2416 (description
2417 "Coverage measures code coverage, typically during test execution. It
2418 uses the code analysis tools and tracing hooks provided in the Python standard
2419 library to determine which lines are executable, and which have been
2420 executed.")
2421 (license license:bsd-3)))
2422
2423 (define-public python2-coverage
2424 (package-with-python2 python-coverage))
2425
2426 (define-public python-cov-core
2427 (package
2428 (name "python-cov-core")
2429 (version "1.15.0")
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "cov-core" version))
2434 (sha256
2435 (base32
2436 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2437 (build-system python-build-system)
2438 (propagated-inputs
2439 `(("python-coverage" ,python-coverage)))
2440 (home-page "https://github.com/schlamar/cov-core")
2441 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2442 (description
2443 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2444 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2445 testing frameworks.")
2446 (license license:expat)))
2447
2448 (define-public python2-cov-core
2449 (package-with-python2 python-cov-core))
2450
2451 (define-public python-discover
2452 (package
2453 (name "python-discover")
2454 (version "0.4.0")
2455 (source
2456 (origin
2457 (method url-fetch)
2458 (uri (string-append
2459 "https://pypi.python.org/packages/source/d/discover/discover-"
2460 version ".tar.gz"))
2461 (sha256
2462 (base32
2463 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2464 (build-system python-build-system)
2465 (home-page "http://pypi.python.org/pypi/discover/")
2466 (synopsis
2467 "Python test discovery for unittest")
2468 (description
2469 "Discover provides test discovery for unittest, a feature that has been
2470 backported from Python 2.7 for Python 2.4+.")
2471 (license license:bsd-3)))
2472
2473 (define-public python2-discover
2474 (package-with-python2 python-discover))
2475
2476 (define-public behave
2477 (package
2478 (name "behave")
2479 (version "1.2.5")
2480 (source (origin
2481 (method url-fetch)
2482 (uri (pypi-uri "behave" version ".tar.bz2"))
2483 (sha256
2484 (base32
2485 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2486 (build-system python-build-system)
2487 (propagated-inputs
2488 `(("python-six" ,python-six)
2489 ("python-parse" ,python-parse)
2490 ("python-parse-type" ,python-parse-type)))
2491 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2492 ;PyHamcrest>=1.8
2493 (home-page "https://github.com/behave/behave")
2494 (synopsis "Python behavior-driven development")
2495 (description
2496 "Behave is a tool for behavior-driven development in python.
2497 Behavior-driven development (or BDD) is an agile software development
2498 technique that encourages collaboration between developers, QA and
2499 non-technical or business participants in a software project. Behave uses
2500 tests written in a natural language style, backed up by Python code.")
2501 (license license:x11)))
2502
2503 (define-public python-exif-read
2504 (package
2505 (name "python-exif-read")
2506 (version "2.1.2")
2507 (source (origin
2508 (method url-fetch)
2509 (uri (pypi-uri "ExifRead" version))
2510 (sha256
2511 (base32
2512 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2513 (build-system python-build-system)
2514 (arguments `(#:tests? #f)) ; no tests
2515 (home-page "https://github.com/ianare/exif-py")
2516 (synopsis "Python library to extract EXIF data from image files")
2517 (description
2518 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2519 files.")
2520 (license license:bsd-3)))
2521
2522 (define-public python2-exif-read
2523 (package-with-python2 python-exif-read))
2524
2525 (define-public python-pyld
2526 (package
2527 (name "python-pyld")
2528 (version "0.7.1")
2529 (source (origin
2530 (method url-fetch)
2531 (uri (pypi-uri "PyLD" version))
2532 (sha256
2533 (base32
2534 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2535 (build-system python-build-system)
2536 (arguments `(#:tests? #f)) ; no tests
2537 (home-page "https://github.com/digitalbazaar/pyld")
2538 (synopsis "Python implementation of the JSON-LD specification")
2539 (description
2540 "PyLD is an implementation of the JSON-LD specification.")
2541 (license license:bsd-3)))
2542
2543 (define-public python2-pyld
2544 (package-with-python2 python-pyld))
2545
2546 (define-public python-certifi
2547 (package
2548 (name "python-certifi")
2549 (version "2017.1.23")
2550 (source (origin
2551 (method url-fetch)
2552 (uri (pypi-uri "certifi" version))
2553 (sha256
2554 (base32
2555 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2556 (build-system python-build-system)
2557 (home-page "https://certifi.io/")
2558 (synopsis "Python CA certificate bundle")
2559 (description
2560 "Certifi is a Python library that contains a CA certificate bundle, which
2561 is used by the Requests library to verify HTTPS requests.")
2562 (license license:asl2.0)))
2563
2564 (define-public python2-certifi
2565 (package-with-python2 python-certifi))
2566
2567 (define-public python-click
2568 (package
2569 (name "python-click")
2570 (version "6.7")
2571 (source
2572 (origin
2573 (method url-fetch)
2574 (uri (pypi-uri "click" version))
2575 (sha256
2576 (base32
2577 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2578 (build-system python-build-system)
2579 (arguments
2580 `(#:phases
2581 (modify-phases %standard-phases
2582 (add-after 'unpack 'fix-paths
2583 (lambda* (#:key inputs #:allow-other-keys)
2584 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2585 "cross-libc" "libc"))))
2586 (substitute* "click/_unicodefun.py"
2587 (("'locale'")
2588 (string-append "'" glibc "/bin/locale'"))))
2589 #t))
2590 (replace 'check
2591 (lambda _
2592 (zero? (system* "make" "test")))))))
2593 (native-inputs
2594 `(("python-pytest" ,python-pytest)))
2595 (home-page "http://click.pocoo.org")
2596 (synopsis "Command line library for Python")
2597 (description
2598 "Click is a Python package for creating command line interfaces in a
2599 composable way with as little code as necessary. Its name stands for
2600 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2601 with sensible defaults out of the box.")
2602 (license license:bsd-3)))
2603
2604 (define-public python2-click
2605 (package-with-python2 python-click))
2606
2607 (define-public python-wheel
2608 (package
2609 (name "python-wheel")
2610 (version "0.30.0a0")
2611 (source
2612 (origin
2613 (method url-fetch)
2614 (uri (pypi-uri "wheel" version))
2615 (sha256
2616 (base32
2617 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2618 (build-system python-build-system)
2619 (native-inputs
2620 `(("python-jsonschema" ,python-jsonschema)
2621 ("python-pytest-cov" ,python-pytest-cov)))
2622 (home-page "https://bitbucket.org/pypa/wheel/")
2623 (synopsis "Format for built Python packages")
2624 (description
2625 "A wheel is a ZIP-format archive with a specially formatted filename and
2626 the @code{.whl} extension. It is designed to contain all the files for a PEP
2627 376 compatible install in a way that is very close to the on-disk format. Many
2628 packages will be properly installed with only the @code{Unpack} step and the
2629 unpacked archive preserves enough information to @code{Spread} (copy data and
2630 scripts to their final locations) at any later time. Wheel files can be
2631 installed with a newer @code{pip} or with wheel's own command line utility.")
2632 (license license:expat)
2633 (properties `((python2-variant . ,(delay python2-wheel))))))
2634
2635 (define-public python2-wheel
2636 (let ((wheel (package-with-python2
2637 (strip-python2-variant python-wheel))))
2638 (package (inherit wheel)
2639 (native-inputs `(("python2-functools32" ,python2-functools32)
2640 ,@(package-native-inputs wheel))))))
2641
2642
2643 (define-public python-requests
2644 (package
2645 (name "python-requests")
2646 (version "2.13.0")
2647 (source (origin
2648 (method url-fetch)
2649 (uri (pypi-uri "requests" version))
2650 (sha256
2651 (base32
2652 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2653 ;; TODO: unbundle urllib3 and chardet.
2654 (build-system python-build-system)
2655 (arguments
2656 ;; FIXME: Some tests require network access.
2657 '(#:tests? #f))
2658 (home-page "http://python-requests.org/")
2659 (synopsis "Python HTTP library")
2660 (description
2661 "Requests is a Python HTTP client library. It aims to be easier to use
2662 than Python’s urllib2 library.")
2663 (license license:asl2.0)))
2664
2665 ;; Some software requires an older version of Requests, notably Docker
2666 ;; Compose.
2667 (define-public python-requests-2.7
2668 (package (inherit python-requests)
2669 (version "2.7.0")
2670 (source (origin
2671 (method url-fetch)
2672 (uri (pypi-uri "requests" version))
2673 (sha256
2674 (base32
2675 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2676
2677 (define-public python2-requests
2678 (package-with-python2 python-requests))
2679
2680 (define-public python-vcversioner
2681 (package
2682 (name "python-vcversioner")
2683 (version "2.16.0.0")
2684 (source
2685 (origin
2686 (method url-fetch)
2687 (uri (pypi-uri "vcversioner" version))
2688 (sha256
2689 (base32
2690 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2691 (build-system python-build-system)
2692 (synopsis "Python library for version number discovery")
2693 (description "Vcversioner is a Python library that inspects tagging
2694 information in a variety of version control systems in order to discover
2695 version numbers.")
2696 (home-page "https://github.com/habnabit/vcversioner")
2697 (license license:isc)))
2698
2699 (define-public python2-vcversioner
2700 (package-with-python2 python-vcversioner))
2701
2702 (define-public python-jsonschema
2703 (package
2704 (name "python-jsonschema")
2705 (version "2.5.1")
2706 (source (origin
2707 (method url-fetch)
2708 (uri
2709 (string-append
2710 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2711 version ".tar.gz"))
2712 (sha256
2713 (base32
2714 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2715 (build-system python-build-system)
2716 (arguments
2717 '(#:phases
2718 (modify-phases %standard-phases
2719 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2720 (native-inputs
2721 `(("python-nose" ,python-nose)
2722 ("python-vcversioner" ,python-vcversioner)))
2723 (home-page "https://github.com/Julian/jsonschema")
2724 (synopsis "Implementation of JSON Schema for Python")
2725 (description
2726 "Jsonschema is an implementation of JSON Schema for Python.")
2727 (license license:expat)
2728 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2729
2730 (define-public python2-jsonschema
2731 (let ((jsonschema (package-with-python2
2732 (strip-python2-variant python-jsonschema))))
2733 (package (inherit jsonschema)
2734 (native-inputs
2735 `(("python2-mock" ,python2-mock)
2736 ,@(package-native-inputs jsonschema)))
2737 (propagated-inputs
2738 `(("python2-functools32" ,python2-functools32))))))
2739
2740 (define-public python-schema
2741 (package
2742 (name "python-schema")
2743 (version "0.6.6")
2744 (source
2745 (origin
2746 (method url-fetch)
2747 (uri (pypi-uri "schema" version))
2748 (sha256
2749 (base32
2750 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2751 (build-system python-build-system)
2752 (native-inputs
2753 `(("python-pytest" ,python-pytest)))
2754 (home-page "https://github.com/keleshev/schema")
2755 (synopsis "Simple data validation library")
2756 (description
2757 "@code{python-schema} is a library for validating Python data
2758 structures, such as those obtained from config-files, forms, external
2759 services or command-line parsing, converted from JSON/YAML (or
2760 something else) to Python data-types.")
2761 (license license:psfl)))
2762
2763 (define-public python2-schema
2764 (package-with-python2 python-schema))
2765
2766 (define-public python-schema-0.5
2767 (package (inherit python-schema)
2768 (version "0.5.0")
2769 (source
2770 (origin
2771 (method url-fetch)
2772 (uri (pypi-uri "schema" version))
2773 (sha256
2774 (base32
2775 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2776
2777 (define-public python2-schema-0.5
2778 (package-with-python2 python-schema-0.5))
2779
2780 (define-public python-kitchen
2781 (package
2782 (name "python-kitchen")
2783 (version "1.2.4")
2784 (source
2785 (origin
2786 (method url-fetch)
2787 (uri (pypi-uri "kitchen" version))
2788 (sha256
2789 (base32
2790 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2791 (build-system python-build-system)
2792 (propagated-inputs
2793 `(("python-chardet" ,python-chardet)))
2794 (home-page "https://github.com/fedora-infra/kitchen")
2795 (synopsis "Python API for snippets")
2796 (description "@code{kitchen} module provides a python API for all sorts of
2797 little useful snippets of code that everybody ends up writing for their projects
2798 but never seem big enough to build an independent release. Use kitchen and stop
2799 cutting and pasting that code over and over.")
2800 (license (list license:lgpl2.1+
2801 ;; subprocess.py, test_subprocess.py,
2802 ;; kitchen/pycompat25/defaultdict.py:
2803 license:psfl))))
2804
2805 (define-public python2-kitchen
2806 (package-with-python2 python-kitchen))
2807
2808 (define-public python-unidecode
2809 (package
2810 (name "python-unidecode")
2811 (version "0.04.20")
2812 (source (origin
2813 (method url-fetch)
2814 (uri (pypi-uri "Unidecode" version))
2815 (sha256
2816 (base32
2817 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2818 (build-system python-build-system)
2819 (home-page "https://pypi.python.org/pypi/Unidecode")
2820 (synopsis "ASCII transliterations of Unicode text")
2821 (description
2822 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2823 useful when integrating with legacy code that doesn't support Unicode, or for
2824 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2825 machine identifiers from human-readable Unicode strings that should still be
2826 somewhat intelligeble.")
2827 (license license:gpl2+)))
2828
2829 (define-public python2-unidecode
2830 (package-with-python2 python-unidecode))
2831
2832 (define-public python-pyjwt
2833 (package
2834 (name "python-pyjwt")
2835 (version "1.4.0")
2836 (source
2837 (origin
2838 (method url-fetch)
2839 (uri (pypi-uri "PyJWT" version))
2840 (sha256
2841 (base32
2842 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2843 (build-system python-build-system)
2844 (native-inputs
2845 `(("python-pytest" ,python-pytest)
2846 ("python-pytest-cov" ,python-pytest-cov)
2847 ("python-pytest-runner" ,python-pytest-runner)))
2848 (home-page "https://github.com/progrium/pyjwt")
2849 (synopsis "JSON Web Token implementation in Python")
2850 (description
2851 "PyJWT is a JSON Web Token implementation written in Python.")
2852 (license license:expat)))
2853
2854 (define-public python2-pyjwt
2855 (package-with-python2 python-pyjwt))
2856
2857 (define-public python-pykka
2858 (package
2859 (name "python-pykka")
2860 (version "1.2.1")
2861 (source
2862 (origin
2863 (method url-fetch)
2864 (uri (pypi-uri "Pykka" version))
2865 (sha256
2866 (base32
2867 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2868 (build-system python-build-system)
2869 (native-inputs
2870 `(("python-mock" ,python-mock)
2871 ("python-nose" ,python-nose)
2872 ("python-gevent" ,python-gevent)
2873 ("python-eventlet" ,python-eventlet)))
2874 (home-page "https://www.pykka.org/")
2875 (synopsis "Pykka is a Python implementation of the actor model")
2876 (description
2877 "Pykka is a Python implementation of the actor model.
2878 The actor model introduces some simple rules to control the sharing
2879 of state and cooperation between execution units, which makes it
2880 easier to build concurrent applications.")
2881 (license license:asl2.0)))
2882
2883 (define-public python2-pykka
2884 (package-with-python2 python-pykka))
2885
2886 (define-public python-oauthlib
2887 (package
2888 (name "python-oauthlib")
2889 (version "1.0.3")
2890 (source (origin
2891 (method url-fetch)
2892 (uri (pypi-uri "oauthlib" version))
2893 (sha256
2894 (base32
2895 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2896 (build-system python-build-system)
2897 (native-inputs
2898 `(("python-nose" ,python-nose)
2899 ("python-mock" ,python-mock)
2900 ("python-cryptography" ,python-cryptography)
2901 ("python-pyjwt" ,python-pyjwt)
2902 ("python-blinker" ,python-blinker)))
2903 (home-page "https://github.com/idan/oauthlib")
2904 (synopsis "OAuth implementation for Python")
2905 (description
2906 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2907 OAuth request-signing logic.")
2908 (license license:bsd-3)
2909 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2910
2911 (define-public python2-oauthlib
2912 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2913 (package
2914 (inherit base)
2915 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2916 ,@(package-native-inputs base))))))
2917
2918 (define-public python-itsdangerous
2919 (package
2920 (name "python-itsdangerous")
2921 (version "0.24")
2922 (source
2923 (origin
2924 (method url-fetch)
2925 (uri (string-append
2926 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2927 version ".tar.gz"))
2928 (sha256
2929 (base32
2930 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2931 (build-system python-build-system)
2932 (home-page "https://github.com/mitsuhiko/itsdangerous")
2933 (synopsis "Python library for passing data to/from untrusted environments")
2934 (description
2935 "Itsdangerous provides various helpers to pass trusted data to untrusted
2936 environments and back.")
2937 (license license:bsd-3)))
2938
2939 (define-public python2-itsdangerous
2940 (package-with-python2 python-itsdangerous))
2941
2942 (define-public python-pyyaml
2943 (package
2944 (name "python-pyyaml")
2945 (version "3.12")
2946 (source
2947 (origin
2948 (method url-fetch)
2949 (uri (pypi-uri "PyYAML" version))
2950 (sha256
2951 (base32
2952 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2953 (build-system python-build-system)
2954 (inputs
2955 `(("libyaml" ,libyaml)))
2956 (home-page "http://pyyaml.org/wiki/PyYAML")
2957 (synopsis "YAML parser and emitter for Python")
2958 (description
2959 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2960 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2961 API, and sensible error messages. PyYAML supports standard YAML tags and
2962 provides Python-specific tags that allow to represent an arbitrary Python
2963 object.")
2964 (license license:expat)))
2965
2966 (define-public python2-pyyaml
2967 (package-with-python2 python-pyyaml))
2968
2969 (define-public python-virtualenv
2970 (package
2971 (name "python-virtualenv")
2972 (version "15.0.3")
2973 (source
2974 (origin
2975 (method url-fetch)
2976 (uri (pypi-uri "virtualenv" version))
2977 (sha256
2978 (base32
2979 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2980 (build-system python-build-system)
2981 (arguments
2982 `(#:phases
2983 (modify-phases %standard-phases
2984 (replace 'check
2985 (lambda _
2986 ;; Disable failing test. See upstream bug report
2987 ;; https://github.com/pypa/virtualenv/issues/957
2988 (substitute* "tests/test_virtualenv.py"
2989 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2990 (zero? (system* "py.test")))))))
2991 (native-inputs
2992 `(("python-mock" ,python-mock)
2993 ("python-pytest" ,python-pytest)))
2994 (home-page "https://virtualenv.pypa.io/")
2995 (synopsis "Virtual Python environment builder")
2996 (description
2997 "Virtualenv is a tool to create isolated Python environments.")
2998 (license license:expat)))
2999
3000 (define-public python2-virtualenv
3001 (package-with-python2 python-virtualenv))
3002
3003 (define-public python-markupsafe
3004 (package
3005 (name "python-markupsafe")
3006 (version "0.23")
3007 (source
3008 (origin
3009 (method url-fetch)
3010 (uri (string-append
3011 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
3012 version ".tar.gz"))
3013 (sha256
3014 (base32
3015 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
3016 (build-system python-build-system)
3017 (home-page "https://github.com/mitsuhiko/markupsafe")
3018 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3019 (description
3020 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3021 for Python.")
3022 (license license:bsd-3)))
3023
3024 (define-public python2-markupsafe
3025 (package-with-python2 python-markupsafe))
3026
3027 (define-public python-jinja2
3028 (package
3029 (name "python-jinja2")
3030 (version "2.8")
3031 (source
3032 (origin
3033 (method url-fetch)
3034 (uri (pypi-uri "Jinja2" version))
3035 (sha256
3036 (base32
3037 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
3038 (build-system python-build-system)
3039 (propagated-inputs
3040 `(("python-markupsafe" ,python-markupsafe)))
3041 (home-page "http://jinja.pocoo.org/")
3042 (synopsis "Python template engine")
3043 (description
3044 "Jinja2 is a small but fast and easy to use stand-alone template engine
3045 written in pure Python.")
3046 (license license:bsd-3)))
3047
3048 (define-public python2-jinja2
3049 (package-with-python2 python-jinja2))
3050
3051 (define-public python-pystache
3052 (package
3053 (name "python-pystache")
3054 (version "0.5.4")
3055 (source (origin
3056 (method url-fetch)
3057 (uri (pypi-uri "pystache" version))
3058 (sha256
3059 (base32
3060 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3061 (build-system python-build-system)
3062 (arguments
3063 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3064 (home-page "http://defunkt.io/pystache/")
3065 (synopsis "Python logic-less template engine")
3066 (description
3067 "Pystache is a Python implementation of the framework agnostic,
3068 logic-free templating system Mustache.")
3069 (license license:expat)
3070 (properties `((python2-variant . ,(delay python2-pystache))))))
3071
3072 (define-public python2-pystache
3073 (package (inherit (package-with-python2
3074 (strip-python2-variant python-pystache)))
3075 (arguments
3076 `(#:python ,python-2
3077 #:phases
3078 (modify-phases %standard-phases
3079 (replace 'check
3080 (lambda _
3081 (zero? (system* "python" "test_pystache.py")))))))))
3082
3083 (define-public python-joblib
3084 (package
3085 (name "python-joblib")
3086 (version "0.10.3")
3087 (source (origin
3088 (method url-fetch)
3089 (uri (pypi-uri "joblib" version))
3090 (sha256
3091 (base32
3092 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3093 (modules '((guix build utils)))
3094 (snippet
3095 '(begin
3096 ;; Remove pre-compiled .pyc files from source.
3097 (for-each delete-file-recursively
3098 (find-files "." "__pycache__" #:directories? #t))
3099 (for-each delete-file (find-files "." "\\.pyc$"))
3100 #t))))
3101 (build-system python-build-system)
3102 (arguments
3103 `(#:phases
3104 (modify-phases %standard-phases
3105 (add-before 'check 'disable-failing-tests
3106 (lambda _
3107 ;; This numpydoc tests fails for unknown reasons
3108 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3109 ;; This numpydoc test depends on matplotlib, which is not a
3110 ;; required input.
3111 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3112 ;; These tests fail to execute sys.executable
3113 (substitute* "joblib/test/test_parallel.py"
3114 (("import nose" line)
3115 (string-append "from nose.plugins.skip import SkipTest\n" line))
3116 (("def test_nested_parallel_warnings" line)
3117 (string-append "@SkipTest\n" line))
3118 (("def test_parallel_with_interactively_defined_functions" line)
3119 (string-append "@SkipTest\n" line)))
3120 #t)))))
3121 ;; Provide nose to enable tests command
3122 (native-inputs
3123 `(("python-nose" ,python-nose)
3124 ("python-sphinx" ,python-sphinx)
3125 ("python-docutils" ,python-docutils)
3126 ("python-numpydoc" ,python-numpydoc)))
3127 (home-page "http://pythonhosted.org/joblib/")
3128 (synopsis "Using Python functions as pipeline jobs")
3129 (description
3130 "Joblib is a set of tools to provide lightweight pipelining in Python.
3131 In particular, joblib offers: transparent disk-caching of the output values
3132 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3133 logging and tracing of the execution.")
3134 (license license:bsd-3)))
3135
3136 (define-public python2-joblib
3137 (package-with-python2 python-joblib))
3138
3139 (define-public python-docutils
3140 (package
3141 (name "python-docutils")
3142 (version "0.13.1")
3143 (source
3144 (origin
3145 (method url-fetch)
3146 (uri (pypi-uri "docutils" version))
3147 (sha256
3148 (base32
3149 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3150 (build-system python-build-system)
3151 (arguments
3152 '(#:tests? #f)) ; no setup.py test command
3153 (home-page "http://docutils.sourceforge.net/")
3154 (synopsis "Python Documentation Utilities")
3155 (description
3156 "Docutils is a modular system for processing documentation into useful
3157 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3158 reStructuredText.")
3159 ;; Most of the source code is public domain, but some source files are
3160 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3161 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3162
3163 (define-public python2-docutils
3164 (package-with-python2 python-docutils))
3165
3166 (define-public python-pygments
3167 (package
3168 (name "python-pygments")
3169 (version "2.1.3")
3170 (source
3171 (origin
3172 (method url-fetch)
3173 (uri (pypi-uri "Pygments" version))
3174 (sha256
3175 (base32
3176 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3177 (build-system python-build-system)
3178 (arguments
3179 ;; FIXME: Tests require sphinx, which depends on this.
3180 '(#:tests? #f))
3181 (home-page "http://pygments.org/")
3182 (synopsis "Syntax highlighting")
3183 (description
3184 "Pygments is a syntax highlighting package written in Python.")
3185 (license license:bsd-2)))
3186
3187 (define-public python2-pygments
3188 (package-with-python2 python-pygments))
3189
3190 (define-public python-sphinxcontrib-websupport
3191 (package
3192 (name "python-sphinxcontrib-websupport")
3193 (version "1.0.1")
3194 (source (origin
3195 (method url-fetch)
3196 (uri (pypi-uri "sphinxcontrib-websupport" version))
3197 (sha256
3198 (base32
3199 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
3200 (build-system python-build-system)
3201 (propagated-inputs
3202 `(("python-mock" ,python-mock)
3203 ("python-pytest" ,python-pytest)
3204 ("python-xapian-bindings" ,python-xapian-bindings)))
3205 ;; Needed for running the test suite
3206 (native-inputs
3207 `(("python-six" ,python-six)
3208 ("python-jinja2" ,python-jinja2)
3209 ("python-docutils" ,python-docutils)
3210 ("python-sphinx" ,python-sphinx)
3211 ("python-sqlalchemy" ,python-sqlalchemy)
3212 ("python-whoosh" ,python-whoosh)))
3213 (home-page "http://sphinx-doc.org/")
3214 (synopsis "Sphinx API for web applications")
3215 (description "This package provides a Python API to easily integrate
3216 Sphinx documentation into your web application. It provides tools to
3217 integrate Sphinx documents in web templates and to handle searches.")
3218 (license license:bsd-3)))
3219
3220 (define-public python-sphinx
3221 (package
3222 (name "python-sphinx")
3223 (version "1.5.1")
3224 (source
3225 (origin
3226 (method url-fetch)
3227 (uri (pypi-uri "Sphinx" version))
3228 (sha256
3229 (base32
3230 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3231 (build-system python-build-system)
3232 (arguments
3233 `(#:phases
3234 (modify-phases %standard-phases
3235 (replace 'check
3236 (lambda _
3237 ;; Requires Internet access.
3238 (delete-file "tests/test_build_linkcheck.py")
3239 (zero? (system* "make" "test")))))))
3240 (propagated-inputs
3241 `(("python-imagesize" ,python-imagesize)
3242 ("python-sphinx-alabaster-theme"
3243 ,python-sphinx-alabaster-theme)
3244 ("python-babel" ,python-babel)
3245 ("python-snowballstemmer" ,python-snowballstemmer)
3246 ("python-docutils" ,python-docutils)
3247 ("python-jinja2" ,python-jinja2)
3248 ("python-pygments" ,python-pygments)
3249 ("python-requests" ,python-requests)
3250 ("python-six" ,python-six)))
3251 (native-inputs
3252 `(("graphviz" ,graphviz)
3253 ("python-html5lib" ,python-html5lib)
3254 ("python-mock" ,python-mock)
3255 ("python-nose" ,python-nose)))
3256 (home-page "http://sphinx-doc.org/")
3257 (synopsis "Python documentation generator")
3258 (description "Sphinx is a tool that makes it easy to create documentation
3259 for Python projects or other documents consisting of multiple reStructuredText
3260 sources.")
3261 (license license:bsd-3)
3262 (properties `((python2-variant . ,(delay python2-sphinx))))))
3263
3264 (define-public python-sphinx-1.6
3265 (package (inherit python-sphinx)
3266 (name "python-sphinx")
3267 (version "1.6.3")
3268 (source (origin
3269 (method url-fetch)
3270 (uri (pypi-uri "Sphinx" version))
3271 (sha256
3272 (base32
3273 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
3274 (arguments
3275 `(#:phases
3276 (modify-phases %standard-phases
3277 (replace 'check
3278 (lambda _
3279 ;; Requires Internet access.
3280 (delete-file "tests/test_build_linkcheck.py")
3281 (substitute* "tests/test_build_latex.py"
3282 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
3283 "@pytest.mark.skip()"))
3284 (zero? (system* "make" "test")))))))
3285 (propagated-inputs
3286 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
3287 ,@(package-propagated-inputs python-sphinx)))
3288 (native-inputs
3289 `(("python-pytest" ,python-pytest-3.0)
3290 ("imagemagick" ,imagemagick) ; for "convert"
3291 ,@(package-native-inputs python-sphinx)))
3292 (properties '())))
3293
3294 (define-public python-sphinx-1.5.3
3295 (package
3296 (inherit python-sphinx)
3297 (name "python-sphinx")
3298 (version "1.5.3")
3299 (source
3300 (origin
3301 (method url-fetch)
3302 (uri (pypi-uri "Sphinx" version))
3303 (sha256
3304 (base32
3305 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3306 (native-inputs
3307 `(("python-pytest" ,python-pytest-3.0)
3308 ,@(package-native-inputs python-sphinx)))))
3309
3310 (define-public python2-sphinx
3311 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3312 (package
3313 (inherit base)
3314 (native-inputs `(("python2-mock" ,python2-mock)
3315 ("python2-enum34" ,python2-enum34)
3316 ,@(package-native-inputs base)))
3317 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3318 ,@(package-propagated-inputs base))))))
3319
3320 (define-public python-sphinx-rtd-theme
3321 (package
3322 (name "python-sphinx-rtd-theme")
3323 (version "0.2.4")
3324 (source
3325 (origin
3326 (method url-fetch)
3327 (uri (pypi-uri "sphinx_rtd_theme" version))
3328 (sha256
3329 (base32
3330 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3331 (build-system python-build-system)
3332 (arguments '(#:tests? #f)) ; No tests.
3333 (propagated-inputs
3334 `(("python-sphinx" ,python-sphinx)))
3335 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3336 (synopsis "ReadTheDocs.org theme for Sphinx")
3337 (description "A theme for Sphinx used by ReadTheDocs.org.")
3338 (license license:expat)))
3339
3340 (define-public python2-sphinx-rtd-theme
3341 (package-with-python2 python-sphinx-rtd-theme))
3342
3343 (define-public python-rst.linker
3344 (package
3345 (name "python-rst.linker")
3346 (version "1.7")
3347 (source
3348 (origin
3349 (method url-fetch)
3350 (uri (pypi-uri "rst.linker" version))
3351 (sha256
3352 (base32
3353 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3354 (build-system python-build-system)
3355 (propagated-inputs
3356 `(("python-dateutil" ,python-dateutil)
3357 ("python-six" ,python-six)))
3358 (native-inputs
3359 `(("python-setuptools-scm" ,python-setuptools-scm)))
3360 ;; Test would require path.py, which would introduce a cyclic dependence.
3361 (arguments `(#:tests? #f))
3362 ;; Note: As of version 1.7 the documentation is not worth building.
3363 (home-page "https://github.com/jaraco/rst.linker")
3364 (synopsis "Sphinx plugin to add links and timestamps")
3365 (description "rst.linker allows to automatically replace text by a
3366 reStructuredText external reference or timestamps. It's primary purpose is to
3367 augment the changelog, but it can be used for other documents, too.")
3368 (license license:expat)))
3369
3370 (define-public python2-rst.linker
3371 (package-with-python2 python-rst.linker))
3372
3373 (define-public python-feedgenerator
3374 (package
3375 (name "python-feedgenerator")
3376 (version "1.9")
3377 (source
3378 (origin
3379 (method url-fetch)
3380 (uri (pypi-uri "feedgenerator" version))
3381 (sha256
3382 (base32
3383 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3384 (modules '((guix build utils)))
3385 (snippet
3386 '(begin
3387 ;; Remove pre-compiled .pyc files from source.
3388 (for-each delete-file-recursively
3389 (find-files "." "__pycache__" #:directories? #t))
3390 (for-each delete-file (find-files "." "\\.pyc$"))
3391 #t))))
3392 (build-system python-build-system)
3393 (propagated-inputs
3394 `(("python-pytz" ,python-pytz)
3395 ("python-six" ,python-six)))
3396 (home-page "https://github.com/getpelican/feedgenerator")
3397 (synopsis
3398 "Standalone version of Django's Atom/RSS feed generator")
3399 (description
3400 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3401 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3402 (license license:bsd-3)))
3403
3404 (define-public python2-feedgenerator
3405 (package-with-python2 python-feedgenerator))
3406
3407 (define-public python-blinker
3408 (package
3409 (name "python-blinker")
3410 (version "1.4")
3411 (source
3412 (origin
3413 (method url-fetch)
3414 (uri (pypi-uri "blinker" version))
3415 (sha256
3416 (base32
3417 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3418 (build-system python-build-system)
3419 (home-page "http://pythonhosted.org/blinker/")
3420 (synopsis "Fast, simple object-to-object and broadcast signaling")
3421 (description
3422 "Blinker provides a fast dispatching system that allows any number of
3423 interested parties to subscribe to events, or \"signals\".")
3424 (license license:expat)))
3425
3426 (define-public python2-blinker
3427 (package-with-python2 python-blinker))
3428
3429 (define-public pelican
3430 (package
3431 (name "pelican")
3432 (version "3.6.3")
3433 (source
3434 (origin
3435 (method url-fetch)
3436 (uri (pypi-uri "pelican" version))
3437 (sha256
3438 (base32
3439 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3440 (build-system python-build-system)
3441 (propagated-inputs
3442 `(("python-feedgenerator" ,python-feedgenerator)
3443 ("python-jinja2" ,python-jinja2)
3444 ("python-pygments" ,python-pygments)
3445 ("python-docutils" ,python-docutils)
3446 ("python-pytz" ,python-pytz)
3447 ("python-blinker" ,python-blinker)
3448 ("python-unidecode" ,python-unidecode)
3449 ("python-six" ,python-six)
3450 ("python-dateutil" ,python-dateutil)))
3451 (home-page "http://getpelican.com/")
3452 (arguments
3453 `(;; XXX Requires a lot more packages to do unit tests :P
3454 #:tests? #f
3455 #:phases (modify-phases %standard-phases
3456 (add-before
3457 'install 'adjust-requires
3458 ;; Since feedgenerator is installed from git, it doesn't
3459 ;; conform to the version requirements.
3460 ;;
3461 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3462 ;; version requirement so setuptools doesn't get confused.
3463 (lambda _
3464 (substitute* "setup.py"
3465 (("['\"]feedgenerator.*?['\"]")
3466 "'feedgenerator'")))))))
3467 (synopsis "Python-based static site publishing system")
3468 (description
3469 "Pelican is a tool to generate a static blog from reStructuredText,
3470 Markdown input files, and more. Pelican uses Jinja2 for templating
3471 and is very extensible.")
3472 (license license:agpl3+)))
3473
3474 (define-public python-scikit-learn
3475 (package
3476 (name "python-scikit-learn")
3477 (version "0.18.1")
3478 (source
3479 (origin
3480 (method url-fetch)
3481 (uri (string-append
3482 "https://github.com/scikit-learn/scikit-learn/archive/"
3483 version ".tar.gz"))
3484 (file-name (string-append name "-" version ".tar.gz"))
3485 (sha256
3486 (base32
3487 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3488 (build-system python-build-system)
3489 (arguments
3490 `(#:phases
3491 (modify-phases %standard-phases
3492 (delete 'check)
3493 (add-after 'install 'check
3494 ;; Running tests from the source directory requires
3495 ;; an "inplace" build with paths relative to CWD.
3496 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3497 ;; Use the installed version instead.
3498 (lambda* (#:key inputs outputs #:allow-other-keys)
3499 (add-installed-pythonpath inputs outputs)
3500 ;; some tests require access to "$HOME"
3501 (setenv "HOME" "/tmp")
3502 ;; Step out of the source directory just to be sure.
3503 (chdir "..")
3504 (zero? (system* "nosetests" "-v" "sklearn")))))))
3505 (inputs
3506 `(("openblas" ,openblas)))
3507 (native-inputs
3508 `(("python-nose" ,python-nose)
3509 ("python-cython" ,python-cython)))
3510 (propagated-inputs
3511 `(("python-numpy" ,python-numpy)
3512 ("python-scipy" ,python-scipy)))
3513 (home-page "http://scikit-learn.org/")
3514 (synopsis "Machine Learning in Python")
3515 (description
3516 "Scikit-learn provides simple and efficient tools for data
3517 mining and data analysis.")
3518 (license license:bsd-3)))
3519
3520 (define-public python2-scikit-learn
3521 (package-with-python2 python-scikit-learn))
3522
3523 (define-public python-scikit-image
3524 (package
3525 (name "python-scikit-image")
3526 (version "0.11.3")
3527 (source
3528 (origin
3529 (method url-fetch)
3530 (uri (string-append
3531 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3532 version ".tar.gz"))
3533 (sha256
3534 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3535 (build-system python-build-system)
3536 (arguments
3537 ;; TODO: Some tests require running X11 server. Disable them?
3538 '(#:tests? #f))
3539 ;; See DEPENDS.txt for the list of build and run time requiremnts
3540 (propagated-inputs
3541 `(("python-matplotlib" ,python-matplotlib)
3542 ("python-networkx" ,python-networkx)
3543 ("python-scipy" ,python-scipy)
3544 ("python-pillow" ,python-pillow)))
3545 (native-inputs
3546 `(("python-numpy" ,python-numpy)
3547 ("python-cython" ,python-cython)
3548 ("python-six" ,python-six)))
3549 (home-page "http://scikit-image.org/")
3550 (synopsis "Image processing in Python")
3551 (description
3552 "Scikit-image is a collection of algorithms for image processing.")
3553 (license license:bsd-3)))
3554
3555 (define-public python2-scikit-image
3556 (package-with-python2 python-scikit-image))
3557
3558 (define-public python-redis
3559 (package
3560 (name "python-redis")
3561 (version "2.10.5")
3562 (source
3563 (origin
3564 (method url-fetch)
3565 (uri (pypi-uri "redis" version))
3566 (sha256
3567 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3568 (build-system python-build-system)
3569 ;; Tests require a running Redis server
3570 (arguments '(#:tests? #f))
3571 ;; As long as we are not running test, we do not need this input :-)
3572 ;;(native-inputs
3573 ;; `(("python-pytest" ,python-pytest)))
3574 (home-page "https://github.com/andymccurdy/redis-py")
3575 (synopsis "Redis Python client")
3576 (description
3577 "This package provides a Python interface to the Redis key-value store.")
3578 (license license:expat)))
3579
3580 (define-public python2-redis
3581 (package-with-python2 python-redis))
3582
3583 (define-public python-rq
3584 (package
3585 (name "python-rq")
3586 (version "0.7.1")
3587 (source
3588 (origin
3589 (method url-fetch)
3590 (uri (pypi-uri "rq" version))
3591 (sha256
3592 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3593 (build-system python-build-system)
3594 (propagated-inputs
3595 `(("python-click" ,python-click)
3596 ("python-redis" ,python-redis)))
3597 (home-page "http://python-rq.org/")
3598 (synopsis "Simple job queues for Python")
3599 (description
3600 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3601 processing them in the background with workers. It is backed by Redis and it
3602 is designed to have a low barrier to entry.")
3603 (license license:bsd-2)))
3604
3605 (define-public python2-rq
3606 (package-with-python2 python-rq))
3607
3608 (define-public python-cython
3609 (package
3610 (name "python-cython")
3611 (version "0.25.2")
3612 (source
3613 (origin
3614 (method url-fetch)
3615 (uri (pypi-uri "Cython" version))
3616 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
3617 (sha256
3618 (base32
3619 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
3620 (build-system python-build-system)
3621 ;; we need the full python package and not just the python-wrapper
3622 ;; because we need libpython3.3m.so
3623 (inputs
3624 `(("python" ,python)))
3625 (arguments
3626 `(#:phases
3627 (modify-phases %standard-phases
3628 (add-before 'check 'set-HOME
3629 ;; some tests require access to "$HOME/.cython"
3630 (lambda _ (setenv "HOME" "/tmp")))
3631 (replace 'check
3632 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3633 (home-page "http://cython.org/")
3634 (synopsis "C extensions for Python")
3635 (description "Cython is an optimising static compiler for both the Python
3636 programming language and the extended Cython programming language. It makes
3637 writing C extensions for Python as easy as Python itself.")
3638 (license license:asl2.0)
3639 (properties `((python2-variant . ,(delay python2-cython))))))
3640
3641 (define-public python2-cython
3642 (package (inherit (package-with-python2
3643 (strip-python2-variant python-cython)))
3644 (name "python2-cython")
3645 (inputs
3646 `(("python-2" ,python-2))))) ; this is not automatically changed
3647
3648 ;; The RPython toolchain currently does not support Python 3.
3649 (define-public python2-rpython
3650 (package
3651 (name "python2-rpython")
3652 (version "0.1.4")
3653 (source
3654 (origin
3655 (method url-fetch)
3656 (uri (pypi-uri "rpython" version))
3657 (sha256
3658 (base32
3659 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3660 (build-system python-build-system)
3661 (arguments `(#:python ,python-2))
3662 (native-inputs
3663 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3664 (home-page "https://rpython.readthedocs.org")
3665 (synopsis "Framework for implementing interpreters and virtual machines")
3666 (description "RPython is a translation and support framework for
3667 producing implementations of dynamic languages, emphasizing a clean separation
3668 between language specification and implementation aspects.")
3669 (license license:expat)))
3670
3671 (define-public python-numpy
3672 (package
3673 (name "python-numpy")
3674 (version "1.12.0")
3675 (source
3676 (origin
3677 (method url-fetch)
3678 (uri (string-append
3679 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3680 (file-name (string-append name "-" version ".tar.gz"))
3681 (sha256
3682 (base32
3683 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3684 (build-system python-build-system)
3685 (inputs
3686 `(("openblas" ,openblas)
3687 ("lapack" ,lapack)))
3688 (native-inputs
3689 `(("python-cython" ,python-cython)
3690 ("python-nose" ,python-nose)
3691 ("gfortran" ,gfortran)))
3692 (arguments
3693 `(#:phases
3694 (modify-phases %standard-phases
3695 (add-before 'build 'set-environment-variables
3696 (lambda* (#:key inputs #:allow-other-keys)
3697 (call-with-output-file "site.cfg"
3698 (lambda (port)
3699 (format port
3700 "[openblas]
3701 libraries = openblas
3702 library_dirs = ~a/lib
3703 include_dirs = ~a/include
3704
3705 # backslash-n to make emacs happy
3706 \n[lapack]
3707 lapack_libs = lapack
3708 library_dirs = ~a/lib
3709 include_dirs = ~a/include
3710 "
3711 (assoc-ref inputs "openblas")
3712 (assoc-ref inputs "openblas")
3713 (assoc-ref inputs "lapack")
3714 (assoc-ref inputs "lapack"))))
3715 ;; Use "gcc" executable, not "cc".
3716 (substitute* "numpy/distutils/system_info.py"
3717 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3718 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3719 #t))
3720 ;; Tests can only be run after the library has been installed and not
3721 ;; within the source directory.
3722 (delete 'check)
3723 (add-after 'install 'check
3724 (lambda* (#:key outputs inputs #:allow-other-keys)
3725 ;; Make installed package available for running the tests
3726 (add-installed-pythonpath inputs outputs)
3727 (with-directory-excursion "/tmp"
3728 (zero? (system* "python" "-c"
3729 "import numpy; numpy.test(verbose=2)"))))))))
3730 (home-page "http://www.numpy.org/")
3731 (synopsis "Fundamental package for scientific computing with Python")
3732 (description "NumPy is the fundamental package for scientific computing
3733 with Python. It contains among other things: a powerful N-dimensional array
3734 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3735 and Fortran code, useful linear algebra, Fourier transform, and random number
3736 capabilities.")
3737 (license license:bsd-3)))
3738
3739 (define-public python2-numpy
3740 (package-with-python2 python-numpy))
3741
3742 (define-public python-munch
3743 (package
3744 (name "python-munch")
3745 (version "2.0.4")
3746 (source
3747 (origin
3748 (method url-fetch)
3749 (uri (pypi-uri "munch" version))
3750 (sha256
3751 (base32
3752 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3753 (build-system python-build-system)
3754 (home-page "https://github.com/Infinidat/munch")
3755 (synopsis "Dot-accessible dictionary")
3756 (description "Munch is a dot-accessible dictionary similar to JavaScript
3757 objects.")
3758 (license license:expat)))
3759
3760 (define-public python2-munch
3761 (package-with-python2 python-munch))
3762
3763 (define-public python2-fastlmm
3764 (package
3765 (name "python2-fastlmm")
3766 (version "0.2.21")
3767 (source
3768 (origin
3769 (method url-fetch)
3770 (uri (pypi-uri "fastlmm" version ".zip"))
3771 (sha256
3772 (base32
3773 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3774 (build-system python-build-system)
3775 (arguments
3776 `(#:python ,python-2)) ; only Python 2.7 is supported
3777 (propagated-inputs
3778 `(("python2-numpy" ,python2-numpy)
3779 ("python2-scipy" ,python2-scipy)
3780 ("python2-matplotlib" ,python2-matplotlib)
3781 ("python2-pandas" ,python2-pandas)
3782 ("python2-scikit-learn" ,python2-scikit-learn)
3783 ("python2-pysnptools" ,python2-pysnptools)))
3784 (native-inputs
3785 `(("unzip" ,unzip)
3786 ("python2-cython" ,python2-cython)
3787 ("python2-mock" ,python2-mock)
3788 ("python2-nose" ,python2-nose)))
3789 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3790 (synopsis "Perform genome-wide association studies on large data sets")
3791 (description
3792 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3793 Models, is a program for performing both single-SNP and SNP-set genome-wide
3794 association studies (GWAS) on extremely large data sets.")
3795 (license license:asl2.0)))
3796
3797 (define-public python-numpy-documentation
3798 (package
3799 (name "python-numpy-documentation")
3800 (version (package-version python-numpy))
3801 (source (package-source python-numpy))
3802 (build-system python-build-system)
3803 (native-inputs
3804 `(("python-matplotlib" ,python-matplotlib)
3805 ("python-numpy" ,python-numpy)
3806 ("pkg-config" ,pkg-config)
3807 ("python-sphinx" ,python-sphinx)
3808 ("python-numpydoc" ,python-numpydoc)
3809 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3810 texlive-fonts-ec
3811 texlive-generic-ifxetex
3812 texlive-generic-pdftex
3813 texlive-latex-amsfonts
3814 texlive-latex-capt-of
3815 texlive-latex-cmap
3816 texlive-latex-environ
3817 texlive-latex-eqparbox
3818 texlive-latex-etoolbox
3819 texlive-latex-expdlist
3820 texlive-latex-fancyhdr
3821 texlive-latex-fancyvrb
3822 texlive-latex-fncychap
3823 texlive-latex-float
3824 texlive-latex-framed
3825 texlive-latex-geometry
3826 texlive-latex-graphics
3827 texlive-latex-hyperref
3828 texlive-latex-mdwtools
3829 texlive-latex-multirow
3830 texlive-latex-oberdiek
3831 texlive-latex-parskip
3832 texlive-latex-preview
3833 texlive-latex-tabulary
3834 texlive-latex-threeparttable
3835 texlive-latex-titlesec
3836 texlive-latex-trimspaces
3837 texlive-latex-ucs
3838 texlive-latex-upquote
3839 texlive-latex-url
3840 texlive-latex-varwidth
3841 texlive-latex-wrapfig)))
3842 ("texinfo" ,texinfo)
3843 ("perl" ,perl)
3844 ("scipy-sphinx-theme"
3845 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3846 (method git-fetch)
3847 (uri (git-reference
3848 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3849 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3850 (sha256
3851 (base32
3852 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3853 ,@(package-native-inputs python-numpy)))
3854 (arguments
3855 `(#:tests? #f ; we're only generating the documentation
3856 #:phases
3857 (modify-phases %standard-phases
3858 (delete 'build)
3859 (replace 'install
3860 (lambda* (#:key inputs outputs #:allow-other-keys)
3861 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3862 (doc (string-append
3863 data "/doc/" ,name "-"
3864 ,(package-version python-numpy)))
3865 (info-reader (string-append data "/info"))
3866 (html (string-append doc "/html"))
3867 (scipy-sphinx-theme "scipy-sphinx-theme")
3868 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3869 (pyver ,(string-append "PYVER=")))
3870
3871 ;; FIXME: this is needed to for texlive-union to generate
3872 ;; fonts, which are not found.
3873 (setenv "HOME" "/tmp")
3874
3875 (with-directory-excursion "doc"
3876 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3877 (mkdir-p html)
3878 (system* "make" "html" pyver)
3879 (system* "make" "latex" "PAPER=a4" pyver)
3880 (system* "make" "-C" "build/latex"
3881 "all-pdf" "PAPER=a4" pyver)
3882 ;; FIXME: Generation of the info file fails.
3883 ;; (system* "make" "info" pyver)
3884 ;; (mkdir-p info)
3885 ;; (copy-file "build/texinfo/numpy.info"
3886 ;; (string-append info "/numpy.info"))
3887 (for-each (lambda (file)
3888 (copy-file (string-append "build/latex" file)
3889 (string-append doc file)))
3890 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3891 (with-directory-excursion "build/html"
3892 (for-each (lambda (file)
3893 (let* ((dir (dirname file))
3894 (tgt-dir (string-append html "/" dir)))
3895 (unless (equal? "." dir)
3896 (mkdir-p tgt-dir))
3897 (install-file file html)))
3898 (find-files "." ".*")))))
3899 #t)))))
3900 (home-page (package-home-page python-numpy))
3901 (synopsis "Documentation for the python-numpy package")
3902 (description (package-description python-numpy))
3903 (license (package-license python-numpy))))
3904
3905 (define-public python2-numpy-documentation
3906 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3907 (package
3908 (inherit numpy-documentation)
3909 (native-inputs `(("python2-functools32" ,python2-functools32)
3910 ,@(package-native-inputs numpy-documentation))))))
3911
3912 (define-public python-pygit2
3913 (package
3914 (name "python-pygit2")
3915 (version "0.25.0")
3916 (source
3917 (origin
3918 (method url-fetch)
3919 (uri (pypi-uri "pygit2" version))
3920 (sha256
3921 (base32
3922 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3923 (patches
3924 (search-patches "python-pygit2-disable-network-tests.patch"))))
3925 (build-system python-build-system)
3926 (propagated-inputs
3927 `(("python-six" ,python-six)
3928 ("python-cffi" ,python-cffi)
3929 ("libgit2" ,libgit2)
3930 ("python-tox" ,python-tox)))
3931 (home-page "https://github.com/libgit2/pygit2")
3932 (synopsis "Python bindings for libgit2")
3933 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3934 library, libgit2 implements Git plumbing.")
3935 ;; GPL2.0 only, with linking exception.
3936 (license license:gpl2)))
3937
3938 (define-public python2-pygit2
3939 (package-with-python2 python-pygit2))
3940
3941 (define-public python-pyparsing
3942 (package
3943 (name "python-pyparsing")
3944 (version "2.0.3")
3945 (source
3946 (origin
3947 (method url-fetch)
3948 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3949 "/pyparsing-" version
3950 "/pyparsing-" version ".tar.gz"))
3951 (sha256
3952 (base32
3953 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3954 (build-system python-build-system)
3955 (outputs '("out" "doc"))
3956 (arguments
3957 `(#:tests? #f ; no test target
3958 #:modules ((guix build python-build-system)
3959 (guix build utils))
3960 #:phases
3961 (alist-cons-after
3962 'install 'install-doc
3963 (lambda* (#:key outputs #:allow-other-keys)
3964 (let* ((doc (string-append (assoc-ref outputs "doc")
3965 "/share/doc/" ,name "-" ,version))
3966 (html-doc (string-append doc "/html"))
3967 (examples (string-append doc "/examples")))
3968 (mkdir-p html-doc)
3969 (mkdir-p examples)
3970 (for-each
3971 (lambda (dir tgt)
3972 (map (lambda (file)
3973 (install-file file tgt))
3974 (find-files dir ".*")))
3975 (list "docs" "htmldoc" "examples")
3976 (list doc html-doc examples))))
3977 %standard-phases)))
3978 (home-page "http://pyparsing.wikispaces.com")
3979 (synopsis "Python parsing class library")
3980 (description
3981 "The pyparsing module is an alternative approach to creating and
3982 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3983 of regular expressions. The pyparsing module provides a library of classes
3984 that client code uses to construct the grammar directly in Python code.")
3985 (license license:expat)))
3986
3987 (define-public python2-pyparsing
3988 (package-with-python2 python-pyparsing))
3989
3990 (define-public python-numpydoc
3991 (package
3992 (name "python-numpydoc")
3993 (version "0.5")
3994 (source
3995 (origin
3996 (method url-fetch)
3997 (uri (string-append
3998 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3999 version ".tar.gz"))
4000 (sha256
4001 (base32
4002 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
4003 (modules '((guix build utils)))
4004 (snippet
4005 '(begin
4006 ;; Drop a test requiring matplotlib, which we cannot add as an
4007 ;; input since it would create a circular dependency: Extend the
4008 ;; test for Python 3, where it is already dropped, to Python 2.
4009 (substitute* "numpydoc/tests/test_plot_directive.py"
4010 (("3") "2"))))))
4011 (build-system python-build-system)
4012 (propagated-inputs
4013 `(("python-sphinx" ,python-sphinx)))
4014 (native-inputs
4015 `(("python-nose" ,python-nose)))
4016 (home-page "https://pypi.python.org/pypi/numpydoc")
4017 (synopsis
4018 "Numpy's Sphinx extensions")
4019 (description
4020 "Sphinx extension to support docstrings in Numpy format.")
4021 (license license:bsd-2)))
4022
4023 (define-public python2-numpydoc
4024 (package-with-python2 python-numpydoc))
4025
4026 (define-public python-numexpr
4027 (package
4028 (name "python-numexpr")
4029 (version "2.6.1")
4030 (source
4031 (origin
4032 (method url-fetch)
4033 (uri (pypi-uri "numexpr" version))
4034 (sha256
4035 (base32
4036 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
4037 (build-system python-build-system)
4038 (arguments `(#:tests? #f)) ; no tests included
4039 (propagated-inputs
4040 `(("python-numpy" ,python-numpy)))
4041 (home-page "https://github.com/pydata/numexpr")
4042 (synopsis "Fast numerical expression evaluator for NumPy")
4043 (description
4044 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4045 expressions that operate on arrays are accelerated and use less memory than
4046 doing the same calculation in Python. In addition, its multi-threaded
4047 capabilities can make use of all your cores, which may accelerate
4048 computations, most specially if they are not memory-bounded (e.g. those using
4049 transcendental functions).")
4050 (license license:expat)))
4051
4052 (define-public python2-numexpr
4053 (package-with-python2 python-numexpr))
4054
4055 (define-public python-cycler
4056 (package
4057 (name "python-cycler")
4058 (version "0.10.0")
4059 (source (origin
4060 (method url-fetch)
4061 (uri (pypi-uri "cycler" version))
4062 (sha256
4063 (base32
4064 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4065 (build-system python-build-system)
4066 (arguments
4067 ;; XXX: The current version requires 'coveralls' which we don't have.
4068 ;; Enable this for the next release which uses 'python-pytest'.
4069 '(#:tests? #f))
4070 (propagated-inputs
4071 `(("python-six" ,python-six)))
4072 (home-page "http://matplotlib.org/cycler/")
4073 (synopsis "Composable keyword argument iterator")
4074 (description
4075 "When using @code{matplotlib} and plotting more than one line, it is
4076 common to want to be able to want to be able to cycle over one or more artist
4077 styles; but the plotting logic can quickly become involved.
4078 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4079 @code{Cycler} class was developed.")
4080 (license license:bsd-3)))
4081
4082 (define-public python2-cycler
4083 (package-with-python2 python-cycler))
4084
4085 (define-public python-colorspacious
4086 (package
4087 (name "python-colorspacious")
4088 (version "1.1.0")
4089 (source
4090 (origin
4091 (method url-fetch)
4092 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
4093 version ".tar.gz"))
4094 (file-name (string-append name "-" version))
4095 (sha256
4096 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
4097 (build-system python-build-system)
4098 (propagated-inputs
4099 `(("python-numpy" ,python-numpy)))
4100 (native-inputs
4101 `(("python-nose" ,python-nose)))
4102 (arguments
4103 `(#:phases
4104 (modify-phases %standard-phases
4105 (replace 'check
4106 (lambda _
4107 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
4108 (home-page "https://github.com/njsmith/colorspacious")
4109 (synopsis "Python library for colorspace conversions")
4110 (description "@code{colorspacious} is a Python library that lets you
4111 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4112 (license license:expat)))
4113
4114 (define-public python2-colorspacious
4115 (package-with-python2 python-colorspacious))
4116
4117 (define-public python-matplotlib
4118 (package
4119 (name "python-matplotlib")
4120 (version "2.0.0")
4121 (source
4122 (origin
4123 (method url-fetch)
4124 (uri (string-append
4125 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
4126 (file-name (string-append name "-" version ".tar.gz"))
4127 (sha256
4128 (base32
4129 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
4130 (build-system python-build-system)
4131 (propagated-inputs ; the following packages are all needed at run time
4132 `(("python-cycler" ,python-cycler)
4133 ("python-pyparsing" ,python-pyparsing)
4134 ("python-pygobject" ,python-pygobject)
4135 ("gobject-introspection" ,gobject-introspection)
4136 ("python-tkinter" ,python "tk")
4137 ("python-dateutil" ,python-dateutil)
4138 ("python-numpy" ,python-numpy)
4139 ("python-pillow" ,python-pillow)
4140 ("python-pytz" ,python-pytz)
4141 ("python-six" ,python-six)
4142 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4143 ;; from 'gtk+') provides the required 'typelib' files used by
4144 ;; 'gobject-introspection'. The location of these files is set with the
4145 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4146 ;; is done automatically by a 'native-search-path' procedure. However,
4147 ;; at run-time the user must set this variable as follows:
4148 ;;
4149 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
4150 ("gtk+" ,gtk+)
4151 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4152 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4153 ;; object. For this reason we need to import both libraries.
4154 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4155 ("python-pycairo" ,python-pycairo)
4156 ("python-cairocffi" ,python-cairocffi)))
4157 (inputs
4158 `(("libpng" ,libpng)
4159 ("imagemagick" ,imagemagick)
4160 ("freetype" ,freetype)
4161 ("cairo" ,cairo)
4162 ("glib" ,glib)
4163 ;; FIXME: Add backends when available.
4164 ;("python-wxpython" ,python-wxpython)
4165 ("python-pyqt" ,python-pyqt)
4166 ("tcl" ,tcl)
4167 ("tk" ,tk)))
4168 (native-inputs
4169 `(("pkg-config" ,pkg-config)
4170 ("python-nose" ,python-nose)
4171 ("python-mock" ,python-mock)))
4172 (arguments
4173 `(#:phases
4174 (modify-phases %standard-phases
4175 (add-before 'build 'configure-environment
4176 (lambda* (#:key outputs inputs #:allow-other-keys)
4177 (let ((cairo (assoc-ref inputs "cairo"))
4178 (gtk+ (assoc-ref inputs "gtk+")))
4179 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4180 ;; has not effect.
4181 (setenv "LD_LIBRARY_PATH"
4182 (string-append cairo "/lib:" gtk+ "/lib"))
4183 (setenv "HOME" (getcwd))
4184 (call-with-output-file "setup.cfg"
4185 (lambda (port)
4186 (format port "[directories]~%
4187 basedirlist = ~a,~a~%
4188 [rc_options]~%
4189 backend = TkAgg~%"
4190 (assoc-ref inputs "tcl")
4191 (assoc-ref inputs "tk")))))
4192 #t)))))
4193 (home-page "http://matplotlib.org")
4194 (synopsis "2D plotting library for Python")
4195 (description
4196 "Matplotlib is a Python 2D plotting library which produces publication
4197 quality figures in a variety of hardcopy formats and interactive environments
4198 across platforms. Matplotlib can be used in Python scripts, the python and
4199 ipython shell, web application servers, and six graphical user interface
4200 toolkits.")
4201 (license license:psfl)
4202 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4203
4204 (define-public python2-matplotlib
4205 (let ((matplotlib (package-with-python2
4206 (strip-python2-variant python-matplotlib))))
4207 (package (inherit matplotlib)
4208 ;; Make sure to use special packages for Python 2 instead
4209 ;; of those automatically rewritten by package-with-python2.
4210 (propagated-inputs
4211 `(("python2-pycairo" ,python2-pycairo)
4212 ("python2-functools32" ,python2-functools32)
4213 ("python2-pygobject-2" ,python2-pygobject-2)
4214 ("python2-subprocess32" ,python2-subprocess32)
4215 ("python2-tkinter" ,python-2 "tk")
4216 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4217 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4218
4219 (define-public python-matplotlib-documentation
4220 (package
4221 (name "python-matplotlib-documentation")
4222 (version (package-version python-matplotlib))
4223 (source (package-source python-matplotlib))
4224 (build-system python-build-system)
4225 (native-inputs
4226 `(("python-matplotlib" ,python-matplotlib)
4227 ("python-colorspacious" ,python-colorspacious)
4228 ("python-sphinx" ,python-sphinx)
4229 ("python-numpydoc" ,python-numpydoc)
4230 ("python-ipython" ,python-ipython)
4231 ("python-mock" ,python-mock)
4232 ("graphviz" ,graphviz)
4233 ("texlive" ,texlive)
4234 ("texinfo" ,texinfo)
4235 ,@(package-native-inputs python-matplotlib)))
4236 (arguments
4237 `(#:tests? #f ; we're only generating documentation
4238 #:phases
4239 (modify-phases %standard-phases
4240 (replace 'build
4241 (lambda _
4242 (chdir "doc")
4243 ;; Produce pdf in 'A4' format.
4244 (substitute* "conf.py"
4245 (("latex_paper_size = 'letter'") "")
4246 ;; latex_paper_size is deprecated -> set paper size using
4247 ;; latex_elements
4248 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4249 ;; insert at a point where latex_elements{} is defined:
4250 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4251 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4252 (replace 'install
4253 (lambda* (#:key inputs outputs #:allow-other-keys)
4254 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4255 (doc (string-append data "/doc/python-matplotlib-" ,version))
4256 (info (string-append data "/info"))
4257 (html (string-append doc "/html")))
4258 (mkdir-p html)
4259 (mkdir-p info)
4260 (copy-recursively "build/html" html)
4261 (symlink (string-append html "/_images")
4262 (string-append info "/matplotlib-figures"))
4263 (with-directory-excursion "build/texinfo"
4264 (substitute* "matplotlib.texi"
4265 (("@image\\{([^,]*)" all file)
4266 (string-append "@image{matplotlib-figures/" file)))
4267 (symlink (string-append html "/_images")
4268 "./matplotlib-figures")
4269 (system* "makeinfo" "--no-split"
4270 "-o" "matplotlib.info" "matplotlib.texi"))
4271 (copy-file "build/texinfo/matplotlib.info"
4272 (string-append info "/matplotlib.info"))
4273 (copy-file "build/latex/Matplotlib.pdf"
4274 (string-append doc "/Matplotlib.pdf")))
4275 #t)))))
4276 (home-page (package-home-page python-matplotlib))
4277 (synopsis "Documentation for the python-matplotlib package")
4278 (description (package-description python-matplotlib))
4279 (license (package-license python-matplotlib))))
4280
4281 (define-public python2-matplotlib-documentation
4282 (package-with-python2 python-matplotlib-documentation))
4283
4284 (define-public python2-pysnptools
4285 (package
4286 (name "python2-pysnptools")
4287 (version "0.3.9")
4288 (source
4289 (origin
4290 (method url-fetch)
4291 (uri (pypi-uri "pysnptools" version ".zip"))
4292 (sha256
4293 (base32
4294 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4295 (build-system python-build-system)
4296 (arguments
4297 `(#:python ,python-2)) ; only Python 2.7 is supported
4298 (propagated-inputs
4299 `(("python2-numpy" ,python2-numpy)
4300 ("python2-scipy" ,python2-scipy)
4301 ("python2-pandas" ,python2-pandas)))
4302 (native-inputs
4303 `(("python2-cython" ,python2-cython)))
4304 (native-inputs
4305 `(("unzip" ,unzip)))
4306 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4307 (synopsis "Library for reading and manipulating genetic data")
4308 (description
4309 "PySnpTools is a library for reading and manipulating genetic data. It
4310 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4311 those files. It can also efficiently manipulate ranges of integers using set
4312 operators such as union, intersection, and difference.")
4313 (license license:asl2.0)))
4314
4315 (define-public python-rpy2
4316 (package
4317 (name "python-rpy2")
4318 (version "2.7.6")
4319 (source
4320 (origin
4321 (method url-fetch)
4322 (uri (pypi-uri "rpy2" version))
4323 (sha256
4324 (base32
4325 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4326 (build-system python-build-system)
4327 (arguments
4328 '(#:phases
4329 (modify-phases %standard-phases
4330 (delete 'check)
4331 (add-after 'install 'check
4332 (lambda* (#:key outputs inputs #:allow-other-keys)
4333 ;; It's easier to run tests after install.
4334 ;; Make installed package available for running the tests
4335 (add-installed-pythonpath inputs outputs)
4336 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4337 (propagated-inputs
4338 `(("python-six" ,python-six)))
4339 (inputs
4340 `(("readline" ,readline)
4341 ("icu4c" ,icu4c)
4342 ("pcre" ,pcre)
4343 ("r-minimal" ,r-minimal)
4344 ("r-survival" ,r-survival)))
4345 (native-inputs
4346 `(("zlib" ,zlib)))
4347 (home-page "http://rpy.sourceforge.net/")
4348 (synopsis "Python interface to the R language")
4349 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4350 low-level interface to R from Python, a proposed high-level interface,
4351 including wrappers to graphical libraries, as well as R-like structures and
4352 functions.")
4353 (license license:gpl3+)))
4354
4355 (define-public python2-rpy2
4356 (let ((rpy2 (package-with-python2 python-rpy2)))
4357 (package (inherit rpy2)
4358 (propagated-inputs
4359 `(("python2-singledispatch" ,python2-singledispatch)
4360 ,@(package-propagated-inputs rpy2))))))
4361
4362 (define-public python-scipy
4363 (package
4364 (name "python-scipy")
4365 (version "0.18.1")
4366 (source
4367 (origin
4368 (method url-fetch)
4369 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4370 version ".tar.gz"))
4371 (file-name (string-append name "-" version ".tar.gz"))
4372 (sha256
4373 (base32
4374 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4375 (build-system python-build-system)
4376 (propagated-inputs
4377 `(("python-numpy" ,python-numpy)
4378 ("python-matplotlib" ,python-matplotlib)
4379 ("python-pyparsing" ,python-pyparsing)))
4380 (inputs
4381 `(("lapack" ,lapack)
4382 ("openblas" ,openblas)))
4383 (native-inputs
4384 `(("python-cython" ,python-cython)
4385 ("python-nose" ,python-nose)
4386 ("python-sphinx" ,python-sphinx)
4387 ("python-numpydoc" ,python-numpydoc)
4388 ("gfortran" ,gfortran)
4389 ("perl" ,perl)))
4390 (outputs '("out" "doc"))
4391 (arguments
4392 `(#:phases
4393 (modify-phases %standard-phases
4394 (add-before 'build 'configure-openblas
4395 (lambda* (#:key inputs #:allow-other-keys)
4396 (call-with-output-file "site.cfg"
4397 (lambda (port)
4398 (format port
4399 "[blas]
4400 libraries = openblas
4401 library_dirs = ~a/lib
4402 include_dirs = ~a/include
4403
4404 # backslash-n to make emacs happy
4405 \n[atlas]
4406 library_dirs = ~a/lib
4407 atlas_libs = openblas
4408 "
4409 (assoc-ref inputs "openblas")
4410 (assoc-ref inputs "openblas")
4411 (assoc-ref inputs "openblas"))))
4412 #t))
4413 (add-after 'install 'install-doc
4414 (lambda* (#:key inputs outputs #:allow-other-keys)
4415 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4416 (doc (string-append data "/doc/" ,name "-" ,version))
4417 (html (string-append doc "/html"))
4418 (pyver ,(string-append "PYVER=")))
4419 ;; Make installed package available for building the
4420 ;; documentation
4421 (add-installed-pythonpath inputs outputs)
4422 (with-directory-excursion "doc"
4423 ;; Fix generation of images for mathematical expressions.
4424 (substitute* (find-files "source" "conf\\.py")
4425 (("pngmath_use_preview = True")
4426 "pngmath_use_preview = False"))
4427 (mkdir-p html)
4428 (system* "make" "html" pyver)
4429 (with-directory-excursion "build/html"
4430 (for-each (lambda (file)
4431 (let* ((dir (dirname file))
4432 (tgt-dir (string-append html "/" dir)))
4433 (install-file file html)))
4434 (find-files "." ".*")))))
4435 #t))
4436 (add-after 'unpack 'fix-tests
4437 (lambda _
4438 (substitute* "scipy/integrate/tests/test_quadpack.py"
4439 (("libm.so") "libm.so.6"))
4440 #t))
4441 ;; Tests can only be run after the library has been installed and not
4442 ;; within the source directory.
4443 (delete 'check)
4444 (add-after 'install 'check
4445 (lambda* (#:key inputs outputs #:allow-other-keys)
4446 (add-installed-pythonpath inputs outputs)
4447 (with-directory-excursion "/tmp"
4448 (zero? (system* "python" "-c"
4449 "import scipy; scipy.test('full')")))
4450 #t)))))
4451 (home-page "http://www.scipy.org/")
4452 (synopsis "The Scipy library provides efficient numerical routines")
4453 (description "The SciPy library is one of the core packages that make up
4454 the SciPy stack. It provides many user-friendly and efficient numerical
4455 routines such as routines for numerical integration and optimization.")
4456 (properties `((python2-variant . ,(delay python2-scipy))))
4457 (license license:bsd-3)))
4458
4459 (define-public python2-scipy
4460 (package-with-python2
4461 (strip-python2-variant python-scipy)))
4462
4463 (define-public python-sockjs-tornado
4464 (package
4465 (name "python-sockjs-tornado")
4466 (version "1.0.3")
4467 (source
4468 (origin
4469 (method url-fetch)
4470 (uri (pypi-uri "sockjs-tornado" version))
4471 (sha256
4472 (base32
4473 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4474 (build-system python-build-system)
4475 (arguments
4476 `(;; There are no tests, and running the test phase requires missing
4477 ;; dependencies
4478 #:tests? #f))
4479 (propagated-inputs
4480 `(("python-tornado" ,python-tornado)))
4481 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4482 (synopsis
4483 "SockJS python server implementation on top of Tornado framework")
4484 (description
4485 "SockJS-tornado provides the server side counterpart to a SockJS client
4486 library, through the Tornado framework.
4487
4488 SockJS provides a low latency, full duplex, cross-domain communication channel
4489 between a web browser and web server.")
4490 (license license:expat)))
4491
4492 (define-public python2-sockjs-tornado
4493 (package-with-python2 python-sockjs-tornado))
4494
4495 (define-public python-socksipy-branch
4496 (package
4497 (name "python-socksipy-branch")
4498 (version "1.01")
4499 (source
4500 (origin
4501 (method url-fetch)
4502 (uri (pypi-uri "SocksiPy-branch" version))
4503 (sha256
4504 (base32
4505 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4506 (build-system python-build-system)
4507 (arguments
4508 `(#:tests? #f)) ; There are no tests
4509 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4510 (synopsis "Python SOCKS module")
4511 (description
4512 "SocksiPy - A Python SOCKS client module. It provides a
4513 socket-like interface that supports connections to any TCP
4514 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4515 The original version was developed by Dan Haim, this is a
4516 branch created by Mario Vilas to address some open issues,
4517 as the original project seems to have been abandoned circa 2007.")
4518 (license license:bsd-3)))
4519
4520 (define-public python2-socksipy-branch
4521 (package-with-python2 python-socksipy-branch))
4522
4523 (define-public python-sqlalchemy
4524 (package
4525 (name "python-sqlalchemy")
4526 (version "1.0.12")
4527 (source
4528 (origin
4529 (method url-fetch)
4530 (uri (string-append "https://pypi.python.org/packages/source/S/"
4531 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4532 (sha256
4533 (base32
4534 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4535 (build-system python-build-system)
4536 (native-inputs
4537 `(("python-cython" ,python-cython) ;for c extensions
4538 ("python-pytest" ,python-pytest)
4539 ("python-mock" ,python-mock))) ;for tests
4540 (arguments
4541 `(#:phases (alist-replace
4542 'check
4543 (lambda _ (zero? (system* "py.test")))
4544 %standard-phases)))
4545 (home-page "http://www.sqlalchemy.org")
4546 (synopsis "Database abstraction library")
4547 (description
4548 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4549 gives application developers the full power and flexibility of SQL. It
4550 provides a full suite of well known enterprise-level persistence patterns,
4551 designed for efficient and high-performing database access, adapted into a
4552 simple and Pythonic domain language.")
4553 (license license:x11)))
4554
4555 (define-public python2-sqlalchemy
4556 (package-with-python2 python-sqlalchemy))
4557
4558 (define-public python-pycodestyle
4559 (package
4560 (name "python-pycodestyle")
4561 (version "2.3.1")
4562 (source
4563 (origin
4564 (method url-fetch)
4565 (uri (pypi-uri "pycodestyle" version))
4566 (sha256
4567 (base32
4568 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4569 (build-system python-build-system)
4570 (home-page "https://pycodestyle.readthedocs.io/")
4571 (synopsis "Python style guide checker")
4572 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4573 Python code against some of the style conventions in
4574 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4575 (license license:expat)))
4576
4577 (define-public python2-pycodestyle
4578 (package-with-python2 python-pycodestyle))
4579
4580 (define-public python-orderedmultidict
4581 (package
4582 (name "python-orderedmultidict")
4583 (version "0.7.11")
4584 (source
4585 (origin
4586 (method url-fetch)
4587 (uri (pypi-uri "orderedmultidict" version))
4588 (sha256
4589 (base32
4590 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4591 (build-system python-build-system)
4592 (arguments
4593 `(#:phases
4594 (modify-phases %standard-phases
4595 (add-after 'unpack 'fix-tests
4596 (lambda _
4597 ;; The package uses nosetest for running the tests.
4598 ;; Adding this initfile allows to run the test suite
4599 ;; without requiring nosetest.
4600 (zero? (system* "touch" "tests/__init__.py")))))))
4601 (propagated-inputs
4602 `(("python-six" ,python-six)))
4603 (native-inputs
4604 `(("python-pycodestyle" ,python-pycodestyle)))
4605 (home-page "https://github.com/gruns/orderedmultidict")
4606 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4607 (description "This package contains a library for ordered multivalue
4608 dictionaries. A multivalue dictionary is a dictionary that can store
4609 multiple values for the same key. An ordered multivalue dictionary is a
4610 multivalue dictionary that retains the order of insertions and deletions.")
4611 (license license:unlicense)))
4612
4613 (define-public python2-orderedmultidict
4614 (package-with-python2 python-orderedmultidict))
4615
4616 (define-public python-furl
4617 (package
4618 (name "python-furl")
4619 (version "0.5.6")
4620 (source
4621 (origin
4622 (method url-fetch)
4623 (uri (pypi-uri "furl" version))
4624 (sha256
4625 (base32
4626 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4627 (build-system python-build-system)
4628 (propagated-inputs
4629 `(("python-six" ,python-six)
4630 ("python-orderedmultidict" ,python-orderedmultidict)))
4631 (native-inputs
4632 `(("python-pycodestyle" ,python-pycodestyle)))
4633 (home-page "https://github.com/gruns/furl")
4634 (synopsis "URL manipulation in Python")
4635 (description "Furl provides an easy-to-use alternative to the
4636 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4637 (license license:unlicense)))
4638
4639 (define-public python2-furl
4640 (package-with-python2 python-furl))
4641
4642 (define-public python-flask-babel
4643 (package
4644 (name "python-flask-babel")
4645 (version "0.11.1")
4646 (source
4647 (origin
4648 (method url-fetch)
4649 (uri (pypi-uri "Flask-Babel" version))
4650 (sha256
4651 (base32
4652 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4653 (build-system python-build-system)
4654 (propagated-inputs
4655 `(("python-flask" ,python-flask)
4656 ("python-babel" ,python-babel)
4657 ("python-jinja2" ,python-jinja2)
4658 ("python-pytz" ,python-pytz)))
4659 (home-page "https://github.com/python-babel/flask-babel")
4660 (synopsis "Add i18n/l10n support to Flask applications")
4661 (description "This package implements internationalization and localization
4662 support for Flask. This is based on the Python babel module as well as pytz -
4663 both of which are installed automatically if you install this library.")
4664 (license license:bsd-3)))
4665
4666 (define-public python2-flask-babel
4667 (package-with-python2 python-flask-babel))
4668
4669 (define-public python-sqlalchemy-utils
4670 (package
4671 (name "python-sqlalchemy-utils")
4672 (version "0.32.13")
4673 (source
4674 (origin
4675 (method url-fetch)
4676 (uri (pypi-uri "SQLAlchemy-Utils" version))
4677 (sha256
4678 (base32
4679 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4680 (build-system python-build-system)
4681 (arguments
4682 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4683 ;; #:phases
4684 ;; (modify-phases %standard-phases
4685 ;; (replace 'check
4686 ;; (lambda _
4687 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4688 (propagated-inputs
4689 `(("python-six" ,python-six)
4690 ("python-sqlalchemy" ,python-sqlalchemy)))
4691 (native-inputs
4692 `(("python-dateutil" ,python-dateutil)
4693 ("python-flexmock" ,python-flexmock)
4694 ("python-psycopg2" ,python-psycopg2)
4695 ("python-pytest" ,python-pytest)
4696 ("python-pytz" ,python-pytz)))
4697 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4698 (synopsis "Various utility functions for SQLAlchemy")
4699 (description
4700 "SQLAlchemy-utils provides various utility functions and custom data types
4701 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4702
4703 You might also want to install the following optional dependencies:
4704 @enumerate
4705 @item @code{python-passlib}
4706 @item @code{python-babel}
4707 @item @code{python-cryptography}
4708 @item @code{python-pytz}
4709 @item @code{python-psycopg2}
4710 @item @code{python-furl}
4711 @item @code{python-flask-babel}
4712 @end enumerate
4713 ")
4714 (license license:bsd-3)))
4715
4716 (define-public python2-sqlalchemy-utils
4717 (package-with-python2 python-sqlalchemy-utils))
4718
4719 (define-public python-alembic
4720 (package
4721 (name "python-alembic")
4722 (version "0.8.10")
4723 (source
4724 (origin
4725 (method url-fetch)
4726 (uri (pypi-uri "alembic" version))
4727 (sha256
4728 (base32
4729 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4730 (build-system python-build-system)
4731 (native-inputs
4732 `(("python-mock" ,python-mock)
4733 ("python-pytest-cov" ,python-pytest-cov)))
4734 (propagated-inputs
4735 `(("python-sqlalchemy" ,python-sqlalchemy)
4736 ("python-mako" ,python-mako)
4737 ("python-editor" ,python-editor)))
4738 (home-page "http://bitbucket.org/zzzeek/alembic")
4739 (synopsis
4740 "Database migration tool for SQLAlchemy")
4741 (description
4742 "Alembic is a lightweight database migration tool for usage with the
4743 SQLAlchemy Database Toolkit for Python.")
4744 (license license:expat)))
4745
4746 (define-public python2-alembic
4747 (package-with-python2 python-alembic))
4748
4749 (define-public python-autopep8
4750 (package
4751 (name "python-autopep8")
4752 (version "1.2.4")
4753 (source
4754 (origin
4755 (method url-fetch)
4756 (uri (pypi-uri "autopep8" version))
4757 (sha256
4758 (base32
4759 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4760 (build-system python-build-system)
4761 (propagated-inputs
4762 `(("python-pep8" ,python-pep8)))
4763 (home-page "https://github.com/hhatto/autopep8")
4764 (synopsis "Format Python code according to the PEP 8 style guide")
4765 (description
4766 "@code{autopep8} automatically formats Python code to conform to
4767 the PEP 8 style guide. It uses the pycodestyle utility to determine
4768 what parts of the code needs to be formatted. @code{autopep8} is
4769 capable of fixing most of the formatting issues that can be reported
4770 by pycodestyle.")
4771 (license (license:non-copyleft
4772 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4773
4774 (define-public python2-autopep8
4775 (package-with-python2 python-autopep8))
4776
4777 (define-public python-distutils-extra
4778 (package
4779 (name "python-distutils-extra")
4780 (version "2.38")
4781 (source
4782 (origin
4783 (method url-fetch)
4784 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4785 version "/+download/python-distutils-extra-"
4786 version ".tar.gz"))
4787 (sha256
4788 (base32
4789 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4790 (build-system python-build-system)
4791 (home-page "https://launchpad.net/python-distutils-extra/")
4792 (synopsis "Enhancements to Python's distutils")
4793 (description
4794 "The python-distutils-extra module enables you to easily integrate
4795 gettext support, themed icons, and scrollkeeper-based documentation into
4796 Python's distutils.")
4797 (license license:gpl2)))
4798
4799 (define-public python2-distutils-extra
4800 (package-with-python2 python-distutils-extra))
4801
4802 (define-public python2-elib.intl
4803 (package
4804 (name "python2-elib.intl")
4805 (version "0.0.3")
4806 (source
4807 (origin
4808 ;; This project doesn't tag releases or publish tarballs, so we take
4809 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4810 (method git-fetch)
4811 (uri (git-reference
4812 (url "https://github.com/dieterv/elib.intl.git")
4813 (commit "d09997cfef")))
4814 (sha256
4815 (base32
4816 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4817 (build-system python-build-system)
4818 (arguments
4819 ;; incompatible with Python 3 (exception syntax)
4820 `(#:python ,python-2
4821 #:tests? #f))
4822 (home-page "https://github.com/dieterv/elib.intl")
4823 (synopsis "Enhanced internationalization for Python")
4824 (description
4825 "The elib.intl module provides enhanced internationalization (I18N)
4826 services for your Python modules and applications.")
4827 (license license:lgpl3+)))
4828
4829 (define-public python-pillow
4830 (package
4831 (name "python-pillow")
4832 (version "3.3.3")
4833 (source
4834 (origin
4835 (method url-fetch)
4836 (uri (pypi-uri "Pillow" version))
4837 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4838 (sha256
4839 (base32
4840 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4841 (build-system python-build-system)
4842 (native-inputs
4843 `(("python-nose" ,python-nose)))
4844 (inputs
4845 `(("freetype" ,freetype)
4846 ("lcms" ,lcms)
4847 ("zlib" ,zlib)
4848 ("libjpeg" ,libjpeg)
4849 ("openjpeg" ,openjpeg)
4850 ("libtiff" ,libtiff)
4851 ("libwebp" ,libwebp)))
4852 (arguments
4853 `(#:phases (modify-phases %standard-phases
4854 (add-after
4855 'install 'check-installed
4856 (lambda* (#:key outputs inputs #:allow-other-keys)
4857 (begin
4858 (setenv "HOME" (getcwd))
4859 ;; Make installed package available for running the
4860 ;; tests
4861 (add-installed-pythonpath inputs outputs)
4862 (and (zero? (system* "python" "selftest.py"
4863 "--installed"))
4864 (zero? (system* "python" "test-installed.py"))))))
4865 (delete 'check))))
4866 (home-page "https://pypi.python.org/pypi/Pillow")
4867 (synopsis "Fork of the Python Imaging Library")
4868 (description
4869 "The Python Imaging Library adds image processing capabilities to your
4870 Python interpreter. This library provides extensive file format support, an
4871 efficient internal representation, and fairly powerful image processing
4872 capabilities. The core image library is designed for fast access to data
4873 stored in a few basic pixel formats. It should provide a solid foundation for
4874 a general image processing tool.")
4875 (license (license:x11-style
4876 "http://www.pythonware.com/products/pil/license.htm"
4877 "The PIL Software License"))))
4878
4879 (define-public python2-pillow
4880 (package-with-python2 python-pillow))
4881
4882 (define-public python-pycparser
4883 (package
4884 (name "python-pycparser")
4885 (version "2.17")
4886 (source
4887 (origin
4888 (method url-fetch)
4889 (uri (pypi-uri "pycparser" version))
4890 (sha256
4891 (base32
4892 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4893 (outputs '("out" "doc"))
4894 (build-system python-build-system)
4895 (native-inputs
4896 `(("pkg-config" ,pkg-config)))
4897 (arguments
4898 `(#:phases
4899 (modify-phases %standard-phases
4900 (replace 'check
4901 (lambda _
4902 (with-directory-excursion "tests"
4903 (zero? (system* "python" "all_tests.py")))))
4904 (add-after 'install 'install-doc
4905 (lambda* (#:key outputs #:allow-other-keys)
4906 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4907 (doc (string-append data "/doc/" ,name "-" ,version))
4908 (examples (string-append doc "/examples")))
4909 (mkdir-p examples)
4910 (for-each (lambda (file)
4911 (copy-file (string-append "." file)
4912 (string-append doc file)))
4913 '("/README.rst" "/CHANGES" "/LICENSE"))
4914 (copy-recursively "examples" examples)))))))
4915 (home-page "https://github.com/eliben/pycparser")
4916 (synopsis "C parser in Python")
4917 (description
4918 "Pycparser is a complete parser of the C language, written in pure Python
4919 using the PLY parsing library. It parses C code into an AST and can serve as
4920 a front-end for C compilers or analysis tools.")
4921 (license license:bsd-3)))
4922
4923 (define-public python2-pycparser
4924 (package-with-python2 python-pycparser))
4925
4926 (define-public python-cffi
4927 (package
4928 (name "python-cffi")
4929 (version "1.10.0")
4930 (source
4931 (origin
4932 (method url-fetch)
4933 (uri (pypi-uri "cffi" version))
4934 (sha256
4935 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
4936 (build-system python-build-system)
4937 (outputs '("out" "doc"))
4938 (inputs
4939 `(("libffi" ,libffi)))
4940 (propagated-inputs ; required at run-time
4941 `(("python-pycparser" ,python-pycparser)))
4942 (native-inputs
4943 `(("pkg-config" ,pkg-config)
4944 ("python-sphinx" ,python-sphinx)
4945 ("python-pytest" ,python-pytest)))
4946 (arguments
4947 `(#:modules ((ice-9 ftw)
4948 (srfi srfi-26)
4949 (guix build utils)
4950 (guix build python-build-system))
4951 #:phases
4952 (modify-phases %standard-phases
4953 (replace 'check
4954 (lambda _
4955 (setenv "PYTHONPATH"
4956 (string-append
4957 (getenv "PYTHONPATH")
4958 ":" (getcwd) "/build/"
4959 (car (scandir "build" (cut string-prefix? "lib." <>)))))
4960
4961 ;; XXX The "normal" approach of setting CC and friends does
4962 ;; not work here. Is this the correct way of doing things?
4963 (substitute* "testing/embedding/test_basic.py"
4964 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4965 (string-append "c = distutils.ccompiler.new_compiler();"
4966 "c.set_executables(compiler='gcc',"
4967 "compiler_so='gcc',linker_exe='gcc',"
4968 "linker_so='gcc -shared')")))
4969 (substitute* "testing/cffi0/test_ownlib.py"
4970 (("'cc testownlib") "'gcc testownlib"))
4971 (zero? (system* "py.test" "-v" "c/" "testing/"))))
4972 (add-after 'install 'install-doc
4973 (lambda* (#:key outputs #:allow-other-keys)
4974 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4975 (doc (string-append data "/doc/" ,name "-" ,version))
4976 (html (string-append doc "/html")))
4977 (with-directory-excursion "doc"
4978 (system* "make" "html")
4979 (mkdir-p html)
4980 (copy-recursively "build/html" html))
4981 (copy-file "LICENSE" (string-append doc "/LICENSE"))
4982 #t))))))
4983 (home-page "http://cffi.readthedocs.org")
4984 (synopsis "Foreign function interface for Python")
4985 (description
4986 "Foreign Function Interface for Python calling C code.")
4987 (license license:expat)))
4988
4989 (define-public python2-cffi
4990 (package-with-python2 python-cffi))
4991
4992 (define-public python-xcffib
4993 (package
4994 (name "python-xcffib")
4995 (version "0.5.1")
4996 (source
4997 (origin
4998 (method url-fetch)
4999 (uri (pypi-uri "xcffib" version))
5000 (sha256
5001 (base32
5002 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
5003 (build-system python-build-system)
5004 (inputs
5005 `(("libxcb" ,libxcb)))
5006 (propagated-inputs
5007 `(("python-cffi" ,python-cffi) ; used at run time
5008 ("python-six" ,python-six)))
5009 (arguments
5010 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5011 #:tests? #f
5012 #:phases
5013 (modify-phases %standard-phases
5014 (add-after 'unpack 'fix-libxcb-path
5015 (lambda* (#:key inputs #:allow-other-keys)
5016 (let ((libxcb (assoc-ref inputs "libxcb")))
5017 (substitute* '("xcffib/__init__.py")
5018 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5019 #t)))
5020 (add-after 'install 'install-doc
5021 (lambda* (#:key outputs #:allow-other-keys)
5022 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5023 "/doc/" ,name "-" ,version)))
5024 (mkdir-p doc)
5025 (copy-file "README.md"
5026 (string-append doc "/README.md"))
5027 #t))))))
5028 (home-page "https://github.com/tych0/xcffib")
5029 (synopsis "XCB Python bindings")
5030 (description
5031 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5032 support for Python 3 and PyPy. It is based on cffi.")
5033 (license license:expat)))
5034
5035 (define-public python2-xcffib
5036 (package-with-python2 python-xcffib))
5037
5038 (define-public python-cairocffi
5039 (package
5040 (name "python-cairocffi")
5041 (version "0.8.0")
5042 (source
5043 (origin
5044 (method url-fetch)
5045 ;; The archive on pypi is missing the 'utils' directory!
5046 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
5047 version ".tar.gz"))
5048 (file-name (string-append name "-" version ".tar.gz"))
5049 (sha256
5050 (base32
5051 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
5052 (build-system python-build-system)
5053 (outputs '("out" "doc"))
5054 (inputs
5055 `(("gdk-pixbuf" ,gdk-pixbuf)
5056 ("cairo" ,cairo)))
5057 (native-inputs
5058 `(("pkg-config" ,pkg-config)
5059 ("python-sphinx" ,python-sphinx)
5060 ("python-docutils" ,python-docutils)))
5061 (propagated-inputs
5062 `(("python-xcffib" ,python-xcffib))) ; used at run time
5063 (arguments
5064 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
5065 #:tests? #f
5066 #:phases
5067 (modify-phases %standard-phases
5068 (add-after 'install 'install-doc
5069 (lambda* (#:key inputs outputs #:allow-other-keys)
5070 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5071 (doc (string-append data "/doc/" ,name "-" ,version))
5072 (html (string-append doc "/html")))
5073 (setenv "LD_LIBRARY_PATH"
5074 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5075 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5076 (setenv "LANG" "en_US.UTF-8")
5077 (mkdir-p html)
5078 (for-each (lambda (file)
5079 (copy-file (string-append "." file)
5080 (string-append doc file)))
5081 '("/README.rst" "/CHANGES" "/LICENSE"))
5082 (system* "python" "setup.py" "build_sphinx")
5083 (copy-recursively "docs/_build/html" html)
5084 #t))))))
5085 (home-page "https://github.com/Kozea/cairocffi")
5086 (synopsis "Python bindings and object-oriented API for Cairo")
5087 (description
5088 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5089 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5090 graphics library with support for multiple backends including image buffers,
5091 PNG, PostScript, PDF, and SVG file output.")
5092 (license license:bsd-3)))
5093
5094 (define-public python2-cairocffi
5095 (package-with-python2 python-cairocffi))
5096
5097 (define-public python-decorator
5098 (package
5099 (name "python-decorator")
5100 (version "4.0.10")
5101 (source
5102 (origin
5103 (method url-fetch)
5104 (uri (pypi-uri "decorator" version))
5105 (sha256
5106 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
5107 (build-system python-build-system)
5108 (arguments '(#:tests? #f)) ; no test target
5109 (home-page "https://pypi.python.org/pypi/decorator/")
5110 (synopsis "Python module to simplify usage of decorators")
5111 (description
5112 "The aim of the decorator module is to simplify the usage of decorators
5113 for the average programmer, and to popularize decorators usage giving examples
5114 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5115 etc. The core of this module is a decorator factory.")
5116 (license license:expat)))
5117
5118 (define-public python2-decorator
5119 (package-with-python2 python-decorator))
5120
5121 (define-public python-drmaa
5122 (package
5123 (name "python-drmaa")
5124 (version "0.7.7")
5125 (source
5126 (origin
5127 (method url-fetch)
5128 (uri (pypi-uri "drmaa" version))
5129 (sha256
5130 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5131 (build-system python-build-system)
5132 ;; The test suite requires libdrmaa which is provided by the cluster
5133 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5134 ;; should be set to the path of the libdrmaa library.
5135 (arguments '(#:tests? #f))
5136 (native-inputs
5137 `(("python-nose" ,python-nose)))
5138 (home-page "https://pypi.python.org/pypi/drmaa")
5139 (synopsis "Python bindings for the DRMAA library")
5140 (description
5141 "A Python package for Distributed Resource Management (DRM) job
5142 submission and control. This package is an implementation of the DRMAA 1.0
5143 Python language binding specification.")
5144 (license license:bsd-3)))
5145
5146 (define-public python2-drmaa
5147 (package-with-python2 python-drmaa))
5148
5149 (define-public python-gridmap
5150 (package
5151 (name "python-gridmap")
5152 (version "0.13.0")
5153 (source
5154 (origin
5155 (method url-fetch)
5156 (uri (string-append
5157 "https://github.com/pygridtools/gridmap/archive/v"
5158 version ".tar.gz"))
5159 (file-name (string-append name "-" version ".tar.gz"))
5160 (sha256
5161 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5162 (build-system python-build-system)
5163 (arguments
5164 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5165 (propagated-inputs
5166 `(("python-psutil" ,python-psutil)
5167 ("python-drmaa" ,python-drmaa)
5168 ("python-pyzmq" ,python-pyzmq)))
5169 (home-page "https://github.com/pygridtools/gridmap")
5170 (synopsis "Create jobs on a cluster directly from Python")
5171 (description
5172 "Gridmap is a Python package to allow you to easily create jobs on the
5173 cluster directly from Python. You can directly map Python functions onto the
5174 cluster without needing to write any wrapper code yourself.")
5175 (license license:gpl3+)))
5176
5177 (define-public python2-gridmap
5178 (package-with-python2 python-gridmap))
5179
5180 (define-public python-pexpect
5181 (package
5182 (name "python-pexpect")
5183 (version "4.2.1")
5184 (source
5185 (origin
5186 (method url-fetch)
5187 (uri (pypi-uri "pexpect" version))
5188 (sha256
5189 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
5190 (build-system python-build-system)
5191 (arguments
5192 `(#:phases
5193 (modify-phases %standard-phases
5194 (add-before 'check 'prepare-tests
5195 (lambda _
5196 (substitute* (find-files "tests")
5197 (("/bin/ls") (which "ls"))
5198 (("/bin/echo") (which "echo"))
5199 (("/bin/which") (which "which"))
5200 ;; Many tests try to use the /bin directory which
5201 ;; is not present in the build environment.
5202 ;; Use one that's non-empty and unlikely to change.
5203 (("/bin'") "/dev'"))
5204 ;; XXX: Socket connection test gets "Connection reset by peer".
5205 ;; Why does it not work? Delete for now.
5206 (delete-file "tests/test_socket.py")
5207 #t))
5208 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
5209 (native-inputs
5210 `(("python-nose" ,python-nose)
5211 ("python-pytest" ,python-pytest-3.0)
5212 ("man-db" ,man-db)
5213 ("which" ,which)))
5214 (propagated-inputs
5215 `(("python-ptyprocess" ,python-ptyprocess)))
5216 (home-page "http://pexpect.readthedocs.org/")
5217 (synopsis "Controlling interactive console applications")
5218 (description
5219 "Pexpect is a pure Python module for spawning child applications;
5220 controlling them; and responding to expected patterns in their output.
5221 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5222 child application and control it as if a human were typing commands.")
5223 (license license:isc)))
5224
5225 (define-public python2-pexpect
5226 (package-with-python2 python-pexpect))
5227
5228 (define-public python-setuptools-scm
5229 (package
5230 (name "python-setuptools-scm")
5231 (version "1.15.0")
5232 (source (origin
5233 (method url-fetch)
5234 (uri (pypi-uri "setuptools_scm" version))
5235 (sha256
5236 (base32
5237 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5238 (build-system python-build-system)
5239 (home-page "https://github.com/pypa/setuptools_scm/")
5240 (synopsis "Manage Python package versions in SCM metadata")
5241 (description
5242 "Setuptools_scm handles managing your Python package versions in
5243 @dfn{software configuration management} (SCM) metadata instead of declaring
5244 them as the version argument or in a SCM managed file.")
5245 (license license:expat)))
5246
5247 (define-public python2-setuptools-scm
5248 (package-with-python2 python-setuptools-scm))
5249
5250 (define-public python-pathpy
5251 (package
5252 (name "python-pathpy")
5253 (version "8.1.1")
5254 (source
5255 (origin
5256 (method url-fetch)
5257 (uri (string-append "https://pypi.python.org/packages/source/p/"
5258 "path.py/path.py-" version ".tar.gz"))
5259 (sha256
5260 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5261 (outputs '("out" "doc"))
5262 (build-system python-build-system)
5263 (propagated-inputs
5264 `(("python-appdirs" ,python-appdirs)))
5265 (native-inputs
5266 `(("python-setuptools-scm" ,python-setuptools-scm)
5267 ("python-sphinx" ,python-sphinx)
5268 ("python-rst.linker" ,python-rst.linker)
5269 ("python-pytest" ,python-pytest)
5270 ("python-pytest-runner" ,python-pytest-runner)))
5271 (arguments
5272 `(#:phases
5273 (modify-phases %standard-phases
5274 (add-after 'build 'build-doc
5275 (lambda _
5276 (setenv "LANG" "en_US.UTF-8")
5277 (zero? (system* "python" "setup.py" "build_sphinx"))))
5278 (add-after 'install 'install-doc
5279 (lambda* (#:key outputs #:allow-other-keys)
5280 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5281 (doc (string-append data "/doc/" ,name "-" ,version))
5282 (html (string-append doc "/html")))
5283 (mkdir-p html)
5284 (for-each (lambda (file)
5285 (copy-file file (string-append doc "/" file)))
5286 '("README.rst" "CHANGES.rst"))
5287 (copy-recursively "build/sphinx/html" html)))))))
5288 (home-page "https://github.com/jaraco/path.py")
5289 (synopsis "Python module wrapper for built-in os.path")
5290 (description
5291 "@code{path.py} implements path objects as first-class entities, allowing
5292 common operations on files to be invoked on those path objects directly.")
5293 (license license:expat)))
5294
5295 (define-public python2-pathpy
5296 (package-with-python2 python-pathpy))
5297
5298 (define-public python-pickleshare
5299 (package
5300 (name "python-pickleshare")
5301 (version "0.5")
5302 (source
5303 (origin
5304 (method url-fetch)
5305 (uri (string-append "https://pypi.python.org/packages/source/p/"
5306 "pickleshare/pickleshare-" version ".tar.gz"))
5307 (sha256
5308 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5309 (build-system python-build-system)
5310 (propagated-inputs
5311 `(("python-pathpy" ,python-pathpy)))
5312 (home-page "https://github.com/vivainio/pickleshare")
5313 (synopsis "Tiny key value database with concurrency support")
5314 (description
5315 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5316 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5317 shelve, many processes can access the database simultaneously. Changing a
5318 value in database is immediately visible to other processes accessing the same
5319 database. Concurrency is possible because the values are stored in separate
5320 files. Hence the “database” is a directory where all files are governed by
5321 PickleShare.")
5322 (license license:expat)))
5323
5324 (define-public python2-pickleshare
5325 (package-with-python2 python-pickleshare))
5326
5327 (define-public python-simplegeneric
5328 (package
5329 (name "python-simplegeneric")
5330 (version "0.8.1")
5331 (source
5332 (origin
5333 (method url-fetch)
5334 (uri (string-append "https://pypi.python.org/packages/source/s/"
5335 "simplegeneric/simplegeneric-" version ".zip"))
5336 (sha256
5337 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5338 (build-system python-build-system)
5339 (native-inputs
5340 `(("unzip" ,unzip)))
5341 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5342 (synopsis "Python module for simple generic functions")
5343 (description
5344 "The simplegeneric module lets you define simple single-dispatch generic
5345 functions, akin to Python’s built-in generic functions like @code{len()},
5346 @code{iter()} and so on. However, instead of using specially-named methods,
5347 these generic functions use simple lookup tables, akin to those used by
5348 e.g. @code{pickle.dump()} and other generic functions found in the Python
5349 standard library.")
5350 (license license:zpl2.1)))
5351
5352 (define-public python2-simplegeneric
5353 (package-with-python2 python-simplegeneric))
5354
5355 (define-public python-ipython-genutils
5356 ;; TODO: This package is retired, check if can be removed, see description.
5357 (package
5358 (name "python-ipython-genutils")
5359 (version "0.1.0")
5360 (source
5361 (origin
5362 (method url-fetch)
5363 (uri (string-append "https://pypi.python.org/packages/source/i/"
5364 "ipython_genutils/ipython_genutils-"
5365 version ".tar.gz"))
5366 (sha256
5367 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5368 (build-system python-build-system)
5369 (arguments `(#:tests? #f)) ; no tests
5370 (home-page "http://ipython.org")
5371 (synopsis "Vestigial utilities from IPython")
5372 (description
5373 "This package provides retired utilities from IPython. No packages
5374 outside IPython/Jupyter should depend on it.
5375
5376 This package shouldn't exist. It contains some common utilities shared by
5377 Jupyter and IPython projects during The Big Split. As soon as possible, those
5378 packages will remove their dependency on this, and this package will go
5379 away.")
5380 (license license:bsd-3)))
5381
5382 (define-public python2-ipython-genutils
5383 (package-with-python2 python-ipython-genutils))
5384
5385 (define-public python-traitlets
5386 (package
5387 (name "python-traitlets")
5388 (version "4.2.0")
5389 (source
5390 (origin
5391 (method url-fetch)
5392 (uri (pypi-uri "traitlets" version))
5393 (sha256
5394 (base32
5395 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5396 (build-system python-build-system)
5397 (arguments
5398 `(#:phases
5399 (modify-phases %standard-phases
5400 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5401 (propagated-inputs
5402 `(("python-ipython-genutils" ,python-ipython-genutils)
5403 ("python-decorator" ,python-decorator)))
5404 (native-inputs
5405 `(("python-mock" ,python-mock)
5406 ("python-nose" ,python-nose)))
5407 (home-page "http://ipython.org")
5408 (synopsis "Configuration system for Python applications")
5409 (description
5410 "Traitlets is a framework that lets Python classes have attributes with
5411 type checking, dynamically calculated default values, and ‘on change’
5412 callbacks. The package also includes a mechanism to use traitlets for
5413 configuration, loading values from files or from command line arguments. This
5414 is a distinct layer on top of traitlets, so you can use traitlets in your code
5415 without using the configuration machinery.")
5416 (license license:bsd-3)))
5417
5418 (define-public python2-traitlets
5419 (package-with-python2 python-traitlets))
5420
5421 (define-public python-jupyter-core
5422 (package
5423 (name "python-jupyter-core")
5424 (version "4.2.1")
5425 (source
5426 (origin
5427 (method url-fetch)
5428 (uri (string-append (pypi-uri "jupyter_core" version)))
5429 (sha256
5430 (base32
5431 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5432 (build-system python-build-system)
5433 ;; FIXME: not sure how to run the tests
5434 (arguments `(#:tests? #f))
5435 (propagated-inputs
5436 `(("python-traitlets" ,python-traitlets)))
5437 (home-page "http://jupyter.org/")
5438 (synopsis "Jupyter base package")
5439 (description
5440 "Jupyter core is the base package on which Jupyter projects rely.")
5441 (license license:bsd-3)))
5442
5443 (define-public python2-jupyter-core
5444 (package-with-python2 python-jupyter-core))
5445
5446 (define-public python-jupyter-client
5447 (package
5448 (name "python-jupyter-client")
5449 (version "4.4.0")
5450 (source
5451 (origin
5452 (method url-fetch)
5453 (uri (pypi-uri "jupyter_client" version))
5454 (sha256
5455 (base32
5456 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5457 (build-system python-build-system)
5458 ;; Tests fail because of missing native python kernel which I assume is
5459 ;; provided by the ipython package, which we cannot use because it would
5460 ;; cause a dependency cycle.
5461 (arguments `(#:tests? #f))
5462 (propagated-inputs
5463 `(("python-pyzmq" ,python-pyzmq)
5464 ("python-traitlets" ,python-traitlets)
5465 ("python-jupyter-core" ,python-jupyter-core)))
5466 (home-page "http://jupyter.org/")
5467 (synopsis "Jupyter protocol implementation and client libraries")
5468 (description
5469 "The @code{jupyter_client} package contains the reference implementation
5470 of the Jupyter protocol. It also provides client and kernel management APIs
5471 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5472 installing @code{kernelspec}s for use with Jupyter frontends.")
5473 (license license:bsd-3)))
5474
5475 (define-public python2-jupyter-client
5476 (package-with-python2 python-jupyter-client))
5477
5478 (define-public python-ipykernel
5479 (package
5480 (name "python-ipykernel")
5481 (version "4.5.2")
5482 (source
5483 (origin
5484 (method url-fetch)
5485 (uri (pypi-uri "ipykernel" version))
5486 (sha256
5487 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5488 (build-system python-build-system)
5489 ;; The tests load a submodule of IPython. However, IPython itself depends
5490 ;; on ipykernel.
5491 (arguments `(#:tests? #f))
5492 (propagated-inputs
5493 ;; imported at runtime during connect
5494 `(("python-jupyter-client" ,python-jupyter-client)))
5495 (home-page "http://ipython.org")
5496 (synopsis "IPython Kernel for Jupyter")
5497 (description
5498 "This package provides the IPython kernel for Jupyter.")
5499 (license license:bsd-3)))
5500
5501 (define-public python2-ipykernel
5502 (package-with-python2 python-ipykernel))
5503
5504 (define-public python-testpath
5505 (package
5506 (name "python-testpath")
5507 (version "0.2")
5508 (source
5509 (origin
5510 (method url-fetch)
5511 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5512 version ".tar.gz"))
5513 (file-name (string-append name "-" version ".tar.gz"))
5514 (sha256
5515 (base32
5516 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5517 (build-system python-build-system)
5518 (arguments
5519 `(#:tests? #f ; this package does not even have a setup.py
5520 #:modules ((guix build python-build-system)
5521 (guix build utils)
5522 (srfi srfi-1))
5523 #:imported-modules (,@%python-build-system-modules
5524 (srfi srfi-1))
5525 #:phases
5526 (modify-phases %standard-phases
5527 (delete 'install)
5528 (replace 'build
5529 (lambda* (#:key inputs outputs #:allow-other-keys)
5530 (let* ((version (last
5531 (string-split (assoc-ref inputs "python") #\-)))
5532 (x.y (string-join (take (string-split version #\.) 2)
5533 "."))
5534 (dir (string-append
5535 (assoc-ref outputs "out")
5536 "/lib/python" x.y "/site-packages/testpath")))
5537 (mkdir-p dir)
5538 (copy-recursively "testpath" dir))
5539 #t)))))
5540 (home-page "https://github.com/takluyver/testpath")
5541 (synopsis "Test utilities for code working with files and commands")
5542 (description
5543 "Testpath is a collection of utilities for Python code working with files
5544 and commands. It contains functions to check things on the filesystem, and
5545 tools for mocking system commands and recording calls to those.")
5546 (license license:expat)))
5547
5548 (define-public python2-testpath
5549 (package-with-python2 python-testpath))
5550
5551 (define-public python-ipython
5552 (package
5553 (name "python-ipython")
5554 (version "5.2.2")
5555 (source
5556 (origin
5557 (method url-fetch)
5558 (uri (pypi-uri "ipython" version ".tar.gz"))
5559 (sha256
5560 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5561 (build-system python-build-system)
5562 (outputs '("out" "doc"))
5563 (propagated-inputs
5564 `(("python-pyzmq" ,python-pyzmq)
5565 ("python-prompt-toolkit" ,python-prompt-toolkit)
5566 ("python-terminado" ,python-terminado)
5567 ("python-matplotlib" ,python-matplotlib)
5568 ("python-numpy" ,python-numpy)
5569 ("python-numpydoc" ,python-numpydoc)
5570 ("python-jinja2" ,python-jinja2)
5571 ("python-mistune" ,python-mistune)
5572 ("python-pexpect" ,python-pexpect)
5573 ("python-pickleshare" ,python-pickleshare)
5574 ("python-simplegeneric" ,python-simplegeneric)
5575 ("python-jsonschema" ,python-jsonschema)
5576 ("python-traitlets" ,python-traitlets)
5577 ("python-ipykernel" ,python-ipykernel)
5578 ("python-nbformat" ,python-nbformat)
5579 ("python-pygments" ,python-pygments)))
5580 (inputs
5581 `(("readline" ,readline)
5582 ("which" ,which)))
5583 (native-inputs
5584 `(("graphviz" ,graphviz)
5585 ("pkg-config" ,pkg-config)
5586 ("python-requests" ,python-requests) ;; for tests
5587 ("python-testpath" ,python-testpath)
5588 ("python-nose" ,python-nose)
5589 ("python-sphinx" ,python-sphinx)
5590 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5591 ;; FIXME: It's possible that a smaller union would work just as well.
5592 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5593 texlive-fonts-ec
5594 texlive-generic-ifxetex
5595 texlive-generic-pdftex
5596 texlive-latex-amsfonts
5597 texlive-latex-capt-of
5598 texlive-latex-cmap
5599 texlive-latex-environ
5600 texlive-latex-eqparbox
5601 texlive-latex-etoolbox
5602 texlive-latex-expdlist
5603 texlive-latex-fancyhdr
5604 texlive-latex-fancyvrb
5605 texlive-latex-fncychap
5606 texlive-latex-float
5607 texlive-latex-framed
5608 texlive-latex-geometry
5609 texlive-latex-graphics
5610 texlive-latex-hyperref
5611 texlive-latex-mdwtools
5612 texlive-latex-multirow
5613 texlive-latex-oberdiek
5614 texlive-latex-parskip
5615 texlive-latex-preview
5616 texlive-latex-tabulary
5617 texlive-latex-threeparttable
5618 texlive-latex-titlesec
5619 texlive-latex-trimspaces
5620 texlive-latex-ucs
5621 texlive-latex-upquote
5622 texlive-latex-url
5623 texlive-latex-varwidth
5624 texlive-latex-wrapfig)))
5625 ("texinfo" ,texinfo)))
5626 (arguments
5627 `(#:phases
5628 (modify-phases %standard-phases
5629 (add-after
5630 'install 'install-doc
5631 (lambda* (#:key inputs outputs #:allow-other-keys)
5632 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5633 (doc (string-append data "/doc/" ,name "-" ,version))
5634 (html (string-append doc "/html"))
5635 (man1 (string-append data "/man/man1"))
5636 (info (string-append data "/info"))
5637 (examples (string-append doc "/examples"))
5638 (python-arg (string-append "PYTHON=" (which "python"))))
5639 (setenv "LANG" "en_US.utf8")
5640 ;; Make installed package available for running the tests
5641 (add-installed-pythonpath inputs outputs)
5642 (with-directory-excursion "docs"
5643 ;; FIXME: pdf fails to build
5644 ;;(system* "make" "pdf" "PAPER=a4")
5645 (system* "make" python-arg "html")
5646 (system* "make" python-arg "info"))
5647 (copy-recursively "docs/man" man1)
5648 (copy-recursively "examples" examples)
5649 (copy-recursively "docs/build/html" html)
5650 ;; (copy-file "docs/build/latex/ipython.pdf"
5651 ;; (string-append doc "/ipython.pdf"))
5652 (mkdir-p info)
5653 (copy-file "docs/build/texinfo/ipython.info"
5654 (string-append info "/ipython.info"))
5655 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5656 ;; Tests can only be run after the library has been installed and not
5657 ;; within the source directory.
5658 (delete 'check)
5659 (add-after
5660 'install 'check
5661 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5662 (if tests?
5663 (with-directory-excursion "/tmp"
5664 ;; Make installed package available for running the tests
5665 (add-installed-pythonpath inputs outputs)
5666 (setenv "HOME" "/tmp/") ;; required by a test
5667 (zero? (system* (string-append (assoc-ref outputs "out")
5668 "/bin/iptest"))))
5669 #t)))
5670 (add-before
5671 'install 'fix-tests
5672 (lambda* (#:key inputs #:allow-other-keys)
5673 (substitute* "./IPython/utils/_process_posix.py"
5674 (("/usr/bin/env', 'which") (which "which")))
5675 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5676 (("#!/usr/bin/env python")
5677 (string-append "#!" (which "python"))))
5678 ;; Disable 1 failing test
5679 (substitute* "./IPython/core/tests/test_magic.py"
5680 (("def test_dirops\\(\\):" all)
5681 (string-append "@dec.skipif(True)\n" all))))))))
5682 (home-page "http://ipython.org")
5683 (synopsis "IPython is a tool for interactive computing in Python")
5684 (description
5685 "IPython provides a rich architecture for interactive computing with:
5686 Powerful interactive shells, a browser-based notebook, support for interactive
5687 data visualization, embeddable interpreters and tools for parallel
5688 computing.")
5689 (license license:bsd-3)
5690 (properties `((python2-variant . ,(delay python2-ipython))))))
5691
5692 (define-public python2-ipython
5693 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5694 (package
5695 (inherit ipython)
5696 ;; FIXME: add pyreadline once available.
5697 (propagated-inputs
5698 `(("python2-backports-shutil-get-terminal-size"
5699 ,python2-backports-shutil-get-terminal-size)
5700 ("python2-pathlib2" ,python2-pathlib2)
5701 ,@(package-propagated-inputs ipython)))
5702 (native-inputs
5703 `(("python2-mock" ,python2-mock)
5704 ,@(package-native-inputs ipython))))))
5705
5706 (define-public python-isodate
5707 (package
5708 (name "python-isodate")
5709 (version "0.5.4")
5710 (source
5711 (origin
5712 (method url-fetch)
5713 (uri (pypi-uri "isodate" version))
5714 (sha256
5715 (base32
5716 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5717 (build-system python-build-system)
5718 (home-page
5719 "http://cheeseshop.python.org/pypi/isodate")
5720 (synopsis
5721 "Python date parser and formatter")
5722 (description
5723 "Python-isodate is a python module for parsing and formatting
5724 ISO 8601 dates, time and duration.")
5725 (license license:bsd-3)))
5726
5727 (define-public python2-isodate
5728 (package-with-python2 python-isodate))
5729
5730 (define-public python-html5lib
5731 (package
5732 (name "python-html5lib")
5733 (version "1.0b10")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (pypi-uri "html5lib" version))
5738 (sha256
5739 (base32
5740 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5741 (build-system python-build-system)
5742 (propagated-inputs
5743 `(("python-six" ,python-six)
5744 ("python-webencodings" ,python-webencodings)))
5745 (arguments
5746 `(#:test-target "check"))
5747 (home-page
5748 "https://github.com/html5lib/html5lib-python")
5749 (synopsis
5750 "Python HTML parser based on the WHATWG HTML specifcation")
5751 (description
5752 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5753 and written in Python.")
5754 (license license:expat)))
5755
5756 (define-public python2-html5lib
5757 (package-with-python2 python-html5lib))
5758
5759 ;; Needed for python-bleach, a dependency of python-notebook
5760 (define-public python-html5lib-0.9
5761 (package
5762 (inherit python-html5lib)
5763 (version "0.999")
5764 (source
5765 (origin
5766 (method url-fetch)
5767 (uri (pypi-uri "html5lib" version))
5768 (sha256
5769 (base32
5770 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5771
5772 (define-public python2-html5lib-0.9
5773 (package-with-python2 python-html5lib-0.9))
5774
5775 (define-public python-webencodings
5776 (package
5777 (name "python-webencodings")
5778 (version "0.5")
5779 (source (origin
5780 (method url-fetch)
5781 (uri (pypi-uri "webencodings" version))
5782 (sha256
5783 (base32
5784 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5785 (build-system python-build-system)
5786 (arguments
5787 '(#:phases
5788 (modify-phases %standard-phases
5789 (replace 'check
5790 (lambda _
5791 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5792 (native-inputs
5793 `(("python-pytest" ,python-pytest)))
5794 (home-page "https://github.com/SimonSapin/python-webencodings")
5795 (synopsis "Character encoding aliases for legacy web content")
5796 (description
5797 "In order to be compatible with legacy web content when interpreting
5798 something like @code{Content-Type: text/html; charset=latin1}, tools need
5799 to use a particular set of aliases for encoding labels as well as some
5800 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5801 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5802 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5803 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5804 defines all such details so that implementations do not have to
5805 reverse-engineer each other.
5806
5807 This module implements the Encoding standard and has encoding labels and
5808 BOM detection, but the actual implementation for encoders and decoders
5809 is Python’s.")
5810 (license license:bsd-3)))
5811
5812 (define-public python2-webencodings
5813 (package-with-python2 python-webencodings))
5814
5815 (define-public python-urwid
5816 (package
5817 (name "python-urwid")
5818 (version "1.3.1")
5819 (source
5820 (origin
5821 (method url-fetch)
5822 (uri (pypi-uri "urwid" version))
5823 (sha256
5824 (base32
5825 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5826 (build-system python-build-system)
5827 (arguments
5828 `(#:phases
5829 (modify-phases %standard-phases
5830 ;; Disable failing test. Bug filed upstream:
5831 ;; https://github.com/wardi/urwid/issues/164
5832 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5833 (add-after 'unpack 'disable-failing-test
5834 (lambda _
5835 (substitute* "urwid/tests/test_event_loops.py"
5836 (("test_remove_watch_file")
5837 "disable_remove_watch_file")))))))
5838 (home-page "http://urwid.org")
5839 (synopsis "Console user interface library for Python")
5840 (description
5841 "Urwid is a curses-based UI/widget library for Python. It includes many
5842 features useful for text console applications.")
5843 (license license:lgpl2.1+)))
5844
5845 (define-public python2-urwid
5846 (let ((python2-urwid (package-with-python2 python-urwid)))
5847 (package
5848 (inherit python2-urwid)
5849 (arguments
5850 (append
5851 '(#:phases
5852 (modify-phases %standard-phases
5853 ;; Disable the vterm tests because of non-deterministic failures
5854 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5855 (add-after 'unpack 'delete-test_vterm.py
5856 (delete-file "urwid/tests/test_vterm.py"))))
5857 (package-arguments python-urwid))))))
5858
5859 (define-public python-openid
5860 (package
5861 (name "python-openid")
5862 (version "3.0.10")
5863 (source
5864 (origin
5865 (method url-fetch)
5866 (uri (pypi-uri "python3-openid" version))
5867 (sha256
5868 (base32
5869 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5870 (build-system python-build-system)
5871 (arguments
5872 `(#:phases
5873 (modify-phases %standard-phases
5874 (replace 'check
5875 (lambda _
5876 (zero? (system* "./admin/runtests")))))))
5877 (properties `((python2-variant . ,(delay python2-openid))))
5878 (propagated-inputs
5879 `(("python-defusedxml" ,python-defusedxml)))
5880 (native-inputs
5881 `(("python-psycopg2" ,python-psycopg2)
5882 ("python-django" ,python-django)))
5883 (home-page "https://github.com/necaris/python3-openid")
5884 (synopsis "OpenID support for servers and consumers")
5885 (description "This library provides OpenID authentication for Python, both
5886 for clients and servers.")
5887 (license license:asl2.0)))
5888
5889 (define-public python2-openid
5890 (package
5891 (name "python2-openid")
5892 (version "2.2.5")
5893 (source
5894 (origin
5895 (method url-fetch)
5896 (uri (pypi-uri "python-openid" version))
5897 (sha256
5898 (base32
5899 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5900 (build-system python-build-system)
5901 (arguments
5902 ;; Python 3 support is in `python3-openid`, a separate package.
5903 `(#:python ,python-2))
5904 (home-page "https://github.com/openid/python-openid")
5905 (synopsis "OpenID support for servers and consumers")
5906 (description "This library provides OpenID authentication for Python, both
5907 for clients and servers.")
5908 (license license:asl2.0)))
5909
5910 (define-public python-urwidtrees
5911 (package
5912 (name "python-urwidtrees")
5913 (version "1.0.2")
5914 (source
5915 (origin
5916 (method url-fetch)
5917 ;; package author intends on distributing via github rather than pypi:
5918 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5919 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5920 version ".tar.gz"))
5921 (file-name (string-append name "-" version ".tar.gz"))
5922 (sha256
5923 (base32
5924 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5925 (build-system python-build-system)
5926 (arguments
5927 '(#:tests? #f)) ; no tests
5928 (propagated-inputs `(("python-urwid" ,python-urwid)))
5929 (home-page "https://github.com/pazz/urwidtrees")
5930 (synopsis "Tree widgets for urwid")
5931 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5932 toolkit. Use it to build trees of widgets.")
5933 (license license:gpl3+)))
5934
5935 (define-public python2-urwidtrees
5936 (package-with-python2 python-urwidtrees))
5937
5938 (define-public python-dbus
5939 (package
5940 (name "python-dbus")
5941 (version "1.2.0")
5942 (source
5943 (origin
5944 (method url-fetch)
5945 (uri (string-append
5946 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5947 version ".tar.gz"))
5948 (sha256
5949 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5950 (build-system gnu-build-system)
5951 (arguments
5952 '(#:phases
5953 (modify-phases %standard-phases
5954 (add-before
5955 'check 'pre-check
5956 (lambda _
5957 ;; XXX: For the missing '/etc/machine-id'.
5958 (substitute* "test/run-test.sh"
5959 (("DBUS_FATAL_WARNINGS=1")
5960 "DBUS_FATAL_WARNINGS=0"))
5961 #t)))))
5962 (native-inputs
5963 `(("pkg-config" ,pkg-config)))
5964 (inputs
5965 `(("python" ,python)
5966 ("dbus-glib" ,dbus-glib)))
5967 (synopsis "Python bindings for D-bus")
5968 (description "python-dbus provides bindings for libdbus, the reference
5969 implementation of D-Bus.")
5970 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5971 (license license:expat)))
5972
5973 (define-public python2-dbus
5974 (package (inherit python-dbus)
5975 (name "python2-dbus")
5976 (inputs `(("python" ,python-2)
5977 ,@(alist-delete "python"
5978 (package-inputs python-dbus)
5979 equal?)))
5980 ;; FIXME: on Python 2, the test_utf8 fails with:
5981 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5982 (arguments `(#:tests? #f))))
5983
5984 (define-public python-apsw
5985 (package
5986 (name "python-apsw")
5987 (version "3.9.2-r1")
5988 (source
5989 (origin
5990 (method url-fetch)
5991 (uri (pypi-uri "apsw" version))
5992 (sha256
5993 (base32
5994 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5995 (build-system python-build-system)
5996 (inputs
5997 `(("sqlite" ,sqlite)))
5998 (arguments
5999 `(#:phases
6000 (modify-phases %standard-phases
6001 (delete 'check)
6002 (add-after 'install 'check
6003 (lambda* (#:key inputs outputs #:allow-other-keys)
6004 (add-installed-pythonpath inputs outputs)
6005 (zero? (system* "python" "setup.py" "test")))))))
6006 (home-page "https://github.com/rogerbinns/apsw/")
6007 (synopsis "Another Python SQLite Wrapper")
6008 (description "APSW is a Python wrapper for the SQLite
6009 embedded relational database engine. In contrast to other wrappers such as
6010 pysqlite it focuses on being a minimal layer over SQLite attempting just to
6011 translate the complete SQLite API into Python.")
6012 (license license:zlib)))
6013
6014 (define-public python2-apsw
6015 (package-with-python2 python-apsw))
6016
6017 (define-public python-lxml
6018 (package
6019 (name "python-lxml")
6020 (version "3.6.0")
6021 (source
6022 (origin
6023 (method url-fetch)
6024 (uri (pypi-uri "lxml" version))
6025 (sha256
6026 (base32
6027 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
6028 (build-system python-build-system)
6029 (inputs
6030 `(("libxml2" ,libxml2)
6031 ("libxslt" ,libxslt)))
6032 (home-page "http://lxml.de/")
6033 (synopsis
6034 "Python XML processing library")
6035 (description
6036 "The lxml XML toolkit is a Pythonic binding for the C libraries
6037 libxml2 and libxslt.")
6038 (license license:bsd-3))) ; and a few more, see LICENSES.txt
6039
6040 (define-public python2-lxml
6041 (package-with-python2 python-lxml))
6042
6043 ;; beautifulsoup4 has a totally different namespace than 3.x,
6044 ;; and pypi seems to put it under its own name, so I guess we should too
6045 (define-public python-beautifulsoup4
6046 (package
6047 (name "python-beautifulsoup4")
6048 (version "4.5.3")
6049 (source
6050 (origin
6051 (method url-fetch)
6052 (uri (pypi-uri "beautifulsoup4" version))
6053 (sha256
6054 (base32
6055 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
6056 (build-system python-build-system)
6057 (arguments
6058 `(#:phases
6059 (modify-phases %standard-phases
6060 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6061 ;; must use this conversion script when building with Python 3. The
6062 ;; conversion script also runs the tests.
6063 ;; For more information, see the file 'convert-py3k' in the source
6064 ;; distribution.
6065 (replace 'check
6066 (lambda _ (zero? (system* "./convert-py3k")))))))
6067 (home-page
6068 "http://www.crummy.com/software/BeautifulSoup/bs4/")
6069 (synopsis
6070 "Python screen-scraping library")
6071 (description
6072 "Beautiful Soup is a Python library designed for rapidly setting up
6073 screen-scraping projects. It offers Pythonic idioms for navigating,
6074 searching, and modifying a parse tree, providing a toolkit for
6075 dissecting a document and extracting what you need. It automatically
6076 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6077 (license license:expat)
6078 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6079
6080 (define-public python2-beautifulsoup4
6081 (package
6082 (inherit (package-with-python2
6083 (strip-python2-variant python-beautifulsoup4)))
6084 (arguments `(#:python ,python-2))))
6085
6086 (define-public python-cssutils
6087 (package
6088 (name "python-cssutils")
6089 (version "1.0.1")
6090 (source
6091 (origin
6092 (method url-fetch)
6093 (uri (pypi-uri "cssutils" version))
6094 (sha256
6095 (base32
6096 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
6097 (build-system python-build-system)
6098 (native-inputs
6099 `(("unzip" ,unzip))) ; for unpacking the source
6100 (arguments
6101 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
6102 (home-page "http://cthedot.de/cssutils/")
6103 (synopsis
6104 "CSS Cascading Style Sheets library for Python")
6105 (description
6106 "Cssutils is a Python package for parsing and building CSS
6107 Cascading Style Sheets. Currently it provides a DOM only and no rendering
6108 options.")
6109 (license license:lgpl3+)))
6110
6111 (define-public python2-cssutils
6112 (package-with-python2 python-cssutils))
6113
6114 (define-public python-cssselect
6115 (package
6116 (name "python-cssselect")
6117 (version "0.9.2")
6118 (source
6119 (origin
6120 (method url-fetch)
6121 (uri (pypi-uri "cssselect" version))
6122 (sha256
6123 (base32
6124 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
6125 (build-system python-build-system)
6126 (arguments
6127 ;; tests fail with message
6128 ;; AttributeError: 'module' object has no attribute 'tests'
6129 `(#:tests? #f))
6130 (home-page
6131 "https://pythonhosted.org/cssselect/")
6132 (synopsis
6133 "CSS3 selector parser and translator to XPath 1.0")
6134 (description
6135 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6136 them to XPath 1.0 expressions. Such expressions can be used in lxml or
6137 another XPath engine to find the matching elements in an XML or HTML document.")
6138 (license license:bsd-3)))
6139
6140 (define-public python2-cssselect
6141 (package-with-python2 python-cssselect))
6142
6143 (define-public python-openid-cla
6144 (package
6145 (name "python-openid-cla")
6146 (version "1.2")
6147 (source
6148 (origin
6149 (method url-fetch)
6150 (uri (pypi-uri "python-openid-cla" version))
6151 (sha256
6152 (base32
6153 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6154 (build-system python-build-system)
6155 (arguments '(#:tests? #f)) ; No tests.
6156 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6157 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6158 (description "@code{openid-cla} is an implementation of the OpenID
6159 contributor license agreement extension for python-openid.")
6160 (license license:bsd-3)))
6161
6162 (define-public python2-openid-cla
6163 (package-with-python2 python-openid-cla))
6164
6165 (define-public python-openid-teams
6166 (package
6167 (name "python-openid-teams")
6168 (version "1.1")
6169 (source
6170 (origin
6171 (method url-fetch)
6172 (uri (pypi-uri "python-openid-teams" version))
6173 (sha256
6174 (base32
6175 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6176 (build-system python-build-system)
6177 (arguments '(#:tests? #f)) ; No tests.
6178 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6179 (synopsis "Implementation of the OpenID teams extension for python-openid")
6180 (description
6181 "@code{openid-teams} is an implementation of the OpenID
6182 teams extension for python-openid.")
6183 (license license:bsd-3)))
6184
6185 (define-public python2-openid-teams
6186 (package-with-python2 python-openid-teams))
6187
6188 (define-public python-netifaces
6189 (package
6190 (name "python-netifaces")
6191 (version "0.10.4")
6192 (source
6193 (origin
6194 (method url-fetch)
6195 (uri (string-append
6196 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6197 version
6198 ".tar.gz"))
6199 (sha256
6200 (base32
6201 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6202 (build-system python-build-system)
6203 (home-page
6204 "https://bitbucket.org/al45tair/netifaces")
6205 (synopsis
6206 "Python module for portable network interface information")
6207 (description
6208 "Netifaces is a Python module providing information on network
6209 interfaces in an easy and portable manner.")
6210 (license license:expat)))
6211
6212 (define-public python2-netifaces
6213 (package-with-python2 python-netifaces))
6214
6215 (define-public python-networkx
6216 (package
6217 (name "python-networkx")
6218 (version "1.11")
6219 (source
6220 (origin
6221 (method url-fetch)
6222 (uri (pypi-uri "networkx" version))
6223 (sha256
6224 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
6225 (build-system python-build-system)
6226 ;; python-decorator is needed at runtime
6227 (propagated-inputs
6228 `(("python-decorator" ,python-decorator)))
6229 (native-inputs
6230 `(("python-nose" ,python-nose)))
6231 (home-page "http://networkx.github.io/")
6232 (synopsis "Python module for creating and manipulating graphs and networks")
6233 (description
6234 "NetworkX is a Python package for the creation, manipulation, and study
6235 of the structure, dynamics, and functions of complex networks.")
6236 (license license:bsd-3)))
6237
6238 (define-public python2-networkx
6239 (package-with-python2 python-networkx))
6240
6241 (define-public snakemake
6242 (package
6243 (name "snakemake")
6244 (version "3.13.3")
6245 (source
6246 (origin
6247 (method url-fetch)
6248 (uri (pypi-uri "snakemake" version))
6249 (sha256
6250 (base32 "1nixb944r4hlskwkzc4wjs34b40xpxpw9gmhhm5p09gvmm22ap5d"))))
6251 (build-system python-build-system)
6252 (arguments
6253 ;; TODO: Package missing test dependencies.
6254 '(#:tests? #f
6255 #:phases
6256 (modify-phases %standard-phases
6257 ;; For cluster execution Snakemake will call Python. Since there is
6258 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6259 ;; this by calling the snakemake wrapper instead.
6260 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6261 (lambda* (#:key outputs #:allow-other-keys)
6262 (substitute* "snakemake/executors.py"
6263 (("\\{sys.executable\\} -m snakemake")
6264 (string-append (assoc-ref outputs "out")
6265 "/bin/snakemake")))
6266 #t)))))
6267 (propagated-inputs
6268 `(("python-wrapt" ,python-wrapt)
6269 ("python-requests" ,python-requests)))
6270 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6271 (synopsis "Python-based execution environment for make-like workflows")
6272 (description
6273 "Snakemake aims to reduce the complexity of creating workflows by
6274 providing a clean and modern domain specific specification language (DSL) in
6275 Python style, together with a fast and comfortable execution environment.")
6276 (license license:expat)))
6277
6278 (define-public python-seaborn
6279 (package
6280 (name "python-seaborn")
6281 (version "0.7.1")
6282 (source
6283 (origin
6284 (method url-fetch)
6285 (uri (pypi-uri "seaborn" version))
6286 (sha256
6287 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6288 (build-system python-build-system)
6289 (arguments
6290 '(#:tests? #f)) ; Tests requires a running X11 server.
6291 (propagated-inputs
6292 `(("python-pandas" ,python-pandas)
6293 ("python-matplotlib" ,python-matplotlib)
6294 ("python-scipy" ,python-scipy)))
6295 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6296 (synopsis "Statistical data visualization")
6297 (description
6298 "Seaborn is a library for making attractive and informative statistical
6299 graphics in Python. It is built on top of matplotlib and tightly integrated
6300 with the PyData stack, including support for numpy and pandas data structures
6301 and statistical routines from scipy and statsmodels.")
6302 (license license:bsd-3)
6303 (properties `((python2-variant . ,(delay python2-seaborn))))))
6304
6305 (define-public python2-seaborn
6306 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6307 (package
6308 (inherit base)
6309 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6310 ,@(package-propagated-inputs base))))))
6311
6312 (define-public python-mpmath
6313 (package
6314 (name "python-mpmath")
6315 (version "0.19")
6316 (source (origin
6317 (method url-fetch)
6318 (uri (string-append "http://mpmath.org/files/mpmath-"
6319 version ".tar.gz"))
6320 (sha256
6321 (base32
6322 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6323 (build-system python-build-system)
6324 (arguments
6325 '(#:phases
6326 (modify-phases %standard-phases
6327 (replace 'check
6328 (lambda _
6329 (zero?
6330 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6331 (home-page "http://mpmath.org")
6332 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6333 (description
6334 "@code{mpmath} can be used as an arbitrary-precision substitute for
6335 Python's float/complex types and math/cmath modules, but also does much
6336 more advanced mathematics.")
6337 (license license:bsd-3)))
6338
6339 (define-public python2-mpmath
6340 (package-with-python2 python-mpmath))
6341
6342 (define-public python-sympy
6343 (package
6344 (name "python-sympy")
6345 (version "1.0")
6346 (source
6347 (origin
6348 (method url-fetch)
6349 (uri (string-append
6350 "https://github.com/sympy/sympy/releases/download/sympy-"
6351 version "/sympy-" version ".tar.gz"))
6352 (sha256
6353 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6354 (build-system python-build-system)
6355 (propagated-inputs
6356 `(("python-mpmath" ,python-mpmath)))
6357 (home-page "http://www.sympy.org/")
6358 (synopsis "Python library for symbolic mathematics")
6359 (description
6360 "SymPy is a Python library for symbolic mathematics. It aims to become a
6361 full-featured computer algebra system (CAS) while keeping the code as simple
6362 as possible in order to be comprehensible and easily extensible.")
6363 (license license:bsd-3)))
6364
6365 (define-public python2-sympy
6366 (package-with-python2 python-sympy))
6367
6368 (define-public python-q
6369 (package
6370 (name "python-q")
6371 (version "2.6")
6372 (source
6373 (origin
6374 (method url-fetch)
6375 (uri (pypi-uri "q" version))
6376 (sha256
6377 (base32
6378 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6379 (build-system python-build-system)
6380 (home-page "https://github.com/zestyping/q")
6381 (synopsis "Quick-and-dirty debugging output for tired programmers")
6382 (description
6383 "q is a Python module for \"print\" style of debugging Python code. It
6384 provides convenient short API for print out of values, tracebacks, and
6385 falling into the Python interpreter.")
6386 (license license:asl2.0)))
6387
6388 (define-public python2-q
6389 (package-with-python2 python-q))
6390
6391 (define-public python-testlib
6392 (package
6393 (name "python-testlib")
6394 (version "0.6.5")
6395 (source
6396 (origin
6397 (method url-fetch)
6398 (uri (string-append
6399 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6400 version ".zip"))
6401 (sha256
6402 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6403 (build-system python-build-system)
6404 (native-inputs
6405 `(("unzip" ,unzip))) ; for unpacking the source
6406 (synopsis "Python micro test suite harness")
6407 (description "A micro unittest suite harness for Python.")
6408 (home-page "https://github.com/trentm/testlib")
6409 (license license:expat)))
6410
6411 (define-public python2-testlib
6412 (package-with-python2 python-testlib))
6413
6414 (define-public python2-xlib
6415 (package
6416 (name "python2-xlib")
6417 (version "0.14")
6418 (source (origin
6419 (method url-fetch)
6420 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6421 "/" version "/"
6422 "python-xlib-" version ".tar.gz"))
6423 (sha256
6424 (base32
6425 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6426 (build-system python-build-system)
6427 (arguments
6428 `(#:python ,python-2 ;Python 2 only
6429 #:tests? #f)) ;no tests
6430 (home-page "http://python-xlib.sourceforge.net/")
6431 (synopsis "Python X11 client library")
6432 (description
6433 "The Python X Library is intended to be a fully functional X client
6434 library for Python programs. It is useful to implement low-level X clients.
6435 It is written entirely in Python.")
6436 (license license:gpl2+)))
6437
6438 (define-public python-singledispatch
6439 (package
6440 (name "python-singledispatch")
6441 (version "3.4.0.3")
6442 (source
6443 (origin
6444 (method url-fetch)
6445 (uri (pypi-uri "singledispatch" version))
6446 (sha256
6447 (base32
6448 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6449 (build-system python-build-system)
6450 (native-inputs
6451 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6452 (home-page
6453 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6454 (synopsis "Backport of singledispatch feature from Python 3.4")
6455 (description
6456 "This library brings functools.singledispatch from Python 3.4 to Python
6457 2.6-3.3.")
6458 (license license:expat)))
6459
6460 (define-public python2-singledispatch
6461 (package-with-python2 python-singledispatch))
6462
6463 (define-public python-tornado
6464 (package
6465 (name "python-tornado")
6466 (version "4.5.1")
6467 (source
6468 (origin
6469 (method url-fetch)
6470 (uri (pypi-uri "tornado" version))
6471 (sha256
6472 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6473 (build-system python-build-system)
6474 (arguments
6475 '(;; FIXME: Two tests error out with:
6476 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6477 ;; #:phases
6478 ;; (modify-phases %standard-phases
6479 ;; (replace 'check
6480 ;; (lambda _
6481 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6482 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6483 ;; (zero? (system* "python" "-m" "tornado.test")))))
6484 #:tests? #f))
6485 (native-inputs
6486 `(("python-certifi" ,python-certifi)))
6487 (propagated-inputs
6488 `(("python-backports-abc" ,python-backports-abc)))
6489 (home-page "http://www.tornadoweb.org/")
6490 (synopsis "Python web framework and asynchronous networking library")
6491 (description
6492 "Tornado is a Python web framework and asynchronous networking library,
6493 originally developed at FriendFeed. By using non-blocking network I/O,
6494 Tornado can scale to tens of thousands of open connections, making it ideal
6495 for long polling, WebSockets, and other applications that require a long-lived
6496 connection to each user.")
6497 (license license:asl2.0)
6498 (properties `((python2-variant . ,(delay python2-tornado))))))
6499
6500 (define-public python2-tornado
6501 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6502 (package (inherit tornado)
6503 (propagated-inputs
6504 `(("python2-backport-ssl-match-hostname"
6505 ,python2-backport-ssl-match-hostname)
6506 ("python2-singledispatch" ,python2-singledispatch)
6507 ,@(package-propagated-inputs tornado))))))
6508
6509 ;; the python- version can be removed with python-3.5
6510 (define-public python-backports-abc
6511 (package
6512 (name "python-backports-abc")
6513 (version "0.5")
6514 (source
6515 (origin
6516 (method url-fetch)
6517 (uri (pypi-uri "backports_abc" version))
6518 (sha256
6519 (base32
6520 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6521 (build-system python-build-system)
6522 (home-page "https://github.com/cython/backports_abc")
6523 (synopsis "Backport of additions to the 'collections.abc' module")
6524 (description
6525 "Python-backports-abc provides a backport of additions to the
6526 'collections.abc' module in Python-3.5.")
6527 (license license:psfl)))
6528
6529 (define-public python2-backports-abc
6530 (package-with-python2 python-backports-abc))
6531
6532 (define-public python-backports-csv
6533 (package
6534 (name "python-backports-csv")
6535 (version "1.0.5")
6536 (source
6537 (origin
6538 (method url-fetch)
6539 (uri (pypi-uri "backports.csv" version))
6540 (sha256
6541 (base32
6542 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6543 (build-system python-build-system)
6544 (home-page "https://github.com/ryanhiebert/backports.csv")
6545 (synopsis "Backport of Python 3's csv module for Python 2")
6546 (description
6547 "Provides a backport of Python 3's @code{csv} module for parsing
6548 comma separated values. The API of the @code{csv} module in Python 2
6549 is drastically different from the @code{csv} module in Python 3.
6550 This is due, for the most part, to the difference between str in
6551 Python 2 and Python 3.")
6552 (license license:psfl)))
6553
6554 (define-public python2-backports-csv
6555 (package-with-python2 python-backports-csv))
6556
6557 (define-public python2-backports-shutil-get-terminal-size
6558 (package
6559 (name "python2-backports-shutil-get-terminal-size")
6560 (version "1.0.0")
6561 (source
6562 (origin
6563 (method url-fetch)
6564 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6565 (sha256
6566 (base32
6567 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6568 (build-system python-build-system)
6569 (arguments
6570 `(#:python ,python-2
6571 #:phases
6572 (modify-phases %standard-phases
6573 (replace 'check
6574 (lambda _
6575 (zero? (system* "py.test" "-v")))))))
6576 (native-inputs
6577 `(("python2-pytest" ,python2-pytest)))
6578 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6579 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6580 (description
6581 "This package provides a backport of the @code{get_terminal_size
6582 function} from Python 3.3's @code{shutil}.
6583 Unlike the original version it is written in pure Python rather than C,
6584 so it might be a tiny bit slower.")
6585 (license license:expat)))
6586
6587 (define-public python-waf
6588 (package
6589 (name "python-waf")
6590 (version "1.9.8")
6591 (source (origin
6592 (method url-fetch)
6593 (uri (string-append "https://waf.io/"
6594 "waf-" version ".tar.bz2"))
6595 (sha256
6596 (base32
6597 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6598 (build-system python-build-system)
6599 (arguments
6600 '(#:phases
6601 (modify-phases %standard-phases
6602 (replace 'build
6603 (lambda _
6604 (zero? (system* "python" "waf-light" "configure" "build"))))
6605 (replace 'check
6606 (lambda _
6607 (zero? (system* "python" "waf" "--version"))))
6608 (replace 'install
6609 (lambda _
6610 (copy-file "waf" %output))))))
6611 (home-page "https://waf.io/")
6612 (synopsis "Python-based build system")
6613 (description
6614 "Waf is a Python-based framework for configuring, compiling and installing
6615 applications.")
6616 (license license:bsd-3)))
6617
6618 (define-public python2-waf
6619 (package-with-python2 python-waf))
6620
6621 (define-public python-pyzmq
6622 (package
6623 (name "python-pyzmq")
6624 (version "15.1.0")
6625 (source
6626 (origin
6627 (method url-fetch)
6628 (uri (pypi-uri "pyzmq" version))
6629 (sha256
6630 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6631 (build-system python-build-system)
6632 (arguments
6633 `(#:configure-flags
6634 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6635 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6636 ;; --inplace' for 'python setup.py test' to work.
6637 #:tests? #f))
6638 (inputs
6639 `(("zeromq" ,zeromq)))
6640 (native-inputs
6641 `(("pkg-config" ,pkg-config)
6642 ("python-nose" ,python-nose)))
6643 (home-page "https://github.com/zeromq/pyzmq")
6644 (synopsis "Python bindings for 0MQ")
6645 (description
6646 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6647 (license license:bsd-4)))
6648
6649 (define-public python2-pyzmq
6650 (package-with-python2 python-pyzmq))
6651
6652 (define-public python-pep8
6653 (package
6654 (name "python-pep8")
6655 (version "1.7.0")
6656 (source
6657 (origin
6658 (method url-fetch)
6659 (uri (pypi-uri "pep8" version))
6660 (sha256
6661 (base32
6662 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6663 (build-system python-build-system)
6664 (home-page "http://pep8.readthedocs.org/")
6665 (synopsis "Python style guide checker")
6666 (description
6667 "This tools checks Python code against some of the style conventions in
6668 PEP 8.")
6669 (license license:expat)))
6670
6671 (define-public python2-pep8
6672 (package-with-python2 python-pep8))
6673
6674 (define-public python-pyflakes
6675 (package
6676 (name "python-pyflakes")
6677 (version "1.0.0")
6678 (source
6679 (origin
6680 (method url-fetch)
6681 (uri (pypi-uri "pyflakes" version))
6682 (sha256
6683 (base32
6684 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6685 (build-system python-build-system)
6686 (home-page
6687 "https://github.com/pyflakes/pyflakes")
6688 (synopsis "Passive checker of Python programs")
6689 (description
6690 "Pyflakes statically checks Python source code for common errors.")
6691 (license license:expat)))
6692
6693 (define-public python2-pyflakes
6694 (package-with-python2 python-pyflakes))
6695
6696 (define-public python-mccabe
6697 (package
6698 (name "python-mccabe")
6699 (version "0.4.0")
6700 (source
6701 (origin
6702 (method url-fetch)
6703 (uri (pypi-uri "mccabe" version))
6704 (sha256
6705 (base32
6706 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6707 (build-system python-build-system)
6708 (native-inputs
6709 `(("python-pytest" ,python-pytest)
6710 ("python-pytest-runner" ,python-pytest-runner)))
6711 (home-page "https://github.com/flintwork/mccabe")
6712 (synopsis "McCabe checker, plugin for flake8")
6713 (description
6714 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6715 complexity of Python source code.")
6716 (license license:expat)))
6717
6718 (define-public python2-mccabe
6719 (package-with-python2 python-mccabe))
6720
6721 (define-public python-mccabe-0.2.1
6722 (package (inherit python-mccabe)
6723 (version "0.2.1")
6724 (source
6725 (origin
6726 (method url-fetch)
6727 (uri (pypi-uri "mccabe" version))
6728 (sha256
6729 (base32
6730 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6731
6732 (define-public python2-mccabe-0.2.1
6733 (package-with-python2 python-mccabe-0.2.1))
6734
6735 ;; Flake8 2.4.1 requires an older version of pep8.
6736 ;; This should be removed ASAP.
6737 (define-public python-pep8-1.5.7
6738 (package (inherit python-pep8)
6739 (version "1.5.7")
6740 (source
6741 (origin
6742 (method url-fetch)
6743 (uri (string-append
6744 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6745 version
6746 ".tar.gz"))
6747 (sha256
6748 (base32
6749 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6750 (arguments
6751 ;; XXX Tests not compatible with Python 3.5.
6752 '(#:tests? #f))))
6753
6754 (define-public python2-pep8-1.5.7
6755 (package-with-python2 python-pep8-1.5.7))
6756
6757 ;; Flake8 2.4.1 requires an older version of pyflakes.
6758 ;; This should be removed ASAP.
6759 (define-public python-pyflakes-0.8.1
6760 (package (inherit python-pyflakes)
6761 (version "0.8.1")
6762 (source
6763 (origin
6764 (method url-fetch)
6765 (uri (string-append
6766 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6767 version
6768 ".tar.gz"))
6769 (sha256
6770 (base32
6771 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6772 (arguments
6773 ;; XXX Tests not compatible with Python 3.5.
6774 '(#:tests? #f))))
6775
6776 (define-public python2-pyflakes-0.8.1
6777 (package-with-python2 python-pyflakes-0.8.1))
6778
6779 (define-public python-flake8
6780 (package
6781 (name "python-flake8")
6782 (version "2.5.4")
6783 (source
6784 (origin
6785 (method url-fetch)
6786 (uri (pypi-uri "flake8" version))
6787 (sha256
6788 (base32
6789 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6790 (modules '((guix build utils)))
6791 (snippet
6792 '(begin
6793 ;; Remove pre-compiled .pyc files from source.
6794 (for-each delete-file-recursively
6795 (find-files "." "__pycache__" #:directories? #t))
6796 (for-each delete-file (find-files "." "\\.pyc$"))
6797 #t))))
6798 (build-system python-build-system)
6799 (propagated-inputs
6800 `(("python-pep8" ,python-pep8)
6801 ("python-pyflakes" ,python-pyflakes)
6802 ("python-mccabe" ,python-mccabe)))
6803 (native-inputs
6804 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6805 ("python-nose" ,python-nose)))
6806 (home-page "https://gitlab.com/pycqa/flake8")
6807 (synopsis
6808 "The modular source code checker: pep8, pyflakes and co")
6809 (description
6810 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6811 (license license:expat)))
6812
6813 (define-public python2-flake8
6814 (package-with-python2 python-flake8))
6815
6816 (define-public python-flake8-polyfill
6817 (package
6818 (name "python-flake8-polyfill")
6819 (version "1.0.1")
6820 (source
6821 (origin
6822 (method url-fetch)
6823 (uri (pypi-uri "flake8-polyfill" version))
6824 (sha256
6825 (base32
6826 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6827 (build-system python-build-system)
6828 (arguments
6829 '(#:phases
6830 (modify-phases %standard-phases
6831 (replace 'check
6832 (lambda _
6833 (setenv "PYTHONPATH"
6834 (string-append (getcwd) "/build/lib:"
6835 (getenv "PYTHONPATH")))
6836 (zero? (system* "py.test" "-v")))))))
6837 (native-inputs
6838 `(("python-flake8" ,python-flake8)
6839 ("python-mock" ,python-mock)
6840 ("python-pycodestyle" ,python-pycodestyle)
6841 ("python-pytest" ,python-pytest)))
6842 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6843 (synopsis "Polyfill package for Flake8 plugins")
6844 (description
6845 "This package that provides some compatibility helpers for Flake8
6846 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6847 (license license:expat)))
6848
6849 (define-public python2-flake8-polyfill
6850 (package-with-python2 python-flake8-polyfill))
6851
6852 (define-public python-mistune
6853 (package
6854 (name "python-mistune")
6855 (version "0.7.3")
6856 (source
6857 (origin
6858 (method url-fetch)
6859 (uri (pypi-uri "mistune" version))
6860 (sha256
6861 (base32
6862 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6863 (build-system python-build-system)
6864 (native-inputs
6865 `(("python-nose" ,python-nose)
6866 ("python-cython" ,python-cython)))
6867 (home-page "https://github.com/lepture/mistune")
6868 (synopsis "Markdown parser in pure Python")
6869 (description "This package provides a fast markdown parser in pure
6870 Python.")
6871 (license license:bsd-3)))
6872
6873 (define-public python2-mistune
6874 (package-with-python2 python-mistune))
6875
6876 (define-public python-markdown
6877 (package
6878 (name "python-markdown")
6879 (version "2.6.8")
6880 (source
6881 (origin
6882 (method url-fetch)
6883 (uri (pypi-uri "Markdown" version))
6884 (sha256
6885 (base32
6886 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6887 (build-system python-build-system)
6888 (arguments
6889 `(#:phases
6890 (modify-phases %standard-phases
6891 (replace 'check
6892 (lambda _
6893 (zero? (system* "python" "run-tests.py")))))))
6894 (native-inputs
6895 `(("python-nose" ,python-nose)
6896 ("python-pyyaml" ,python-pyyaml)))
6897 (home-page "https://pythonhosted.org/Markdown/")
6898 (synopsis "Python implementation of Markdown")
6899 (description
6900 "This package provides a Python implementation of John Gruber's
6901 Markdown. The library features international input, various Markdown
6902 extensions, and several HTML output formats. A command line wrapper
6903 markdown_py is also provided to convert Markdown files to HTML.")
6904 (license license:bsd-3)))
6905
6906 (define-public python2-markdown
6907 (package-with-python2 python-markdown))
6908
6909 (define-public python-ptyprocess
6910 (package
6911 (name "python-ptyprocess")
6912 (version "0.5.1")
6913 (source
6914 (origin
6915 (method url-fetch)
6916 (uri (string-append
6917 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6918 version ".tar.gz"))
6919 (sha256
6920 (base32
6921 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6922 (build-system python-build-system)
6923 (native-inputs
6924 `(("python-nose" ,python-nose)))
6925 (arguments
6926 `(#:phases
6927 (modify-phases %standard-phases
6928 (replace 'check
6929 (lambda _
6930 (zero? (system* "nosetests")))))))
6931 (home-page "https://github.com/pexpect/ptyprocess")
6932 (synopsis "Run a subprocess in a pseudo terminal")
6933 (description
6934 "This package provides a Python library used to launch a subprocess in a
6935 pseudo terminal (pty), and interact with both the process and its pty.")
6936 (license license:isc)))
6937
6938 (define-public python2-ptyprocess
6939 (package-with-python2 python-ptyprocess))
6940
6941 (define-public python-cram
6942 (package
6943 (name "python-cram")
6944 (version "0.7")
6945 (home-page "https://bitheap.org/cram/")
6946 (source (origin
6947 (method url-fetch)
6948 (uri (list (string-append home-page "cram-"
6949 version ".tar.gz")
6950 (pypi-uri "cram" version)))
6951 (sha256
6952 (base32
6953 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6954 (arguments
6955 '(#:phases
6956 (modify-phases %standard-phases
6957 (add-after 'unpack 'patch-source
6958 (lambda _
6959 (substitute* (find-files "cram" ".*\\.py$")
6960 ;; Replace default shell path.
6961 (("/bin/sh") (which "sh")))
6962 (substitute* (find-files "tests" ".*\\.t$")
6963 (("md5") "md5sum")
6964 (("/bin/bash") (which "bash"))
6965 (("/bin/sh") (which "sh")))
6966 (substitute* "cram/_test.py"
6967 ;; This hack works around a bug triggered by substituting
6968 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6969 ;; "cram -h", which breaks the output at 80 characters. This
6970 ;; causes the line showing the default shell to break into two
6971 ;; lines, but the test expects a single line...
6972 (("env\\['COLUMNS'\\] = '80'")
6973 "env['COLUMNS'] = '160'"))
6974 #t))
6975 (delete 'check)
6976 (add-after 'install 'check
6977 ;; The test phase uses the built library and executable.
6978 ;; It's easier to run it after install since the build
6979 ;; directory contains version-specific PATH.
6980 (lambda* (#:key inputs outputs #:allow-other-keys)
6981 (add-installed-pythonpath inputs outputs)
6982 (setenv "PATH" (string-append (getenv "PATH") ":"
6983 (assoc-ref outputs "out") "/bin"))
6984 (zero? (system* "make" "test")))))))
6985 (build-system python-build-system)
6986 (native-inputs
6987 `(("python-coverage" ,python-coverage)
6988 ("which" ,which)))
6989 (synopsis "Simple testing framework for command line applications")
6990 (description
6991 "Cram is a functional testing framework for command line applications.
6992 Cram tests look like snippets of interactive shell sessions. Cram runs each
6993 command and compares the command output in the test with the command’s actual
6994 output.")
6995 (license license:gpl2+)))
6996
6997 (define-public python2-cram
6998 (package-with-python2 python-cram))
6999
7000 (define-public python-terminado
7001 (package
7002 (name "python-terminado")
7003 (version "0.6")
7004 (source
7005 (origin
7006 (method url-fetch)
7007 (uri (pypi-uri "terminado" version))
7008 (sha256
7009 (base32
7010 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
7011 (build-system python-build-system)
7012 (propagated-inputs
7013 `(("python-tornado" ,python-tornado)
7014 ("python-ptyprocess" ,python-ptyprocess)))
7015 (native-inputs
7016 `(("python-nose" ,python-nose)))
7017 (arguments
7018 `(#:phases
7019 (modify-phases %standard-phases
7020 (replace 'check
7021 (lambda _
7022 (zero? (system* "nosetests")))))))
7023 (home-page "https://github.com/takluyver/terminado")
7024 (synopsis "Terminals served to term.js using Tornado websockets")
7025 (description "This package provides a Tornado websocket backend for the
7026 term.js Javascript terminal emulator library.")
7027 (license license:bsd-2)
7028 (properties `((python2-variant . ,(delay python2-terminado))))))
7029
7030 (define-public python2-terminado
7031 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
7032 (package (inherit terminado)
7033 (propagated-inputs
7034 `(("python2-backport-ssl-match-hostname"
7035 ,python2-backport-ssl-match-hostname)
7036 ,@(package-propagated-inputs terminado))))))
7037
7038 (define-public python-straight-plugin
7039 (package
7040 (name "python-straight-plugin")
7041 (version "1.4.1")
7042 (source
7043 (origin
7044 (method url-fetch)
7045 (uri (pypi-uri "straight.plugin" version))
7046 (sha256
7047 (base32
7048 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7049 (build-system python-build-system)
7050 (home-page "https://github.com/ironfroggy/straight.plugin")
7051 (synopsis "Simple namespaced plugin facility")
7052 (description "Straight Plugin provides a type of plugin you can create from
7053 almost any existing Python modules, and an easy way for outside developers to
7054 add functionality and customization to your projects with their own plugins.")
7055 (license license:expat)))
7056
7057 (define-public python2-straight-plugin
7058 (package-with-python2 python-straight-plugin))
7059
7060 (define-public python-fonttools
7061 (package
7062 (name "python-fonttools")
7063 (version "2.5")
7064 (source (origin
7065 (method url-fetch)
7066 (uri (string-append
7067 "https://pypi.python.org/packages/source/F/FontTools/"
7068 "fonttools-" version ".tar.gz"))
7069 (sha256
7070 (base32
7071 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
7072 (build-system python-build-system)
7073 (arguments
7074 '(#:test-target "check"
7075 #:phases
7076 (modify-phases %standard-phases
7077 (add-after 'unpack 'patch-setuppy
7078 ;; Remove the undocumented "extra_path" argument, which adds an
7079 ;; intervening directories between site-packages and the package
7080 ;; directory.
7081 (lambda _
7082 (substitute* "setup.py"
7083 (("^[ \t]*extra_path *= *'FontTools',") ""))
7084 #t)))))
7085 (home-page "https://github.com/behdad/fonttools")
7086 (synopsis "Tools to manipulate font files")
7087 (description
7088 "FontTools/TTX is a library to manipulate font files from Python. It
7089 supports reading and writing of TrueType/OpenType fonts, reading and writing
7090 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7091 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7092 from an XML-based format.")
7093 (license (license:non-copyleft
7094 "file://LICENSE.txt"
7095 "See LICENSE.txt in the distribution."))))
7096
7097 (define-public python2-fonttools
7098 (package-with-python2 python-fonttools))
7099
7100 (define-public python-ly
7101 (package
7102 (name "python-ly")
7103 (version "0.9.4")
7104 (source
7105 (origin
7106 (method url-fetch)
7107 (uri (string-append "https://pypi.python.org/packages/57/4f/"
7108 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
7109 "/python-ly-" version ".tar.gz"))
7110 (sha256
7111 (base32
7112 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
7113 (build-system python-build-system)
7114 (arguments
7115 ;; FIXME: Some tests need network access.
7116 '(#:tests? #f))
7117 (synopsis "Tool and library for manipulating LilyPond files")
7118 (description "This package provides a Python library to parse, manipulate
7119 or create documents in LilyPond format. A command line program ly is also
7120 provided that can be used to do various manipulations with LilyPond files.")
7121 (home-page "https://pypi.python.org/pypi/python-ly")
7122 (license license:gpl2+)))
7123
7124 (define-public python-appdirs
7125 (package
7126 (name "python-appdirs")
7127 (version "1.4.3")
7128 (source
7129 (origin
7130 (method url-fetch)
7131 (uri (pypi-uri "appdirs" version))
7132 (sha256
7133 (base32
7134 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7135 (build-system python-build-system)
7136 (home-page "https://github.com/ActiveState/appdirs")
7137 (synopsis
7138 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7139 (description
7140 "This module provides a portable way of finding out where user data
7141 should be stored on various operating systems.")
7142 (license license:expat)))
7143
7144 (define-public python2-appdirs
7145 (package-with-python2 python-appdirs))
7146
7147 (define-public python-llfuse
7148 (package
7149 (name "python-llfuse")
7150 (version "1.2")
7151 (source (origin
7152 (method url-fetch)
7153 (uri (string-append
7154 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7155 "llfuse-" version ".tar.bz2"))
7156 (sha256
7157 (base32
7158 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
7159 (build-system python-build-system)
7160 (inputs
7161 `(("fuse" ,fuse)
7162 ("attr" ,attr)))
7163 (native-inputs
7164 `(("pkg-config" ,pkg-config)))
7165 (synopsis "Python bindings for FUSE")
7166 (description
7167 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7168 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7169 (license license:lgpl2.0+)
7170 (properties `((python2-variant . ,(delay python2-llfuse))))))
7171
7172 (define-public python2-llfuse
7173 (package (inherit (package-with-python2
7174 (strip-python2-variant python-llfuse)))
7175 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7176
7177 ;; For attic-0.16
7178 (define-public python-llfuse-0.41
7179 (package (inherit python-llfuse)
7180 (version "0.41.1")
7181 (source (origin
7182 (method url-fetch)
7183 (uri (string-append
7184 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7185 "llfuse-" version ".tar.bz2"))
7186 (sha256
7187 (base32
7188 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7189 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7190 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7191 (license (list license:expat license:lgpl2.0+))))
7192
7193 (define-public python-msgpack
7194 (package
7195 (name "python-msgpack")
7196 (version "0.4.8")
7197 (source (origin
7198 (method url-fetch)
7199 (uri (pypi-uri "msgpack-python" version))
7200 (sha256
7201 (base32
7202 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
7203 (build-system python-build-system)
7204 (synopsis "MessagePack (de)serializer")
7205 (description "MessagePack is a fast, compact binary serialization format,
7206 suitable for similar data to JSON. This package provides CPython bindings for
7207 reading and writing MessagePack data.")
7208 (home-page "https://pypi.python.org/pypi/msgpack-python/")
7209 (license license:asl2.0)))
7210
7211 (define-public python2-msgpack
7212 (package-with-python2 python-msgpack))
7213
7214 (define-public python-netaddr
7215 (package
7216 (name "python-netaddr")
7217 (version "0.7.18")
7218 (source
7219 (origin
7220 (method url-fetch)
7221 (uri (string-append
7222 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
7223 version
7224 ".tar.gz"))
7225 (sha256
7226 (base32
7227 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
7228 (build-system python-build-system)
7229 (arguments `(#:tests? #f)) ;; No tests.
7230 (home-page "https://github.com/drkjam/netaddr/")
7231 (synopsis "Pythonic manipulation of network addresses")
7232 (description
7233 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7234 and MAC network addresses.")
7235 (license license:bsd-3)))
7236
7237 (define-public python2-netaddr
7238 (package-with-python2 python-netaddr))
7239
7240 (define-public python-wrapt
7241 (package
7242 (name "python-wrapt")
7243 (version "1.10.8")
7244 (source
7245 (origin
7246 (method url-fetch)
7247 (uri (pypi-uri "wrapt" version))
7248 (sha256
7249 (base32
7250 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
7251 (build-system python-build-system)
7252 (arguments
7253 ;; Tests are not included in the tarball, they are only available in the
7254 ;; git repository.
7255 `(#:tests? #f))
7256 (home-page "https://github.com/GrahamDumpleton/wrapt")
7257 (synopsis "Module for decorators, wrappers and monkey patching")
7258 (description
7259 "The aim of the wrapt module is to provide a transparent object proxy for
7260 Python, which can be used as the basis for the construction of function
7261 wrappers and decorator functions.")
7262 (license license:bsd-2)))
7263
7264 (define-public python2-wrapt
7265 (package-with-python2 python-wrapt))
7266
7267 (define-public python-iso8601
7268 (package
7269 (name "python-iso8601")
7270 (version "0.1.11")
7271 (source
7272 (origin
7273 (method url-fetch)
7274 (uri (pypi-uri "iso8601" version))
7275 (sha256
7276 (base32
7277 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7278 (build-system python-build-system)
7279 (native-inputs
7280 `(("python-pytest" ,python-pytest)))
7281 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7282 (synopsis "Module to parse ISO 8601 dates")
7283 (description
7284 "This module parses the most common forms of ISO 8601 date strings (e.g.
7285 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7286 (license license:expat)))
7287
7288 (define-public python2-iso8601
7289 (package-with-python2 python-iso8601))
7290
7291 (define-public python-monotonic
7292 (package
7293 (name "python-monotonic")
7294 (version "0.3")
7295 (source
7296 (origin
7297 (method url-fetch)
7298 (uri (string-append
7299 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7300 version
7301 ".tar.gz"))
7302 (sha256
7303 (base32
7304 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7305 (build-system python-build-system)
7306 (home-page "https://github.com/atdt/monotonic")
7307 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7308 (description
7309 "This module provides a monotonic() function which returns the value (in
7310 fractional seconds) of a clock which never goes backwards.")
7311 (license license:asl2.0)))
7312
7313 (define-public python2-monotonic
7314 (package-with-python2 python-monotonic))
7315
7316 (define-public python-webob
7317 (package
7318 (name "python-webob")
7319 (version "1.5.1")
7320 (source
7321 (origin
7322 (method url-fetch)
7323 (uri (pypi-uri "WebOb" version))
7324 (sha256
7325 (base32
7326 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7327 (build-system python-build-system)
7328 (native-inputs
7329 `(("python-nose" ,python-nose)))
7330 (home-page "http://webob.org/")
7331 (synopsis "WSGI request and response object")
7332 (description
7333 "WebOb provides wrappers around the WSGI request environment, and an
7334 object to help create WSGI responses.")
7335 (license license:expat)))
7336
7337 (define-public python2-webob
7338 (package-with-python2 python-webob))
7339
7340 (define-public python-xlrd
7341 (package
7342 (name "python-xlrd")
7343 (version "1.0.0")
7344 (source (origin
7345 (method url-fetch)
7346 (uri (pypi-uri "xlrd" version))
7347 (sha256
7348 (base32
7349 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7350 (build-system python-build-system)
7351 (arguments
7352 `(#:phases
7353 (modify-phases %standard-phases
7354 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7355 ;; run tests instead for now.
7356 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7357 (native-inputs `(("python-nose" ,python-nose)))
7358 (home-page "http://www.python-excel.org/")
7359 (synopsis "Library for extracting data from Excel files")
7360 (description "This packages provides a library to extract data from
7361 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7362 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7363 Unicode-aware. It is not intended as an end-user tool.")
7364 (license license:bsd-3)))
7365
7366 (define-public python2-xlrd
7367 (package-with-python2 python-xlrd))
7368
7369 (define-public python-prettytable
7370 (package
7371 (name "python-prettytable")
7372 (version "0.7.2")
7373 (source
7374 (origin
7375 (method url-fetch)
7376 (uri (string-append
7377 "https://pypi.python.org/packages/source/P/PrettyTable/"
7378 "prettytable-" version ".tar.bz2"))
7379 (sha256
7380 (base32
7381 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7382 (build-system python-build-system)
7383 (home-page "http://code.google.com/p/prettytable/")
7384 (synopsis "Display tabular data in an ASCII table format")
7385 (description
7386 "A library designed to represent tabular data in visually appealing ASCII
7387 tables. PrettyTable allows for selection of which columns are to be printed,
7388 independent alignment of columns (left or right justified or centred) and
7389 printing of sub-tables by specifying a row range.")
7390 (license license:bsd-3)))
7391
7392 (define-public python2-prettytable
7393 (package-with-python2 python-prettytable))
7394
7395 (define-public python-tables
7396 (package
7397 (name "python-tables")
7398 (version "3.2.2")
7399 (source
7400 (origin
7401 (method url-fetch)
7402 (uri (pypi-uri "tables" version))
7403 (sha256
7404 (base32
7405 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7406 (modules '((guix build utils)))
7407 (snippet
7408 '(begin
7409 ;; Remove pre-compiled .pyc files from source.
7410 (for-each delete-file-recursively
7411 (find-files "." "__pycache__" #:directories? #t))
7412 (for-each delete-file (find-files "." "\\.pyc$"))
7413 #t))))
7414 (build-system python-build-system)
7415 (arguments
7416 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7417 ;; or "check", so we must override the build and check phases.
7418 #:phases
7419 (modify-phases %standard-phases
7420 (add-after 'unpack 'use-gcc
7421 (lambda _
7422 (substitute* "setup.py"
7423 (("compiler = new_compiler\\(\\)" line)
7424 (string-append line
7425 "\ncompiler.set_executables(compiler='gcc',"
7426 "compiler_so='gcc',"
7427 "linker_exe='gcc',"
7428 "linker_so='gcc -shared')")))
7429 #t))
7430 (replace 'build
7431 (lambda* (#:key inputs #:allow-other-keys)
7432 (zero? (system* "python" "setup.py" "build"
7433 (string-append "--hdf5="
7434 (assoc-ref inputs "hdf5"))))))
7435 (replace 'check
7436 (lambda* (#:key inputs #:allow-other-keys)
7437 (zero? (system* "python" "setup.py" "check"
7438 (string-append "--hdf5="
7439 (assoc-ref inputs "hdf5")))))))))
7440 (propagated-inputs
7441 `(("python-numexpr" ,python-numexpr)
7442 ("python-numpy" ,python-numpy)))
7443 (native-inputs
7444 `(("python-cython" ,python-cython)
7445 ("pkg-config" ,pkg-config)))
7446 (inputs
7447 `(("hdf5" ,hdf5)
7448 ("bzip2" ,bzip2)
7449 ("zlib" ,zlib)))
7450 (home-page "http://www.pytables.org/")
7451 (synopsis "Hierarchical datasets for Python")
7452 (description "PyTables is a package for managing hierarchical datasets and
7453 designed to efficiently cope with extremely large amounts of data.")
7454 (license license:bsd-3)))
7455
7456 (define-public python2-tables
7457 (package-with-python2 python-tables))
7458
7459 (define-public python-pyasn1
7460 (package
7461 (name "python-pyasn1")
7462 (version "0.2.3")
7463 (source
7464 (origin
7465 (method url-fetch)
7466 (uri (pypi-uri "pyasn1" version))
7467 (sha256
7468 (base32
7469 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7470 (build-system python-build-system)
7471 (home-page "http://pyasn1.sourceforge.net/")
7472 (synopsis "ASN.1 types and codecs")
7473 (description
7474 "This is an implementation of ASN.1 types and codecs in Python. It is
7475 suitable for a wide range of protocols based on the ASN.1 specification.")
7476 (license license:bsd-2)))
7477
7478 (define-public python2-pyasn1
7479 (package-with-python2 python-pyasn1))
7480
7481 (define-public python-pyasn1-modules
7482 (package
7483 (name "python-pyasn1-modules")
7484 (version "0.0.8")
7485 (source
7486 (origin
7487 (method url-fetch)
7488 (uri (pypi-uri "pyasn1-modules" version))
7489 (sha256
7490 (base32
7491 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7492 (build-system python-build-system)
7493 (propagated-inputs
7494 `(("python-pyasn1" ,python-pyasn1)))
7495 (home-page "https://sourceforge.net/projects/pyasn1/")
7496 (synopsis "ASN.1 codec implementations")
7497 (description
7498 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7499 implementations of ASN.1-based codecs and protocols.")
7500 (license license:bsd-3)))
7501
7502 (define-public python2-pyasn1-modules
7503 (package-with-python2 python-pyasn1-modules))
7504
7505 (define-public python-ipaddress
7506 (package
7507 (name "python-ipaddress")
7508 (version "1.0.18")
7509 (source (origin
7510 (method url-fetch)
7511 (uri (pypi-uri "ipaddress" version))
7512 (sha256
7513 (base32
7514 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7515 (build-system python-build-system)
7516 (home-page "https://github.com/phihag/ipaddress")
7517 (synopsis "IP address manipulation library")
7518 (description
7519 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7520 in Python. This library is used to create, poke at, and manipulate IPv4 and
7521 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7522 module to older versions of Python.")
7523 (license license:psfl)))
7524
7525 (define-public python2-ipaddress
7526 (package-with-python2 python-ipaddress))
7527
7528 (define-public python2-ipaddr
7529 (package
7530 (name "python2-ipaddr")
7531 (version "2.1.11")
7532 (source
7533 (origin
7534 (method url-fetch)
7535 (uri (pypi-uri "ipaddr" version))
7536 (sha256
7537 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7538 (build-system python-build-system)
7539 (arguments
7540 `(#:python ,python-2 ;version 2 only
7541 #:phases
7542 (modify-phases %standard-phases
7543 (replace 'check
7544 (lambda* _
7545 (zero? (system* "python" "ipaddr_test.py")))))))
7546 (home-page "https://github.com/google/ipaddr-py")
7547 (synopsis "IP address manipulation library")
7548 (description
7549 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7550 IPv6 addresses and networks.
7551
7552 For new implementations you may prefer to use the standard module
7553 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7554 versions of Python.")
7555 (license license:asl2.0)))
7556
7557 (define-public python-idna
7558 (package
7559 (name "python-idna")
7560 (version "2.5")
7561 (source
7562 (origin
7563 (method url-fetch)
7564 (uri (pypi-uri "idna" version))
7565 (sha256
7566 (base32
7567 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7568 (build-system python-build-system)
7569 (home-page "https://github.com/kjd/idna")
7570 (synopsis "Internationalized domain names in applications")
7571 (description
7572 "This is a library to support the Internationalised Domain Names in
7573 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7574 protocol is often referred to as “IDNA2008” and can produce different results
7575 from the earlier standard from 2003. The library is also intended to act as a
7576 suitable drop-in replacement for the “encodings.idna” module that comes with
7577 the Python standard library but currently only supports the older 2003
7578 specification.")
7579 (license license:bsd-4)))
7580
7581 (define-public python2-idna
7582 (package-with-python2 python-idna))
7583
7584 (define-public python-pretend
7585 (package
7586 (name "python-pretend")
7587 (version "1.0.8")
7588 (source
7589 (origin
7590 (method url-fetch)
7591 (uri (string-append "https://pypi.python.org/packages/source/p/"
7592 "pretend/pretend-" version ".tar.gz"))
7593 (sha256
7594 (base32
7595 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7596 (build-system python-build-system)
7597 (home-page "https://github.com/alex/pretend")
7598 (synopsis "Library for stubbing in Python")
7599 (description
7600 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7601 technique for writing tests. You may hear the term mixed up with mocks,
7602 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7603 responses, rather than doing any computation.")
7604 (license license:bsd-3)))
7605
7606 (define-public python2-pretend
7607 (package-with-python2 python-pretend))
7608
7609 (define-public python-cryptography-vectors
7610 (package
7611 (name "python-cryptography-vectors")
7612 (version "2.0")
7613 (source
7614 (origin
7615 (method url-fetch)
7616 (uri (pypi-uri "cryptography_vectors" version))
7617 (sha256
7618 (base32
7619 "0qadys01517k5wy0rifxip02p08kzrqxm5j0lmmlp0kr07h9jc7h"))))
7620 (build-system python-build-system)
7621 (home-page "https://github.com/pyca/cryptography")
7622 (synopsis "Test vectors for the cryptography package")
7623 (description
7624 "This package contains test vectors for the cryptography package.")
7625 ;; Distributed under either BSD-3 or ASL2.0
7626 (license (list license:bsd-3 license:asl2.0))))
7627
7628 (define-public python2-cryptography-vectors
7629 (package-with-python2 python-cryptography-vectors))
7630
7631 (define-public python-cryptography
7632 (package
7633 (name "python-cryptography")
7634 (version "2.0")
7635 (source
7636 (origin
7637 (method url-fetch)
7638 (uri (pypi-uri "cryptography" version))
7639 (sha256
7640 (base32
7641 "1c40qlxyn1jgg99f3pqi7146d3561rn9zdqc7w8f7kwr9ysm696k"))))
7642 (build-system python-build-system)
7643 (inputs
7644 `(("openssl" ,openssl)))
7645 (propagated-inputs
7646 `(("python-asn1crypto" ,python-asn1crypto)
7647 ("python-cffi" ,python-cffi)
7648 ("python-six" ,python-six)
7649 ("python-idna" ,python-idna)
7650 ("python-iso8601" ,python-iso8601)))
7651 (native-inputs
7652 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7653 ("python-hypothesis" ,python-hypothesis)
7654 ("python-pretend" ,python-pretend)
7655 ("python-pytz" ,python-pytz)
7656 ("python-pytest" ,python-pytest-3.0)))
7657 (home-page "https://github.com/pyca/cryptography")
7658 (synopsis "Cryptographic recipes and primitives for Python")
7659 (description
7660 "cryptography is a package which provides cryptographic recipes and
7661 primitives to Python developers. It aims to be the “cryptographic standard
7662 library” for Python. The package includes both high level recipes, and low
7663 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7664 message digests and key derivation functions.")
7665 ;; Distributed under either BSD-3 or ASL2.0
7666 (license (list license:bsd-3 license:asl2.0))
7667 (properties `((python2-variant . ,(delay python2-cryptography))))))
7668
7669 (define-public python2-cryptography
7670 (let ((crypto (package-with-python2
7671 (strip-python2-variant python-cryptography))))
7672 (package (inherit crypto)
7673 (propagated-inputs
7674 `(("python2-ipaddress" ,python2-ipaddress)
7675 ("python2-backport-ssl-match-hostname"
7676 ,python2-backport-ssl-match-hostname)
7677 ("python2-enum34" ,python2-enum34)
7678 ,@(package-propagated-inputs crypto))))))
7679
7680 (define-public python-pyopenssl
7681 (package
7682 (name "python-pyopenssl")
7683 (version "17.1.0")
7684 (source
7685 (origin
7686 (method url-fetch)
7687 (uri (pypi-uri "pyOpenSSL" version))
7688 (patches
7689 (search-patches "python-pyopenssl-17.1.0-test-overflow.patch"))
7690 (sha256
7691 (base32
7692 "0qwmqhfsq84ydir9dz273ypmlcvs7v71m1jns0sd4k0h6lfsa82s"))))
7693 (build-system python-build-system)
7694 (arguments
7695 '(#:phases
7696 (modify-phases %standard-phases
7697 (delete 'check)
7698 (add-after 'install 'check
7699 (lambda* (#:key inputs outputs #:allow-other-keys)
7700 (add-installed-pythonpath inputs outputs)
7701 (zero? (system* "py.test" "-v" "-k"
7702 (string-append
7703 ;; This test tries to look up certificates from
7704 ;; the compiled-in default path in OpenSSL, which
7705 ;; does not exist in the build environment.
7706 "not test_fallback_default_verify_paths "
7707 ;; This test attempts to make a connection to
7708 ;; an external web service.
7709 "and not test_set_default_verify_paths"))))))))
7710 (propagated-inputs
7711 `(("python-cryptography" ,python-cryptography)
7712 ("python-six" ,python-six)))
7713 (inputs
7714 `(("openssl" ,openssl)))
7715 (native-inputs
7716 `(("python-pretend" ,python-pretend)
7717 ("python-pytest" ,python-pytest-3.0)))
7718 (home-page "https://github.com/pyca/pyopenssl")
7719 (synopsis "Python wrapper module around the OpenSSL library")
7720 (description
7721 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7722 library.")
7723 (license license:asl2.0)))
7724
7725 (define-public python2-pyopenssl
7726 (package-with-python2 python-pyopenssl))
7727
7728 (define-public python-pip
7729 (package
7730 (name "python-pip")
7731 (version "9.0.1")
7732 (source
7733 (origin
7734 (method url-fetch)
7735 (uri (pypi-uri "pip" version))
7736 (sha256
7737 (base32
7738 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7739 (build-system python-build-system)
7740 (arguments
7741 '(#:tests? #f)) ; there are no tests in the pypi archive.
7742 (home-page "https://pip.pypa.io/")
7743 (synopsis "Package manager for Python software")
7744 (description
7745 "Pip is a package manager for Python software, that finds packages on the
7746 Python Package Index (PyPI).")
7747 (license license:expat)))
7748
7749 (define-public python2-pip
7750 (package-with-python2 python-pip))
7751
7752 (define-public python-tlsh
7753 (package
7754 (name "python-tlsh")
7755 (version "3.4.4")
7756 (home-page "https://github.com/trendmicro/tlsh")
7757 (source (origin
7758 (method url-fetch)
7759 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7760 version ".tar.gz"))
7761 (sha256
7762 (base32
7763 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7764 (file-name (string-append name "-" version ".tar.gz"))))
7765 (build-system cmake-build-system)
7766 (arguments
7767 '(#:out-of-source? #f
7768 #:phases (modify-phases %standard-phases
7769 (replace
7770 'install
7771 (lambda* (#:key outputs #:allow-other-keys)
7772 ;; Build and install the Python bindings. The underlying
7773 ;; C++ library is apparently not meant to be installed.
7774 (let ((out (assoc-ref outputs "out")))
7775 (with-directory-excursion "py_ext"
7776 (and (system* "python" "setup.py" "build")
7777 (system* "python" "setup.py" "install"
7778 (string-append "--prefix=" out))))))))))
7779 (inputs `(("python" ,python-wrapper))) ;for the bindings
7780 (synopsis "Fuzzy matching library for Python")
7781 (description
7782 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7783 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7784 value which can be used for similarity comparisons. Similar objects have
7785 similar hash values, which allows for the detection of similar objects by
7786 comparing their hash values. The byte stream should have a sufficient amount
7787 of complexity; for example, a byte stream of identical bytes will not generate
7788 a hash value.")
7789 (license license:asl2.0)))
7790
7791 (define-public python2-tlsh
7792 (package
7793 (inherit python-tlsh)
7794 (name "python2-tlsh")
7795 (inputs `(("python" ,python-2)))))
7796
7797 (define-public python-termcolor
7798 (package
7799 (name "python-termcolor")
7800 (version "1.1.0")
7801 (source
7802 (origin
7803 (method url-fetch)
7804 (uri (pypi-uri "termcolor" version))
7805 (sha256
7806 (base32
7807 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7808 (build-system python-build-system)
7809 (arguments
7810 ;; There are no tests.
7811 `(#:tests? #f))
7812 (home-page "http://pypi.python.org/pypi/termcolor")
7813 (synopsis "ANSII Color formatting for terminal output")
7814 (description
7815 "This package provides ANSII Color formatting for output in terminals.")
7816 (license license:expat)))
7817
7818 (define-public python2-termcolor
7819 (package-with-python2 python-termcolor))
7820
7821 (define-public python-libarchive-c
7822 (package
7823 (name "python-libarchive-c")
7824 (version "2.2")
7825 (source (origin
7826 (method url-fetch)
7827 (uri (pypi-uri "libarchive-c" version))
7828 (sha256
7829 (base32
7830 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7831 (build-system python-build-system)
7832 (arguments
7833 '(#:phases (modify-phases %standard-phases
7834 (add-before
7835 'build 'reference-libarchive
7836 (lambda* (#:key inputs #:allow-other-keys)
7837 ;; Retain the absolute file name of libarchive.so.
7838 (let ((libarchive (assoc-ref inputs "libarchive")))
7839 (substitute* "libarchive/ffi.py"
7840 (("find_library\\('archive'\\)")
7841 (string-append "'" libarchive
7842 "/lib/libarchive.so'")))))))))
7843 (inputs
7844 `(("libarchive" ,libarchive)))
7845 (home-page "https://github.com/Changaco/python-libarchive-c")
7846 (synopsis "Python interface to libarchive")
7847 (description
7848 "This package provides Python bindings to libarchive, a C library to
7849 access possibly compressed archives in many different formats. It uses
7850 Python's @code{ctypes} foreign function interface (FFI).")
7851 (license license:lgpl2.0+)))
7852
7853 (define-public python2-libarchive-c
7854 (package-with-python2 python-libarchive-c))
7855
7856 (define-public python-file
7857 (package
7858 (inherit file)
7859 (name "python-file")
7860 (source (origin
7861 (inherit (package-source file))
7862 ;; This patch should not be applied to python2-file.
7863 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7864 (build-system python-build-system)
7865 (arguments
7866 '(#:tests? #f ;no tests
7867 #:configure-flags '("--single-version-externally-managed" "--root=/")
7868 #:phases (modify-phases %standard-phases
7869 (add-before 'build 'change-directory
7870 (lambda _
7871 (chdir "python")
7872 #t))
7873 (add-before 'build 'set-library-file-name
7874 (lambda* (#:key inputs #:allow-other-keys)
7875 (let ((file (assoc-ref inputs "file")))
7876 (substitute* "magic.py"
7877 (("find_library\\('magic'\\)")
7878 (string-append "'" file "/lib/libmagic.so'")))
7879 #t))))))
7880 (inputs `(("file" ,file)))
7881 (self-native-input? #f)
7882 (synopsis "Python bindings to the libmagic file type guesser. Note that
7883 this module and the python-magic module both provide a \"magic.py\" file;
7884 these two modules, which are different and were developed separately, both
7885 serve the same purpose: provide Python bindings for libmagic.")))
7886
7887 (define-public python2-file
7888 (package-with-python2 python-file))
7889
7890 (define-public python-debian
7891 (package
7892 (name "python-debian")
7893 (version "0.1.28")
7894 (source
7895 (origin
7896 (method url-fetch)
7897 (uri (pypi-uri name version))
7898 (sha256
7899 (base32
7900 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7901 (build-system python-build-system)
7902 (propagated-inputs
7903 `(("python-six" ,python-six)))
7904 (home-page "http://packages.debian.org/sid/python-debian")
7905 (synopsis "Debian package related modules")
7906 (description
7907 ;; XXX: Use @enumerate instead of @itemize to work around
7908 ;; <http://bugs.gnu.org/21772>.
7909 "This package provides Python modules that abstract many formats of
7910 Debian-related files, such as:
7911
7912 @enumerate
7913 @item Debtags information;
7914 @item @file{debian/changelog} files;
7915 @item packages files, pdiffs;
7916 @item control files of single or multiple RFC822-style paragraphs---e.g.
7917 @file{debian/control}, @file{.changes}, @file{.dsc};
7918 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7919 contained files and meta-information.
7920 @end enumerate\n")
7921
7922 ;; Modules are either GPLv2+ or GPLv3+.
7923 (license license:gpl3+)))
7924
7925 (define-public python2-debian
7926 (package-with-python2 python-debian))
7927
7928 (define-public python-nbformat
7929 (package
7930 (name "python-nbformat")
7931 (version "4.1.0")
7932 (source
7933 (origin
7934 (method url-fetch)
7935 (uri (pypi-uri "nbformat" version))
7936 (sha256
7937 (base32
7938 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7939 (build-system python-build-system)
7940 (arguments `(#:tests? #f)) ; no test target
7941 (propagated-inputs
7942 `(("python-ipython-genutils" ,python-ipython-genutils)
7943 ("python-jsonschema" ,python-jsonschema)
7944 ("python-jupyter-core" ,python-jupyter-core)
7945 ("python-traitlets" ,python-traitlets)))
7946 (home-page "http://jupyter.org")
7947 (synopsis "Jupyter Notebook format")
7948 (description "This package provides the reference implementation of the
7949 Jupyter Notebook format and Python APIs for working with notebooks.")
7950 (license license:bsd-3)))
7951
7952 (define-public python2-nbformat
7953 (package-with-python2 python-nbformat))
7954
7955 (define-public python-bleach
7956 (package
7957 (name "python-bleach")
7958 (version "1.4.3")
7959 (source
7960 (origin
7961 (method url-fetch)
7962 (uri (pypi-uri "bleach" version))
7963 (sha256
7964 (base32
7965 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7966 (build-system python-build-system)
7967 (propagated-inputs
7968 `(("python-html5lib" ,python-html5lib-0.9)
7969 ("python-six" ,python-six)))
7970 (native-inputs
7971 `(("python-nose" ,python-nose)))
7972 (home-page "https://github.com/jsocol/bleach")
7973 (synopsis "Whitelist-based HTML-sanitizing tool")
7974 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7975 (license license:asl2.0)))
7976
7977 (define-public python2-bleach
7978 (package-with-python2 python-bleach))
7979
7980 (define-public python-entrypoints
7981 (package
7982 (name "python-entrypoints")
7983 (version "0.2.2")
7984 (source
7985 (origin
7986 (method url-fetch)
7987 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7988 version ".tar.gz"))
7989 (file-name (string-append name "-" version ".tar.gz"))
7990 (sha256
7991 (base32
7992 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7993 (build-system python-build-system)
7994 ;; The package does not come with a setup.py file, so we have to generate
7995 ;; one ourselves.
7996 (arguments
7997 `(#:tests? #f
7998 #:phases
7999 (modify-phases %standard-phases
8000 (add-after 'unpack 'create-setup.py
8001 (lambda _
8002 (call-with-output-file "setup.py"
8003 (lambda (port)
8004 (format port "\
8005 from setuptools import setup
8006 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8007 " ,version))))))))
8008 (home-page "https://github.com/takluyver/entrypoints")
8009 (synopsis "Discover and load entry points from installed Python packages")
8010 (description "Entry points are a way for Python packages to advertise
8011 objects with some common interface. The most common examples are
8012 @code{console_scripts} entry points, which define shell commands by
8013 identifying a Python function to run. The @code{entrypoints} module contains
8014 functions to find and load entry points.")
8015 (license license:expat)))
8016
8017 (define-public python2-entrypoints
8018 (package-with-python2 python-entrypoints))
8019
8020 (define-public python-nbconvert
8021 (package
8022 (name "python-nbconvert")
8023 (version "5.0.0b1")
8024 (source
8025 (origin
8026 (method url-fetch)
8027 (uri (pypi-uri "nbconvert" version))
8028 (sha256
8029 (base32
8030 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8031 (build-system python-build-system)
8032 (arguments
8033 `(;; The "bdist_egg" target is disabled by default, causing the installation
8034 ;; to fail.
8035 #:configure-flags (list "bdist_egg")
8036 ;; FIXME: 5 failures, 40 errors.
8037 #:tests? #f))
8038 ;; #:phases
8039 ;; (modify-phases %standard-phases
8040 ;; (replace 'check
8041 ;; (lambda _
8042 ;; (zero? (system* "py.test" "-v")))))
8043 (native-inputs
8044 `(("python-pytest" ,python-pytest)))
8045 (propagated-inputs
8046 `(("python-bleach" ,python-bleach)
8047 ("python-entrypoints" ,python-entrypoints)
8048 ("python-jinja2" ,python-jinja2)
8049 ("python-jupyter-core" ,python-jupyter-core)
8050 ("python-mistune" ,python-mistune)
8051 ("python-nbformat" ,python-nbformat)
8052 ("python-pygments" ,python-pygments)
8053 ("python-traitlets" ,python-traitlets)))
8054 (home-page "http://jupyter.org")
8055 (synopsis "Converting Jupyter Notebooks")
8056 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8057 notebooks to various other formats via Jinja templates. It allows you to
8058 convert an @code{.ipynb} notebook file into various static formats including:
8059
8060 @enumerate
8061 @item HTML
8062 @item LaTeX
8063 @item PDF
8064 @item Reveal JS
8065 @item Markdown (md)
8066 @item ReStructured Text (rst)
8067 @item executable script
8068 @end enumerate\n")
8069 (license license:bsd-3)))
8070
8071 (define-public python2-nbconvert
8072 (package-with-python2 python-nbconvert))
8073
8074 (define-public python-notebook
8075 (package
8076 (name "python-notebook")
8077 (version "4.2.3")
8078 (source (origin
8079 (method url-fetch)
8080 (uri (pypi-uri "notebook" version))
8081 (sha256
8082 (base32
8083 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
8084 (build-system python-build-system)
8085 (arguments
8086 `(#:phases
8087 (modify-phases %standard-phases
8088 (replace 'check
8089 (lambda _
8090 ;; HOME must be set for tests
8091 (setenv "HOME" "/tmp")
8092 (zero? (system* "nosetests")))))))
8093 (propagated-inputs
8094 `(("python-jupyter-core" ,python-jupyter-core)
8095 ("python-nbformat" ,python-nbformat)
8096 ("python-nbconvert" ,python-nbconvert)
8097 ("python-ipython" ,python-ipython)))
8098 (native-inputs
8099 `(("python-nose" ,python-nose)
8100 ("python-sphinx" ,python-sphinx)
8101 ("python-requests" ,python-requests)))
8102 (home-page "http://jupyter.org/")
8103 (synopsis "Web-based notebook environment for interactive computing")
8104 (description
8105 "The Jupyter HTML notebook is a web-based notebook environment for
8106 interactive computing.")
8107 (properties `((python2-variant . ,(delay python2-notebook))))
8108 (license license:bsd-3)))
8109
8110 (define-public python2-notebook
8111 (let ((base (package-with-python2
8112 (strip-python2-variant python-notebook))))
8113 (package (inherit base)
8114 (native-inputs
8115 `(("python2-mock" ,python2-mock)
8116 ,@(package-native-inputs base)))
8117 (arguments
8118 (substitute-keyword-arguments (package-arguments base)
8119 ((#:phases phases)
8120 `(modify-phases ,phases
8121 (add-before 'check 'disable-test-case
8122 ;; The test requires network access to localhost. Curiously it
8123 ;; fails with Python 2 only. Simply make the test-case return
8124 ;; immediately.
8125 (lambda _
8126 (substitute*
8127 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8128 (("formats = self.nbconvert_api") "return #")))))))))))
8129
8130 (define-public python-widgetsnbextension
8131 (package
8132 (name "python-widgetsnbextension")
8133 (version "1.2.6")
8134 (source
8135 (origin
8136 (method url-fetch)
8137 (uri (pypi-uri "widgetsnbextension" version))
8138 (sha256
8139 (base32
8140 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8141 (build-system python-build-system)
8142 (propagated-inputs
8143 `(("python-notebook" ,python-notebook)))
8144 (native-inputs
8145 `(("python-certifi" ,python-certifi)
8146 ("python-nose" ,python-nose)))
8147 (home-page "http://ipython.org")
8148 (synopsis "IPython HTML widgets for Jupyter")
8149 (description "This package provides interactive HTML widgets for Jupyter
8150 notebooks.")
8151 (license license:bsd-3)))
8152
8153 (define-public python2-widgetsnbextension
8154 (package-with-python2 python-widgetsnbextension))
8155
8156 (define-public python-ipywidgets
8157 (package
8158 (name "python-ipywidgets")
8159 (version "5.2.2")
8160 (source
8161 (origin
8162 (method url-fetch)
8163 (uri (pypi-uri "ipywidgets" version))
8164 (sha256
8165 (base32
8166 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8167 (build-system python-build-system)
8168 ;; FIXME: it's not clear how to run the tests.
8169 (arguments `(#:tests? #f))
8170 (propagated-inputs
8171 `(("python-ipykernel" ,python-ipykernel)
8172 ("python-ipython" ,python-ipython)
8173 ("python-traitlets" ,python-traitlets)
8174 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8175 (home-page "http://ipython.org")
8176 (synopsis "IPython HTML widgets for Jupyter")
8177 (description "Ipywidgets are interactive HTML widgets for Jupyter
8178 notebooks and the IPython kernel. Notebooks come alive when interactive
8179 widgets are used. Users gain control of their data and can visualize changes
8180 in the data.")
8181 (license license:bsd-3)))
8182
8183 (define-public python2-ipywidgets
8184 (package-with-python2 python-ipywidgets))
8185
8186 (define-public python-jupyter-console
8187 (package
8188 (name "python-jupyter-console")
8189 (version "5.0.0")
8190 (source
8191 (origin
8192 (method url-fetch)
8193 (uri (pypi-uri "jupyter_console" version))
8194 (sha256
8195 (base32
8196 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8197 (build-system python-build-system)
8198 ;; FIXME: it's not clear how to run the tests.
8199 (arguments `(#:tests? #f))
8200 (propagated-inputs
8201 `(("python-ipykernel" ,python-ipykernel)
8202 ("python-ipython" ,python-ipython)
8203 ("python-jupyter-client" ,python-jupyter-client)
8204 ("python-prompt-toolkit" ,python-prompt-toolkit)
8205 ("python-pygments" ,python-pygments)))
8206 (home-page "https://jupyter.org")
8207 (synopsis "Jupyter terminal console")
8208 (description "This package provides a terminal-based console frontend for
8209 Jupyter kernels. It also allows for console-based interaction with non-Python
8210 Jupyter kernels such as IJulia and IRKernel.")
8211 (license license:bsd-3)))
8212
8213 (define-public python2-jupyter-console
8214 (package-with-python2 python-jupyter-console))
8215
8216 (define-public jupyter
8217 (package
8218 (name "jupyter")
8219 (version "1.0.0")
8220 (source
8221 (origin
8222 (method url-fetch)
8223 (uri (pypi-uri "jupyter" version))
8224 (sha256
8225 (base32
8226 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8227 (build-system python-build-system)
8228 ;; FIXME: it's not clear how to run the tests.
8229 (arguments `(#:tests? #f))
8230 (propagated-inputs
8231 `(("python-ipykernel" ,python-ipykernel)
8232 ("python-ipywidgets" ,python-ipywidgets)
8233 ("python-jupyter-console" ,python-jupyter-console)
8234 ("python-nbconvert" ,python-nbconvert)
8235 ("python-notebook" ,python-notebook)))
8236 (home-page "http://jupyter.org")
8237 (synopsis "Web application for interactive documents")
8238 (description
8239 "The Jupyter Notebook is a web application that allows you to create and
8240 share documents that contain live code, equations, visualizations and
8241 explanatory text. Uses include: data cleaning and transformation, numerical
8242 simulation, statistical modeling, machine learning and much more.")
8243 (license license:bsd-3)))
8244
8245 (define-public python-chardet
8246 (package
8247 (name "python-chardet")
8248 (version "2.3.0")
8249 (source
8250 (origin
8251 (method url-fetch)
8252 (uri (string-append
8253 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8254 version
8255 ".tar.gz"))
8256 (sha256
8257 (base32
8258 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8259 (build-system python-build-system)
8260 (home-page "https://github.com/chardet/chardet")
8261 (synopsis "Universal encoding detector for Python 2 and 3")
8262 (description
8263 "This package provides @code{chardet}, a Python module that can
8264 automatically detect a wide range of file encodings.")
8265 (license license:lgpl2.1+)))
8266
8267 (define-public python2-chardet
8268 (package-with-python2 python-chardet))
8269
8270 (define-public python-docopt
8271 (package
8272 (name "python-docopt")
8273 (version "0.6.2")
8274 (source
8275 (origin
8276 (method url-fetch)
8277 ;; The release on PyPI does not include tests.
8278 (uri (string-append
8279 "https://github.com/docopt/docopt/archive/"
8280 version ".tar.gz"))
8281 (file-name (string-append name "-" version ".tar.gz"))
8282 (sha256
8283 (base32
8284 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8285 (build-system python-build-system)
8286 (native-inputs
8287 `(("python-pytest" ,python-pytest)))
8288 (arguments
8289 `(#:phases (alist-replace
8290 'check
8291 (lambda _ (zero? (system* "py.test")))
8292 %standard-phases)))
8293 (home-page "http://docopt.org")
8294 (synopsis "Command-line interface description language for Python")
8295 (description "This library allows the user to define a command-line
8296 interface from a program's help message rather than specifying it
8297 programatically with command-line parsers like @code{getopt} and
8298 @code{argparse}.")
8299 (license license:expat)))
8300
8301 (define-public python2-docopt
8302 (package-with-python2 python-docopt))
8303
8304 (define-public python-zope-event
8305 (package
8306 (name "python-zope-event")
8307 (version "4.1.0")
8308 (source
8309 (origin
8310 (method url-fetch)
8311 (uri (string-append "https://pypi.python.org/packages/source/z"
8312 "/zope.event/zope.event-" version ".tar.gz"))
8313 (sha256
8314 (base32
8315 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8316 (build-system python-build-system)
8317 (home-page "http://pypi.python.org/pypi/zope.event")
8318 (synopsis "Event publishing system for Python")
8319 (description "Zope.event provides an event publishing API, intended for
8320 use by applications which are unaware of any subscribers to their events. It
8321 is a simple event-dispatching system on which more sophisticated event
8322 dispatching systems can be built.")
8323 (license license:zpl2.1)))
8324
8325 (define-public python2-zope-event
8326 (package-with-python2 python-zope-event))
8327
8328 (define-public python-zope-interface
8329 (package
8330 (name "python-zope-interface")
8331 (version "4.1.3")
8332 (source
8333 (origin
8334 (method url-fetch)
8335 (uri (string-append "https://pypi.python.org/packages/source/z"
8336 "/zope.interface/zope.interface-" version ".tar.gz"))
8337 (sha256
8338 (base32
8339 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8340 (build-system python-build-system)
8341 (native-inputs
8342 `(("python-zope-event" ,python-zope-event)))
8343 (home-page "https://github.com/zopefoundation/zope.interface")
8344 (synopsis "Python implementation of the \"design by contract\"
8345 methodology")
8346 (description "Zope.interface provides an implementation of \"object
8347 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8348 conforming to a given API or contract.")
8349 (license license:zpl2.1)))
8350
8351 (define-public python2-zope-interface
8352 (package-with-python2 python-zope-interface))
8353
8354 (define-public python-zope-exceptions
8355 (package
8356 (name "python-zope-exceptions")
8357 (version "4.0.8")
8358 (source
8359 (origin
8360 (method url-fetch)
8361 (uri (string-append "https://pypi.python.org/packages/source/z"
8362 "/zope.exceptions/zope.exceptions-"
8363 version ".tar.gz"))
8364 (sha256
8365 (base32
8366 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8367 (build-system python-build-system)
8368 (arguments
8369 '(#:tests? #f)) ; circular dependency with zope.testrunner
8370 (propagated-inputs
8371 `(("python-zope-interface" ,python-zope-interface)))
8372 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8373 (synopsis "Zope exceptions")
8374 (description "Zope.exceptions provides general-purpose exception types
8375 that have uses outside of the Zope framework.")
8376 (license license:zpl2.1)))
8377
8378 (define-public python2-zope-exceptions
8379 (package-with-python2 python-zope-exceptions))
8380
8381 (define-public python-zope-testing
8382 (package
8383 (name "python-zope-testing")
8384 (version "4.5.0")
8385 (source
8386 (origin
8387 (method url-fetch)
8388 (uri (string-append "https://pypi.python.org/packages/source/z"
8389 "/zope.testing/zope.testing-" version ".tar.gz"))
8390 (sha256
8391 (base32
8392 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8393 (modules '((guix build utils)))
8394 (snippet
8395 '(begin
8396 ;; Remove pre-compiled .pyc files backup files from source.
8397 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8398 #t))))
8399 (build-system python-build-system)
8400 (native-inputs
8401 `(("python-zope-exceptions" ,python-zope-exceptions)))
8402 (propagated-inputs
8403 `(("python-zope-interface" ,python-zope-interface)))
8404 (home-page "http://pypi.python.org/pypi/zope.testing")
8405 (synopsis "Zope testing helpers")
8406 (description "Zope.testing provides a number of testing utilities for HTML
8407 forms, HTTP servers, regular expressions, and more.")
8408 (license license:zpl2.1)))
8409
8410 (define-public python2-zope-testing
8411 (package-with-python2 python-zope-testing))
8412
8413 (define-public python-zope-testrunner
8414 (package
8415 (name "python-zope-testrunner")
8416 (version "4.4.9")
8417 (source
8418 (origin
8419 (method url-fetch)
8420 (uri (string-append "https://pypi.python.org/packages/source/z"
8421 "/zope.testrunner/zope.testrunner-"
8422 version ".zip"))
8423 (sha256
8424 (base32
8425 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8426 (build-system python-build-system)
8427 (arguments
8428 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8429 (native-inputs
8430 `(("python-six" ,python-six)
8431 ;("python-zope-interface" ,python-zope-interface)
8432 ("python-zope-exceptions" ,python-zope-exceptions)
8433 ("python-zope-testing" ,python-zope-testing)
8434 ("unzip" ,unzip)))
8435 (propagated-inputs
8436 `(("python-zope-interface" ,python-zope-interface)))
8437 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8438 (synopsis "Zope testrunner script")
8439 (description "Zope.testrunner provides a script for running Python
8440 tests.")
8441 (license license:zpl2.1)))
8442
8443 (define-public python2-zope-testrunner
8444 (let ((base (package-with-python2 python-zope-testrunner)))
8445 (package
8446 (inherit base)
8447 (native-inputs
8448 (append (package-native-inputs base)
8449 `(("python2-subunit" ,python2-subunit)
8450 ("python2-mimeparse" ,python2-mimeparse)))))))
8451
8452 (define-public python-zope-i18nmessageid
8453 (package
8454 (name "python-zope-i18nmessageid")
8455 (version "4.0.3")
8456 (source
8457 (origin
8458 (method url-fetch)
8459 (uri (string-append
8460 "https://pypi.python.org/packages/source/z"
8461 "/zope.i18nmessageid/zope.i18nmessageid-"
8462 version ".tar.gz"))
8463 (sha256
8464 (base32
8465 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8466 (build-system python-build-system)
8467 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8468 (synopsis "Message identifiers for internationalization")
8469 (description "Zope.i18nmessageid provides facilities for declaring
8470 internationalized messages within program source text.")
8471 (license license:zpl2.1)))
8472
8473 (define-public python2-zope-i18nmessageid
8474 (package-with-python2 python-zope-i18nmessageid))
8475
8476 (define-public python-zope-schema
8477 (package
8478 (name "python-zope-schema")
8479 (version "4.4.2")
8480 (source
8481 (origin
8482 (method url-fetch)
8483 (uri (string-append "https://pypi.python.org/packages/source/z"
8484 "/zope.schema/zope.schema-" version ".tar.gz"))
8485 (sha256
8486 (base32
8487 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8488 (build-system python-build-system)
8489 (arguments
8490 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8491 (propagated-inputs
8492 `(("python-zope-event" ,python-zope-event)
8493 ("python-zope-exceptions", python-zope-exceptions)
8494 ("python-zope-interface" ,python-zope-interface)))
8495 (native-inputs
8496 `(("python-zope-testing" ,python-zope-testing)
8497 ("python-coverage" ,python-coverage)
8498 ("python-nose" ,python-nose)))
8499 (home-page "http://pypi.python.org/pypi/zope.schema")
8500 (synopsis "Zope data schemas")
8501 (description "Zope.scheme provides extensions to zope.interface for
8502 defining data schemas.")
8503 (license license:zpl2.1)))
8504
8505 (define-public python2-zope-schema
8506 (package-with-python2 python-zope-schema))
8507
8508 (define-public python-zope-configuration
8509 (package
8510 (name "python-zope-configuration")
8511 (version "4.0.3")
8512 (source (origin
8513 (method url-fetch)
8514 (uri (string-append "https://pypi.python.org/packages/source/z"
8515 "/zope.configuration/zope.configuration-"
8516 version ".tar.gz"))
8517 (sha256
8518 (base32
8519 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8520 (build-system python-build-system)
8521 (arguments
8522 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8523 (propagated-inputs
8524 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8525 ("python-zope-schema" ,python-zope-schema)))
8526 (home-page "http://pypi.python.org/pypi/zope.configuration")
8527 (synopsis "Zope Configuration Markup Language")
8528 (description "Zope.configuration implements ZCML, the Zope Configuration
8529 Markup Language.")
8530 (license license:zpl2.1)))
8531
8532 (define-public python2-zope-configuration
8533 (package-with-python2 python-zope-configuration))
8534
8535 (define-public python-zope-proxy
8536 (package
8537 (name "python-zope-proxy")
8538 (version "4.1.6")
8539 (source
8540 (origin
8541 (method url-fetch)
8542 (uri (string-append "https://pypi.python.org/packages/source/z"
8543 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8544 (sha256
8545 (base32
8546 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8547 (build-system python-build-system)
8548 (arguments
8549 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8550 (propagated-inputs
8551 `(("python-zope-interface" ,python-zope-interface)))
8552 (home-page "http://pypi.python.org/pypi/zope.proxy")
8553 (synopsis "Generic, transparent proxies")
8554 (description "Zope.proxy provides generic, transparent proxies for Python.
8555 Proxies are special objects which serve as mostly-transparent wrappers around
8556 another object, intervening in the apparent behavior of the wrapped object
8557 only when necessary to apply the policy (e.g., access checking, location
8558 brokering, etc.) for which the proxy is responsible.")
8559 (license license:zpl2.1)))
8560
8561 (define-public python2-zope-proxy
8562 (package-with-python2 python-zope-proxy))
8563
8564 (define-public python-zope-location
8565 (package
8566 (name "python-zope-location")
8567 (version "4.0.3")
8568 (source
8569 (origin
8570 (method url-fetch)
8571 (uri (string-append "https://pypi.python.org/packages/source/z"
8572 "/zope.location/zope.location-" version ".tar.gz"))
8573 (sha256
8574 (base32
8575 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8576 (build-system python-build-system)
8577 (arguments
8578 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8579 (propagated-inputs
8580 `(("python-zope-proxy" ,python-zope-proxy)
8581 ("python-zope-schema" ,python-zope-schema)))
8582 (home-page "http://pypi.python.org/pypi/zope.location/")
8583 (synopsis "Zope location library")
8584 (description "Zope.location implements the concept of \"locations\" in
8585 Zope3, which are are special objects that have a structural location.")
8586 (license license:zpl2.1)))
8587
8588 (define-public python2-zope-location
8589 (package-with-python2 python-zope-location))
8590
8591 (define-public python-zope-security
8592 (package
8593 (name "python-zope-security")
8594 (version "4.0.3")
8595 (source
8596 (origin
8597 (method url-fetch)
8598 (uri (string-append "https://pypi.python.org/packages/source/z"
8599 "/zope.security/zope.security-" version ".tar.gz"))
8600 (sha256
8601 (base32
8602 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8603 (build-system python-build-system)
8604 (arguments
8605 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8606 (propagated-inputs
8607 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8608 ("python-zope-proxy" ,python-zope-proxy)
8609 ("python-zope-schema" ,python-zope-schema)))
8610 (native-inputs
8611 `(("python-six" ,python-six)
8612 ("python-zope-component" ,python-zope-component)
8613 ("python-zope-configuration" ,python-zope-configuration)
8614 ("python-zope-location" ,python-zope-location)
8615 ("python-zope-testrunner" ,python-zope-testrunner)
8616 ("python-zope-testing" ,python-zope-testing)))
8617 (home-page "http://pypi.python.org/pypi/zope.security")
8618 (synopsis "Zope security framework")
8619 (description "Zope.security provides a generic mechanism to implement
8620 security policies on Python objects.")
8621 (license license:zpl2.1)))
8622
8623 (define-public python2-zope-security
8624 (let ((zope-security (package-with-python2 python-zope-security)))
8625 (package (inherit zope-security)
8626 (propagated-inputs
8627 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8628 ,@(alist-delete
8629 "python-zope-testrunner"
8630 (package-propagated-inputs zope-security)))))))
8631
8632 (define-public python-zope-component
8633 (package
8634 (name "python-zope-component")
8635 (version "4.3.0")
8636 (source
8637 (origin
8638 (method url-fetch)
8639 (uri (pypi-uri "zope.component" version))
8640 (sha256
8641 (base32
8642 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8643 (build-system python-build-system)
8644 (arguments
8645 ;; Skip tests due to circular dependency with python-zope-security.
8646 '(#:tests? #f))
8647 (native-inputs
8648 `(("python-zope-testing" ,python-zope-testing)))
8649 (propagated-inputs
8650 `(("python-zope-event" ,python-zope-event)
8651 ("python-zope-interface" ,python-zope-interface)
8652 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8653 ("python-zope-configuration" ,python-zope-configuration)))
8654 (home-page "https://github.com/zopefoundation/zope.component")
8655 (synopsis "Zope Component Architecture")
8656 (description "Zope.component represents the core of the Zope Component
8657 Architecture. Together with the zope.interface package, it provides
8658 facilities for defining, registering and looking up components.")
8659 (license license:zpl2.1)))
8660
8661 (define-public python2-zope-component
8662 (package-with-python2 python-zope-component))
8663
8664 (define-public python-pythondialog
8665 (package
8666 (name "python-pythondialog")
8667 (version "3.4.0")
8668 (source
8669 (origin
8670 (method url-fetch)
8671 (uri (pypi-uri "pythondialog" version))
8672 (sha256
8673 (base32
8674 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8675 (build-system python-build-system)
8676 (arguments
8677 `(#:phases
8678 (modify-phases %standard-phases
8679 (add-after 'unpack 'patch-path
8680 (lambda* (#:key inputs #:allow-other-keys)
8681 (let* ((dialog (assoc-ref inputs "dialog")))
8682 ;; Since this library really wants to grovel the search path, we
8683 ;; must hardcode dialog's store path into it.
8684 (substitute* "dialog.py"
8685 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8686 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8687 #t))))
8688 #:tests? #f)) ; no test suite
8689 (propagated-inputs
8690 `(("dialog" ,dialog)))
8691 (home-page "http://pythondialog.sourceforge.net/")
8692 (synopsis "Python interface to the UNIX dialog utility")
8693 (description "A Python wrapper for the dialog utility. Its purpose is to
8694 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8695 This allows one to make simple text-mode user interfaces on Unix-like systems")
8696 (license license:lgpl2.1)
8697 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8698
8699 (define-public python2-pythondialog
8700 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8701 (package
8702 (inherit base)
8703 (version (package-version python-pythondialog))
8704 (source (origin
8705 (method url-fetch)
8706 (uri (pypi-uri "python2-pythondialog" version))
8707 (sha256
8708 (base32
8709 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8710
8711 (define-public python-pyrfc3339
8712 (package
8713 (name "python-pyrfc3339")
8714 (version "1.0")
8715 (source
8716 (origin
8717 (method url-fetch)
8718 (uri (pypi-uri "pyRFC3339" version))
8719 (sha256
8720 (base32
8721 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8722 (build-system python-build-system)
8723 (propagated-inputs
8724 `(("python-pytz" ,python-pytz)))
8725 (native-inputs
8726 `(("python-nose" ,python-nose)))
8727 (home-page "https://github.com/kurtraschke/pyRFC3339")
8728 (synopsis "Python timestamp library")
8729 (description "Python library for generating and parsing RFC 3339-compliant
8730 timestamps.")
8731 (license license:expat)))
8732
8733 (define-public python2-pyrfc3339
8734 (package-with-python2 python-pyrfc3339))
8735
8736 (define-public python-werkzeug
8737 (package
8738 (name "python-werkzeug")
8739 (version "0.11.15")
8740 (source
8741 (origin
8742 (method url-fetch)
8743 (uri (pypi-uri "Werkzeug" version))
8744 (sha256
8745 (base32
8746 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8747 (build-system python-build-system)
8748 (native-inputs
8749 `(("python-pytest" ,python-pytest)))
8750 (home-page "http://werkzeug.pocoo.org/")
8751 (synopsis "Utilities for WSGI applications")
8752 (description "One of the most advanced WSGI utility modules. It includes a
8753 powerful debugger, full-featured request and response objects, HTTP utilities to
8754 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8755 uploads, a powerful URL routing system and a bunch of community-contributed
8756 addon modules.")
8757 (license license:x11)))
8758
8759 (define-public python2-werkzeug
8760 (package-with-python2 python-werkzeug))
8761
8762 (define-public python-configobj
8763 (package
8764 (name "python-configobj")
8765 (version "5.0.6")
8766 (source (origin
8767 (method url-fetch)
8768 (uri (string-append
8769 "https://pypi.python.org/packages/source/c/configobj/"
8770 "configobj-" version ".tar.gz"))
8771 (sha256
8772 (base32
8773 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8774 ;; Patch setup.py so it looks for python-setuptools, which is
8775 ;; required to parse the keyword 'install_requires' in setup.py.
8776 (patches (search-patches "python-configobj-setuptools.patch"))))
8777 (build-system python-build-system)
8778 (propagated-inputs
8779 `(("python-six" ,python-six)))
8780 (synopsis "Config file reading, writing and validation")
8781 (description "ConfigObj is a simple but powerful config file reader and
8782 writer: an ini file round tripper. Its main feature is that it is very easy to
8783 use, with a straightforward programmer’s interface and a simple syntax for
8784 config files.")
8785 (home-page "https://github.com/DiffSK/configobj")
8786 (license license:bsd-3)))
8787
8788 (define-public python2-configobj
8789 (package-with-python2 python-configobj))
8790
8791 (define-public python-configargparse
8792 (package
8793 (name "python-configargparse")
8794 (version "0.10.0")
8795 (source (origin
8796 (method url-fetch)
8797 (uri (string-append
8798 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8799 "ConfigArgParse-" version ".tar.gz"))
8800 (sha256
8801 (base32
8802 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8803 (build-system python-build-system)
8804 (arguments
8805 ;; FIXME: Bug in test suite filed upstream:
8806 ;; https://github.com/bw2/ConfigArgParse/issues/32
8807 '(#:tests? #f))
8808 (synopsis "Replacement for argparse")
8809 (description "A drop-in replacement for argparse that allows options to also
8810 be set via config files and/or environment variables.")
8811 (home-page "https://github.com/bw2/ConfigArgParse")
8812 (license license:expat)))
8813
8814 (define-public python2-configargparse
8815 (package-with-python2 python-configargparse))
8816
8817 (define-public python-ndg-httpsclient
8818 (package
8819 (name "python-ndg-httpsclient")
8820 (version "0.4.2")
8821 (source (origin
8822 (method url-fetch)
8823 (uri (pypi-uri "ndg_httpsclient" version))
8824 (sha256
8825 (base32
8826 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8827 (build-system python-build-system)
8828 (arguments
8829 '(;; The tests appear to require networking.
8830 #:tests? #f))
8831 (propagated-inputs
8832 `(("python-pyopenssl" ,python-pyopenssl)))
8833 (synopsis "HTTPS support for Python's httplib and urllib2")
8834 (description "This is a HTTPS client implementation for httplib and urllib2
8835 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8836 over the default provided with Python and importantly enables full verification
8837 of the SSL peer.")
8838 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8839 (license license:bsd-3)))
8840
8841 ;; python2-openssl requires special care, so package-with-python2 is
8842 ;; insufficient.
8843 (define-public python2-ndg-httpsclient
8844 (package (inherit python-ndg-httpsclient)
8845 (name "python2-ndg-httpsclient")
8846 (arguments `(#:python ,python-2))
8847 (propagated-inputs
8848 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8849
8850 (define-public python-contextlib2
8851 (package
8852 (name "python-contextlib2")
8853 (version "0.4.0")
8854 (source
8855 (origin
8856 (method url-fetch)
8857 (uri (pypi-uri "contextlib2" version))
8858 (sha256
8859 (base32
8860 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8861 (build-system python-build-system)
8862 (arguments
8863 `(#:phases
8864 (modify-phases %standard-phases
8865 (replace 'check
8866 (lambda _ (zero?
8867 (system*
8868 "python" "test_contextlib2.py" "-v")))))))
8869 (home-page "http://contextlib2.readthedocs.org/")
8870 (synopsis "Tools for decorators and context managers")
8871 (description "This module is primarily a backport of the Python
8872 3.2 contextlib to earlier Python versions. Like contextlib, it
8873 provides utilities for common tasks involving decorators and context
8874 managers. It also contains additional features that are not part of
8875 the standard library.")
8876 (license license:psfl)))
8877
8878 (define-public python2-contextlib2
8879 (package-with-python2 python-contextlib2))
8880
8881 (define-public python-texttable
8882 (package
8883 (name "python-texttable")
8884 (version "0.8.7")
8885 (source
8886 (origin
8887 (method url-fetch)
8888 (uri (pypi-uri "texttable" version))
8889 (sha256
8890 (base32
8891 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8892 (build-system python-build-system)
8893 (arguments '(#:tests? #f)) ; no tests
8894 (home-page "https://github.com/foutaise/texttable/")
8895 (synopsis "Python module for creating simple ASCII tables")
8896 (description "Texttable is a Python module for creating simple ASCII
8897 tables.")
8898 (license license:lgpl2.1+)))
8899
8900 (define-public python2-texttable
8901 (package-with-python2 python-texttable))
8902
8903 (define-public python-websocket-client
8904 (package
8905 (name "python-websocket-client")
8906 (version "0.37.0")
8907 (source
8908 (origin
8909 (method url-fetch)
8910 (uri (pypi-uri "websocket_client" version))
8911 (sha256
8912 (base32
8913 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8914 (build-system python-build-system)
8915 (propagated-inputs
8916 `(("python-six" ,python-six)))
8917 (home-page "https://github.com/liris/websocket-client")
8918 (synopsis "WebSocket client for Python")
8919 (description "The Websocket-client module provides the low level APIs for
8920 WebSocket usage in Python programs.")
8921 (license license:lgpl2.1+)))
8922
8923 (define-public python2-websocket-client
8924 (package-with-python2 python-websocket-client))
8925
8926 (define-public python-atomicwrites
8927 (package
8928 (name "python-atomicwrites")
8929 (version "1.1.5")
8930 (source (origin
8931 (method url-fetch)
8932 (uri (pypi-uri "atomicwrites" version))
8933 (sha256
8934 (base32
8935 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8936 (build-system python-build-system)
8937 (synopsis "Atomic file writes in Python")
8938 (description "Library for atomic file writes using platform dependent tools
8939 for atomic file system operations.")
8940 (home-page "https://github.com/untitaker/python-atomicwrites")
8941 (license license:expat)))
8942
8943 (define-public python2-atomicwrites
8944 (package-with-python2 python-atomicwrites))
8945
8946 (define-public python-requests-toolbelt
8947 (package
8948 (name "python-requests-toolbelt")
8949 (version "0.6.2")
8950 (source (origin
8951 (method url-fetch)
8952 (uri (string-append
8953 "https://pypi.python.org/packages/"
8954 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8955 "requests-toolbelt-" version ".tar.gz"))
8956 (sha256
8957 (base32
8958 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8959 (build-system python-build-system)
8960 (native-inputs
8961 `(("python-betamax" ,python-betamax)
8962 ("python-mock" ,python-mock)
8963 ("python-pytest" ,python-pytest)))
8964 (propagated-inputs
8965 `(("python-requests" ,python-requests)))
8966 (synopsis "Extensions to python-requests")
8967 (description "This is a toolbelt of useful classes and functions to be used
8968 with python-requests.")
8969 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8970 (license license:asl2.0)))
8971
8972 (define-public python-click-threading
8973 (package
8974 (name "python-click-threading")
8975 (version "0.2.0")
8976 (source (origin
8977 (method url-fetch)
8978 (uri (string-append
8979 "https://pypi.python.org/packages/"
8980 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8981 "click-threading-" version ".tar.gz"))
8982 (sha256
8983 (base32
8984 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8985 (build-system python-build-system)
8986 (propagated-inputs
8987 `(("python-click" ,python-click)))
8988 (synopsis "Utilities for multithreading in Click")
8989 (description "This package provides utilities for multithreading in Click
8990 applications.")
8991 (home-page "https://github.com/click-contrib/click-threading")
8992 (license license:expat)))
8993
8994 (define-public python-click-log
8995 (package
8996 (name "python-click-log")
8997 (version "0.1.8")
8998 (source (origin
8999 (method url-fetch)
9000 (uri (pypi-uri "click-log" version))
9001 (sha256
9002 (base32
9003 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
9004 (build-system python-build-system)
9005 (propagated-inputs
9006 `(("python-click" ,python-click)))
9007 (synopsis "Logging for click applications")
9008 (description "This package provides a Python library for logging Click
9009 applications.")
9010 (home-page "https://github.com/click-contrib/click-log")
9011 (license license:expat)))
9012
9013 (define-public python-apipkg
9014 (package
9015 (name "python-apipkg")
9016 (version "1.4")
9017 (source (origin
9018 (method url-fetch)
9019 (uri (pypi-uri "apipkg" version))
9020 (sha256
9021 (base32
9022 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9023 (build-system python-build-system)
9024 (native-inputs
9025 `(("python-pytest" ,python-pytest)))
9026 (synopsis "Namespace control and lazy-import mechanism")
9027 (description "With apipkg you can control the exported namespace of a Python
9028 package and greatly reduce the number of imports for your users. It is a small
9029 pure Python module that works on virtually all Python versions.")
9030 (home-page "https://bitbucket.org/hpk42/apipkg")
9031 (license license:expat)))
9032
9033 (define-public python2-apipkg
9034 (package-with-python2 python-apipkg))
9035
9036 (define-public python-execnet
9037 (package
9038 (name "python-execnet")
9039 (version "1.4.1")
9040 (source (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "execnet" version))
9043 (sha256
9044 (base32
9045 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9046 (build-system python-build-system)
9047 (arguments
9048 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9049 ;; The two test failures are caused by the lack of an `ssh` executable.
9050 ;; The test suite can be run with pytest after the 'install' phase.
9051 #:tests? #f))
9052 (native-inputs
9053 `(("python-pytest" ,python-pytest)
9054 ("python-setuptools-scm" ,python-setuptools-scm)))
9055 (propagated-inputs
9056 `(("python-apipkg" ,python-apipkg)))
9057 (synopsis "Rapid multi-Python deployment")
9058 (description "Execnet provides a share-nothing model with
9059 channel-send/receive communication for distributing execution across many
9060 Python interpreters across version, platform and network barriers. It has a
9061 minimal and fast API targeting the following uses:
9062 @enumerate
9063 @item distribute tasks to (many) local or remote CPUs
9064 @item write and deploy hybrid multi-process applications
9065 @item write scripts to administer multiple environments
9066 @end enumerate")
9067 (home-page "http://codespeak.net/execnet/")
9068 (license license:expat)))
9069
9070 (define-public python2-execnet
9071 (package-with-python2 python-execnet))
9072
9073 (define-public python-trollius-redis
9074 (package
9075 (name "python-trollius-redis")
9076 (version "0.1.4")
9077 (source
9078 (origin
9079 (method url-fetch)
9080 (uri (pypi-uri "trollius_redis" version))
9081 (sha256
9082 (base32
9083 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
9084 (build-system python-build-system)
9085 ;; TODO: Tests require packaging 'hiredis'.
9086 (arguments '(#:tests? #f))
9087 (home-page "https://github.com/benjolitz/trollius-redis")
9088 (synopsis "Port of asyncio-redis to trollius")
9089 (description "@code{trollius-redis} is a Redis client for Python
9090 trollius. It is an asynchronious IO (PEP 3156) implementation of the
9091 Redis protocol.")
9092 (license license:bsd-2)))
9093
9094 (define-public python2-trollius-redis
9095 (package-with-python2 python-trollius-redis))
9096
9097 ;;; The software provided by this package was integrated into pytest 2.8.
9098 (define-public python-pytest-cache
9099 (package
9100 (name "python-pytest-cache")
9101 (version "1.0")
9102 (source (origin
9103 (method url-fetch)
9104 (uri (pypi-uri "pytest-cache" version))
9105 (sha256
9106 (base32
9107 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
9108 (build-system python-build-system)
9109 (propagated-inputs
9110 `(("python-apipkg" ,python-apipkg)
9111 ("python-execnet" ,python-execnet)
9112 ("python-py" ,python-py)
9113 ("python-pytest" ,python-pytest)))
9114 (synopsis "Py.test plugin with mechanisms for caching across test runs")
9115 (description "The pytest-cache plugin provides tools to rerun failures from
9116 the last py.test invocation.")
9117 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
9118 (license license:expat)))
9119
9120 (define-public python2-pytest-cache
9121 (package-with-python2 python-pytest-cache))
9122
9123 (define-public python-pytest-localserver
9124 (package
9125 (name "python-pytest-localserver")
9126 (version "0.3.5")
9127 (source (origin
9128 (method url-fetch)
9129 (uri (pypi-uri "pytest-localserver" version))
9130 (sha256
9131 (base32
9132 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
9133 (build-system python-build-system)
9134 (arguments
9135 `(#:phases (modify-phases %standard-phases
9136 (replace 'check
9137 (lambda _
9138 (zero? (system* "py.test" "--genscript=runtests.py"))
9139 (zero? (system* "py.test")))))))
9140 (native-inputs
9141 `(("python-pytest" ,python-pytest)
9142 ("python-requests" ,python-requests)
9143 ("python-six" ,python-six)))
9144 (propagated-inputs
9145 `(("python-werkzeug" ,python-werkzeug)))
9146 (synopsis "Py.test plugin to test server connections locally")
9147 (description "Pytest-localserver is a plugin for the pytest testing
9148 framework which enables you to test server connections locally.")
9149 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9150 (license license:expat)))
9151
9152 (define-public python-wsgi-intercept
9153 (package
9154 (name "python-wsgi-intercept")
9155 (version "1.2.2")
9156 (source (origin
9157 (method url-fetch)
9158 (uri (string-append
9159 "https://pypi.python.org/packages/"
9160 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9161 "wsgi_intercept-" version ".tar.gz"))
9162 (sha256
9163 (base32
9164 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
9165 (build-system python-build-system)
9166 (propagated-inputs
9167 `(("python-six" ,python-six)))
9168 (native-inputs
9169 `(("python-pytest" ,python-pytest)
9170 ("python-httplib2" ,python-httplib2)
9171 ("python-requests" ,python-requests)
9172 ("python-urllib3" ,python-urllib3)))
9173 (synopsis "Puts a WSGI application in place of a real URI for testing")
9174 (description "Wsgi_intercept installs a WSGI application in place of a real
9175 URI for testing. Testing a WSGI application normally involves starting a
9176 server at a local host and port, then pointing your test code to that address.
9177 Instead, this library lets you intercept calls to any specific host/port
9178 combination and redirect them into a WSGI application importable by your test
9179 program. Thus, you can avoid spawning multiple processes or threads to test
9180 your Web app.")
9181 (home-page "https://github.com/cdent/wsgi-intercept")
9182 (license license:expat)))
9183
9184 (define-public python-pytest-xprocess
9185 (package
9186 (name "python-pytest-xprocess")
9187 (version "0.9.1")
9188 (source (origin
9189 (method url-fetch)
9190 (uri (pypi-uri "pytest-xprocess" version))
9191 (sha256
9192 (base32
9193 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9194 (build-system python-build-system)
9195 (propagated-inputs
9196 `(("python-pytest" ,python-pytest)
9197 ("python-pytest-cache" ,python-pytest-cache)
9198 ("python-psutil" ,python-psutil)))
9199 (synopsis "Pytest plugin to manage external processes across test runs")
9200 (description "Pytest-xprocess is an experimental py.test plugin for managing
9201 processes across test runs.")
9202 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9203 (license license:expat)))
9204
9205 (define-public python-icalendar
9206 (package
9207 (name "python-icalendar")
9208 (version "3.11.5")
9209 (source (origin
9210 (method url-fetch)
9211 (uri (pypi-uri "icalendar" version))
9212 (sha256
9213 (base32
9214 "0y6f2js983ag0d138xx4pzyc71gf44hyqmjsdvw6pq2xrkpj8jzk"))))
9215 (build-system python-build-system)
9216 (propagated-inputs
9217 `(("python-dateutil" ,python-dateutil)
9218 ("python-pytz" ,python-pytz)))
9219 (synopsis "Python library for parsing iCalendar files")
9220 (description "The icalendar package is a parser/generator of iCalendar
9221 files for use with Python.")
9222 (home-page "https://github.com/collective/icalendar")
9223 (license license:bsd-2)))
9224
9225 (define-public python-sphinxcontrib-newsfeed
9226 (package
9227 (name "python-sphinxcontrib-newsfeed")
9228 (version "0.1.4")
9229 (source (origin
9230 (method url-fetch)
9231 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9232 (sha256
9233 (base32
9234 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
9235 (arguments '(#:tests? #f)) ; No tests.
9236 (build-system python-build-system)
9237 (propagated-inputs
9238 `(("python-sphinx" ,python-sphinx)))
9239 (synopsis "News Feed extension for Sphinx")
9240 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9241 Blog, News or Announcements section to a Sphinx website.")
9242 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
9243 (license license:bsd-2)))
9244
9245 (define-public python-args
9246 (package
9247 (name "python-args")
9248 (version "0.1.0")
9249 (source (origin
9250 (method url-fetch)
9251 (uri (pypi-uri "args" version))
9252 (sha256
9253 (base32
9254 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9255 (build-system python-build-system)
9256 (home-page "https://github.com/kennethreitz/args")
9257 (synopsis "Command-line argument parser")
9258 (description
9259 "This library provides a Python module to parse command-line arguments.")
9260 (license license:bsd-3)))
9261
9262 (define-public python2-args
9263 (package-with-python2 python-args))
9264
9265 (define-public python-clint
9266 (package
9267 (name "python-clint")
9268 (version "0.5.1")
9269 (source (origin
9270 (method url-fetch)
9271 (uri (pypi-uri "clint" version))
9272 (sha256
9273 (base32
9274 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9275 (build-system python-build-system)
9276 (arguments
9277 '(#:phases
9278 (modify-phases %standard-phases
9279 (replace 'check
9280 (lambda _
9281 (zero? (system* "py.test" "-v")))))))
9282 (native-inputs
9283 `(("python-pytest" ,python-pytest)))
9284 (propagated-inputs
9285 `(("python-args" ,python-args)))
9286 (home-page "https://github.com/kennethreitz/clint")
9287 (synopsis "Command-line interface tools")
9288 (description
9289 "Clint is a Python module filled with a set of tools for developing
9290 command-line applications, including tools for colored and indented
9291 output, progress bar display, and pipes.")
9292 (license license:isc)))
9293
9294 (define-public python2-clint
9295 (package-with-python2 python-clint))
9296
9297 (define-public python-astor
9298 (package
9299 (name "python-astor")
9300 (version "0.5")
9301 (source (origin
9302 (method url-fetch)
9303 (uri (pypi-uri "astor" version))
9304 (sha256
9305 (base32
9306 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9307 (build-system python-build-system)
9308 (home-page "https://github.com/berkerpeksag/astor")
9309 (synopsis "Read and write Python ASTs")
9310 (description
9311 "Astor is designed to allow easy manipulation of Python source via the
9312 Abstract Syntax Tree.")
9313 (license license:bsd-3)))
9314
9315 (define-public python2-astor
9316 (package-with-python2 python-astor))
9317
9318 (define-public python-rply
9319 (package
9320 (name "python-rply")
9321 (version "0.7.4")
9322 (source (origin
9323 (method url-fetch)
9324 (uri (pypi-uri "rply" version))
9325 (sha256
9326 (base32
9327 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9328 (build-system python-build-system)
9329 (propagated-inputs
9330 `(("python-appdirs" ,python-appdirs)))
9331 (home-page "https://github.com/alex/rply")
9332 (synopsis "Parser generator for Python")
9333 (description
9334 "This package provides a pure Python based parser generator, that also
9335 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9336 with a new public API, and RPython support.")
9337 (license license:bsd-3)))
9338
9339 (define-public python2-rply
9340 (package-with-python2 python-rply))
9341
9342 (define-public python-hy
9343 (package
9344 (name "python-hy")
9345 (version "0.11.1")
9346 (source (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "hy" version))
9349 (sha256
9350 (base32
9351 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9352 (build-system python-build-system)
9353 (arguments
9354 '(#:phases
9355 (modify-phases %standard-phases
9356 (replace 'check
9357 (lambda _
9358 ;; Tests require write access to HOME.
9359 (setenv "HOME" "/tmp")
9360 (zero? (system* "nosetests")))))))
9361 (native-inputs
9362 `(("python-coverage" ,python-coverage)
9363 ("python-nose" ,python-nose)))
9364 (propagated-inputs
9365 `(("python-astor" ,python-astor)
9366 ("python-clint" ,python-clint)
9367 ("python-rply" ,python-rply)))
9368 (home-page "http://hylang.org/")
9369 (synopsis "Lisp frontend to Python")
9370 (description
9371 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9372 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9373 Python at your fingertips, in Lisp form.")
9374 (license license:expat)))
9375
9376 (define-public python2-hy
9377 (package-with-python2 python-hy))
9378
9379 (define-public python-rauth
9380 (package
9381 (name "python-rauth")
9382 (version "0.7.3")
9383 (source
9384 (origin
9385 (method url-fetch)
9386 (uri (pypi-uri "rauth" version))
9387 (sha256
9388 (base32
9389 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9390 (build-system python-build-system)
9391 (arguments
9392 `(#:test-target "check"))
9393 (propagated-inputs
9394 `(("python-requests" ,python-requests)))
9395 (home-page "https://github.com/litl/rauth")
9396 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9397 (description
9398 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9399 provides service wrappers for convenient connection initialization and
9400 authenticated session objects providing things like keep-alive.")
9401 (license license:expat)
9402 (properties `((python2-variant . ,(delay python2-rauth))))))
9403
9404 (define-public python2-rauth
9405 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9406 (package
9407 (inherit base)
9408 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9409 ,@(package-native-inputs base))))))
9410
9411 (define-public python2-functools32
9412 (package
9413 (name "python2-functools32")
9414 (version "3.2.3-2")
9415 (source
9416 (origin
9417 (method url-fetch)
9418 (uri (pypi-uri "functools32" version))
9419 (sha256
9420 (base32
9421 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9422 (build-system python-build-system)
9423 (arguments
9424 `(#:python ,python-2
9425 #:tests? #f)) ; no test target
9426 (home-page "https://github.com/MiCHiLU/python-functools32")
9427 (synopsis
9428 "Backport of the functools module from Python 3.2.3")
9429 (description
9430 "This package is a backport of the @code{functools} module from Python
9431 3.2.3 for use with older versions of Python and PyPy.")
9432 (license license:expat)))
9433
9434 (define-public python2-subprocess32
9435 (package
9436 (name "python2-subprocess32")
9437 (version "3.2.7")
9438 (source (origin
9439 (method url-fetch)
9440 (uri (pypi-uri "subprocess32" version))
9441 (sha256
9442 (base32
9443 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9444 (patches
9445 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9446 (build-system python-build-system)
9447 (arguments
9448 `(#:python ,python-2
9449 #:phases
9450 (modify-phases %standard-phases
9451 (add-after 'unpack 'patch-/bin/sh
9452 (lambda _
9453 (substitute* '("subprocess32.py"
9454 "test_subprocess32.py")
9455 (("/bin/sh") (which "sh")))
9456 #t))
9457 (delete 'check)
9458 (add-after 'install 'check
9459 (lambda* (#:key inputs outputs #:allow-other-keys)
9460 ;; For some reason this package fails to import
9461 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9462 ;; directory. Running tests after install is easier.
9463 (add-installed-pythonpath inputs outputs)
9464 (zero? (system* "python" "test_subprocess32.py")))))))
9465 (home-page "https://github.com/google/python-subprocess32")
9466 (synopsis "Backport of the subprocess module from Python 3.2")
9467 (description
9468 "This is a backport of the @code{subprocess} standard library module
9469 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9470 new features. On POSIX systems it is guaranteed to be reliable when used
9471 in threaded applications. It includes timeout support from Python 3.3 but
9472 otherwise matches 3.2’s API.")
9473 (license license:psfl)))
9474
9475 (define-public python2-futures
9476 (package
9477 (name "python2-futures")
9478 (version "3.0.5")
9479 (source
9480 (origin
9481 (method url-fetch)
9482 (uri (pypi-uri "futures" version))
9483 (sha256
9484 (base32
9485 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9486 (build-system python-build-system)
9487 (arguments `(#:python ,python-2))
9488 (home-page "https://github.com/agronholm/pythonfutures")
9489 (synopsis
9490 "Backport of the concurrent.futures package from Python 3.2")
9491 (description
9492 "The concurrent.futures module provides a high-level interface for
9493 asynchronously executing callables. This package backports the
9494 concurrent.futures package from Python 3.2")
9495 (license license:bsd-3)))
9496
9497 (define-public python-promise
9498 (package
9499 (name "python-promise")
9500 (version "0.4.2")
9501 (source
9502 (origin
9503 (method url-fetch)
9504 (uri (pypi-uri "promise" version))
9505 (sha256
9506 (base32
9507 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9508 (build-system python-build-system)
9509 ;; Tests wants python-futures, which is a python2 only program, and
9510 ;; can't be found by python-promise at test time.
9511 (arguments `(#:tests? #f))
9512 (home-page "https://github.com/syrusakbary/promise")
9513 (synopsis "Promises/A+ implementation for Python")
9514 (description
9515 "Promises/A+ implementation for Python")
9516 (properties `((python2-variant . ,(delay python2-promise))))
9517 (license license:expat)))
9518
9519 (define-public python2-promise
9520 (let ((promise (package-with-python2
9521 (strip-python2-variant python-promise))))
9522 (package (inherit promise)
9523 (arguments (substitute-keyword-arguments (package-arguments promise)
9524 ((#:tests? _) #t)))
9525 (native-inputs
9526 `(("python2-futures" ,python2-futures)
9527 ("python2-pytest" ,python2-pytest)
9528 ,@(package-native-inputs promise))))))
9529
9530 (define-public python-urllib3
9531 (package
9532 (name "python-urllib3")
9533 (version "1.18.1")
9534 (source
9535 (origin
9536 (method url-fetch)
9537 (uri (pypi-uri "urllib3" version))
9538 (sha256
9539 (base32
9540 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9541 (build-system python-build-system)
9542 (arguments `(#:tests? #f))
9543 (native-inputs
9544 `(;; some packages for tests
9545 ("python-nose" ,python-nose)
9546 ("python-mock" ,python-mock)
9547 ("python-tornado" ,python-tornado)))
9548 (propagated-inputs
9549 `(;; extra packages for https security
9550 ("python-certifi" ,python-certifi)
9551 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9552 ("python-pyasn1" ,python-pyasn1)
9553 ("python-pyopenssl" ,python-pyopenssl)))
9554 (home-page "https://urllib3.readthedocs.org/")
9555 (synopsis "HTTP library with thread-safe connection pooling")
9556 (description
9557 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9558 can reuse the same socket connection for multiple requests, it can POST files,
9559 supports url redirection and retries, and also gzip and deflate decoding.")
9560 (license license:expat)))
9561
9562 (define-public python2-urllib3
9563 (package-with-python2 python-urllib3))
9564
9565 (define-public python-colorama
9566 (package
9567 (name "python-colorama")
9568 (version "0.3.7")
9569 (source
9570 (origin
9571 (method url-fetch)
9572 (uri (pypi-uri "colorama" version))
9573 (sha256
9574 (base32
9575 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9576 (build-system python-build-system)
9577 (synopsis "Colored terminal text rendering for Python")
9578 (description "Colorama is a Python library for rendering colored terminal
9579 text.")
9580 (home-page "https://pypi.python.org/pypi/colorama")
9581 (license license:bsd-3)))
9582
9583 (define-public python2-colorama
9584 (package-with-python2 python-colorama))
9585
9586 (define-public python-rsa
9587 (package
9588 (name "python-rsa")
9589 (version "3.4.2")
9590 (source
9591 (origin
9592 (method url-fetch)
9593 (uri (pypi-uri "rsa" version))
9594 (sha256
9595 (base32
9596 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9597 (build-system python-build-system)
9598 (propagated-inputs
9599 `(("python-pyasn1" ,python-pyasn1)))
9600 (synopsis "Pure-Python RSA implementation")
9601 (description "Python-RSA is a pure-Python RSA implementation. It supports
9602 encryption and decryption, signing and verifying signatures, and key
9603 generation according to PKCS#1 version 1.5. It can be used as a Python
9604 library as well as on the command line.")
9605 (home-page "http://stuvel.eu/rsa")
9606 (license license:asl2.0)))
9607
9608 (define-public python2-rsa
9609 (package-with-python2 python-rsa))
9610
9611 (define-public python-pluggy
9612 (package
9613 (name "python-pluggy")
9614 (version "0.3.1")
9615 (source
9616 (origin
9617 (method url-fetch)
9618 (uri (pypi-uri "pluggy" version))
9619 (sha256
9620 (base32
9621 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9622 (build-system python-build-system)
9623 (synopsis "Plugin and hook calling mechanism for Python")
9624 (description "Pluggy is an extraction of the plugin manager as used by
9625 Pytest but stripped of Pytest specific details.")
9626 (home-page "https://pypi.python.org/pypi/pluggy")
9627 (license license:expat)))
9628
9629 (define-public python2-pluggy
9630 (package-with-python2 python-pluggy))
9631
9632 (define-public python-tox
9633 (package
9634 (name "python-tox")
9635 (version "2.3.1")
9636 (source
9637 (origin
9638 (method url-fetch)
9639 (uri (pypi-uri "tox" version))
9640 (sha256
9641 (base32
9642 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9643 (build-system python-build-system)
9644 (arguments
9645 ;; FIXME: Tests require pytest-timeout, which itself requires
9646 ;; pytest>=2.8.0 for installation.
9647 '(#:tests? #f))
9648 (propagated-inputs
9649 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9650 ("python-py" ,python-py)
9651 ("python-virtualenv" ,python-virtualenv)))
9652 (native-inputs
9653 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9654 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9655 (home-page "http://tox.testrun.org/")
9656 (synopsis "Virtualenv-based automation of test activities")
9657 (description "Tox is a generic virtualenv management and test command line
9658 tool. It can be used to check that a package installs correctly with
9659 different Python versions and interpreters, or run tests in each type of
9660 supported environment, or act as a frontend to continuous integration
9661 servers.")
9662 (license license:expat)))
9663
9664 (define-public python2-tox
9665 (package-with-python2 python-tox))
9666
9667 (define-public python-jmespath
9668 (package
9669 (name "python-jmespath")
9670 (version "0.9.0")
9671 (source
9672 (origin
9673 (method url-fetch)
9674 (uri (pypi-uri "jmespath" version))
9675 (sha256
9676 (base32
9677 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9678 (build-system python-build-system)
9679 (native-inputs
9680 `(("python-nose" ,python-nose)))
9681 (synopsis "JSON Matching Expressions")
9682 (description "JMESPath (pronounced “james path”) is a Python library that
9683 allows one to declaratively specify how to extract elements from a JSON
9684 document.")
9685 (home-page "https://github.com/jmespath/jmespath.py")
9686 (license license:expat)))
9687
9688 (define-public python2-jmespath
9689 (package-with-python2 python-jmespath))
9690
9691 (define-public python-botocore
9692 (package
9693 (name "python-botocore")
9694 (version "1.5.26")
9695 (source
9696 (origin
9697 (method url-fetch)
9698 (uri (pypi-uri "botocore" version))
9699 (sha256
9700 (base32
9701 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9702 (build-system python-build-system)
9703 (arguments
9704 ;; FIXME: Many tests are failing.
9705 '(#:tests? #f))
9706 (propagated-inputs
9707 `(("python-dateutil" ,python-dateutil)
9708 ("python-docutils" ,python-docutils)
9709 ("python-jmespath" ,python-jmespath)))
9710 (native-inputs
9711 `(("python-mock" ,python-mock)
9712 ("python-nose" ,python-nose)
9713 ("behave" ,behave)
9714 ("python-tox" ,python-tox)
9715 ("python-wheel" ,python-wheel)))
9716 (home-page "https://github.com/boto/botocore")
9717 (synopsis "Low-level interface to AWS")
9718 (description "Botocore is a Python library that provides a low-level
9719 interface to the Amazon Web Services (AWS) API.")
9720 (license license:asl2.0)))
9721
9722 (define-public python2-botocore
9723 (package-with-python2 python-botocore))
9724
9725 (define-public awscli
9726 (package
9727 (name "awscli")
9728 (version "1.11.63")
9729 (source
9730 (origin
9731 (method url-fetch)
9732 (uri (pypi-uri name version))
9733 (sha256
9734 (base32
9735 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9736 (build-system python-build-system)
9737 (propagated-inputs
9738 `(("python-colorama" ,python-colorama)
9739 ("python-botocore" ,python-botocore)
9740 ("python-s3transfer" ,python-s3transfer)
9741 ("python-docutils" ,python-docutils)
9742 ("python-pyyaml" ,python-pyyaml)
9743 ("python-rsa" ,python-rsa)))
9744 (arguments
9745 ;; FIXME: The 'pypi' release does not contain tests.
9746 '(#:tests? #f))
9747 (home-page "https://aws.amazon.com/cli/")
9748 (synopsis "Command line client for AWS")
9749 (description "AWS CLI provides a unified command line interface to the
9750 Amazon Web Services (AWS) API.")
9751 (license license:asl2.0)))
9752
9753 (define-public python-hypothesis
9754 (package
9755 (name "python-hypothesis")
9756 (version "3.1.0")
9757 (source (origin
9758 (method url-fetch)
9759 (uri (pypi-uri "hypothesis" version))
9760 (sha256
9761 (base32
9762 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9763 (build-system python-build-system)
9764 (native-inputs
9765 `(("python-flake8" ,python-flake8)
9766 ("python-pytest" ,python-pytest)))
9767 (synopsis "Library for property based testing")
9768 (description "Hypothesis is a library for testing your Python code against a
9769 much larger range of examples than you would ever want to write by hand. It’s
9770 based on the Haskell library, Quickcheck, and is designed to integrate
9771 seamlessly into your existing Python unit testing work flow.")
9772 (home-page "https://github.com/DRMacIver/hypothesis")
9773 (license license:mpl2.0)
9774 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9775
9776 (define-public python2-hypothesis
9777 (let ((hypothesis (package-with-python2
9778 (strip-python2-variant python-hypothesis))))
9779 (package (inherit hypothesis)
9780 (native-inputs
9781 `(("python2-enum34" ,python2-enum34)
9782 ,@(package-native-inputs hypothesis))))))
9783
9784 (define-public python-pytest-subtesthack
9785 (package
9786 (name "python-pytest-subtesthack")
9787 (version "0.1.1")
9788 (source (origin
9789 (method url-fetch)
9790 (uri (pypi-uri "pytest-subtesthack" version))
9791 (sha256
9792 (base32
9793 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9794 (build-system python-build-system)
9795 (propagated-inputs
9796 `(("python-pytest" ,python-pytest)))
9797 (synopsis "Set-up and tear-down fixtures for unit tests")
9798 (description "This plugin allows you to set up and tear down fixtures within
9799 unit test functions that use @code{py.test}. This is useful for using
9800 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9801 function multiple times, without setting up or tearing down fixture state as is
9802 normally the case.")
9803 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9804 (license license:unlicense)))
9805
9806 (define-public python2-pytest-subtesthack
9807 (package-with-python2 python-pytest-subtesthack))
9808
9809 (define-public python-xdo
9810 (package
9811 (name "python-xdo")
9812 (version "0.3")
9813 (source (origin
9814 (method url-fetch)
9815 (uri (string-append
9816 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9817 "python-xdo_" version ".orig.tar.gz"))
9818 (sha256
9819 (base32
9820 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9821 (build-system python-build-system)
9822 (arguments
9823 '(#:phases
9824 (modify-phases %standard-phases
9825 (add-before 'install 'patch-libxdo-path
9826 ;; Hardcode the path of dynamically loaded libxdo library.
9827 (lambda* (#:key inputs #:allow-other-keys)
9828 (let ((libxdo (string-append
9829 (assoc-ref inputs "xdotool")
9830 "/lib/libxdo.so")))
9831 (substitute* "xdo/_xdo.py"
9832 (("find_library\\(\"xdo\"\\)")
9833 (simple-format #f "\"~a\"" libxdo)))
9834 #t))))
9835 #:tests? #f)) ; no tests provided
9836 (propagated-inputs
9837 `(("python-six" ,python-six)))
9838 (inputs
9839 `(("xdotool" ,xdotool)
9840 ("libX11" ,libx11)))
9841 (home-page "https://tracker.debian.org/pkg/python-xdo")
9842 (synopsis "Python library for simulating X11 keyboard/mouse input")
9843 (description "Provides bindings to libxdo for manipulating X11 via simulated
9844 input. (Note that this is mostly a legacy library; you may wish to look at
9845 python-xdo for newer bindings.)")
9846 (license license:bsd-3)))
9847
9848 (define-public python2-xdo
9849 (package-with-python2 python-xdo))
9850
9851 (define-public python-wtforms
9852 (package
9853 (name "python-wtforms")
9854 (version "2.1")
9855 (source
9856 (origin
9857 (method url-fetch)
9858 (uri (pypi-uri "WTForms" version ".zip"))
9859 (sha256
9860 (base32
9861 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9862 (build-system python-build-system)
9863 (arguments
9864 '(#:phases
9865 (modify-phases %standard-phases
9866 (add-after 'unpack 'remove-django-test
9867 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9868 (lambda _
9869 (substitute*
9870 "tests/runtests.py"
9871 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9872 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9873 #t)))))
9874 (native-inputs
9875 `(("unzip" ,unzip)))
9876 (home-page "http://wtforms.simplecodes.com/")
9877 (synopsis
9878 "Form validation and rendering library for Python web development")
9879 (description
9880 "WTForms is a flexible forms validation and rendering library
9881 for Python web development. It is very similar to the web form API
9882 available in Django, but is a standalone package.")
9883 (license license:bsd-3)))
9884
9885 (define-public python2-wtforms
9886 (package-with-python2 python-wtforms))
9887
9888 (define-public python-mako
9889 (package
9890 (name "python-mako")
9891 (version "1.0.6")
9892 (source
9893 (origin
9894 (method url-fetch)
9895 (uri (pypi-uri "Mako" version))
9896 (sha256
9897 (base32
9898 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9899 (build-system python-build-system)
9900 (propagated-inputs
9901 `(("python-markupsafe" ,python-markupsafe)))
9902 (native-inputs
9903 `(("python-mock" ,python-mock)
9904 ("python-nose" ,python-nose)
9905 ("python-pytest" ,python-pytest)))
9906 (home-page "http://www.makotemplates.org/")
9907 (synopsis "Templating language for Python")
9908 (description "Mako is a templating language for Python that compiles
9909 templates into Python modules.")
9910 (license license:expat)))
9911
9912 (define-public python2-mako
9913 (package-with-python2 python-mako))
9914
9915 (define-public python-waitress
9916 (package
9917 (name "python-waitress")
9918 (version "0.8.10")
9919 (source
9920 (origin
9921 (method url-fetch)
9922 (uri (pypi-uri "waitress" version))
9923 (sha256
9924 (base32
9925 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9926 (build-system python-build-system)
9927 (home-page "https://github.com/Pylons/waitress")
9928 (synopsis "Waitress WSGI server")
9929 (description "Waitress is meant to be a production-quality pure-Python WSGI
9930 server with very acceptable performance.")
9931 (license license:zpl2.1)))
9932
9933 (define-public python2-waitress
9934 (package-with-python2 python-waitress))
9935
9936 (define-public python-wsgiproxy2
9937 (package
9938 (name "python-wsgiproxy2")
9939 (version "0.4.2")
9940 (source
9941 (origin
9942 (method url-fetch)
9943 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9944 (sha256
9945 (base32
9946 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9947 (build-system python-build-system)
9948 (arguments
9949 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9950 ;; support Python 3:
9951 ;; https://github.com/benoitc/restkit/issues/140
9952 #:tests? #f))
9953 (native-inputs
9954 `(("unzip" ,unzip)
9955 ("python-nose" ,python-nose)
9956 ("python-coverage" ,python-coverage)))
9957 (propagated-inputs
9958 `(("python-six" ,python-six)
9959 ("python-webob" ,python-webob)))
9960 (home-page
9961 "https://github.com/gawel/WSGIProxy2/")
9962 (synopsis "WSGI Proxy with various http client backends")
9963 (description "WSGI turns HTTP requests into WSGI function calls.
9964 WSGIProxy turns WSGI function calls into HTTP requests.
9965 It also includes code to sign requests and pass private data,
9966 and to spawn subprocesses to handle requests.")
9967 (license license:expat)))
9968
9969 (define-public python2-wsgiproxy2
9970 (package-with-python2 python-wsgiproxy2))
9971
9972 (define-public python-pastedeploy
9973 (package
9974 (name "python-pastedeploy")
9975 (version "1.5.2")
9976 (source
9977 (origin
9978 (method url-fetch)
9979 (uri (pypi-uri "PasteDeploy" version))
9980 (sha256
9981 (base32
9982 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9983 (build-system python-build-system)
9984 (native-inputs
9985 `(("python-nose" ,python-nose)))
9986 (home-page "http://pythonpaste.org/deploy/")
9987 (synopsis
9988 "Load, configure, and compose WSGI applications and servers")
9989 (description
9990 "This tool provides code to load WSGI applications and servers from URIs;
9991 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9992 Script provides commands to serve applications based on this configuration
9993 file.")
9994 (license license:expat)))
9995
9996 (define-public python2-pastedeploy
9997 (package-with-python2 python-pastedeploy))
9998
9999 (define-public python-paste
10000 (package
10001 (name "python-paste")
10002 (version "2.0.3")
10003 (source
10004 (origin
10005 (method url-fetch)
10006 (uri (pypi-uri "Paste" version))
10007 (sha256
10008 (base32
10009 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
10010 (patches (search-patches "python-paste-remove-website-test.patch"
10011 "python-paste-remove-timing-test.patch"))))
10012 (build-system python-build-system)
10013 (native-inputs
10014 `(("python-nose" ,python-nose)))
10015 (propagated-inputs
10016 `(("python-six" ,python-six)))
10017 (home-page "http://pythonpaste.org")
10018 (synopsis
10019 "Python web development tools, focusing on WSGI")
10020 (description
10021 "Paste provides a variety of web development tools and middleware which
10022 can be nested together to build web applications. Paste's design closely
10023 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
10024 (license license:expat)))
10025
10026 (define-public python2-paste
10027 (package-with-python2 python-paste))
10028
10029 (define-public python-pastescript
10030 (package
10031 (name "python-pastescript")
10032 (version "2.0.2")
10033 (source
10034 (origin
10035 (method url-fetch)
10036 (uri (pypi-uri "PasteScript" version))
10037 (sha256
10038 (base32
10039 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
10040 (build-system python-build-system)
10041 (native-inputs
10042 `(("python-nose" ,python-nose)))
10043 (propagated-inputs
10044 `(("python-paste" ,python-paste)
10045 ("python-pastedeploy" ,python-pastedeploy)))
10046 (home-page "http://pythonpaste.org/script/")
10047 (arguments
10048 '(;; Unfortunately, this requires the latest unittest2,
10049 ;; but that requires traceback2 which requires linecache2 which requires
10050 ;; unittest2. So we're skipping tests for now.
10051 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
10052 ;; so in theory we could get around this situation somehow.)
10053 #:tests? #f))
10054 (synopsis
10055 "Pluggable command line tool for serving web applications and more")
10056 (description
10057 "PasteScript is a plugin-friendly command line tool which provides a
10058 variety of features, from launching web applications to bootstrapping project
10059 layouts.")
10060 (license license:expat)))
10061
10062 (define-public python2-pastescript
10063 (package-with-python2 python-pastescript))
10064
10065 (define-public python-pyquery
10066 (package
10067 (name "python-pyquery")
10068 (version "1.2.17")
10069 (source
10070 (origin
10071 (method url-fetch)
10072 (uri (pypi-uri "pyquery" version))
10073 (sha256
10074 (base32
10075 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10076 (build-system python-build-system)
10077 (native-inputs
10078 `(("python-webob" ,python-webob)
10079 ("python-webtest" ,python-webtest)))
10080 (propagated-inputs
10081 `(("python-lxml" ,python-lxml)
10082 ("python-cssselect" ,python-cssselect)))
10083 (home-page "https://github.com/gawel/pyquery")
10084 (synopsis "Make jQuery-like queries on xml documents")
10085 (description "pyquery allows you to make jQuery queries on xml documents.
10086 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10087 fast xml and html manipulation.")
10088 (license license:bsd-3)))
10089
10090 (define-public python2-pyquery
10091 (package-with-python2 python-pyquery))
10092
10093 (define-public python-webtest
10094 (package
10095 (name "python-webtest")
10096 (version "2.0.20")
10097 (source
10098 (origin
10099 (method url-fetch)
10100 (uri (pypi-uri "WebTest" version))
10101 (sha256
10102 (base32
10103 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
10104 (build-system python-build-system)
10105 (arguments
10106 `(;; Unfortunately we have to disable tests!
10107 ;; This release of WebTest is pinned to python-nose < 1.3,
10108 ;; but older versions of python-nose are plagued with the following
10109 ;; bug(s), which rears its ugly head during test execution:
10110 ;; https://github.com/nose-devs/nose/issues/759
10111 ;; https://github.com/nose-devs/nose/pull/811
10112 #:tests? #f))
10113 ;; Commented out code is no good, but in this case, once tests
10114 ;; are ready to be enabled again, we should put the following
10115 ;; in place:
10116 ;; (native-inputs
10117 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
10118 ;; ; but see above comment
10119 ;; ("python-coverage" ,python-coverage)
10120 ;; ("python-mock" ,python-mock)
10121 ;; ("python-pastedeploy" ,python-pastedeploy)
10122 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10123 ;; ("python-pyquery" ,python-pyquery)))
10124 (propagated-inputs
10125 `(("python-waitress" ,python-waitress)
10126 ("python-webob" ,python-webob)
10127 ("python-six" ,python-six)
10128 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10129 (home-page "http://webtest.pythonpaste.org/")
10130 (synopsis "Helper to test WSGI applications")
10131 (description "Webtest allows you to test your Python web applications
10132 without starting an HTTP server. It supports anything that supports the
10133 minimum of WSGI.")
10134 (license license:expat)))
10135
10136 (define-public python2-webtest
10137 (package-with-python2 python-webtest))
10138
10139 (define-public python-anyjson
10140 (package
10141 (name "python-anyjson")
10142 (version "0.3.3")
10143 (source
10144 (origin
10145 (method url-fetch)
10146 (uri (pypi-uri "anyjson" version))
10147 (sha256
10148 (base32
10149 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10150 (build-system python-build-system)
10151 (arguments
10152 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10153 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10154 ;; whatever) so this transformation needs to be done before the tests
10155 ;; can be run. Maybe we could add a build step to transform beforehand
10156 ;; but it could be annoying/difficult.
10157 ;; We can enable tests for the Python 2 version, though, and do below.
10158 #:tests? #f))
10159 (home-page "http://bitbucket.org/runeh/anyjson/")
10160 (synopsis
10161 "Wraps best available JSON implementation in a common interface")
10162 (description
10163 "Anyjson loads whichever is the fastest JSON module installed
10164 and provides a uniform API regardless of which JSON implementation is used.")
10165 (license license:bsd-3)
10166 (properties `((python2-variant . ,(delay python2-anyjson))))))
10167
10168 (define-public python2-anyjson
10169 (let ((anyjson (package-with-python2
10170 (strip-python2-variant python-anyjson))))
10171 (package
10172 (inherit anyjson)
10173 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10174 #:tests? #t
10175 ,@(package-arguments anyjson)))
10176 (native-inputs `(("python2-nose" ,python2-nose))))))
10177
10178 (define-public python-amqp
10179 (package
10180 (name "python-amqp")
10181 (version "1.4.9")
10182 (source
10183 (origin
10184 (method url-fetch)
10185 (uri (pypi-uri "amqp" version))
10186 (sha256
10187 (base32
10188 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10189 (build-system python-build-system)
10190 (native-inputs
10191 `(("python-nose" ,python-nose)
10192 ("python-mock" ,python-mock)))
10193 (home-page "https://github.com/celery/py-amqp")
10194 (synopsis
10195 "Low-level AMQP client for Python (fork of amqplib)")
10196 (description
10197 "This is a fork of amqplib which was originally written by Barry Pederson.
10198 It is maintained by the Celery project, and used by kombu as a pure python
10199 alternative when librabbitmq is not available.")
10200 (license license:lgpl2.1+)
10201 (properties `((python2-variant . ,(delay python2-amqp))))))
10202
10203 (define-public python2-amqp
10204 (let ((amqp (package-with-python2
10205 (strip-python2-variant python-amqp))))
10206 (package
10207 (inherit amqp)
10208 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10209 ;; unmaintained. Weirdly, does not do this on the python 3
10210 ;; version?
10211 #:tests? #f
10212 ,@(package-arguments amqp))))))
10213
10214 (define-public python-kombu
10215 (package
10216 (name "python-kombu")
10217 (version "3.0.37")
10218 (source
10219 (origin
10220 (method url-fetch)
10221 (uri (pypi-uri "kombu" version))
10222 (sha256
10223 (base32
10224 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
10225 (build-system python-build-system)
10226 (native-inputs
10227 `(("python-mock" ,python-mock)
10228 ("python-nose" ,python-nose)))
10229 (propagated-inputs
10230 `(("python-anyjson" ,python-anyjson)
10231 ("python-amqp" ,python-amqp)
10232 ("python-redis" ,python-redis)))
10233 (home-page "http://kombu.readthedocs.org")
10234 (synopsis "Message passing library for Python")
10235 (description "The aim of Kombu is to make messaging in Python as easy as
10236 possible by providing an idiomatic high-level interface for the AMQ protocol,
10237 and also provide proven and tested solutions to common messaging problems.
10238 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10239 message orientation, queuing, routing, reliability and security, for which the
10240 RabbitMQ messaging server is the most popular implementation.")
10241 (license license:bsd-3)
10242 (properties `((python2-variant . ,(delay python2-kombu))))))
10243
10244 (define-public python2-kombu
10245 (let ((kombu (package-with-python2
10246 (strip-python2-variant python-kombu))))
10247 (package
10248 (inherit kombu)
10249 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10250 ;; It works fine on the python3 variant.
10251 #:tests? #f
10252 ,@(package-arguments kombu)))
10253 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10254 ,@(package-native-inputs kombu))))))
10255
10256 (define-public python-billiard
10257 (package
10258 (name "python-billiard")
10259 (version "3.3.0.23")
10260 (source
10261 (origin
10262 (method url-fetch)
10263 (uri (pypi-uri "billiard" version))
10264 (sha256
10265 (base32
10266 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10267 (build-system python-build-system)
10268 (native-inputs
10269 `(("python-nose" ,python-nose)))
10270 (home-page "https://github.com/celery/billiard")
10271 (synopsis
10272 "Python multiprocessing fork with improvements and bugfixes")
10273 (description
10274 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10275 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10276 pyprocessing package. This standalone variant is intended to be compatible with
10277 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10278 (license license:bsd-3)
10279 (properties `((python2-variant . ,(delay python2-billiard))))))
10280
10281 (define-public python2-billiard
10282 (let ((billiard (package-with-python2
10283 (strip-python2-variant python-billiard))))
10284 (package
10285 (inherit billiard)
10286 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10287 ("python2-mock" ,python2-mock)
10288 ,@(package-native-inputs billiard))))))
10289
10290 (define-public python-celery
10291 (package
10292 (name "python-celery")
10293 (version "3.1.24")
10294 (source
10295 (origin
10296 (method url-fetch)
10297 (uri (pypi-uri "celery" version))
10298 (sha256
10299 (base32
10300 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10301 (build-system python-build-system)
10302 (arguments
10303 `(#:phases
10304 (modify-phases %standard-phases
10305 ;; These tests break with Python 3.5:
10306 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10307 (replace 'check
10308 (lambda _
10309 (zero?
10310 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10311 (native-inputs
10312 `(("python-nose" ,python-nose)))
10313 (propagated-inputs
10314 `(("python-pytz" ,python-pytz)
10315 ("python-billiard" ,python-billiard)
10316 ("python-kombu" ,python-kombu)))
10317 (home-page "http://celeryproject.org")
10318 (synopsis "Distributed Task Queue")
10319 (description "Celery is an asynchronous task queue/job queue based on
10320 distributed message passing. It is focused on real-time operation, but
10321 supports scheduling as well. The execution units, called tasks, are executed
10322 concurrently on a single or more worker servers using multiprocessing,
10323 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10324 synchronously (wait until ready).")
10325 (license license:bsd-3)
10326 (properties `((python2-variant . ,(delay python2-celery))))))
10327
10328 (define-public python2-celery
10329 (let ((celery (package-with-python2
10330 (strip-python2-variant python-celery))))
10331 (package
10332 (inherit celery)
10333 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10334 ("python2-mock" ,python2-mock)
10335 ,@(package-native-inputs celery))))))
10336
10337 (define-public python-translitcodec
10338 (package
10339 (name "python-translitcodec")
10340 (version "0.4.0")
10341 (source
10342 (origin
10343 (method url-fetch)
10344 (uri (pypi-uri "translitcodec" version))
10345 (sha256
10346 (base32
10347 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10348 (build-system python-build-system)
10349 (arguments
10350 `(#:tests? #f)) ; no tests provided
10351 (home-page
10352 "https://github.com/claudep/translitcodec")
10353 (synopsis
10354 "Unicode to 8-bit charset transliteration codec")
10355 (description
10356 "This package contains codecs for transliterating ISO 10646 texts into
10357 best-effort representations using smaller coded character sets (ASCII,
10358 ISO 8859, etc.).")
10359 (license license:expat)))
10360
10361 (define-public python2-translitcodec
10362 (package-with-python2 python-translitcodec))
10363
10364 (define-public python-editor
10365 (package
10366 (name "python-editor")
10367 (version "0.5")
10368 (source
10369 (origin
10370 (method url-fetch)
10371 (uri (pypi-uri "python-editor" version))
10372 (sha256
10373 (base32
10374 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10375 (build-system python-build-system)
10376 (home-page
10377 "https://github.com/fmoo/python-editor")
10378 (synopsis
10379 "Programmatically open an editor, capture the result")
10380 (description
10381 "python-editor is a library that provides the editor module for
10382 programmatically interfacing with your system's $EDITOR.")
10383 (license license:asl2.0)))
10384
10385 (define-public python2-editor
10386 (package-with-python2 python-editor))
10387
10388 (define-public python-sphinxcontrib-programoutput
10389 (package
10390 (name "python-sphinxcontrib-programoutput")
10391 (version "0.10")
10392 (source (origin
10393 (method url-fetch)
10394 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10395 (sha256
10396 (base32
10397 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10398 (build-system python-build-system)
10399 (arguments
10400 ;; FIXME: Many tests are failing and the upstream is gone.
10401 '(#:tests? #f))
10402 (propagated-inputs
10403 `(("python-sphinx" ,python-sphinx)))
10404 (synopsis "Sphinx extension to include program output")
10405 (description "A Sphinx extension to literally insert the output of arbitrary
10406 commands into documents, helping you to keep your command examples up to date.")
10407 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10408 (license license:bsd-2)))
10409
10410 (define-public python2-sphinxcontrib-programoutput
10411 (package-with-python2 python-sphinxcontrib-programoutput))
10412
10413 (define-public python-sphinx-repoze-autointerface
10414 (package
10415 (name "python-sphinx-repoze-autointerface")
10416 (version "0.8")
10417 (source (origin
10418 (method url-fetch)
10419 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10420 (sha256
10421 (base32
10422 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10423 (build-system python-build-system)
10424 (arguments '(#:tests? #f)) ; No tests.
10425 (propagated-inputs
10426 `(("python-sphinx" ,python-sphinx)
10427 ("python-zope-interface" ,python-zope-interface)))
10428 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10429 (description "This package defines an extension for the Sphinx documentation
10430 system. The extension allows generation of API documentation by
10431 introspection of @code{zope.interface} instances in code.")
10432 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10433 (license license:repoze)))
10434
10435 (define-public python2-sphinx-repoze-autointerface
10436 (package-with-python2 python-sphinx-repoze-autointerface))
10437
10438 (define-public python-psycopg2
10439 (package
10440 (name "python-psycopg2")
10441 (version "2.6.2")
10442 (source
10443 (origin
10444 (method url-fetch)
10445 (uri (pypi-uri "psycopg2" version))
10446 (sha256
10447 (base32
10448 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10449 (build-system python-build-system)
10450 (arguments
10451 ;; Tests would require a postgresql database "psycopg2_test"
10452 ;; and a running postgresql database management service.
10453 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10454 (inputs
10455 `(("postgresql" ,postgresql))) ; libpq
10456 (home-page "http://initd.org/psycopg/")
10457 (synopsis "Python PostgreSQL adapter")
10458 (description
10459 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10460 (license license:lgpl3+)))
10461
10462 (define-public python2-psycopg2
10463 (package-with-python2 python-psycopg2))
10464
10465 (define-public python-vobject
10466 (package
10467 (name "python-vobject")
10468 (version "0.9.5")
10469 (source (origin
10470 (method url-fetch)
10471 (uri (pypi-uri "vobject" version))
10472 (sha256
10473 (base32
10474 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
10475 (build-system python-build-system)
10476 (arguments
10477 '(;; The test suite relies on some non-portable Windows interfaces.
10478 #:tests? #f))
10479 (propagated-inputs
10480 `(("python-dateutil" ,python-dateutil)
10481 ("python-pyicu" ,python-pyicu)))
10482 (synopsis "Parse and generate vCard and vCalendar files")
10483 (description "Vobject is intended to be a full featured Python package for
10484 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10485 are supported and well tested. vCard 3.0 files are supported, and all data
10486 should be imported, but only a few components are understood in a sophisticated
10487 way.")
10488 (home-page "http://eventable.github.io/vobject/")
10489 (license license:asl2.0)))
10490
10491 (define-public python2-vobject
10492 (package-with-python2 python-vobject))
10493
10494 (define-public python-munkres
10495 (package
10496 (name "python-munkres")
10497 (version "1.0.8")
10498 (source (origin
10499 (method url-fetch)
10500 (uri (pypi-uri "munkres" version))
10501 (sha256
10502 (base32
10503 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10504 (build-system python-build-system)
10505 (arguments
10506 '(#:tests? #f)) ; no test suite
10507 (home-page "http://software.clapper.org/munkres/")
10508 (synopsis "Implementation of the Munkres algorithm")
10509 (description "The Munkres module provides an implementation of the Munkres
10510 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10511 useful for solving the Assignment Problem.")
10512 (license license:bsd-3)))
10513
10514 (define-public python2-munkres
10515 (package-with-python2 python-munkres))
10516
10517 (define-public python-flask
10518 (package
10519 (name "python-flask")
10520 (version "0.11.1")
10521 (source (origin
10522 (method url-fetch)
10523 (uri (pypi-uri "Flask" version))
10524 (sha256
10525 (base32
10526 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10527 (build-system python-build-system)
10528 (propagated-inputs
10529 `(("python-itsdangerous" ,python-itsdangerous)
10530 ("python-jinja2" ,python-jinja2)
10531 ("python-click" ,python-click)
10532 ("python-werkzeug" ,python-werkzeug)))
10533 (home-page "https://github.com/mitsuhiko/flask/")
10534 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10535 (description "Flask is a micro web framework based on the Werkzeug toolkit
10536 and Jinja2 template engine. It is called a micro framework because it does not
10537 presume or force a developer to use a particular tool or library.")
10538 (license license:bsd-3)))
10539
10540 (define-public python2-flask
10541 (package-with-python2 python-flask))
10542
10543 (define-public python-flask-wtf
10544 (package
10545 (name "python-flask-wtf")
10546 (version "0.13.1")
10547 (source
10548 (origin
10549 (method url-fetch)
10550 (uri (pypi-uri "Flask-WTF" version))
10551 (sha256
10552 (base32
10553 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10554 (build-system python-build-system)
10555 (arguments
10556 '(#:phases
10557 (modify-phases %standard-phases
10558 (add-before 'check 'drop-failing-test
10559 (lambda _
10560 ;; FIXME: This file tries resolving an external server, which
10561 ;; fails. Try to patch out the offending section instead of
10562 ;; deleting the whole thing.
10563 (delete-file "tests/test_recaptcha.py")
10564 #t)))))
10565 (propagated-inputs
10566 `(("python-flask-babel" ,python-flask-babel)
10567 ("python-babel" ,python-babel)
10568 ("python-wtforms" ,python-wtforms)))
10569 (native-inputs
10570 `(("python-nose" ,python-nose)))
10571 (home-page "https://github.com/lepture/flask-wtf")
10572 (synopsis "Simple integration of Flask and WTForms")
10573 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10574 upload, and reCAPTCHA.")
10575 (license license:bsd-3)))
10576
10577 (define-public python2-flask-wtf
10578 (package-with-python2 python-flask-wtf))
10579
10580 (define-public python-flask-multistatic
10581 (package
10582 (name "python-flask-multistatic")
10583 (version "1.0")
10584 (source
10585 (origin
10586 (method url-fetch)
10587 (uri (pypi-uri "flask-multistatic" version))
10588 (sha256
10589 (base32
10590 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10591 (build-system python-build-system)
10592 (propagated-inputs
10593 `(("python-flask" ,python-flask)))
10594 (home-page "https://pagure.io/flask-multistatic")
10595 (synopsis "Flask plugin to allow overriding static files")
10596 (description "@code{flask-multistatic} is a flask plugin that adds support
10597 for overriding static files.")
10598 (license license:gpl3+)))
10599
10600 (define-public python2-flask-multistatic
10601 (package-with-python2 python-flask-multistatic))
10602
10603 (define-public python-cookies
10604 (package
10605 (name "python-cookies")
10606 (version "2.2.1")
10607 (source (origin
10608 (method url-fetch)
10609 (uri (pypi-uri "cookies" version))
10610 (sha256
10611 (base32
10612 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10613 (build-system python-build-system)
10614 (arguments
10615 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10616 #:tests? #f))
10617 (native-inputs
10618 `(("python-pytest" ,python2-pytest)))
10619 (synopsis "HTTP cookie parser and renderer")
10620 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10621 Python.")
10622 (home-page "https://gitlab.com/sashahart/cookies")
10623 (license license:expat)))
10624
10625 (define-public python2-cookies
10626 (package-with-python2 python-cookies))
10627
10628 (define-public python-responses
10629 (package
10630 (name "python-responses")
10631 (version "0.5.1")
10632 (source (origin
10633 (method url-fetch)
10634 (uri (pypi-uri "responses" version))
10635 (sha256
10636 (base32
10637 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10638 (build-system python-build-system)
10639 (arguments
10640 `(;; Test suite is not distributed:
10641 ;; https://github.com/getsentry/responses/issues/38
10642 #:tests? #f))
10643 (native-inputs
10644 `(("python-mock" ,python-mock)))
10645 (propagated-inputs
10646 `(("python-requests" ,python-requests)
10647 ("python-cookies" ,python-cookies)
10648 ("python-six" ,python-six)))
10649 (home-page "https://github.com/getsentry/responses")
10650 (synopsis "Utility for mocking out the `requests` Python library")
10651 (description "A utility library for mocking out the `requests` Python
10652 library.")
10653 (license license:asl2.0)))
10654
10655 (define-public python2-responses
10656 (package-with-python2 python-responses))
10657
10658 (define-public python-whoosh
10659 (package
10660 (name "python-whoosh")
10661 (version "2.7.4")
10662 (source
10663 (origin
10664 (method url-fetch)
10665 (uri (pypi-uri "Whoosh" version))
10666 (sha256
10667 (base32
10668 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10669 (build-system python-build-system)
10670 (native-inputs
10671 `(("python-pytest" ,python-pytest)))
10672 (home-page "http://bitbucket.org/mchaput/whoosh")
10673 (synopsis "Full text indexing, search, and spell checking library")
10674 (description
10675 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10676 checking library.")
10677 (license license:bsd-2)))
10678
10679 (define-public python2-whoosh
10680 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10681 (package (inherit whoosh)
10682 (propagated-inputs
10683 `(("python2-backport-ssl-match-hostname"
10684 ,python2-backport-ssl-match-hostname)
10685 ,@(package-propagated-inputs whoosh))))))
10686
10687 (define-public python-pathlib
10688 (package
10689 (name "python-pathlib")
10690 (version "1.0.1")
10691 (source (origin
10692 (method url-fetch)
10693 (uri (pypi-uri "pathlib" version))
10694 (sha256
10695 (base32
10696 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10697 (build-system python-build-system)
10698 ;; The tests depend on the internal "test" module, which does not provide
10699 ;; a stable interface.
10700 (arguments `(#:tests? #f))
10701 (home-page "https://pathlib.readthedocs.org/")
10702 (synopsis "Object-oriented file system paths")
10703 (description "Pathlib offers a set of classes to handle file system paths.
10704 It offers the following advantages over using string objects:
10705
10706 @enumerate
10707 @item No more cumbersome use of os and os.path functions. Everything can
10708 be done easily through operators, attribute accesses, and method calls.
10709 @item Embodies the semantics of different path types. For example,
10710 comparing Windows paths ignores casing.
10711 @item Well-defined semantics, eliminating any inconsistencies or
10712 ambiguities (forward vs. backward slashes, etc.).
10713 @end enumerate
10714
10715 Note: In Python 3.4, pathlib is now part of the standard library. For other
10716 Python versions please consider python-pathlib2 instead, which tracks the
10717 standard library module. This module (python-pathlib) isn't maintained
10718 anymore.")
10719 (license license:expat)))
10720
10721 (define-public python2-pathlib
10722 (package-with-python2 python-pathlib))
10723
10724 (define-public python2-pathlib2
10725 (package
10726 (name "python2-pathlib2")
10727 (version "2.1.0")
10728 (source (origin
10729 (method url-fetch)
10730 (uri (pypi-uri "pathlib2" version))
10731 (sha256
10732 (base32
10733 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10734 (build-system python-build-system)
10735 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10736 ;; version is 3.4 which already includes this package as part of the
10737 ;; standard library.
10738 (arguments
10739 `(#:python ,python-2))
10740 (native-inputs
10741 `(("python2-six" ,python2-six)))
10742 (home-page "http://pypi.python.org/pypi/pathlib2/")
10743 (synopsis "Object-oriented file system paths - backport of standard
10744 pathlib module")
10745 (description "The goal of pathlib2 is to provide a backport of standard
10746 pathlib module which tracks the standard library module, so all the newest
10747 features of the standard pathlib can be used also on older Python versions.
10748
10749 Pathlib offers a set of classes to handle file system paths. It offers the
10750 following advantages over using string objects:
10751
10752 @enumerate
10753 @item No more cumbersome use of os and os.path functions. Everything can
10754 be done easily through operators, attribute accesses, and method calls.
10755 @item Embodies the semantics of different path types. For example,
10756 comparing Windows paths ignores casing.
10757 @item Well-defined semantics, eliminating any inconsistencies or
10758 ambiguities (forward vs. backward slashes, etc.).
10759 @end enumerate")
10760 (license license:expat)))
10761
10762 (define-public python-jellyfish
10763 (package
10764 (name "python-jellyfish")
10765 (version "0.5.6")
10766 (source (origin
10767 (method url-fetch)
10768 (uri (pypi-uri "jellyfish" version))
10769 (sha256
10770 (base32
10771 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10772 (build-system python-build-system)
10773 (native-inputs
10774 `(("python-pytest" ,python-pytest)))
10775 (home-page "https://github.com/jamesturk/jellyfish")
10776 (synopsis "Approximate and phonetic matching of strings")
10777 (description "Jellyfish uses a variety of string comparison and phonetic
10778 encoding algorithms to do fuzzy string matching.")
10779 (license license:bsd-2)
10780 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10781
10782 (define-public python2-jellyfish
10783 (let ((jellyfish (package-with-python2
10784 (strip-python2-variant python-jellyfish))))
10785 (package (inherit jellyfish)
10786 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10787 ,@(package-native-inputs jellyfish))))))
10788
10789 (define-public python2-unicodecsv
10790 (package
10791 (name "python2-unicodecsv")
10792 (version "0.14.1")
10793 (source (origin
10794 (method url-fetch)
10795 ;; The test suite is not included in the PyPi release.
10796 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10797 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10798 "archive/" version ".tar.gz"))
10799 (file-name (string-append name "-" version ".tar.gz"))
10800 (sha256
10801 (base32
10802 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10803 (build-system python-build-system)
10804 (arguments
10805 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10806 #:python ,python-2))
10807 (native-inputs
10808 `(("python2-unittest2" ,python2-unittest2)))
10809 (home-page "https://github.com/jdunck/python-unicodecsv")
10810 (synopsis "Unicode CSV module for Python 2")
10811 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10812 module, adding support for Unicode strings.")
10813 (license license:bsd-2)))
10814
10815 (define-public python-rarfile
10816 (package
10817 (name "python-rarfile")
10818 (version "2.8")
10819 (source (origin
10820 (method url-fetch)
10821 (uri (pypi-uri "rarfile" version))
10822 (sha256
10823 (base32
10824 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10825 (build-system python-build-system)
10826 (arguments
10827 '(#:phases
10828 (modify-phases %standard-phases
10829 (replace 'check
10830 ;; Many tests fail, but the installation proceeds.
10831 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10832 (native-inputs
10833 `(("which" ,which))) ; required for tests
10834 (propagated-inputs
10835 `(("libarchive" ,libarchive)))
10836 (home-page "https://github.com/markokr/rarfile")
10837 (synopsis "RAR archive reader for Python")
10838 (description "This is Python module for RAR archive reading. The interface
10839 is made as zipfile like as possible.")
10840 (license license:isc)))
10841
10842 (define-public python2-rarfile
10843 (package-with-python2 python-rarfile))
10844
10845 (define-public python-magic
10846 (package
10847 (name "python-magic")
10848 (version "0.4.3")
10849 (source
10850 (origin
10851 (method url-fetch)
10852 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10853 version ".tar.gz"))
10854 (sha256
10855 (base32
10856 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10857 (file-name (string-append name "-" version "-checkout"))))
10858 (build-system python-build-system)
10859 (arguments
10860 ;; The tests are unreliable, so don't run them. The tests fail
10861 ;; under Python3 because they were written for Python2 and
10862 ;; contain import statements that do not work in Python3. One of
10863 ;; the tests fails under Python2 because its assertions are
10864 ;; overly stringent; it relies on comparing output strings which
10865 ;; are brittle and can change depending on the version of
10866 ;; libmagic being used and the system on which the test is
10867 ;; running. In my case, under GuixSD 0.10.0, only one test
10868 ;; failed, and it seems to have failed only because the version
10869 ;; of libmagic that is packaged in Guix outputs a slightly
10870 ;; different (but not wrong) string than the one that the test
10871 ;; expected.
10872 '(#:tests? #f
10873 #:phases (modify-phases %standard-phases
10874 ;; Replace a specific method call with a hard-coded
10875 ;; path to the necessary libmagic.so file in the
10876 ;; store. If we don't do this, then the method call
10877 ;; will fail to find the libmagic.so file, which in
10878 ;; turn will cause any application using
10879 ;; python-magic to fail.
10880 (add-before 'build 'hard-code-path-to-libmagic
10881 (lambda* (#:key inputs #:allow-other-keys)
10882 (let ((file (assoc-ref inputs "file")))
10883 (substitute* "magic.py"
10884 (("ctypes.util.find_library\\('magic'\\)")
10885 (string-append "'" file "/lib/libmagic.so'")))
10886 #t)))
10887 (add-before 'install 'disable-egg-compression
10888 (lambda _
10889 (let ((port (open-file "setup.cfg" "a")))
10890 (display "\n[easy_install]\nzip_ok = 0\n"
10891 port)
10892 (close-port port)
10893 #t))))))
10894 (inputs
10895 ;; python-magic needs to be able to find libmagic.so.
10896 `(("file" ,file)))
10897 (home-page "https://github.com/ahupp/python-magic")
10898 (synopsis "File type identification using libmagic")
10899 (description
10900 "This module uses ctypes to access the libmagic file type
10901 identification library. It makes use of the local magic database and
10902 supports both textual and MIME-type output. Note that this module and
10903 the python-file module both provide a \"magic.py\" file; these two
10904 modules, which are different and were developed separately, both serve
10905 the same purpose: to provide Python bindings for libmagic.")
10906 (license license:expat)))
10907
10908 (define-public python2-magic
10909 (package-with-python2 python-magic))
10910
10911 (define-public python2-s3cmd
10912 (package
10913 (name "python2-s3cmd")
10914 (version "1.6.1")
10915 (source
10916 (origin
10917 (method url-fetch)
10918 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10919 "s3cmd-" version ".tar.gz"))
10920 (sha256
10921 (base32
10922 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10923 (build-system python-build-system)
10924 (arguments
10925 ;; s3cmd is written for python2 only and contains no tests.
10926 `(#:python ,python-2
10927 #:tests? #f))
10928 (propagated-inputs
10929 `(("python2-dateutil" ,python2-dateutil)
10930 ;; The python-file package also provides a magic.py module.
10931 ;; This is an unfortunate state of affairs; however, s3cmd
10932 ;; fails to install if it cannot find specifically the
10933 ;; python-magic package. Thus we include it, instead of using
10934 ;; python-file. Ironically, s3cmd sometimes works better
10935 ;; without libmagic bindings at all:
10936 ;; https://github.com/s3tools/s3cmd/issues/198
10937 ("python2-magic" ,python2-magic)))
10938 (home-page "http://s3tools.org/s3cmd")
10939 (synopsis "Command line tool for S3-compatible storage services")
10940 (description
10941 "S3cmd is a command line tool for uploading, retrieving and managing data
10942 in storage services that are compatible with the Amazon Simple Storage
10943 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10944 GnuPG encryption, and more. It also supports management of Amazon's
10945 CloudFront content delivery network.")
10946 (license license:gpl2+)))
10947
10948 (define-public python-pkgconfig
10949 (package
10950 (name "python-pkgconfig")
10951 (version "1.1.0")
10952 (source
10953 (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "pkgconfig" version))
10956 (sha256
10957 (base32
10958 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10959 (build-system python-build-system)
10960 (native-inputs
10961 `(("python-nose" ,python-nose)))
10962 (inputs
10963 `(("pkg-config" ,pkg-config)))
10964 (arguments
10965 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10966 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10967 #:tests? #f
10968 ;; Hard-code the path to pkg-config.
10969 #:phases
10970 (modify-phases %standard-phases
10971 (add-before
10972 'build 'patch
10973 (lambda _
10974 (substitute* "pkgconfig/pkgconfig.py"
10975 (("cmd = 'pkg-config")
10976 (string-append "cmd = '" (which "pkg-config"))))
10977 #t)))))
10978 (home-page "https://github.com/matze/pkgconfig")
10979 (synopsis "Python interface for pkg-config")
10980 (description "This module provides a Python interface to pkg-config. It
10981 can be used to find all pkg-config packages, check if a package exists,
10982 check if a package meets certain version requirements, query CFLAGS and
10983 LDFLAGS and parse the output to build extensions with setup.py.")
10984 (license license:expat)))
10985
10986 (define-public python2-pkgconfig
10987 (package-with-python2 python-pkgconfig))
10988
10989 (define-public python-bz2file
10990 (package
10991 (name "python-bz2file")
10992 (version "0.98")
10993 (source
10994 (origin
10995 (method url-fetch)
10996 (uri (pypi-uri "bz2file" version))
10997 (sha256
10998 (base32
10999 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11000 (build-system python-build-system)
11001 (arguments
11002 `(#:tests? #f)) ; Tests use deprecated python modules.
11003 (home-page "https://github.com/nvawda/bz2file")
11004 (synopsis "Read and write bzip2-compressed files")
11005 (description
11006 "Bz2file is a Python library for reading and writing bzip2-compressed
11007 files. It contains a drop-in replacement for the I/O interface in the
11008 standard library's @code{bz2} module, including features from the latest
11009 development version of CPython that are not available in older releases.")
11010 (license license:asl2.0)
11011 (properties `((python2-variant . ,(delay python2-bz2file))))))
11012
11013 (define-public python2-bz2file
11014 (let ((base (package-with-python2
11015 (strip-python2-variant python-bz2file))))
11016 (package
11017 (inherit base)
11018 (arguments
11019 `(#:python ,python-2
11020 #:phases
11021 (modify-phases %standard-phases
11022 ;; 'python setup.py test' does not work as of 0.98.
11023 ;; There is only the one test file, so we run it directly.
11024 (replace 'check
11025 (lambda _ (zero? (system* "python"
11026 "test_bz2file.py"))))))))))
11027
11028 (define-public python-future
11029 (package
11030 (name "python-future")
11031 (version "0.16.0")
11032 (source
11033 (origin
11034 (method url-fetch)
11035 (uri (pypi-uri "future" version))
11036 (sha256
11037 (base32
11038 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
11039 (build-system python-build-system)
11040 ;; Many tests connect to the network or are otherwise flawed.
11041 ;; https://github.com/PythonCharmers/python-future/issues/210
11042 (arguments
11043 `(#:tests? #f))
11044 (home-page "http://python-future.org")
11045 (synopsis "Single-source support for Python 3 and 2")
11046 (description
11047 "@code{python-future} is the missing compatibility layer between Python 2 and
11048 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11049 to support both Python 2 and Python 3 with minimal overhead.")
11050 (license license:expat)))
11051
11052 (define-public python2-future
11053 (package-with-python2 python-future))
11054
11055 (define-public python-cysignals
11056 (package
11057 (name "python-cysignals")
11058 (version "1.1.0")
11059 (source
11060 (origin
11061 (method url-fetch)
11062 (uri (pypi-uri "cysignals" version ".tar.bz2"))
11063 (sha256
11064 (base32
11065 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
11066 (build-system python-build-system)
11067 (native-inputs
11068 `(("python-cython" ,python-cython)
11069 ("python-sphinx" ,python-sphinx)))
11070 (inputs
11071 `(("pari-gp" ,pari-gp)))
11072 (arguments
11073 `(#:modules ((guix build python-build-system)
11074 ((guix build gnu-build-system) #:prefix gnu:)
11075 (guix build utils))
11076 ;; FIXME: Tests are executed after installation and currently fail
11077 ;; when not installing into standard locations; the author is working
11078 ;; on a fix.
11079 #:tests? #f
11080 #:phases
11081 (modify-phases %standard-phases
11082 (add-before
11083 'build 'configure
11084 (assoc-ref gnu:%standard-phases 'configure)))))
11085 (home-page
11086 "https://github.com/sagemath/cysignals")
11087 (synopsis
11088 "Handling of interrupts and signals for Cython")
11089 (description
11090 "The cysignals package provides mechanisms to handle interrupts (and
11091 other signals and errors) in Cython code, using two related approaches,
11092 for mixed Cython/Python code or external C libraries and pure Cython code,
11093 respectively.")
11094 (license license:lgpl3+)))
11095
11096 (define-public python2-cysignals
11097 (package-with-python2 python-cysignals))
11098
11099 (define-public python2-shedskin
11100 (package
11101 (name "python2-shedskin")
11102 (version "0.9.4")
11103 (source
11104 (origin
11105 (method url-fetch)
11106 (uri (string-append "https://github.com/shedskin/shedskin/"
11107 "releases/download/v" version
11108 "/shedskin-" version ".tgz"))
11109 (sha256
11110 (base32
11111 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11112 (build-system python-build-system)
11113 (arguments
11114 `(#:python ,python-2
11115 #:phases (modify-phases %standard-phases
11116 (add-after 'unpack 'fix-resulting-include-libs
11117 (lambda* (#:key inputs #:allow-other-keys)
11118 (let ((libgc (assoc-ref inputs "libgc"))
11119 (pcre (assoc-ref inputs "pcre")))
11120 (substitute* "shedskin/makefile.py"
11121 (("variable == 'CCFLAGS':[ ]*")
11122 (string-append "variable == 'CCFLAGS':\n"
11123 " line += ' -I " pcre "/include"
11124 " -I " libgc "/include'"))
11125 (("variable == 'LFLAGS':[ ]*")
11126 (string-append "variable == 'LFLAGS':\n"
11127 " line += ' -L" pcre "/lib"
11128 " -L " libgc "/lib'")))
11129 #t))))))
11130 (inputs `(("pcre" ,pcre)
11131 ("libgc" ,libgc)))
11132 (home-page "https://shedskin.github.io/")
11133 (synopsis "Experimental Python-2 to C++ Compiler")
11134 (description (string-append "This is an experimental compiler for a subset of
11135 Python. It generates C++ code and a Makefile."))
11136 (license (list license:gpl3 license:bsd-3 license:expat))))
11137
11138 (define-public python2-rope
11139 (package
11140 (name "python2-rope")
11141 (version "0.10.3")
11142 (source
11143 (origin
11144 (method url-fetch)
11145 (uri (pypi-uri "rope" version))
11146 (sha256
11147 (base32
11148 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11149 (arguments
11150 ;; Rope is currently python-2 only.
11151 ;; https://github.com/python-rope/rope/issues/57
11152 `(#:python ,python-2))
11153 (build-system python-build-system)
11154 (native-inputs
11155 `(("python2-unittest2" ,python2-unittest2)))
11156 (home-page "https://github.com/python-rope/rope")
11157 (synopsis "Refactoring library for Python")
11158 (description "Rope is a refactoring library for Python. It facilitates
11159 the renaming, moving and extracting of attributes, functions, modules, fields
11160 and parameters in Python 2 source code. These refactorings can also be applied
11161 to occurrences in strings and comments.")
11162 (license license:gpl2)))
11163
11164 (define-public python-py3status
11165 (package
11166 (name "python-py3status")
11167 (version "3.1")
11168 (source
11169 (origin
11170 (method url-fetch)
11171 (uri (pypi-uri "py3status" version))
11172 (sha256
11173 (base32
11174 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
11175 (build-system python-build-system)
11176 (arguments
11177 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
11178 (home-page "https://github.com/ultrabug/py3status")
11179 (synopsis "Extensible i3status wrapper written in Python")
11180 (description "py3status is an i3status wrapper which extends i3status
11181 functionality in a modular way, allowing you to extend your panel with your
11182 own code, responding to click events and updating clock every second.")
11183 (license license:bsd-3)))
11184
11185 (define-public python-tblib
11186 (package
11187 (name "python-tblib")
11188 (version "1.3.0")
11189 (source (origin
11190 (method url-fetch)
11191 (uri (pypi-uri "tblib" version))
11192 (sha256 (base32
11193 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11194 (build-system python-build-system)
11195 (arguments
11196 `(#:phases
11197 (modify-phases %standard-phases
11198 (replace 'check
11199 (lambda _
11200 ;; Upstream runs tests after installation and the package itself
11201 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11202 ;; found.
11203 (setenv "PYTHONPATH"
11204 (string-append (getcwd) "/build/lib:"
11205 (getenv "PYTHONPATH")))
11206 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11207 (native-inputs
11208 `(("python-pytest" ,python-pytest)
11209 ("python-six" ,python-six)))
11210 (home-page "https://github.com/ionelmc/python-tblib")
11211 (synopsis "Traceback serialization library")
11212 (description
11213 "Traceback serialization allows you to:
11214
11215 @enumerate
11216 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11217 different processes. This allows better error handling when running code over
11218 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11219
11220 @item Parse traceback strings and raise with the parsed tracebacks.
11221 @end enumerate\n")
11222 (license license:bsd-3)))
11223
11224 (define-public python2-tblib
11225 (package-with-python2 python-tblib))
11226
11227 (define-public python-sqlparse
11228 (package
11229 (name "python-sqlparse")
11230 (version "0.1.19")
11231 (source (origin
11232 (method url-fetch)
11233 (uri (pypi-uri "sqlparse" version))
11234 (sha256
11235 (base32
11236 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11237 (build-system python-build-system)
11238 (arguments
11239 `(#:phases
11240 (modify-phases %standard-phases
11241 (replace 'check
11242 (lambda* _
11243 ;; setup.py-integrated 2to3 only affects the build files, but
11244 ;; py.test is using the source files. So we need to convert them
11245 ;; manually.
11246 (when (zero? (system* "python3"))
11247 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11248 (zero? (system* "py.test")))))))
11249 (native-inputs
11250 `(("python-pytest" ,python-pytest)))
11251 (home-page "https://github.com/andialbrecht/sqlparse")
11252 (synopsis "Non-validating SQL parser")
11253 (description "Sqlparse is a non-validating SQL parser for Python. It
11254 provides support for parsing, splitting and formatting SQL statements.")
11255 (license license:bsd-3)))
11256
11257 (define-public python2-sqlparse
11258 (package-with-python2 python-sqlparse))
11259
11260 (define-public python-greenlet
11261 (package
11262 (name "python-greenlet")
11263 (version "0.4.11")
11264 (source (origin
11265 (method url-fetch)
11266 (uri (pypi-uri "greenlet" version))
11267 (sha256
11268 (base32
11269 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11270 (build-system python-build-system)
11271 (home-page "https://greenlet.readthedocs.io/")
11272 (synopsis "Lightweight in-process concurrent programming")
11273 (description
11274 "Greenlet package is a spin-off of Stackless, a version of CPython
11275 that supports micro-threads called \"tasklets\". Tasklets run
11276 pseudo-concurrently (typically in a single or a few OS-level threads) and
11277 are synchronized with data exchanges on \"channels\".")
11278 (license (list license:psfl license:expat))))
11279
11280 (define-public python2-greenlet
11281 (package-with-python2 python-greenlet))
11282
11283 (define-public python-gevent
11284 (package
11285 (name "python-gevent")
11286 (version "1.1.1")
11287 (source (origin
11288 (method url-fetch)
11289 (uri (pypi-uri "gevent" version))
11290 (sha256
11291 (base32
11292 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11293 (modules '((guix build utils)))
11294 (snippet
11295 '(begin
11296 ;; unbunding libev and c-ares
11297 (for-each delete-file-recursively '("libev" "c-ares"))
11298 ;; fixing testsuite
11299 (call-with-output-file "greentest/__init__.py" noop)
11300 (substitute* "greentest/testrunner.py"
11301 (("import util") "from . import util")
11302 (("from util import log") "from .util import log"))))))
11303 (build-system python-build-system)
11304 (propagated-inputs
11305 `(("python-greenlet" ,python-greenlet)))
11306 (native-inputs
11307 `(("python-six" ,python-six)))
11308 (inputs
11309 `(("c-ares" ,c-ares)
11310 ("libev" ,libev)))
11311 (home-page "http://www.gevent.org/")
11312 (synopsis "Coroutine-based network library")
11313 (description
11314 "gevent is a coroutine-based Python networking library that uses greenlet
11315 to provide a high-level synchronous API on top of the libev event loop.")
11316 (license license:expat)))
11317
11318 (define-public python2-gevent
11319 (package-with-python2 python-gevent))
11320
11321 (define-public python-geventhttpclient
11322 (package
11323 (name "python-geventhttpclient")
11324 (version "1.3.1")
11325 (source (origin
11326 (method url-fetch)
11327 (uri (pypi-uri "geventhttpclient" version))
11328 (sha256
11329 (base32
11330 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11331 (modules '((guix build utils)))
11332 (snippet
11333 '(begin
11334 ;; Delete pre-compiled files.
11335 (for-each delete-file (find-files "src/geventhttpclient"
11336 ".*\\.pyc"))
11337 #t))))
11338 (build-system python-build-system)
11339 (arguments
11340 '(#:phases
11341 (modify-phases %standard-phases
11342 (add-after 'unpack 'delete-network-tests
11343 (lambda _
11344 (delete-file "src/geventhttpclient/tests/test_client.py")
11345 #t))
11346 (delete 'check)
11347 (add-after 'install 'check
11348 (lambda* (#:key inputs outputs #:allow-other-keys)
11349 (add-installed-pythonpath inputs outputs)
11350 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11351 (native-inputs
11352 `(("python-pytest" ,python-pytest)))
11353 (propagated-inputs
11354 `(("python-certifi" ,python-certifi)
11355 ("python-gevent" ,python-gevent)
11356 ("python-six" ,python-six)))
11357 (home-page "https://github.com/gwik/geventhttpclient")
11358 (synopsis "HTTP client library for gevent")
11359 (description "@code{python-geventhttpclient} is a high performance,
11360 concurrent HTTP client library for python using @code{gevent}.")
11361 (license license:expat)))
11362
11363 (define-public python2-geventhttpclient
11364 (package-with-python2 python-geventhttpclient))
11365
11366 (define-public python-fastimport
11367 (package
11368 (name "python-fastimport")
11369 (version "0.9.6")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "fastimport" version))
11374 (sha256
11375 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11376 (build-system python-build-system)
11377 (home-page "https://github.com/jelmer/python-fastimport")
11378 (synopsis "VCS fastimport parser and generator in Python")
11379 (description "This package provides a parser for and generator of the Git
11380 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11381 format.")
11382 (license license:gpl2+)))
11383
11384 (define-public python2-fastimport
11385 (package-with-python2 python-fastimport))
11386
11387 (define-public python-twisted
11388 (package
11389 (name "python-twisted")
11390 (version "16.2.0")
11391 (source (origin
11392 (method url-fetch)
11393 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11394 (sha256
11395 (base32
11396 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11397 (build-system python-build-system)
11398 (arguments
11399 '(#:tests? #f)) ; FIXME: Some tests are failing.
11400 ;; #:phases
11401 ;; (modify-phases %standard-phases
11402 ;; (replace 'check
11403 ;; (lambda _
11404 ;; (zero? (system* "./bin/trial" "twisted")))))
11405 (propagated-inputs
11406 `(("python-zope-interface" ,python-zope-interface)))
11407 (home-page "https://twistedmatrix.com/")
11408 (synopsis "Asynchronous networking framework written in Python")
11409 (description
11410 "Twisted is an extensible framework for Python programming, with special
11411 focus on event-based network programming and multiprotocol integration.")
11412 (license license:expat)))
11413
11414 (define-public python2-twisted
11415 (package-with-python2 python-twisted))
11416
11417 (define-public python-pika
11418 (package
11419 (name "python-pika")
11420 (version "0.10.0")
11421 (source
11422 (origin
11423 (method url-fetch)
11424 (uri (pypi-uri "pika" version))
11425 (sha256
11426 (base32
11427 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11428 (build-system python-build-system)
11429 (native-inputs
11430 `(("python-pyev" ,python-pyev)
11431 ("python-tornado" ,python-tornado)
11432 ("python-twisted" ,python-twisted)))
11433 (home-page "https://pika.readthedocs.org")
11434 (synopsis "Pure Python AMQP Client Library")
11435 (description
11436 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11437 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11438 network support library.")
11439 (license license:bsd-3)))
11440
11441 (define-public python2-pika
11442 (package-with-python2 python-pika))
11443
11444 (define-public python-ply
11445 (package
11446 (name "python-ply")
11447 (version "3.9")
11448 (source
11449 (origin
11450 (method url-fetch)
11451 (uri (pypi-uri "ply" version))
11452 (sha256
11453 (base32
11454 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11455 (build-system python-build-system)
11456 (home-page "http://www.dabeaz.com/ply/")
11457 (synopsis "Python Lex & Yacc")
11458 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11459 It uses LR parsing and does extensive error checking.")
11460 (license license:bsd-3)))
11461
11462 (define-public python2-ply
11463 (package-with-python2 python-ply))
11464
11465 (define-public python-tabulate
11466 (package
11467 (name "python-tabulate")
11468 (version "0.7.7")
11469 (source (origin
11470 (method url-fetch)
11471 (uri (pypi-uri "tabulate" version))
11472 (sha256
11473 (base32
11474 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11475 (build-system python-build-system)
11476 (arguments
11477 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11478 ;; and the latest release is not tagged in the upstream repository.
11479 '(#:tests? #f))
11480 (home-page "https://bitbucket.org/astanin/python-tabulate")
11481 (synopsis "Pretty-print tabular data")
11482 (description
11483 "Tabulate is a library and command-line utility to pretty-print tabular
11484 data in Python.")
11485 (license license:expat)))
11486
11487 (define-public python2-tabulate
11488 (package-with-python2 python-tabulate))
11489
11490 (define-public python-kazoo
11491 (package
11492 (name "python-kazoo")
11493 (version "2.2.1")
11494 (source
11495 (origin
11496 (method url-fetch)
11497 (uri (pypi-uri "kazoo" version))
11498 (sha256
11499 (base32
11500 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11501 (build-system python-build-system)
11502 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11503 (propagated-inputs
11504 `(("python-six" ,python-six)))
11505 (home-page "https://kazoo.readthedocs.org")
11506 (synopsis "High-level Zookeeper client library")
11507 (description
11508 "Kazoo is a Python client library for the Apache Zookeeper distributed
11509 application service. It is designed to be easy to use and to avoid common
11510 programming errors.")
11511 (license license:asl2.0)))
11512
11513 (define-public python2-kazoo
11514 (package-with-python2 python-kazoo))
11515
11516 (define-public python-pykafka
11517 (package
11518 (name "python-pykafka")
11519 (version "2.4.0")
11520 (source (origin
11521 (method url-fetch)
11522 (uri (string-append
11523 "https://pypi.python.org/packages/8b/3e/"
11524 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11525 "pykafka-" version ".tar.gz"))
11526 (sha256
11527 (base32
11528 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11529 (build-system python-build-system)
11530 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11531 (propagated-inputs
11532 `(("python-gevent" ,python-gevent)
11533 ("python-kazoo" ,python-kazoo)
11534 ("python-tabulate" ,python-tabulate)))
11535 (inputs
11536 `(("librdkafka" ,librdkafka)))
11537 (home-page "https://pykafka.readthedocs.io/")
11538 (synopsis "Apache Kafka client for Python")
11539 (description
11540 "PyKafka is a client for the Apache Kafka distributed messaging system.
11541 It includes Python implementations of Kafka producers and consumers, which
11542 are optionally backed by a C extension built on librdkafka.")
11543 (license license:asl2.0)))
11544
11545 (define-public python2-pykafka
11546 (package-with-python2 python-pykafka))
11547
11548 (define-public python-wcwidth
11549 (package
11550 (name "python-wcwidth")
11551 (version "0.1.7")
11552 (source
11553 (origin
11554 (method url-fetch)
11555 (uri (pypi-uri "wcwidth" version))
11556 (sha256
11557 (base32
11558 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11559 (build-system python-build-system)
11560 (home-page "https://github.com/jquast/wcwidth")
11561 (synopsis "Measure number of terminal column cells of wide-character codes")
11562 (description "Wcwidth measures the number of terminal column cells of
11563 wide-character codes. It is useful for those implementing a terminal emulator,
11564 or programs that carefully produce output to be interpreted by one. It is a
11565 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11566 specified in POSIX.1-2001 and POSIX.1-2008.")
11567 (license license:expat)))
11568
11569 (define-public python2-wcwidth
11570 (package-with-python2 python-wcwidth))
11571
11572 (define-public python2-jsonrpclib
11573 (package
11574 (name "python2-jsonrpclib")
11575 (version "0.1.7")
11576 (source (origin
11577 (method url-fetch)
11578 (uri (string-append
11579 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11580 "jsonrpclib-" version ".tar.gz"))
11581 (sha256
11582 (base32
11583 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11584 (build-system python-build-system)
11585 (arguments
11586 `(#:tests? #f
11587 #:python ,python-2))
11588 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11589 (synopsis "Implementation of JSON-RPC specification for Python")
11590 (description
11591 "This library is an implementation of the JSON-RPC specification.
11592 It supports both the original 1.0 specification, as well as the
11593 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11594 etc.")
11595 (license license:asl2.0)))
11596
11597 (define-public python-chai
11598 (package
11599 (name "python-chai")
11600 (version "1.1.1")
11601 (source (origin
11602 (method url-fetch)
11603 (uri (pypi-uri "chai" version))
11604 (sha256
11605 (base32
11606 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11607 (build-system python-build-system)
11608 (home-page "https://github.com/agoragames/chai")
11609 (synopsis "Mocking framework for Python")
11610 (description
11611 "Chai provides an api for mocking, stubbing and spying your python
11612 objects, patterned after the Mocha library for Ruby.")
11613 (license license:bsd-3)))
11614
11615 (define-public python2-chai
11616 (package-with-python2 python-chai))
11617
11618 (define-public python-arrow
11619 (package
11620 (name "python-arrow")
11621 (version "0.8.0")
11622 (source (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "arrow" version))
11625 (sha256
11626 (base32
11627 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11628 (build-system python-build-system)
11629 (native-inputs
11630 `(;; For testing
11631 ("python-chai" ,python-chai)
11632 ("python-simplejson" ,python-simplejson)))
11633 (propagated-inputs
11634 `(("python-dateutil" ,python-dateutil)))
11635 (home-page "https://github.com/crsmithdev/arrow/")
11636 (synopsis "Dates and times for Python")
11637 (description
11638 "Arrow is a Python library to creating, manipulating, formatting and
11639 converting dates, times, and timestamps. It implements and updates the
11640 datetime type.")
11641 (license license:asl2.0)))
11642
11643 (define-public python2-arrow
11644 (package-with-python2 python-arrow))
11645
11646 (define-public python-inflection
11647 (package
11648 (name "python-inflection")
11649 (version "0.3.1")
11650 (source
11651 (origin (method url-fetch)
11652 (uri (pypi-uri "inflection" version))
11653 (sha256
11654 (base32
11655 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11656 (build-system python-build-system)
11657 (native-inputs
11658 `(("python-pytest" ,python-pytest)))
11659 (home-page "https://github.com/jpvanhal/inflection")
11660 (synopsis "Python string transformation library")
11661 (description
11662 "Inflection is a string transformation library. It singularizes
11663 and pluralizes English words, and transforms strings from CamelCase to
11664 underscored string.")
11665 (license license:expat)))
11666
11667 (define-public python2-inflection
11668 (package-with-python2 python-inflection))
11669
11670 (define-public python-pylev
11671 (package
11672 (name "python-pylev")
11673 (version "1.3.0")
11674 (source (origin
11675 (method url-fetch)
11676 (uri (pypi-uri "pylev" version))
11677 (sha256
11678 (base32
11679 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11680 (build-system python-build-system)
11681 (home-page "https://github.com/toastdriven/pylev")
11682 (synopsis "Levenshtein distance implementation in Python")
11683 (description "Pure Python Levenshtein implementation, based off the
11684 Wikipedia code samples at
11685 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11686 (license license:bsd-3)))
11687
11688 (define-public python2-pylev
11689 (package-with-python2 python-pylev))
11690
11691 (define-public python-cleo
11692 (package
11693 (name "python-cleo")
11694 (version "0.4.1")
11695 (source (origin
11696 (method url-fetch)
11697 (uri (pypi-uri "cleo" version))
11698 (sha256
11699 (base32
11700 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11701 (build-system python-build-system)
11702 (native-inputs
11703 `(;; For testing
11704 ("python-mock" ,python-mock)
11705 ("python-pytest" ,python-pytest)))
11706 (propagated-inputs
11707 `(("python-psutil" ,python-psutil)
11708 ("python-pylev" ,python-pylev)))
11709 (home-page "https://github.com/sdispater/cleo")
11710 (synopsis "Command-line arguments library for Python")
11711 (description
11712 "Cleo allows you to create command-line commands with signature in
11713 docstring and colored output.")
11714 (license license:expat)))
11715
11716 (define-public python2-cleo
11717 (package-with-python2 python-cleo))
11718
11719 (define-public python-lazy-object-proxy
11720 (package
11721 (name "python-lazy-object-proxy")
11722 (version "1.2.2")
11723 (source (origin
11724 (method url-fetch)
11725 (uri (pypi-uri "lazy-object-proxy" version))
11726 (sha256
11727 (base32
11728 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11729 (build-system python-build-system)
11730 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11731 (synopsis "Lazy object proxy for python")
11732 (description
11733 "Lazy object proxy is an object that wraps a callable but defers the call
11734 until the object is actually required, and caches the result of said call.")
11735 (license license:bsd-2)))
11736
11737 (define-public python2-lazy-object-proxy
11738 (package-with-python2 python-lazy-object-proxy))
11739
11740 (define-public python-dnspython
11741 (package
11742 (name "python-dnspython")
11743 (version "1.15.0")
11744 (source (origin
11745 (method url-fetch)
11746 (uri (string-append "http://www.dnspython.org/kits/"
11747 version "/dnspython-" version ".tar.gz"))
11748 (sha256
11749 (base32
11750 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11751 (build-system python-build-system)
11752 (arguments '(#:tests? #f)) ; XXX: requires internet access
11753 (home-page "http://www.dnspython.org")
11754 (synopsis "DNS toolkit for Python")
11755 (description
11756 "dnspython is a DNS toolkit for Python. It supports almost all record
11757 types. It can be used for queries, zone transfers, and dynamic updates.
11758 It supports TSIG authenticated messages and EDNS0.")
11759 (license license:expat)))
11760
11761 (define-public python2-dnspython
11762 (package-with-python2 python-dnspython))
11763
11764 (define-public python-email-validator
11765 (package
11766 (name "python-email-validator")
11767 (version "1.0.2")
11768 (source
11769 (origin (method url-fetch)
11770 (uri (pypi-uri "email_validator" version))
11771 (sha256
11772 (base32
11773 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11774 (build-system python-build-system)
11775 (arguments
11776 '(#:phases
11777 (modify-phases %standard-phases
11778 (add-before 'build 'use-dnspython
11779 (lambda _
11780 (substitute* "setup.py"
11781 (("dnspython3") "dnspython"))
11782 #t)))))
11783 (propagated-inputs
11784 `(("python-dnspython" ,python-dnspython)
11785 ("python-idna" ,python-idna)))
11786 (home-page "https://github.com/JoshData/python-email-validator")
11787 (synopsis "Email address validation library for Python")
11788 (description
11789 "This library validates email address syntax and deliverability.")
11790 (license license:cc0)))
11791
11792 (define-public python2-email-validator
11793 (package-with-python2 python-email-validator))
11794
11795 (define-public python-ukpostcodeparser
11796 (package
11797 (name "python-ukpostcodeparser")
11798 (version "1.0.3")
11799 (source (origin
11800 (method url-fetch)
11801 (uri (pypi-uri "UkPostcodeParser" version))
11802 (sha256
11803 (base32
11804 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11805 (build-system python-build-system)
11806 (home-page "https://github.com/hamstah/ukpostcodeparser")
11807 (synopsis "UK Postcode parser for Python")
11808 (description
11809 "This library provides the @code{parse_uk_postcode} function for
11810 parsing UK postcodes.")
11811 (license license:expat)))
11812
11813 (define-public python2-ukpostcodeparser
11814 (package-with-python2 python-ukpostcodeparser))
11815
11816 (define-public python-faker
11817 (package
11818 (name "python-faker")
11819 (version "0.7.9")
11820 (source (origin
11821 (method url-fetch)
11822 (uri (pypi-uri "Faker" version))
11823 (sha256
11824 (base32
11825 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11826 (patches
11827 (search-patches "python-faker-fix-build-32bit.patch"))
11828 (modules '((guix build utils)))
11829 (snippet
11830 '(begin
11831 (for-each delete-file (find-files "." "\\.pyc$"))
11832 #t))))
11833 (build-system python-build-system)
11834 (arguments
11835 '(#:phases
11836 (modify-phases %standard-phases
11837 (replace 'check
11838 (lambda _
11839 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11840 (native-inputs
11841 `(;; For testing
11842 ("python-email-validator" ,python-email-validator)
11843 ("python-mock" ,python-mock)
11844 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11845 (propagated-inputs
11846 `(("python-dateutil" ,python-dateutil)
11847 ("python-six" ,python-six)))
11848 (home-page "https://github.com/joke2k/faker")
11849 (synopsis "Python package that generates fake data")
11850 (description
11851 "Faker is a Python package that generates fake data such as names,
11852 addresses, and phone numbers.")
11853 (license license:expat)
11854 (properties `((python2-variant . ,(delay python2-faker))))))
11855
11856 (define-public python2-faker
11857 (let ((base (package-with-python2 (strip-python2-variant
11858 python-faker))))
11859 (package
11860 (inherit base)
11861 (propagated-inputs
11862 `(("python2-ipaddress" ,python2-ipaddress)
11863 ,@(package-propagated-inputs base))))))
11864
11865 (define-public python-fake-factory
11866 (package
11867 (name "python-fake-factory")
11868 (version "0.7.2")
11869 (source (origin
11870 (method url-fetch)
11871 (uri (pypi-uri "fake-factory" version))
11872 (sha256
11873 (base32
11874 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11875 (patches
11876 (search-patches
11877 "python-fake-factory-fix-build-32bit.patch"))))
11878 (build-system python-build-system)
11879 (arguments
11880 '(#:phases
11881 (modify-phases %standard-phases
11882 (replace 'check
11883 (lambda _
11884 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11885 (native-inputs
11886 `(;; For testing
11887 ("python-email-validator" ,python-email-validator)
11888 ("python-mock" ,python-mock)
11889 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11890 (propagated-inputs
11891 `(("python-dateutil" ,python-dateutil)
11892 ("python-six" ,python-six)))
11893 (home-page "https://github.com/joke2k/faker")
11894 (synopsis "Python package that generates fake data")
11895 (description
11896 "Faker is a Python package that generates fake data such as names,
11897 addresses, and phone numbers.")
11898 (license license:expat)
11899 (properties `((python2-variant . ,(delay python2-fake-factory))
11900 (superseded . ,python-faker)))))
11901
11902 (define-public python2-fake-factory
11903 (let ((base (package-with-python2 (strip-python2-variant
11904 python-fake-factory))))
11905 (package
11906 (inherit base)
11907 (properties `((superseded . ,python2-faker)))
11908 (propagated-inputs
11909 `(("python2-ipaddress" ,python2-ipaddress)
11910 ,@(package-propagated-inputs base))))))
11911
11912 (define-public python-pyaml
11913 (package
11914 (name "python-pyaml")
11915 (version "15.8.2")
11916 (source (origin
11917 (method url-fetch)
11918 (uri (pypi-uri "pyaml" version))
11919 (sha256
11920 (base32
11921 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11922 (build-system python-build-system)
11923 (native-inputs
11924 `(("python-unidecode" ,python-unidecode)))
11925 (propagated-inputs
11926 `(("python-pyyaml" ,python-pyyaml)))
11927 (home-page "https://github.com/mk-fg/pretty-yaml")
11928 (synopsis "YAML pretty-print library for Python")
11929 (description
11930 "pyaml is a PyYAML based python module to produce pretty and readable
11931 YAML-serialized data.")
11932 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11933
11934 (define-public python2-pyaml
11935 (package-with-python2 python-pyaml))
11936
11937 (define-public python-flexmock
11938 (package
11939 (name "python-flexmock")
11940 (version "0.10.2")
11941 (source (origin
11942 (method url-fetch)
11943 (uri (pypi-uri "flexmock" version))
11944 (sha256
11945 (base32
11946 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11947 (build-system python-build-system)
11948 (home-page "https://flexmock.readthedocs.org")
11949 (synopsis "Testing library for Python")
11950 (description
11951 "flexmock is a testing library for Python that makes it easy to create
11952 mocks, stubs and fakes.")
11953 (license license:bsd-3)))
11954
11955 (define-public python2-flexmock
11956 (package-with-python2 python-flexmock))
11957
11958 (define-public python-orator
11959 (package
11960 (name "python-orator")
11961 (version "0.8.2")
11962 (source (origin
11963 (method url-fetch)
11964 (uri (pypi-uri "orator" version))
11965 (sha256
11966 (base32
11967 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11968 (build-system python-build-system)
11969 (arguments '(#:tests? #f)) ; no tests
11970 (propagated-inputs
11971 `(("python-arrow" ,python-arrow)
11972 ("python-blinker" ,python-blinker)
11973 ("python-cleo" ,python-cleo)
11974 ("python-faker" ,python-faker)
11975 ("python-inflection" ,python-inflection)
11976 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11977 ("python-pyaml" ,python-pyaml)
11978 ("python-simplejson" ,python-simplejson)
11979 ("python-wrapt" ,python-wrapt)))
11980 (home-page "https://orator-orm.com/")
11981 (synopsis "ActiveRecord ORM for Python")
11982 (description
11983 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11984 implementation for Python.")
11985 (license license:expat)
11986 (properties `((python2-variant . ,(delay python2-orator))))))
11987
11988 (define-public python2-orator
11989 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11990 (package
11991 (inherit base)
11992 (propagated-inputs
11993 `(("python2-ipaddress" ,python2-ipaddress)
11994 ,@(package-propagated-inputs base))))))
11995
11996 (define-public python-prompt-toolkit
11997 (package
11998 (name "python-prompt-toolkit")
11999 (version "1.0.9")
12000 (source
12001 (origin
12002 (method url-fetch)
12003 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
12004 (sha256
12005 (base32
12006 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
12007 (build-system python-build-system)
12008 (arguments
12009 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
12010 (propagated-inputs
12011 `(("python-wcwidth" ,python-wcwidth)
12012 ("python-six" ,python-six)
12013 ("python-pygments" ,python-pygments)))
12014 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
12015 (synopsis "Library for building command line interfaces in Python")
12016 (description
12017 "Prompt-Toolkit is a library for building interactive command line
12018 interfaces in Python. It's like GNU Readline but it also features syntax
12019 highlighting while typing, out-of-the-box multi-line input editing, advanced
12020 code completion, incremental search, support for Chinese double-width
12021 characters, mouse support, and auto suggestions.")
12022 (license license:bsd-3)))
12023
12024 (define-public python2-prompt-toolkit
12025 (package-with-python2 python-prompt-toolkit))
12026
12027 (define-public python-jedi
12028 (package
12029 (name "python-jedi")
12030 (version "0.9.0")
12031 (source
12032 (origin
12033 (method url-fetch)
12034 (uri (pypi-uri "jedi" version))
12035 (sha256
12036 (base32
12037 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
12038 (build-system python-build-system)
12039 (arguments
12040 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
12041 '(#:tests? #f))
12042 (native-inputs
12043 `(("python-pytest" ,python-pytest)))
12044 (home-page "https://github.com/davidhalter/jedi")
12045 (synopsis
12046 "Autocompletion for Python that can be used for text editors")
12047 (description
12048 "Jedi is an autocompletion tool for Python that can be used for text editors.")
12049 (license license:expat)))
12050
12051 (define-public python2-jedi
12052 (package-with-python2 python-jedi))
12053
12054 (define-public ptpython
12055 (package
12056 (name "ptpython")
12057 (version "0.34")
12058 (source (origin
12059 (method url-fetch)
12060 (uri (pypi-uri "ptpython" version))
12061 (sha256
12062 (base32
12063 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12064 (build-system python-build-system)
12065 (arguments
12066 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
12067 (propagated-inputs
12068 `(("python-docopt" ,python-docopt)
12069 ("python-jedi" ,python-jedi)
12070 ("python-prompt-toolkit" ,python-prompt-toolkit)
12071 ("python-pygments" ,python-pygments)))
12072 (home-page "https://github.com/jonathanslenders/ptpython")
12073 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12074 (description
12075 "ptpython is a Python read-eval-print loop with IDE-like features.
12076 It supports syntax highlighting, multiline editing, autocompletion, mouse,
12077 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12078 etc.")
12079 (license license:bsd-3)
12080 (properties `((python2-variant . ,(delay ptpython-2))))))
12081
12082 (define-public ptpython-2
12083 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12084 (package
12085 (inherit base)
12086 (name "ptpython2"))))
12087
12088 (define-public python-requests-oauthlib
12089 (package
12090 (name "python-requests-oauthlib")
12091 (version "0.6.2")
12092 (source
12093 (origin
12094 (method url-fetch)
12095 (uri (pypi-uri "requests-oauthlib" version))
12096 (sha256
12097 (base32
12098 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
12099 (build-system python-build-system)
12100 (arguments
12101 `(#:phases
12102 (modify-phases %standard-phases
12103 ;; removes tests that require network access
12104 (add-before 'check 'pre-check
12105 (lambda _
12106 (delete-file "tests/test_core.py")
12107 #t)))))
12108 (native-inputs
12109 `(("python-requests-mock" ,python-requests-mock)
12110 ("python-mock" ,python-mock)))
12111 (propagated-inputs
12112 `(("python-oauthlib" ,python-oauthlib)
12113 ("python-requests" ,python-requests)))
12114 (home-page
12115 "https://github.com/requests/requests-oauthlib")
12116 (synopsis
12117 "OAuthlib authentication support for Requests")
12118 (description
12119 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
12120 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
12121 (license license:isc)))
12122
12123 (define-public python2-requests-oauthlib
12124 (package-with-python2 python-requests-oauthlib))
12125
12126 (define-public python-stem
12127 (package
12128 (name "python-stem")
12129 (version "1.5.4")
12130 (source
12131 (origin
12132 (method url-fetch)
12133 (uri (pypi-uri "stem" version))
12134 (sha256
12135 (base32
12136 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
12137 (build-system python-build-system)
12138 (arguments
12139 `(#:phases
12140 (modify-phases %standard-phases
12141 (replace 'check
12142 (lambda _
12143 (zero? (system* "./run_tests.py" "--unit")))))))
12144 (native-inputs
12145 `(("python-mock" ,python-mock)
12146 ("python-pep8" ,python-pep8)
12147 ("python-pyflakes" ,python-pyflakes)))
12148 (home-page "https://stem.torproject.org/")
12149 (synopsis
12150 "Python controller library that allows applications to interact with Tor")
12151 (description
12152 "Stem is a Python controller library for Tor. With it you can use Tor's
12153 control protocol to script against the Tor process and read descriptor data
12154 relays publish about themselves.")
12155 (license license:lgpl3)))
12156
12157 (define-public python2-stem
12158 (package-with-python2 python-stem))
12159
12160 (define-public python-pyserial
12161 (package
12162 (name "python-pyserial")
12163 (version "3.1.1")
12164 (source
12165 (origin
12166 (method url-fetch)
12167 (uri (pypi-uri "pyserial" version))
12168 (sha256
12169 (base32
12170 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12171 (build-system python-build-system)
12172 (arguments
12173 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12174 ;; #:phases
12175 ;; (modify-phases %standard-phases
12176 ;; (replace 'check
12177 ;; (lambda _
12178 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12179 (home-page
12180 "https://github.com/pyserial/pyserial")
12181 (synopsis "Python Serial Port Bindings")
12182 (description "@code{pyserial} provide serial port bindings for Python. It
12183 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12184 and/or Xon/Xoff. The port is accessed in RAW mode.")
12185 (license license:bsd-3)))
12186
12187 (define-public python2-pyserial
12188 (package-with-python2 python-pyserial))
12189
12190 (define-public python-kivy
12191 (package
12192 (name "python-kivy")
12193 (version "1.9.1")
12194 (source
12195 (origin
12196 (method url-fetch)
12197 (uri (pypi-uri "kivy" version))
12198 (file-name (string-append name "-" version ".tar.gz"))
12199 (sha256
12200 (base32
12201 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12202 (build-system python-build-system)
12203 (arguments
12204 `(#:tests? #f ; Tests require many optional packages
12205 #:phases
12206 (modify-phases %standard-phases
12207 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12208 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12209 (lambda* (#:key inputs #:allow-other-keys)
12210 (setenv "KIVY_SDL2_PATH"
12211 (string-append (assoc-ref inputs "sdl-union")
12212 "/include/SDL2"))
12213 #t)))))
12214 (native-inputs
12215 `(("pkg-config" ,pkg-config)
12216 ("python-cython" ,python-cython)))
12217 (inputs
12218 `(("gstreamer" ,gstreamer)
12219 ("mesa" ,mesa)
12220 ("sdl-union"
12221 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12222 (home-page "http://kivy.org")
12223 (synopsis
12224 "Multitouch application framework")
12225 (description
12226 "A software library for rapid development of
12227 hardware-accelerated multitouch applications.")
12228 (license license:expat)))
12229
12230 (define-public python2-kivy
12231 (package-with-python2 python-kivy))
12232
12233 (define-public python-kivy-next
12234 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12235 (revision "1"))
12236 (package (inherit python-kivy)
12237 (name "python-kivy-next")
12238 (version (string-append "1.9.1-" revision "."
12239 (string-take commit 7)))
12240 (source
12241 (origin
12242 (method git-fetch)
12243 (uri (git-reference
12244 (url "https://github.com/kivy/kivy")
12245 (commit commit)))
12246 (file-name (string-append name "-" version "-checkout"))
12247 (sha256
12248 (base32
12249 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12250
12251 (define-public python2-kivy-next
12252 (package-with-python2 python-kivy-next))
12253
12254 (define-public python-binaryornot
12255 (package
12256 (name "python-binaryornot")
12257 (version "0.4.0")
12258 (source (origin
12259 (method url-fetch)
12260 (uri (pypi-uri "binaryornot" version))
12261 (sha256
12262 (base32
12263 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12264 (build-system python-build-system)
12265 (propagated-inputs
12266 `(("python-chardet" ,python-chardet)
12267 ("python-hypothesis" ,python-hypothesis)))
12268 (home-page "https://github.com/audreyr/binaryornot")
12269 (synopsis "Package to check if a file is binary or text")
12270 (description "Ultra-lightweight pure Python package to check if a file is
12271 binary or text.")
12272 (license license:bsd-3)
12273 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12274
12275 (define-public python2-binaryornot
12276 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12277 (package (inherit base)
12278 (propagated-inputs
12279 `(("python2-enum34" ,python2-enum34)
12280 ,@(package-propagated-inputs base))))))
12281
12282 (define-public python-nltk
12283 (package
12284 (name "python-nltk")
12285 (version "3.2.1")
12286 (source (origin
12287 (method url-fetch)
12288 (uri (pypi-uri "nltk" version))
12289 (sha256
12290 (base32
12291 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12292 (build-system python-build-system)
12293 (arguments
12294 '(;; The tests require some extra resources to be downloaded.
12295 ;; TODO Try packaging these resources.
12296 #:tests? #f))
12297 (home-page "http://nltk.org/")
12298 (synopsis "Natural Language Toolkit")
12299 (description "It provides interfaces to over 50 corpora and lexical
12300 resources such as WordNet, along with a suite of text processing libraries
12301 for classification, tokenization, stemming, tagging, parsing, and semantic
12302 reasoning, wrappers for natural language processing libraries.")
12303 (license license:asl2.0)))
12304
12305 (define-public python2-nltk
12306 (package-with-python2 python-nltk))
12307
12308 (define-public python-pymongo
12309 (package
12310 (name "python-pymongo")
12311 (version "3.3.0")
12312 (source (origin
12313 (method url-fetch)
12314 (uri (pypi-uri "pymongo" version))
12315 (sha256
12316 (base32
12317 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12318 (build-system python-build-system)
12319 (propagated-inputs
12320 `(("python-certifi" ,python-certifi)))
12321 (home-page "https://github.com/mongodb/mongo-python-driver")
12322 (synopsis "Python driver for MongoDB")
12323 (description "Python driver for MongoDB.")
12324 (license license:asl2.0)))
12325
12326 (define-public python2-pymongo
12327 (package-with-python2 python-pymongo))
12328
12329 (define-public python-sh
12330 (package
12331 (name "python-sh")
12332 (version "1.11")
12333 (source (origin
12334 (method url-fetch)
12335 (uri (pypi-uri "sh" version))
12336 (sha256
12337 (base32
12338 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12339 (build-system python-build-system)
12340 (arguments
12341 `(#:tests? #f)) ; no tests
12342 (home-page "https://github.com/amoffat/sh")
12343 (synopsis "Python subprocess interface")
12344 (description "Abstracts process invocation by providing a function
12345 interface for programs.")
12346 (license license:expat)))
12347
12348 (define-public python2-sh
12349 (package-with-python2 python-sh))
12350
12351 (define-public python-consul
12352 (package
12353 (name "python-consul")
12354 (version "0.6.1")
12355 (source
12356 (origin
12357 (method url-fetch)
12358 (uri (pypi-uri "python-consul" version))
12359 (sha256
12360 (base32
12361 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12362 (build-system python-build-system)
12363 (native-inputs
12364 `(("python-pytest" ,python-pytest)))
12365 (propagated-inputs
12366 `(("python-requests" ,python-requests)
12367 ("python-six" ,python-six)))
12368 (home-page "https://github.com/cablehead/python-consul")
12369 (synopsis "Python client for Consul")
12370 (description
12371 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12372 discovery, monitoring and configuration.")
12373 (license license:expat)))
12374
12375 (define-public python2-consul
12376 (package-with-python2 python-consul))
12377
12378 (define-public python-schematics
12379 (package
12380 (name "python-schematics")
12381 (version "1.1.1")
12382 (source
12383 (origin
12384 (method url-fetch)
12385 (uri (string-append
12386 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12387 (file-name (string-append name "-" version ".tar.gz"))
12388 (sha256
12389 (base32
12390 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12391 (build-system python-build-system)
12392 (propagated-inputs
12393 `(("python-six" ,python-six)))
12394 (arguments
12395 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12396 ; version requirements (eg python-coveralls)
12397 (home-page "https://github.com/schematics/schematics")
12398 (synopsis "Python Data Structures for Humans")
12399 (description "Python Data Structures for Humans.")
12400 (license license:bsd-3)))
12401
12402 (define-public python2-schematics
12403 (package-with-python2 python-schematics))
12404
12405 (define-public python-publicsuffix
12406 (package
12407 (name "python-publicsuffix")
12408 (version "1.1.0")
12409 (source (origin
12410 (method url-fetch)
12411 (uri (pypi-uri "publicsuffix" version))
12412 (sha256
12413 (base32
12414 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12415 (build-system python-build-system)
12416 (arguments
12417 `(#:tests? #f)) ; tests use the internet
12418 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12419 (synopsis "Get suffix for a domain name")
12420 (description "Get a public suffix for a domain name using the Public Suffix
12421 List.")
12422 (license license:expat)))
12423
12424 (define-public python2-publicsuffix
12425 (package-with-python2 python-publicsuffix))
12426
12427 (define-public python-publicsuffix2
12428 (package
12429 (name "python-publicsuffix2")
12430 (version "2.20160818")
12431 (source
12432 (origin
12433 (method url-fetch)
12434 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12435 (sha256
12436 (base32
12437 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12438 (build-system python-build-system)
12439 (arguments
12440 '(#:tests? #f)) ; The test suite requires network access.
12441 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12442 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12443 (description "Get a public suffix for a domain name using the Public Suffix
12444 List. Forked from and using the same API as the publicsuffix package.")
12445 (license (list license:expat license:mpl2.0))))
12446
12447 (define-public python2-publicsuffix2
12448 (package-with-python2 python-publicsuffix2))
12449
12450 (define-public python-url
12451 (package
12452 (name "python-url")
12453 (version "0.2.0")
12454 (source (origin
12455 (method url-fetch)
12456 (uri (pypi-uri "url" version))
12457 (sha256
12458 (base32
12459 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12460 (build-system python-build-system)
12461 (propagated-inputs
12462 `(("python-publicsuffix" ,python-publicsuffix)))
12463 (native-inputs
12464 `(("python-coverage" ,python-coverage)
12465 ("python-nose" ,python-nose)))
12466 (arguments
12467 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12468 (home-page "https://github.com/seomoz/url-py")
12469 (synopsis "URL Parsing")
12470 (description "Library for parsing urls.")
12471 (license license:expat)
12472 (properties `((python2-variant . ,(delay python2-url))))))
12473
12474 (define-public python2-url
12475 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12476 (package (inherit base)
12477 (propagated-inputs
12478 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12479
12480 (define-public python-freezegun
12481 (package
12482 (name "python-freezegun")
12483 (version "0.3.8")
12484 (source
12485 (origin
12486 (method url-fetch)
12487 (uri (pypi-uri "freezegun" version))
12488 (sha256
12489 (base32
12490 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12491 (build-system python-build-system)
12492 (native-inputs
12493 `(("python-mock" ,python-mock)
12494 ("python-nose" ,python-nose)
12495 ("python-coverage" ,python-coverage)))
12496 (propagated-inputs
12497 `(("python-six" ,python-six)
12498 ("python-dateutil" ,python-dateutil)))
12499 (arguments
12500 `(#:phases (modify-phases %standard-phases
12501 ;; The tests are normally executed via `make test`, but the PyPi
12502 ;; package does not include the Makefile.
12503 (replace 'check
12504 (lambda _
12505 (zero? (system* "nosetests" "./tests/")))))))
12506 (home-page "https://github.com/spulec/freezegun")
12507 (synopsis "Test utility for mocking the datetime module")
12508 (description
12509 "FreezeGun is a library that allows your python tests to travel through
12510 time by mocking the datetime module.")
12511 (license license:asl2.0)))
12512
12513 (define-public python2-freezegun
12514 (package-with-python2 python-freezegun))
12515
12516
12517 (define-public python-odfpy
12518 (package
12519 (name "python-odfpy")
12520 (version "1.3.3")
12521 (source (origin
12522 (method url-fetch)
12523 (uri (pypi-uri "odfpy" version))
12524 (sha256
12525 (base32
12526 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12527 (arguments
12528 `(#:modules ((srfi srfi-1)
12529 (guix build python-build-system)
12530 (guix build utils))
12531 #:phases
12532 (modify-phases %standard-phases
12533 (replace 'check
12534 ;; The test runner invokes python2 and python3 for test*.py.
12535 ;; To avoid having both in inputs, we replicate it here.
12536 (lambda _
12537 (every (lambda (test-file)
12538 (zero? (system* "python" test-file)))
12539 (find-files "tests" "^test.*\\.py$")))))))
12540 (build-system python-build-system)
12541 (home-page "https://github.com/eea/odfpy")
12542 (synopsis "Python API and tools to manipulate OpenDocument files")
12543 (description "Collection of libraries and utility programs written in
12544 Python to manipulate OpenDocument 1.2 files.")
12545 (license
12546 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12547 ;; number of files with other licenses.
12548 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12549
12550 (define-public python2-odfpy
12551 (package-with-python2 python-odfpy))
12552
12553 (define-public python-cachecontrol
12554 (package
12555 (name "python-cachecontrol")
12556 (version "0.11.6")
12557 (source
12558 (origin
12559 (method url-fetch)
12560 ;; Pypi does not have tests.
12561 (uri (string-append
12562 "https://github.com/ionrock/cachecontrol/archive/v"
12563 version ".tar.gz"))
12564 (file-name (string-append name "-" version ".tar.gz"))
12565 (sha256
12566 (base32
12567 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12568 (build-system python-build-system)
12569 (arguments
12570 `(#:phases
12571 (modify-phases %standard-phases
12572 (replace 'check
12573 (lambda _
12574 ;; Drop test that requires internet access.
12575 (delete-file "tests/test_regressions.py")
12576 (setenv "PYTHONPATH"
12577 (string-append (getcwd) "/build/lib:"
12578 (getenv "PYTHONPATH")))
12579 (zero? (system* "py.test" "-vv")))))))
12580 (native-inputs
12581 `(("python-pytest" ,python-pytest)
12582 ("python-redis" ,python-redis)
12583 ("python-webtest" ,python-webtest)
12584 ("python-mock" ,python-mock)))
12585 (propagated-inputs
12586 `(("python-requests" ,python-requests)
12587 ("python-lockfile" ,python-lockfile)))
12588 (home-page "https://github.com/ionrock/cachecontrol")
12589 (synopsis "The httplib2 caching algorithms for use with requests")
12590 (description "CacheControl is a port of the caching algorithms in
12591 @code{httplib2} for use with @code{requests} session objects.")
12592 (license license:asl2.0)))
12593
12594 (define-public python2-cachecontrol
12595 (package-with-python2 python-cachecontrol))
12596
12597 (define-public python-lit
12598 (package
12599 (name "python-lit")
12600 (version "0.5.0")
12601 (source
12602 (origin
12603 (method url-fetch)
12604 (uri (pypi-uri "lit" version))
12605 (sha256
12606 (base32
12607 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12608 (build-system python-build-system)
12609 (home-page "http://llvm.org/")
12610 (synopsis "LLVM Software Testing Tool")
12611 (description "@code{lit} is a portable tool for executing LLVM and Clang
12612 style test suites, summarizing their results, and providing indication of
12613 failures.")
12614 (license license:ncsa)))
12615
12616 (define-public python2-lit
12617 (package-with-python2 python-lit))
12618
12619 (define-public python-pytest-pep8
12620 (package
12621 (name "python-pytest-pep8")
12622 (version "1.0.6")
12623 (source (origin
12624 (method url-fetch)
12625 (uri (pypi-uri "pytest-pep8" version))
12626 (sha256
12627 (base32
12628 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12629 (build-system python-build-system)
12630 (arguments
12631 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12632 (native-inputs
12633 `(("python-pytest" ,python-pytest)))
12634 (propagated-inputs
12635 `(("python-pep8" ,python-pep8)))
12636 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12637 (synopsis "Py.test plugin to check PEP8 requirements")
12638 (description "Pytest plugin for checking PEP8 compliance.")
12639 (license license:expat)))
12640
12641 (define-public python2-pytest-pep8
12642 (package-with-python2 python-pytest-pep8))
12643
12644 (define-public python-pytest-flakes
12645 (package
12646 (name "python-pytest-flakes")
12647 (version "1.0.1")
12648 (source (origin
12649 (method url-fetch)
12650 (uri (pypi-uri "pytest-flakes" version))
12651 (sha256
12652 (base32
12653 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12654 (build-system python-build-system)
12655 (arguments
12656 `(#:phases
12657 (modify-phases %standard-phases
12658 (delete 'check)
12659 (add-after 'install 'check
12660 (lambda* (#:key outputs inputs #:allow-other-keys)
12661 ;; It's easier to run tests after install.
12662 ;; Make installed package available for running the tests
12663 (add-installed-pythonpath inputs outputs)
12664 (zero? (system* "py.test" "-vv")))))))
12665 (native-inputs
12666 `(("python-coverage" ,python-coverage)
12667 ("python-pytest" ,python-pytest)
12668 ("python-pytest-cache" ,python-pytest-cache)
12669 ("python-pytest-pep8" ,python-pytest-pep8)))
12670 (propagated-inputs
12671 `(("python-pyflakes" ,python-pyflakes)))
12672 (home-page "https://github.com/fschulze/pytest-flakes")
12673 (synopsis "Py.test plugin to check source code with pyflakes")
12674 (description "Pytest plugin for checking Python source code with pyflakes.")
12675 (license license:expat)))
12676
12677 (define-public python2-pytest-flakes
12678 (package-with-python2 python-pytest-flakes))
12679
12680 (define-public python-natsort
12681 (package
12682 (name "python-natsort")
12683 (version "5.0.2")
12684 (source (origin
12685 (method url-fetch)
12686 (uri (pypi-uri "natsort" version))
12687 (sha256
12688 (base32
12689 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12690 (build-system python-build-system)
12691 (arguments
12692 `(#:phases
12693 (modify-phases %standard-phases
12694 (add-before 'check 'set-cachedir
12695 ;; Tests require write access to $HOME by default
12696 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12697 (native-inputs
12698 `(("python-hypothesis" ,python-hypothesis)
12699 ("python-pytest-cache" ,python-pytest-cache)
12700 ("python-pytest-cov" ,python-pytest-cov)
12701 ("python-pytest-flakes" ,python-pytest-flakes)
12702 ("python-pytest-pep8" ,python-pytest-pep8)))
12703 (propagated-inputs ; TODO: Add python-fastnumbers.
12704 `(("python-pyicu" ,python-pyicu)))
12705 (home-page "https://github.com/SethMMorton/natsort")
12706 (synopsis "Natural sorting for python and shell")
12707 (description
12708 "Natsort lets you apply natural sorting on lists instead of
12709 lexicographical. If you use the built-in @code{sorted} method in python
12710 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12711 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12712 function @code{natsorted} that identifies numbers and sorts them separately
12713 from strings. It can also sort version numbers, real numbers, mixed types
12714 and more, and comes with a shell command @command{natsort} that exposes this
12715 functionality in the command line.")
12716 (license license:expat)
12717 (properties `((python2-variant . ,(delay python2-natsort))))))
12718
12719 (define-public python2-natsort
12720 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12721 (package (inherit base)
12722 (native-inputs
12723 `(("python2-pathlib" ,python2-pathlib)
12724 ("python2-mock" ,python2-mock)
12725 ("python2-enum34" ,python2-enum34)
12726 ,@(package-native-inputs base))))))
12727
12728 (define-public python-glances
12729 (package
12730 (name "python-glances")
12731 (version "2.7.1")
12732 (source
12733 (origin
12734 (method url-fetch)
12735 (uri (pypi-uri "Glances" version))
12736 (sha256
12737 (base32
12738 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12739 (build-system python-build-system)
12740 (propagated-inputs
12741 `(("python-psutil" ,python-psutil)))
12742 (home-page
12743 "https://github.com/nicolargo/glances")
12744 (synopsis
12745 "A cross-platform curses-based monitoring tool")
12746 (description
12747 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12748 Glances uses the PsUtil library to get information from your system. It monitors
12749 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12750 (license license:lgpl3+)))
12751
12752 (define-public python2-glances
12753 (package-with-python2 python-glances))
12754
12755 (define-public python-graphql-core
12756 (package
12757 (name "python-graphql-core")
12758 (version "0.5.3")
12759 (source
12760 (origin
12761 (method url-fetch)
12762 (uri (pypi-uri "graphql-core" version))
12763 (sha256
12764 (base32
12765 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12766 (build-system python-build-system)
12767 (arguments
12768 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12769 #:phases
12770 (modify-phases %standard-phases
12771 (add-after 'unpack 'patch-hardcoded-version
12772 (lambda _ (substitute*
12773 "setup.py"
12774 (("'gevent==1.1rc1'") "'gevent'"))
12775 #t)))))
12776 (native-inputs
12777 `(("python-gevent" ,python-gevent)
12778 ("python-mock" ,python-mock)
12779 ("python-pytest-mock" ,python-pytest-mock)))
12780 (propagated-inputs
12781 `(("python-promise" ,python-promise)
12782 ("python-six" ,python-six)))
12783 (home-page "https://github.com/graphql-python/graphql-core")
12784 (synopsis "GraphQL implementation for Python")
12785 (description
12786 "GraphQL implementation for Python. GraphQL is a data query language and
12787 runtime designed and used to request and deliver data to mobile and web apps.
12788 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12789 to Python.")
12790 (license license:expat)))
12791
12792 (define-public python2-graphql-core
12793 (package-with-python2 python-graphql-core))
12794
12795 (define-public python-graphql-relay
12796 (package
12797 (name "python-graphql-relay")
12798 (version "0.4.5")
12799 (source
12800 (origin
12801 (method url-fetch)
12802 (uri (pypi-uri "graphql-relay" version))
12803 (sha256
12804 (base32
12805 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12806 (build-system python-build-system)
12807 (native-inputs
12808 `(("python-pytest" ,python-pytest)))
12809 (propagated-inputs
12810 `(("python-graphql-core" ,python-graphql-core)
12811 ("python-promise" ,python-promise)
12812 ("python-six" ,python-six)))
12813 (home-page "https://github.com/graphql-python/graphql-relay-py")
12814 (synopsis "Relay implementation for Python")
12815 (description
12816 "This is a library to allow the easy creation of Relay-compliant servers
12817 using the GraphQL Python reference implementation of a GraphQL server. It
12818 should be noted that the code is a exact port of the original
12819 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12820 from Facebook.")
12821 (license license:expat)))
12822
12823 (define-public python2-graphql-relay
12824 (package-with-python2 python-graphql-relay))
12825
12826 (define-public python-graphene
12827 (package
12828 (name "python-graphene")
12829 (version "0.10.2")
12830 (source
12831 (origin
12832 (method url-fetch)
12833 (uri (pypi-uri "graphene" version))
12834 (sha256
12835 (base32
12836 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12837 (build-system python-build-system)
12838 (native-inputs
12839 `(("python-django-filter" ,python-django-filter)
12840 ("python-mock" ,python-mock)
12841 ("python-psycopg2" ,python-psycopg2)
12842 ("python-pytest-django" ,python-pytest-django)
12843 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12844 (propagated-inputs
12845 `(("python-graphql-core" ,python-graphql-core)
12846 ("python-graphql-relay" ,python-graphql-relay)
12847 ("python-iso8601" ,python-iso8601)
12848 ("python-promise" ,python-promise)
12849 ("python-six" ,python-six)))
12850 (home-page "http://graphene-python.org/")
12851 (synopsis "GraphQL Framework for Python")
12852 (description
12853 "Graphene is a Python library for building GraphQL schemas/types.
12854 A GraphQL schema describes your data model, and provides a GraphQL server
12855 with an associated set of resolve methods that know how to fetch data.")
12856 (properties `((python2-variant . ,(delay python2-graphene))))
12857 (license license:expat)))
12858
12859 (define-public python2-graphene
12860 (let ((base (package-with-python2
12861 (strip-python2-variant python-graphene))))
12862 (package (inherit base)
12863 (native-inputs
12864 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12865 ,@(package-native-inputs base))))))
12866
12867 (define-public python-nautilus
12868 (package
12869 (name "python-nautilus")
12870 (version "0.4.9")
12871 (source
12872 (origin
12873 (method url-fetch)
12874 (uri (pypi-uri "nautilus" version))
12875 (sha256
12876 (base32
12877 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12878 (build-system python-build-system)
12879 (arguments `(#:tests? #f)) ; fails to import test modules
12880 (propagated-inputs
12881 `(("python-bcrypt" ,python-bcrypt)
12882 ("python-click" ,python-click)
12883 ("python-consul" ,python-consul)
12884 ("python-graphene" ,python-graphene)
12885 ("python-jinja2" ,python-jinja2)
12886 ("python-peewee" ,python-peewee)
12887 ("python-pika" ,python-pika)
12888 ("python-tornado" ,python-tornado)
12889 ("python-wtforms" ,python-wtforms)))
12890 (native-inputs
12891 `(("python-nose2" ,python-nose2)))
12892 (home-page "https://github.com/AlecAivazis/nautilus")
12893 (synopsis "Library for creating microservice applications")
12894 (description
12895 "Nautilus is a framework for flux based microservices that looks to
12896 provide extendible implementations of common aspects of a cloud so that you can
12897 focus on building massively scalable web applications.")
12898 (license license:expat)))
12899
12900 (define-public python-snowballstemmer
12901 (package
12902 (name "python-snowballstemmer")
12903 (version "1.2.1")
12904 (source (origin
12905 (method url-fetch)
12906 (uri (pypi-uri "snowballstemmer" version))
12907 (sha256
12908 (base32
12909 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12910 (build-system python-build-system)
12911 (arguments
12912 `(;; No tests exist
12913 #:tests? #f))
12914 (home-page "https://github.com/shibukawa/snowball_py")
12915 (synopsis "Snowball stemming library collection for Python")
12916 (description "This package provides 16 word stemmer algorithms generated
12917 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12918 English stemmer.")
12919 (license license:bsd-3)))
12920
12921 (define-public python2-snowballstemmer
12922 (package-with-python2 python-snowballstemmer))
12923
12924 (define-public python-sphinx-cloud-sptheme
12925 (package
12926 (name "python-sphinx-cloud-sptheme")
12927 (version "1.8.0")
12928 (source (origin
12929 (method url-fetch)
12930 (uri (pypi-uri "cloud_sptheme" version))
12931 (sha256
12932 (base32
12933 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12934 (build-system python-build-system)
12935 ;; FIXME: The 'pypi' release archive does not contain tests.
12936 (arguments '(#:tests? #f))
12937 (native-inputs
12938 `(("python-sphinx" ,python-sphinx)))
12939 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12940 (synopsis "'Cloud' theme for Sphinx documenter")
12941 (description "This package contains the \"Cloud\" theme for Sphinx and some
12942 related extensions.")
12943 (license license:bsd-3)))
12944
12945 (define-public python2-sphinx-cloud-sptheme
12946 (package-with-python2 python-sphinx-cloud-sptheme))
12947
12948 (define-public python-sphinx-alabaster-theme
12949 (package
12950 (name "python-sphinx-alabaster-theme")
12951 (version "0.7.9")
12952 (source (origin
12953 (method url-fetch)
12954 (uri (pypi-uri "alabaster" version))
12955 (sha256
12956 (base32
12957 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12958 (build-system python-build-system)
12959 (propagated-inputs
12960 `(("python-pygments" ,python-pygments)))
12961 (home-page "https://alabaster.readthedocs.io/")
12962 (synopsis "Configurable sidebar-enabled Sphinx theme")
12963 (description "Alabaster is a visually (c)lean, responsive, configurable
12964 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12965 (license license:bsd-3)))
12966
12967 (define-public python2-sphinx-alabaster-theme
12968 (package-with-python2 python-sphinx-alabaster-theme))
12969
12970 (define-public python-betamax
12971 (package
12972 (name "python-betamax")
12973 (version "0.8.0")
12974 (source
12975 (origin
12976 (method url-fetch)
12977 (uri (pypi-uri "betamax" version))
12978 (sha256
12979 (base32
12980 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12981 (build-system python-build-system)
12982 (arguments
12983 '(;; Many tests fail because they require networking.
12984 #:tests? #f))
12985 (propagated-inputs
12986 `(("python-requests" ,python-requests)))
12987 (home-page "https://github.com/sigmavirus24/betamax")
12988 (synopsis "Record HTTP interactions with python-requests")
12989 (description "Betamax will record your test suite's HTTP interactions and
12990 replay them during future tests. It is designed to work with python-requests.")
12991 (license license:expat)))
12992
12993 (define-public python2-betamax
12994 (package-with-python2 python-betamax))
12995
12996 (define-public python-s3transfer
12997 (package
12998 (name "python-s3transfer")
12999 (version "0.1.10")
13000 (source (origin
13001 (method url-fetch)
13002 (uri (pypi-uri "s3transfer" version))
13003 (sha256
13004 (base32
13005 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
13006 (build-system python-build-system)
13007 (arguments
13008 `(#:phases
13009 (modify-phases %standard-phases
13010 (replace 'check
13011 (lambda _
13012 ;; 7 of the 'integration' tests require network access or login
13013 ;; credentials.
13014 (zero? (system* "nosetests" "--exclude=integration")))))))
13015 (native-inputs
13016 `(("python-docutils" ,python-docutils)
13017 ("python-mock" ,python-mock)
13018 ("python-nose" ,python-nose)))
13019 (propagated-inputs
13020 `(("python-botocore" ,python-botocore)))
13021 (synopsis "Amazon S3 Transfer Manager")
13022 (description "S3transfer is a Python library for managing Amazon S3
13023 transfers.")
13024 (home-page "https://github.com/boto/s3transfer")
13025 (license license:asl2.0)
13026 (properties `((python2-variant . ,(delay python2-s3transfer))))))
13027
13028 (define-public python2-s3transfer
13029 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
13030 (package
13031 (inherit base)
13032 (native-inputs
13033 `(("python2-futures" ,python2-futures)
13034 ,@(package-native-inputs base))))))
13035
13036 (define-public python-setproctitle
13037 (package
13038 (name "python-setproctitle")
13039 (version "1.1.10")
13040 (source
13041 (origin
13042 (method url-fetch)
13043 (uri (pypi-uri "setproctitle" version))
13044 (sha256
13045 (base32
13046 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13047 (build-system python-build-system)
13048 (arguments
13049 '(#:phases
13050 (modify-phases %standard-phases
13051 (add-before 'check 'patch-Makefile
13052 ;; Stricly this is only required for the python2 variant.
13053 ;; But adding a phase in an inherited package seems to be
13054 ;; cumbersum. So we patch even for python3.
13055 (lambda _
13056 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13057 (when nose
13058 (substitute* "Makefile"
13059 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13060 (string-append nose "/bin/nosetests "))))
13061 #t)))
13062 (replace 'check
13063 (lambda _
13064 (setenv "PYTHON" (or (which "python3") (which "python")))
13065 (setenv "PYCONFIG" (or (which "python3-config")
13066 (which "python-config")))
13067 (setenv "CC" "gcc")
13068 ;; No need to extend PYTHONPATH to find the built package, since
13069 ;; the Makefile will build anyway
13070 (zero? (system* "make" "check")))))))
13071 (native-inputs
13072 `(("procps" ,procps))) ; required for tests
13073 (home-page
13074 "https://github.com/dvarrazzo/py-setproctitle")
13075 (synopsis
13076 "Setproctitle implementation for Python to customize the process title")
13077 (description "The library allows a process to change its title (as displayed
13078 by system tools such as ps and top).
13079
13080 Changing the title is mostly useful in multi-process systems, for
13081 example when a master process is forked: changing the children's title
13082 allows to identify the task each process is busy with. The technique
13083 is used by PostgreSQL and the OpenSSH Server for example.")
13084 (license license:bsd-3)
13085 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13086
13087 (define-public python2-setproctitle
13088 (let ((base (package-with-python2
13089 (strip-python2-variant python-setproctitle))))
13090 (package
13091 (inherit base)
13092 (native-inputs `(("python2-nose" ,python2-nose)
13093 ,@(package-native-inputs base))))))
13094
13095 (define-public python-validictory
13096 (package
13097 (name "python-validictory")
13098 (version "1.0.1")
13099 (source
13100 (origin
13101 (method url-fetch)
13102 (uri (pypi-uri "validictory" version))
13103 (sha256
13104 (base32
13105 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13106 (build-system python-build-system)
13107 (arguments
13108 '(#:phases
13109 (modify-phases %standard-phases
13110 (add-after 'unpack 'bootstrap
13111 ;; Move the tests out of the package directory to avoid
13112 ;; packaging them.
13113 (lambda* _
13114 (rename-file "validictory/tests" "tests")
13115 (delete-file "tests/__init__.py")))
13116 (replace 'check
13117 (lambda _
13118 ;; Extend PYTHONPATH so the built package will be found.
13119 (setenv "PYTHONPATH"
13120 (string-append (getcwd) "/build/lib:"
13121 (getenv "PYTHONPATH")))
13122 (zero? (system* "py.test" "-vv" )))))))
13123 (native-inputs
13124 `(("python-pytest" ,python-pytest)))
13125 (home-page
13126 "https://github.com/jamesturk/validictory")
13127 (synopsis "General purpose Python data validator")
13128 (description "It allows validation of arbitrary Python data structures.
13129
13130 The schema format is based on the JSON Schema
13131 proposal (http://json-schema.org), so combined with json the library is also
13132 useful as a validator for JSON data.")
13133 (license license:expat)))
13134
13135 (define-public python2-validictory
13136 (package-with-python2 python-validictory))
13137
13138 (define-public python-aniso8601
13139 (package
13140 (name "python-aniso8601")
13141 (version "1.1.0")
13142 (source
13143 (origin
13144 (method url-fetch)
13145 (uri (pypi-uri "aniso8601" version))
13146 (sha256
13147 (base32
13148 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
13149 (build-system python-build-system)
13150 (propagated-inputs
13151 `(("python-dateutil" ,python-dateutil)))
13152 (home-page
13153 "https://bitbucket.org/nielsenb/aniso8601")
13154 (synopsis
13155 "Python library for parsing ISO 8601 strings")
13156 (description
13157 "This package contains a library for parsing ISO 8601 datetime strings.")
13158 (license license:bsd-3)))
13159
13160 (define-public python-flask-restful
13161 (package
13162 (name "python-flask-restful")
13163 (version "0.3.5")
13164 (source
13165 (origin
13166 (method url-fetch)
13167 (uri (pypi-uri "Flask-RESTful" version))
13168 (sha256
13169 (base32
13170 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13171 (build-system python-build-system)
13172 (propagated-inputs
13173 `(("python-aniso8601" ,python-aniso8601)
13174 ("python-flask" ,python-flask)
13175 ("python-pycrypto" ,python-pycrypto)
13176 ("python-pytz" ,python-pytz)))
13177 (native-inputs
13178 `(;; Optional dependency of Flask. Tests need it.
13179 ("python-blinker" ,python-blinker)
13180 ("python-mock" ,python-mock) ; For tests
13181 ("python-nose" ,python-nose) ; For tests
13182 ("python-sphinx" ,python-sphinx)))
13183 (home-page
13184 "https://www.github.com/flask-restful/flask-restful/")
13185 (synopsis
13186 "Flask module for creating REST APIs")
13187 (description
13188 "This package contains a Flask module for creating REST APIs.")
13189 (license license:bsd-3)))
13190
13191 (define-public python-flask-basicauth
13192 (package
13193 (name "python-flask-basicauth")
13194 (version "0.2.0")
13195 (source
13196 (origin
13197 (method url-fetch)
13198 (uri (pypi-uri "Flask-BasicAuth" version))
13199 (sha256
13200 (base32
13201 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13202 (build-system python-build-system)
13203 (propagated-inputs
13204 `(("python-flask" ,python-flask)))
13205 (home-page
13206 "https://github.com/jpvanhal/flask-basicauth")
13207 (synopsis
13208 "HTTP basic access authentication for Flask")
13209 (description
13210 "This package provides HTTP basic access authentication for Flask.")
13211 (license license:bsd-3)))
13212
13213 (define-public python-flask-sqlalchemy
13214 (package
13215 (name "python-flask-sqlalchemy")
13216 (version "2.1")
13217 (source
13218 (origin
13219 (method url-fetch)
13220 (uri (pypi-uri "Flask-SQLAlchemy" version))
13221 (sha256
13222 (base32
13223 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13224 (build-system python-build-system)
13225 (propagated-inputs
13226 `(("python-flask" ,python-flask)
13227 ("python-sqlalchemy" ,python-sqlalchemy)))
13228 (home-page
13229 "https://github.com/mitsuhiko/flask-sqlalchemy")
13230 (synopsis
13231 "Module adding SQLAlchemy support to your Flask application")
13232 (description
13233 "This package adds SQLAlchemy support to your Flask application.")
13234 (license license:bsd-3)))
13235
13236 (define-public python-pyev
13237 (package
13238 (name "python-pyev")
13239 (version "0.9.0")
13240 (source
13241 (origin
13242 (method url-fetch)
13243 (uri (pypi-uri "pyev" version))
13244 (sha256
13245 (base32
13246 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13247 (build-system python-build-system)
13248 (arguments
13249 `(#:tests? #f ; no test suite
13250 #:phases
13251 (modify-phases %standard-phases
13252 (add-after 'unpack 'patch
13253 (lambda* (#:key inputs #:allow-other-keys)
13254 (let ((libev (string-append (assoc-ref inputs "libev")
13255 "/lib/libev.so.4")))
13256 (substitute* "setup.py"
13257 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13258 (string-append "libev_dll_name = \"" libev "\"")))))))))
13259 (inputs
13260 `(("libev" ,libev)))
13261 (home-page "http://pythonhosted.org/pyev/")
13262 (synopsis "Python libev interface")
13263 (description "Pyev provides a Python interface to libev.")
13264 (license license:gpl3)))
13265
13266 (define-public python2-pyev
13267 (package-with-python2 python-pyev))
13268
13269 (define-public python-imagesize
13270 (package
13271 (name "python-imagesize")
13272 (version "0.7.1")
13273 (source
13274 (origin
13275 (method url-fetch)
13276 (uri (pypi-uri "imagesize" version))
13277 (sha256
13278 (base32
13279 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13280 (build-system python-build-system)
13281 (arguments
13282 '(;; Test files are not distributed on PyPi:
13283 ;; https://github.com/shibukawa/imagesize_py/issues/7
13284 #:tests? #f))
13285 (home-page "https://github.com/shibukawa/imagesize_py")
13286 (synopsis "Gets image size of files in variaous formats in Python")
13287 (description
13288 "This package allows determination of image size from
13289 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13290 (license license:expat)))
13291
13292 (define-public python2-imagesize
13293 (package-with-python2 python-imagesize))
13294
13295 (define-public python-axolotl-curve25519
13296 (package
13297 (name "python-axolotl-curve25519")
13298 (version "0.1")
13299 (source
13300 (origin
13301 (method git-fetch)
13302 (uri (git-reference
13303 (url "git://github.com/tgalal/python-axolotl-curve25519")
13304 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13305 (file-name (string-append name "-" version "-checkout"))
13306 (sha256
13307 (base32
13308 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13309 (build-system python-build-system)
13310 (arguments
13311 `(;; Prevent creation of the egg. This works around
13312 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13313 #:configure-flags '("--root=/")))
13314 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13315 (synopsis "Python wrapper for curve25519 library")
13316 (description "This is a python wrapper for the curve25519 library
13317 with ed25519 signatures. The C code was pulled from
13318 libaxolotl-android. At the moment this wrapper is meant for use by
13319 python-axolotl.")
13320 (license (list license:gpl3 ; Most files
13321 license:bsd-3)))) ; curve/curve25519-donna.c
13322
13323 (define-public python2-axolotl-curve25519
13324 (package-with-python2 python-axolotl-curve25519))
13325
13326 (define-public python-axolotl
13327 (package
13328 (name "python-axolotl")
13329 (version "0.1.35")
13330 (source
13331 (origin
13332 (method url-fetch)
13333 (uri (string-append
13334 "https://github.com/tgalal/python-axolotl/archive/"
13335 version ".tar.gz"))
13336 (file-name (string-append name "-" version ".tar.gz"))
13337 (sha256
13338 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13339 (build-system python-build-system)
13340 (arguments
13341 `(#:phases
13342 (modify-phases %standard-phases
13343 ;; Don't install tests
13344 (add-before 'install 'remove-tests
13345 (lambda _
13346 (for-each delete-file-recursively
13347 '("axolotl/tests" "build/lib/axolotl/tests"))
13348 #t)))))
13349 (propagated-inputs
13350 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13351 ("python-dateutil" ,python-dateutil)
13352 ("python-protobuf" ,python-protobuf)
13353 ("python-pycrypto" ,python-pycrypto)))
13354 (home-page "https://github.com/tgalal/python-axolotl")
13355 (synopsis "Python port of libaxolotl-android")
13356 (description "This is a python port of libaxolotl-android. This
13357 is a ratcheting forward secrecy protocol that works in synchronous and
13358 asynchronous messaging environments.")
13359 (license license:gpl3)))
13360
13361 (define-public python2-axolotl
13362 (package-with-python2 python-axolotl))
13363
13364 (define-public python-termstyle
13365 (package
13366 (name "python-termstyle")
13367 (version "0.1.11")
13368 (source
13369 (origin
13370 (method url-fetch)
13371 (uri (pypi-uri "termstyle" version))
13372 (sha256
13373 (base32
13374 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13375 (build-system python-build-system)
13376 (arguments
13377 '(#:phases
13378 (modify-phases %standard-phases
13379 (replace 'check
13380 (lambda _
13381 (zero? (system* "python" "test3.py")))))))
13382 (home-page "https://github.com/gfxmonk/termstyle")
13383 (synopsis "Console text coloring for Python")
13384 (description "This package provides console text coloring for Python.")
13385 (license license:bsd-3)))
13386
13387 (define-public python-rednose
13388 (package
13389 (name "python-rednose")
13390 (version "1.2.1")
13391 (source
13392 (origin
13393 (method url-fetch)
13394 (uri (pypi-uri "rednose" version))
13395 (sha256
13396 (base32
13397 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13398 (build-system python-build-system)
13399 (arguments
13400 `(#:phases
13401 (modify-phases %standard-phases
13402 (add-after 'unpack 'fix-deps
13403 (lambda _
13404 ;; See <https://github.com/JBKahn/rednose/issues/12>
13405 (substitute* "setup.py"
13406 (("python-termstyle") "termstyle"))
13407 #t)))))
13408 (propagated-inputs
13409 `(("python-colorama" ,python-colorama)
13410 ("python-termstyle" ,python-termstyle)))
13411 (native-inputs
13412 `(("python-six" ,python-six)
13413 ("python-nose" ,python-nose)))
13414 (home-page "https://github.com/JBKahn/rednose")
13415 (synopsis "Colored output for Python nosetests")
13416 (description "This package provides colored output for the
13417 @command{nosetests} command of the Python Nose unit test framework.")
13418 (license license:bsd-3)))
13419
13420 (define-public python2-rednose
13421 (package-with-python2 python-rednose))
13422
13423 (define-public python-flask-restplus
13424 (package
13425 (name "python-flask-restplus")
13426 (version "0.9.2")
13427 (source
13428 (origin
13429 (method url-fetch)
13430 (uri (pypi-uri "flask-restplus" version))
13431 (sha256
13432 (base32
13433 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13434 (build-system python-build-system)
13435 (arguments
13436 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13437 ;; #:phases
13438 ;; (modify-phases %standard-phases
13439 ;; (replace 'check
13440 ;; (lambda _
13441 ;; (zero? (system* "nosetests")))))))
13442 (propagated-inputs
13443 `(("python-aniso8601" ,python-aniso8601)
13444 ("python-flask" ,python-flask)
13445 ("python-jsonschema" ,python-jsonschema)
13446 ("python-pytz" ,python-pytz)
13447 ("python-six" ,python-six)))
13448 (native-inputs
13449 `(("python-tzlocal" ,python-tzlocal)
13450 ("python-blinker" ,python-blinker)
13451 ("python-nose" ,python-nose)
13452 ("python-rednose" ,python-rednose)))
13453 (home-page "https://github.com/noirbizarre/flask-restplus")
13454 (synopsis "Framework for documented API development with Flask")
13455 (description "This package provides a framework for API development with
13456 the Flask web framework in Python. It is similar to package
13457 @code{python-flask-restful} but supports the @code{python-swagger}
13458 documentation builder.")
13459 (license license:expat)))
13460
13461 (define-public python-sadisplay
13462 (package
13463 (name "python-sadisplay")
13464 (version "0.4.6")
13465 (source
13466 (origin
13467 (method url-fetch)
13468 (uri (pypi-uri "sadisplay" version))
13469 (sha256
13470 (base32
13471 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13472 (build-system python-build-system)
13473 (propagated-inputs
13474 `(("python-sqlalchemy" ,python-sqlalchemy)))
13475 (native-inputs
13476 `(("python-nose" ,python-nose)))
13477 (home-page "https://bitbucket.org/estin/sadisplay")
13478 (synopsis "SQLAlchemy schema displayer")
13479 (description "This package provides a program to build Entity
13480 Relationship diagrams from a SQLAlchemy model (or directly from the
13481 database).")
13482 (license license:bsd-3)))
13483
13484 (define-public python2-sadisplay
13485 (package-with-python2 python-sadisplay))
13486
13487 (define-public python-flask-restful-swagger
13488 (package
13489 (name "python-flask-restful-swagger")
13490 (version "0.19")
13491 (source
13492 (origin
13493 (method url-fetch)
13494 (uri (pypi-uri "flask-restful-swagger" version))
13495 (sha256
13496 (base32
13497 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13498 (build-system python-build-system)
13499 (propagated-inputs
13500 `(("python-flask-restful" ,python-flask-restful)))
13501 (home-page "https://github.com/rantav/flask-restful-swagger")
13502 (synopsis "Extract Swagger specs from Flask-Restful projects")
13503 (description "This package lets you extract Swagger API documentation
13504 specs from your Flask-Restful projects.")
13505 (license license:expat)))
13506
13507 (define-public python2-flask-restful-swagger
13508 (package-with-python2 python-flask-restful-swagger))
13509
13510 (define-public python-argcomplete
13511 (package
13512 (name "python-argcomplete")
13513 (version "1.7.0")
13514 (source
13515 (origin
13516 (method url-fetch)
13517 (uri (pypi-uri "argcomplete" version))
13518 (sha256
13519 (base32
13520 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13521 (build-system python-build-system)
13522 (native-inputs
13523 `(("python-pexpect" ,python-pexpect)
13524 ("tcsh" ,tcsh)))
13525 (home-page "https://github.com/kislyuk/argcomplete")
13526 (synopsis "Shell tab completion for Python argparse")
13527 (description "argcomplete provides extensible command line tab completion
13528 of arguments and options for Python scripts using @code{argparse}. It's
13529 particularly useful for programs with many options or sub-parsers that can
13530 dynamically suggest completions; for example, when browsing resources over the
13531 network.")
13532 (license license:asl2.0)))
13533
13534 (define-public python2-argcomplete
13535 (package-with-python2 python-argcomplete))
13536
13537 (define-public python-xopen
13538 (package
13539 (name "python-xopen")
13540 (version "0.1.1")
13541 (source
13542 (origin
13543 (method url-fetch)
13544 (uri (pypi-uri "xopen" version))
13545 (sha256
13546 (base32
13547 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13548 (file-name (string-append name "-" version ".tar.gz"))))
13549 (build-system python-build-system)
13550 (home-page "https://github.com/marcelm/xopen/")
13551 (synopsis "Open compressed files transparently")
13552 (description "This module provides an @code{xopen} function that works like
13553 Python's built-in @code{open} function, but can also deal with compressed files.
13554 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13555 recognized by their file extensions. The focus is on being as efficient as
13556 possible on all supported Python versions.")
13557 (license license:expat)))
13558
13559 (define-public python2-xopen
13560 (package-with-python2 python-xopen))
13561
13562 (define-public python2-cheetah
13563 (package
13564 (name "python2-cheetah")
13565 (version "2.4.4")
13566 (source
13567 (origin
13568 (method url-fetch)
13569 (uri (pypi-uri "Cheetah" version))
13570 (sha256
13571 (base32
13572 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13573 (build-system python-build-system)
13574 (arguments
13575 `(#:python ,python-2))
13576 (propagated-inputs
13577 `(("python2-markdown" ,python2-markdown)))
13578 (home-page "https://pythonhosted.org/Cheetah/")
13579 (synopsis "Template engine")
13580 (description "Cheetah is a text-based template engine and Python code
13581 generator.
13582
13583 Cheetah can be used as a standalone templating utility or referenced as
13584 a library from other Python applications. It has many potential uses,
13585 but web developers looking for a viable alternative to ASP, JSP, PHP and
13586 PSP are expected to be its principle user group.
13587
13588 Features:
13589 @enumerate
13590 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13591 text-based format.
13592 @item Cleanly separates content, graphic design, and program code.
13593 @item Blends the power and flexibility of Python with a simple template language
13594 that non-programmers can understand.
13595 @item Gives template writers full access to any Python data structure, module,
13596 function, object, or method in their templates.
13597 @item Makes code reuse easy by providing an object-orientated interface to
13598 templates that is accessible from Python code or other Cheetah templates.
13599 One template can subclass another and selectively reimplement sections of it.
13600 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13601 improve the performance of a dynamic website.
13602 @item Compiles templates into optimized, yet readable, Python code.
13603 @end enumerate")
13604 (license (license:x11-style "file://LICENSE"))))
13605
13606 (define-public python-dulwich
13607 (package
13608 (name "python-dulwich")
13609 (version "0.16.3")
13610 (source
13611 (origin
13612 (method url-fetch)
13613 (uri (list (string-append "https://www.dulwich.io/releases/"
13614 "dulwich-" version ".tar.gz")
13615 (pypi-uri "dulwich" version)))
13616 (sha256
13617 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13618 (build-system python-build-system)
13619 (arguments
13620 `(#:phases
13621 (modify-phases %standard-phases
13622 (add-before 'check 'fix-tests
13623 (lambda* (#:key inputs #:allow-other-keys)
13624 ;; The tests use Popen with a custom environment which doesn't
13625 ;; include PATH.
13626 (substitute* "dulwich/tests/compat/utils.py"
13627 (("'git'") (string-append "'"
13628 (which "git")
13629 "'")))
13630 (substitute* '("dulwich/tests/test_repository.py"
13631 "dulwich/tests/test_hooks.py")
13632 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13633 (setenv "TEST_RUNNER" "unittest")
13634 (setenv "PYTHONHASHSEED" "random")
13635 #t)))))
13636 (propagated-inputs
13637 `(("python-fastimport" ,python-fastimport)))
13638 (native-inputs
13639 `(("python-mock" ,python-mock)
13640 ("python-geventhttpclient" ,python-geventhttpclient)
13641 ("git" ,git)))
13642 (home-page "https://www.dulwich.io/")
13643 (synopsis "Git implementation in Python")
13644 (description "Dulwich is an implementation of the Git file formats and
13645 protocols written in pure Python.")
13646 ;; Can be used with either license.
13647 (license (list license:asl2.0 license:gpl2+))))
13648
13649 (define-public python2-dulwich
13650 (package-with-python2 python-dulwich))
13651
13652 (define-public python-pbkdf2
13653 (package
13654 (name "python-pbkdf2")
13655 (version "1.3")
13656 (source
13657 (origin
13658 (method url-fetch)
13659 (uri (pypi-uri "pbkdf2" version))
13660 (sha256
13661 (base32
13662 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13663 (build-system python-build-system)
13664 (arguments
13665 '(#:phases
13666 (modify-phases %standard-phases
13667 (replace 'check
13668 (lambda _
13669 (setenv "PYTHONPATH"
13670 (string-append (getcwd) "/build/lib:"
13671 (getenv "PYTHONPATH")))
13672 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13673 (propagated-inputs
13674 `(("python-pycrypto" ,python-pycrypto))) ; optional
13675 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13676 (synopsis "Password-based key derivation")
13677 (description "This module implements the password-based key derivation
13678 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13679
13680 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13681 is part of the RSA Public Key Cryptography Standards series. The provided
13682 implementation takes a password or a passphrase and a salt value (and
13683 optionally a iteration count, a digest module, and a MAC module) and provides
13684 a file-like object from which an arbitrarly-sized key can be read.")
13685 (license license:expat)))
13686
13687 (define-public python2-pbkdf2
13688 (package-with-python2 python-pbkdf2))
13689
13690 (define-public python-qrcode
13691 (package
13692 (name "python-qrcode")
13693 (version "5.3")
13694 (source
13695 (origin
13696 (method url-fetch)
13697 (uri (pypi-uri "qrcode" version))
13698 (sha256
13699 (base32
13700 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13701 (build-system python-build-system)
13702 (arguments
13703 ;; FIXME: Tests require packaging 'pymaging'.
13704 '(#:tests? #f))
13705 (propagated-inputs
13706 `(("python-lxml" ,python-lxml) ; for SVG output
13707 ("python-pillow" ,python-pillow) ; for PNG output
13708 ("python-six" ,python-six)))
13709 (home-page "https://github.com/lincolnloop/python-qrcode")
13710 (synopsis "QR Code image generator")
13711 (description "This package provides a pure Python QR Code generator
13712 module. It uses the Python Imaging Library (PIL) to allow for the generation
13713 of QR Codes.
13714
13715 In addition this package provides a command line tool to generate QR codes and
13716 either write these QR codes to a file or do the output as ascii art at the
13717 console.")
13718 (license license:bsd-3)))
13719
13720 (define-public python2-qrcode
13721 (package-with-python2 python-qrcode))
13722
13723 ;; SlowAES isn't compatible with Python 3.
13724 (define-public python2-slowaes
13725 (package
13726 (name "python2-slowaes")
13727 (version "0.1a1")
13728 (source
13729 (origin
13730 (method url-fetch)
13731 (uri (pypi-uri "slowaes" version))
13732 (sha256
13733 (base32
13734 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13735 (build-system python-build-system)
13736 (arguments `(#:python ,python-2))
13737 (home-page "http://code.google.com/p/slowaes/")
13738 (synopsis "Implementation of AES in Python")
13739 (description "This package contains an implementation of AES in Python.
13740 This implementation is slow (hence the project name) but still useful when
13741 faster ones are not available.")
13742 (license license:asl2.0)))
13743
13744 (define-public python-rst2ansi
13745 (package
13746 (name "python-rst2ansi")
13747 (version "0.1.5")
13748 (source
13749 (origin
13750 (method url-fetch)
13751 (uri (pypi-uri "rst2ansi" version))
13752 (sha256
13753 (base32
13754 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13755 (build-system python-build-system)
13756 (propagated-inputs
13757 `(("python-docutils" ,python-docutils)))
13758 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13759 (synopsis "Convert RST to ANSI-decorated console output")
13760 (description
13761 "Python module dedicated to rendering RST (reStructuredText) documents
13762 to ansi-escaped strings suitable for display in a terminal.")
13763 (license license:expat)))
13764
13765 (define-public python-ansi2html
13766 (package
13767 (name "python-ansi2html")
13768 (version "1.2.0")
13769 (source
13770 (origin
13771 (method url-fetch)
13772 (uri (pypi-uri "ansi2html" version))
13773 (sha256
13774 (base32
13775 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13776 (build-system python-build-system)
13777 (native-inputs
13778 `(("python-mock" ,python-mock)
13779 ("python-nose" ,python-nose)))
13780 (propagated-inputs
13781 `(("python-six" ,python-six)))
13782 (home-page "http://github.com/ralphbean/ansi2html")
13783 (synopsis "Convert ANSI-decorated console output to HTML")
13784 (description
13785 "@command{ansi2html} is a Python library and command line utility for
13786 convering text with ANSI color codes to HTML or LaTeX.")
13787 (license license:gpl3+)))
13788
13789 (define-public python2-ansi2html
13790 (package-with-python2 python-ansi2html))
13791
13792 (define-public python-ddt
13793 (package
13794 (name "python-ddt")
13795 (version "1.1.1")
13796 (source
13797 (origin
13798 (method url-fetch)
13799 (uri (pypi-uri "ddt" version))
13800 (sha256
13801 (base32
13802 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13803 (build-system python-build-system)
13804 (native-inputs
13805 `(("python-mock" ,python-mock)
13806 ("python-nose" ,python-nose)))
13807 (propagated-inputs
13808 `(("python-six" ,python-six)
13809 ("python-pyyaml" ,python-pyyaml)))
13810 (home-page "https://github.com/txels/ddt")
13811 (synopsis "Data-Driven Tests")
13812 (description
13813 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13814 it with different test data, and make it appear as multiple test cases.")
13815 (license license:expat)))
13816
13817 (define-public python2-ddt
13818 (package-with-python2 python-ddt))
13819
13820 (define-public python-pycosat
13821 (package
13822 (name "python-pycosat")
13823 (version "0.6.1")
13824 (source
13825 (origin
13826 (method url-fetch)
13827 (uri (pypi-uri "pycosat" version))
13828 (sha256
13829 (base32
13830 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13831 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13832 (build-system python-build-system)
13833 (home-page "https://github.com/ContinuumIO/pycosat")
13834 (synopsis "Bindings to picosat (a SAT solver)")
13835 (description
13836 "This package provides efficient Python bindings to @code{picosat} on
13837 the C level. When importing pycosat, the @code{picosat} solver becomes part
13838 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13839 Problem} (SAT) solver.")
13840 (license license:expat)))
13841
13842 (define-public python2-pycosat
13843 (package-with-python2 python-pycosat))
13844
13845 (define-public python2-ruamel.ordereddict
13846 (package
13847 (name "python2-ruamel.ordereddict")
13848 (version "0.4.9")
13849 (source
13850 (origin
13851 (method url-fetch)
13852 (uri (pypi-uri "ruamel.ordereddict" version))
13853 (sha256
13854 (base32
13855 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13856 (build-system python-build-system)
13857 (arguments
13858 `(#:python ,python-2
13859 #:phases
13860 (modify-phases %standard-phases
13861 (delete 'check)
13862 (add-after 'install 'check
13863 (lambda* (#:key inputs outputs #:allow-other-keys)
13864 (add-installed-pythonpath inputs outputs)
13865 (zero? (system* "python" "test/testordereddict.py")))))))
13866 (home-page "https://bitbucket.org/ruamel/ordereddict")
13867 (synopsis "Version of dict that keeps keys in insertion order")
13868 (description
13869 "This is an implementation of an ordered dictionary with @dfn{Key
13870 Insertion Order} (KIO: updates of values do not affect the position of the
13871 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13872 removed and put at the back). The standard library module @code{OrderedDict},
13873 implemented later, implements a subset of @code{ordereddict} functionality.
13874 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13875 Order} (KSO, no sorting function can be specified, but a transform can be
13876 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13877 (license license:expat)))
13878
13879 (define-public python-pypeg2
13880 (package
13881 (name "python-pypeg2")
13882 (version "2.15.2")
13883 (source
13884 (origin
13885 (method url-fetch)
13886 (uri (pypi-uri "pyPEG2" version))
13887 (sha256
13888 (base32
13889 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13890 (build-system python-build-system)
13891 (propagated-inputs `(("python-lxml" ,python-lxml)))
13892 (arguments
13893 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13894 '(#:tests? #f))
13895 (home-page "https://fdik.org/pyPEG/")
13896 (synopsis "Parsering Expression Grammars in Python")
13897 (description "PyPEG is an intrinsic parser interpreter framework for
13898 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13899 parse many formal languages.")
13900 (license license:gpl2)))
13901
13902 (define-public python2-cliapp
13903 (package
13904 (name "python2-cliapp")
13905 (version "1.20160724")
13906 (source
13907 (origin
13908 (method url-fetch)
13909 (uri (string-append
13910 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13911 version ".tar.gz"))
13912 (sha256
13913 (base32
13914 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13915 (build-system python-build-system)
13916 (arguments
13917 `(#:python ,python-2))
13918 (propagated-inputs
13919 `(("python2-pyaml" ,python2-pyaml)))
13920 (home-page "https://liw.fi/cliapp/")
13921 (synopsis "Python framework for command line programs")
13922 (description "@code{python2-cliapp} is a python framework for
13923 command line programs. It contains the typical stuff such programs
13924 need to do, such as parsing the command line for options, and
13925 iterating over input files.")
13926 (license license:gpl2+)))
13927
13928 (define-public python2-ttystatus
13929 (package
13930 (name "python2-ttystatus")
13931 (version "0.32")
13932 (source
13933 (origin
13934 (method url-fetch)
13935 (uri (string-append
13936 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13937 version ".tar.gz"))
13938 (sha256
13939 (base32
13940 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13941 (build-system python-build-system)
13942 (arguments
13943 `(#:python ,python-2))
13944 (home-page "https://liw.fi/ttystatus/")
13945 (synopsis "Python library for showing progress reporting and
13946 status updates on terminals")
13947 (description "@code{python2-ttystatus} is a python library for
13948 showing progress reporting and status updates on terminals, for
13949 command line programs. Output is automatically adapted to the width
13950 of the terminal: truncated if it does not fit, and resized if the
13951 terminal size changes.")
13952 (license license:gpl3+)))
13953
13954 (define-public python2-tracing
13955 (package
13956 (name "python2-tracing")
13957 (version "0.10")
13958 (source
13959 (origin
13960 (method url-fetch)
13961 (uri (string-append
13962 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13963 version ".tar.gz"))
13964 (sha256
13965 (base32
13966 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13967 (build-system python-build-system)
13968 (arguments
13969 `(#:python ,python-2))
13970 (home-page "https://liw.fi/tracing/")
13971 (synopsis "Python debug logging helper")
13972 (description "@code{python2-tracing} is a python library for
13973 logging debug messages. It provides a way to turn debugging messages
13974 on and off, based on the filename they occur in. It is much faster
13975 than using @code{logging.Filter} to accomplish the same thing, which
13976 matters when code is run in production mode. The actual logging still
13977 happens using the @code{logging} library.")
13978 (license license:gpl3+)))
13979
13980 (define-public python2-larch
13981 (package
13982 (name "python2-larch")
13983 (version "1.20151025")
13984 (source
13985 (origin
13986 (method url-fetch)
13987 (uri (string-append
13988 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13989 version ".tar.gz"))
13990 (sha256
13991 (base32
13992 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13993 (build-system python-build-system)
13994 (arguments
13995 `(#:python ,python-2))
13996 (propagated-inputs
13997 `(("python2-tracing" ,python2-tracing)))
13998 (home-page "https://liw.fi/larch/")
13999 (synopsis "Python copy-on-write B-tree library")
14000 (description "@code{python2-larch} is an implementation of
14001 particular kind of B-tree, based on research by Ohad Rodeh. See
14002 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14003 on the data structure.
14004
14005 The distinctive feature of this B-tree is that a node is never
14006 (conceptually) modified. Instead, all updates are done by
14007 copy-on-write. This makes it easy to clone a tree, and modify only the
14008 clone, while other processes access the original tree.")
14009 (license license:gpl3+)))
14010
14011 (define-public python-htmlmin
14012 (package
14013 (name "python-htmlmin")
14014 (version "0.1.10")
14015 (source
14016 (origin
14017 (method url-fetch)
14018 (uri (pypi-uri "htmlmin" version))
14019 (sha256
14020 (base32
14021 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
14022 (arguments
14023 `(#:tests? #f)) ;htmlmin has no tests
14024 (build-system python-build-system)
14025 (home-page "https://htmlmin.readthedocs.org/en/latest/")
14026 (synopsis "HTML minifier")
14027 (description "@code{htmlmin} is an HTML minifier that just works.
14028 It comes with safe defaults and easily configurable options.")
14029 (license license:bsd-3)))
14030
14031 (define-public python2-htmlmin
14032 (package-with-python2 python-htmlmin))
14033
14034 (define-public python-flask-htmlmin
14035 (package
14036 (name "python-flask-htmlmin")
14037 (version "1.2")
14038 (source
14039 (origin
14040 (method url-fetch)
14041 (uri (pypi-uri "Flask-HTMLmin" version))
14042 (sha256
14043 (base32
14044 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
14045 (propagated-inputs
14046 `(("python-flask" ,python-flask)
14047 ("python-htmlmin" ,python-htmlmin)))
14048 (build-system python-build-system)
14049 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
14050 (synopsis "HTML response minifier for Flask")
14051 (description
14052 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
14053 (license license:bsd-3)))
14054
14055 (define-public python2-flask-htmlmin
14056 (package-with-python2 python-flask-htmlmin))
14057
14058 (define-public python-flask-login
14059 (package
14060 (name "python-flask-login")
14061 (version "0.4.0")
14062 (source
14063 (origin
14064 (method url-fetch)
14065 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
14066 version ".tar.gz"))
14067 (file-name (string-append name "-" version ".tar.gz"))
14068 (sha256
14069 (base32
14070 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
14071 (arguments
14072 ;; Tests fail PEP8 compliance. See:
14073 ;; https://github.com/maxcountryman/flask-login/issues/340
14074 `(#:tests? #f))
14075 (build-system python-build-system)
14076 (home-page "https://github.com/maxcountryman/flask-login")
14077 (synopsis "User session management for Flask")
14078 (description
14079 "@code{Flask-Login} provides user session management for Flask. It
14080 handles the common tasks of logging in, logging out, and remembering your
14081 users' sessions over extended periods of time.")
14082 (license license:expat)))
14083
14084 (define-public python2-flask-login
14085 (package-with-python2 python-flask-login))
14086
14087 (define-public python-astroid
14088 (package
14089 (name "python-astroid")
14090 (version "1.5.3")
14091 (source
14092 (origin
14093 (method url-fetch)
14094 (uri (string-append
14095 "https://github.com/PyCQA/astroid/archive/astroid-"
14096 version ".tar.gz"))
14097 (sha256
14098 (base32
14099 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
14100 (build-system python-build-system)
14101 (propagated-inputs
14102 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14103 ("python-six" ,python-six)
14104 ("python-wrapt" ,python-wrapt)))
14105 (arguments
14106 `(#:phases
14107 (modify-phases %standard-phases
14108 (replace 'check
14109 (lambda _
14110 (zero? (system* "python" "-m" "unittest" "discover"
14111 "-p" "unittest*.py")))))))
14112 (home-page "https://github.com/PyCQA/astroid")
14113 (synopsis "Common base representation of python source code for pylint and
14114 other projects")
14115 (description "@code{python-astroid} provides a common base representation
14116 of python source code for projects such as pychecker, pyreverse, pylint, etc.
14117
14118 It provides a compatible representation which comes from the _ast module. It
14119 rebuilds the tree generated by the builtin _ast module by recursively walking
14120 down the AST and building an extended ast. The new node classes have
14121 additional methods and attributes for different usages. They include some
14122 support for static inference and local name scopes. Furthermore, astroid
14123 builds partial trees by inspecting living objects.")
14124 (license license:lgpl2.1+)
14125 (properties `((python2-variant . ,(delay python2-astroid))))))
14126
14127 (define-public python2-astroid
14128 (let ((base (package-with-python2
14129 (strip-python2-variant python-astroid))))
14130 (package (inherit base)
14131 (propagated-inputs
14132 `(("python2-backports-functools-lru-cache"
14133 ,python2-backports-functools-lru-cache)
14134 ("python2-enum34" ,python2-enum34)
14135 ("python2-singledispatch" ,python2-singledispatch)
14136 ,@(package-propagated-inputs base))))))
14137
14138 (define-public python-isort
14139 (package
14140 (name "python-isort")
14141 (version "4.2.5")
14142 (source
14143 (origin
14144 (method url-fetch)
14145 (uri (string-append
14146 "https://github.com/timothycrosley/isort/archive/"
14147 version ".tar.gz"))
14148 (file-name (string-append name "-" version ".tar.gz"))
14149 (sha256
14150 (base32
14151 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14152 (build-system python-build-system)
14153 (native-inputs
14154 `(("python-mock" ,python-mock)
14155 ("python-pytest" ,python-pytest)))
14156 (home-page "https://github.com/timothycrosley/isort")
14157 (synopsis "Python utility/library to sort python imports")
14158 (description "@code{python-isort} is a python utility/library to sort
14159 imports alphabetically, and automatically separated into sections. It
14160 provides a command line utility, a python library and plugins for various
14161 editors.")
14162 (license license:expat)))
14163
14164 (define-public python2-isort
14165 (package-with-python2 python-isort))
14166
14167 (define-public python2-backports-functools-lru-cache
14168 (package
14169 (name "python2-backports-functools-lru-cache")
14170 (version "1.3")
14171 (source
14172 (origin
14173 (method url-fetch)
14174 ;; only the pypi tarballs contain the necessary metadata
14175 (uri (pypi-uri "backports.functools_lru_cache" version))
14176 (sha256
14177 (base32
14178 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14179 (build-system python-build-system)
14180 (native-inputs
14181 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14182 (arguments
14183 `(#:python ,python-2))
14184 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14185 (synopsis "Backport of functools.lru_cache from Python 3.3")
14186 (description "@code{python2-backports-functools-lru-cache} is a backport
14187 of @code{functools.lru_cache} from python 3.3.")
14188 (license license:expat)))
14189
14190 (define-public python-configparser
14191 (package
14192 (name "python-configparser")
14193 (version "3.5.0")
14194 (source
14195 (origin
14196 (method url-fetch)
14197 (uri (string-append
14198 "https://bitbucket.org/ambv/configparser/get/"
14199 version ".tar.bz2"))
14200 (file-name (string-append name "-" version ".tar.gz"))
14201 (sha256
14202 (base32
14203 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14204 (build-system python-build-system)
14205 (home-page "http://docs.python.org/py3k/library/configparser.html")
14206 (synopsis "Backport of configparser from python 3.5")
14207 (description "@code{python-configparser} is a backport of
14208 @code{configparser} from Python 3.5 so that it can be used directly
14209 in other versions.")
14210 (license license:expat)))
14211
14212 (define-public python2-configparser
14213 (package-with-python2 python-configparser))
14214
14215 (define-public python2-coverage-test-runner
14216 (package
14217 (name "python2-coverage-test-runner")
14218 (version "1.11")
14219 (source
14220 (origin
14221 (method url-fetch)
14222 (uri (string-append
14223 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14224 "coverage-test-runner/snapshot/coverage-test-runner-"
14225 version ".tar.gz"))
14226 (sha256
14227 (base32
14228 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14229 (build-system python-build-system)
14230 (arguments
14231 `(#:python ,python-2
14232 #:phases
14233 (modify-phases %standard-phases
14234 (replace 'check
14235 (lambda _
14236 (zero? (system* "./testrun")))))))
14237 (propagated-inputs
14238 `(("python2-coverage" ,python2-coverage)))
14239 (home-page "https://liw.fi/coverage-test-runner/")
14240 (synopsis "Python module for running unit tests")
14241 (description "@code{CoverageTestRunner} is a python module for running
14242 unit tests and failing them if the unit test module does not exercise all
14243 statements in the module it tests.")
14244 (license license:gpl3+)))
14245
14246 (define-public python-pylint
14247 (package
14248 (name "python-pylint")
14249 (version "1.7.2")
14250 (source
14251 (origin
14252 (method url-fetch)
14253 (uri (string-append
14254 "https://github.com/PyCQA/pylint/archive/pylint-"
14255 version ".tar.gz"))
14256 (sha256
14257 (base32
14258 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
14259 (build-system python-build-system)
14260 (native-inputs
14261 `(("python-pytest" ,python-pytest)
14262 ("python-pytest-runner" ,python-pytest-runner)
14263 ("python-tox" ,python-tox)))
14264 (propagated-inputs
14265 `(("python-astroid" ,python-astroid)
14266 ("python-isort" ,python-isort)
14267 ("python-mccabe" ,python-mccabe)
14268 ("python-six" ,python-six)))
14269 (arguments
14270 `(#:phases
14271 (modify-phases %standard-phases
14272 (replace 'check
14273 (lambda _
14274 ;; Somehow, tests for python2-pylint
14275 ;; fail if run from the build directory
14276 (let ((work "/tmp/work"))
14277 (mkdir-p work)
14278 (setenv "PYTHONPATH"
14279 (string-append (getenv "PYTHONPATH") ":" work))
14280 (copy-recursively "." work)
14281 (with-directory-excursion "/tmp"
14282 (zero? (system* "python" "-m" "unittest" "discover"
14283 "-s" (string-append work "/pylint/test")
14284 "-p" "*test_*.py")))))))))
14285 (home-page "https://github.com/PyCQA/pylint")
14286 (synopsis "Python source code analyzer which looks for coding standard
14287 errors")
14288 (description "Pylint is a Python source code analyzer which looks
14289 for programming errors, helps enforcing a coding standard and sniffs
14290 for some code smells (as defined in Martin Fowler's Refactoring book).
14291
14292 Pylint has many rules enabled by default, way too much to silence them
14293 all on a minimally sized program. It's highly configurable and handle
14294 pragmas to control it from within your code. Additionally, it is
14295 possible to write plugins to add your own checks.")
14296 (license license:gpl2+)))
14297
14298 (define-public python2-pylint
14299 (let ((pylint (package-with-python2 python-pylint)))
14300 (package (inherit pylint)
14301 (propagated-inputs
14302 `(("python2-backports-functools-lru-cache"
14303 ,python2-backports-functools-lru-cache)
14304 ("python2-configparser" ,python2-configparser)
14305 ,@(package-propagated-inputs pylint))))))
14306
14307 (define-public python-paramunittest
14308 (package
14309 (name "python-paramunittest")
14310 (version "0.2")
14311 (source
14312 (origin
14313 (method url-fetch)
14314 (uri (pypi-uri "ParamUnittest" version))
14315 (sha256
14316 (base32
14317 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14318 (build-system python-build-system)
14319 (home-page
14320 "https://github.com/rik0/ParamUnittest")
14321 (synopsis
14322 "Simple extension to have parametrized unit tests")
14323 (description
14324 "This package allows to create parametrized unit-tests that work with the standard
14325 unittest package. A parametrized test case is automatically converted to multiple test
14326 cases. Since they are TestCase subclasses, they work with other test suites that
14327 recognize TestCases.")
14328 (license license:bsd-2)))
14329
14330 (define-public python2-python-paramunittest
14331 (package-with-python2 python-paramunittest))
14332
14333 (define-public python-mando
14334 (package
14335 (name "python-mando")
14336 (version "0.5")
14337 (source
14338 (origin
14339 (method url-fetch)
14340 (uri (pypi-uri "mando" version))
14341 (sha256
14342 (base32
14343 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14344 (build-system python-build-system)
14345 (propagated-inputs
14346 `(("python-rst2ansi" ,python-rst2ansi)))
14347 (native-inputs
14348 `(("python-sphinx" ,python-sphinx-1.5.3)
14349 ("python-paramunittest" ,python-paramunittest)))
14350 (home-page "https://mando.readthedocs.org/")
14351 (synopsis
14352 "Wrapper around argparse, allowing creation of complete CLI applications")
14353 (description
14354 "This package is a wrapper around argparse, allowing you to write complete CLI
14355 applications in seconds while maintaining all the flexibility.")
14356 (license license:expat)))
14357
14358 (define-public python2-mando
14359 (package-with-python2 python-mando))
14360
14361 (define-public python-mando-0.3.1
14362 ;; python-radon (version 1.5.0) has a requirement
14363 ;; for mando<0.4,>=0.3
14364 (package
14365 (inherit python-mando)
14366 (name "python-mando")
14367 (version "0.3.1")
14368 (source
14369 (origin
14370 (method url-fetch)
14371 (uri (string-append "https://github.com/rubik/mando/archive/v"
14372 version
14373 ".tar.gz"))
14374 (sha256
14375 (base32
14376 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14377
14378 (define-public python-fudge
14379 (package
14380 (name "python-fudge")
14381 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14382 ;; package, which is currently the only use of this package.
14383 (version "0.9.6")
14384 (source
14385 (origin
14386 (method url-fetch)
14387 (uri (pypi-uri "fudge" version))
14388 (sha256
14389 (base32
14390 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14391 (build-system python-build-system)
14392 (arguments
14393 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14394 (home-page "https://github.com/fudge-py/fudge")
14395 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14396 (description
14397 "Fudge is a Python module for using fake objects (mocks and stubs) to
14398 test real ones.
14399
14400 In readable Python code, you declare the methods available on your fake object
14401 and how they should be called. Then you inject that into your application and
14402 start testing. This declarative approach means you don’t have to record and
14403 playback actions and you don’t have to inspect your fakes after running code.
14404 If the fake object was used incorrectly then you’ll see an informative
14405 exception message with a traceback that points to the culprit.")
14406 (license license:expat)))
14407
14408 (define-public python2-fudge
14409 (package-with-python2 python-fudge))
14410
14411 (define-public python-oauth2client
14412 (package
14413 (name "python-oauth2client")
14414 (version "4.0.0")
14415 (source
14416 (origin
14417 (method url-fetch)
14418 (uri (pypi-uri "oauth2client" version))
14419 (sha256
14420 (base32
14421 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14422 (build-system python-build-system)
14423 (arguments
14424 `(#:tests? #f))
14425 (propagated-inputs
14426 `(("python-httplib2" ,python-httplib2)
14427 ("python-pyasn1" ,python-pyasn1)
14428 ("python-pyasn1-modules" ,python-pyasn1-modules)
14429 ("python-rsa" ,python-rsa)
14430 ("python-six" ,python-six)))
14431 (home-page "http://github.com/google/oauth2client/")
14432 (synopsis "OAuth 2.0 client library")
14433 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14434 library for Python")
14435 (license license:asl2.0)))
14436
14437 (define-public python-flask-oidc
14438 (package
14439 (name "python-flask-oidc")
14440 (version "1.1.1")
14441 (source
14442 (origin
14443 (method url-fetch)
14444 (uri (pypi-uri "flask-oidc" version))
14445 (sha256
14446 (base32
14447 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14448 (build-system python-build-system)
14449 (propagated-inputs
14450 `(("python-flask" ,python-flask)
14451 ("python-itsdangerous" ,python-itsdangerous)
14452 ("python-oauth2client" ,python-oauth2client)
14453 ("python-six" ,python-six)))
14454 (native-inputs
14455 `(("python-nose" ,python-nose)
14456 ("python-mock" ,python-mock)))
14457 (home-page "https://github.com/puiterwijk/flask-oidc")
14458 (synopsis "OpenID Connect extension for Flask")
14459 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14460 for Flask.")
14461 (license license:bsd-2)))
14462
14463 (define-public python-mwclient
14464 (package
14465 (name "python-mwclient")
14466 (version "0.8.4")
14467 (source
14468 (origin
14469 (method url-fetch)
14470 ;; The PyPI version wouldn't contain tests.
14471 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14472 "v" version ".tar.gz"))
14473 (sha256
14474 (base32
14475 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14476 (build-system python-build-system)
14477 (propagated-inputs
14478 `(("python-requests" ,python-requests)
14479 ("python-requests-oauthlib"
14480 ,python-requests-oauthlib)
14481 ("python-six" ,python-six)))
14482 (native-inputs
14483 `(("python-mock" ,python-mock)
14484 ("python-pytest" ,python-pytest)
14485 ("python-pytest-pep8" ,python-pytest-pep8)
14486 ("python-pytest-cache" ,python-pytest-cache)
14487 ("python-pytest-cov" ,python-pytest-cov)
14488 ("python-responses" ,python-responses)))
14489 (home-page "https://github.com/btongminh/mwclient")
14490 (synopsis "MediaWiki API client")
14491 (description "This package provides a MediaWiki API client.")
14492 (license license:expat)))
14493
14494 (define-public python2-mwclient
14495 (package-with-python2 python-mwclient))
14496
14497 (define-public python-pytest-warnings
14498 (package
14499 (name "python-pytest-warnings")
14500 (version "0.2.0")
14501 (source
14502 (origin
14503 (method url-fetch)
14504 (uri (pypi-uri "pytest-warnings" version))
14505 (sha256
14506 (base32
14507 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14508 (build-system python-build-system)
14509 (propagated-inputs
14510 `(("pytest" ,python-pytest-3.0)))
14511 (home-page "https://github.com/fschulze/pytest-warnings")
14512 (synopsis "Pytest plugin to list Python warnings in pytest report")
14513 (description
14514 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14515 pytest report.")
14516 (license license:expat)))
14517
14518 (define-public python2-pytest-warnings
14519 (package-with-python2 python-pytest-warnings))
14520
14521 (define-public python-pytest-capturelog
14522 (package
14523 (name "python-pytest-capturelog")
14524 (version "0.7")
14525 (source
14526 (origin
14527 (method url-fetch)
14528 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
14529 (sha256
14530 (base32
14531 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
14532 (build-system python-build-system)
14533 (propagated-inputs
14534 `(("pytest" ,python-pytest-3.0)))
14535 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
14536 (synopsis "Pytest plugin to catch log messages")
14537 (description
14538 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
14539 (license license:expat)))
14540
14541 (define-public python2-pytest-capturelog
14542 (package-with-python2 python-pytest-capturelog))
14543
14544 (define-public python-pytest-catchlog
14545 (package
14546 (name "python-pytest-catchlog")
14547 (version "1.2.2")
14548 (source
14549 (origin
14550 (method url-fetch)
14551 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14552 (sha256
14553 (base32
14554 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14555 (build-system python-build-system)
14556 (native-inputs
14557 `(("unzip" ,unzip)))
14558 (propagated-inputs
14559 `(("pytest" ,python-pytest-3.0)))
14560 (home-page "https://github.com/eisensheng/pytest-catchlog")
14561 (synopsis "Pytest plugin to catch log messages")
14562 (description
14563 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14564 a fork of pytest-capturelog.")
14565 (license license:expat)))
14566
14567 (define-public python2-pytest-catchlog
14568 (package-with-python2 python-pytest-catchlog))
14569
14570 (define-public python-utils
14571 (package
14572 (name "python-utils")
14573 (version "2.1.0")
14574 (source (origin
14575 (method url-fetch)
14576 (uri (pypi-uri "python-utils" version))
14577 (sha256
14578 (base32
14579 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14580 (build-system python-build-system)
14581 (native-inputs
14582 `(("pytest-runner" ,python-pytest-runner)
14583 ("pytest" ,python-pytest)
14584 ("six" ,python-six)))
14585 (home-page "https://github.com/WoLpH/python-utils")
14586 (synopsis "Convenient utilities not included with the standard Python install")
14587 (description
14588 "Python Utils is a collection of small Python functions and classes which
14589 make common patterns shorter and easier.")
14590 (license license:bsd-2)))
14591
14592 (define-public python2-utils
14593 (package-with-python2 python-utils))
14594
14595 (define-public python-webassets
14596 (package
14597 (name "python-webassets")
14598 (version "0.12.1")
14599 (source
14600 (origin
14601 (method url-fetch)
14602 (uri (pypi-uri "webassets" version))
14603 (sha256
14604 (base32
14605 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14606 (build-system python-build-system)
14607 (native-inputs
14608 `(("python-jinja2" ,python-jinja2)
14609 ("python-mock" ,python-mock)
14610 ("python-nose" ,python-nose)
14611 ("python-pytest" ,python-pytest)))
14612 (home-page "https://github.com/miracle2k/webassets")
14613 (synopsis "Media asset management")
14614 (description "Merges, minifies and compresses Javascript and CSS files,
14615 supporting a variety of different filters, including YUI, jsmin, jspacker or
14616 CSS tidy. Also supports URL rewriting in CSS files.")
14617 (license license:bsd-2)))
14618
14619 (define-public python-sphinx-me
14620 (package
14621 (name "python-sphinx-me")
14622 (version "0.3")
14623 (source
14624 (origin
14625 (method url-fetch)
14626 (uri (pypi-uri "sphinx-me" version))
14627 (sha256
14628 (base32
14629 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14630 (build-system python-build-system)
14631 (home-page "https://github.com/stephenmcd/sphinx-me")
14632 (synopsis "Create a Sphinx documentation shell")
14633 (description
14634 "Create a Sphinx documentation shell for your project and include the
14635 README file as the documentation index. It handles extracting the required
14636 meta data such as the project name, author and version from your project for
14637 use in your Sphinx docs.")
14638 (license license:bsd-2)))
14639
14640 (define-public python2-sphinx-me
14641 (package-with-python2 python-sphinx-me))
14642
14643 (define-public python-cssmin
14644 (package
14645 (name "python-cssmin")
14646 (version "0.2.0")
14647 (source
14648 (origin
14649 (method url-fetch)
14650 (uri (pypi-uri "cssmin" version))
14651 (sha256
14652 (base32
14653 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14654 (build-system python-build-system)
14655 (home-page "https://github.com/zacharyvoase/cssmin")
14656 (synopsis "Python port of the YUI CSS Compressor")
14657 (description "Python port of the YUI CSS Compressor.")
14658 (license (list license:expat license:bsd-3))))
14659
14660 (define-public python2-cssmin
14661 (package-with-python2 python-cssmin))
14662
14663 (define-public python-diff-match-patch
14664 (package
14665 (name "python-diff-match-patch")
14666 (version "20121119")
14667 (source
14668 (origin
14669 (method url-fetch)
14670 (uri (pypi-uri "diff-match-patch" version))
14671 (sha256
14672 (base32
14673 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14674 (build-system python-build-system)
14675 (home-page "https://code.google.com/p/google-diff-match-patch")
14676 (synopsis "Synchronize plain text")
14677 (description "Diff Match and Patch libraries offer robust algorithms to
14678 perform the operations required for synchronizing plain text.")
14679 (license license:asl2.0)))
14680
14681 (define-public python2-diff-match-patch
14682 (package-with-python2 python-diff-match-patch))
14683
14684 (define-public python-dirsync
14685 (package
14686 (name "python-dirsync")
14687 (version "2.2.2")
14688 (source
14689 (origin
14690 (method url-fetch)
14691 (uri (pypi-uri "dirsync" version ".zip"))
14692 (sha256
14693 (base32
14694 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14695 (build-system python-build-system)
14696 (native-inputs
14697 `(("unzip" ,unzip)))
14698 (propagated-inputs
14699 `(("six" ,python-six)))
14700 (home-page "https://bitbucket.org/tkhyn/dirsync")
14701 (synopsis "Advanced directory tree synchronisation tool")
14702 (description "Advanced directory tree synchronisation tool.")
14703 (license license:expat)))
14704
14705 (define-public python2-dirsync
14706 (package-with-python2 python-dirsync))
14707
14708 (define-public python-nosexcover
14709 (package
14710 (name "python-nosexcover")
14711 (version "1.0.11")
14712 (source (origin
14713 (method url-fetch)
14714 (uri (pypi-uri "nosexcover" version))
14715 (sha256
14716 (base32
14717 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14718 (build-system python-build-system)
14719 (propagated-inputs
14720 `(("python-coverage" ,python-coverage)
14721 ("python-nose" ,python-nose)))
14722 (home-page "http://github.com/cmheisel/nose-xcover")
14723 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14724 (description "Nose-xcover is a companion to the built-in
14725 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
14726 to a file named coverage.xml.
14727
14728 It will honor all the options you pass to the Nose coverage plugin,
14729 especially -cover-package.")
14730 (license license:expat)))
14731
14732 (define-public python2-nosexcover
14733 (package-with-python2 python-nosexcover))
14734
14735 (define-public python-elasticsearch
14736 (package
14737 (name "python-elasticsearch")
14738 (version "1.0.0")
14739 (source
14740 (origin
14741 (method url-fetch)
14742 (uri (pypi-uri "elasticsearch" version))
14743 (sha256
14744 (base32
14745 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14746 (build-system python-build-system)
14747 (native-inputs
14748 `(("python-mock" ,python-mock)
14749 ("python-nosexcover" ,python-nosexcover)
14750 ("python-pyaml" ,python-pyaml)
14751 ("python-requests" ,python-requests)))
14752 (propagated-inputs
14753 `(("urllib3" ,python-urllib3)))
14754 (arguments
14755 ;; tests require the test_elasticsearch module but it is not distributed.
14756 `(#:tests? #f))
14757 (home-page "https://github.com/elastic/elasticsearch-py")
14758 (synopsis "Low-level client for Elasticsearch")
14759 (description "Official low-level client for Elasticsearch. Its goal is to
14760 provide common ground for all Elasticsearch-related code in Python; because of
14761 this it tries to be opinion-free and very extendable.")
14762 (license license:expat)))
14763
14764 (define-public python2-elasticsearch
14765 (package-with-python2 python-elasticsearch))
14766
14767 (define-public python-levenshtein
14768 (package
14769 (name "python-levenshtein")
14770 (version "0.12.0")
14771 (source
14772 (origin
14773 (method url-fetch)
14774 (uri (pypi-uri "python-Levenshtein" version))
14775 (sha256
14776 (base32
14777 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14778 (build-system python-build-system)
14779 (home-page "https://github.com/ztane/python-Levenshtein")
14780 (synopsis "Fast computation of Levenshtein distance and string similarity")
14781 (description
14782 "The Levenshtein Python C extension module contains functions for fast computation of
14783 @enumerate
14784 @item Levenshtein (edit) distance, and edit operations
14785 @item string similarity
14786 @item approximate median strings, and generally string averaging
14787 @item string sequence and set similarity
14788 @end enumerate
14789 It supports both normal and Unicode strings.")
14790 (license license:gpl2+)))
14791
14792 (define-public python2-levenshtein
14793 (package-with-python2 python-levenshtein))
14794
14795 (define-public python-scandir
14796 (package
14797 (name "python-scandir")
14798 (version "1.4")
14799 (source
14800 (origin
14801 (method url-fetch)
14802 (uri (pypi-uri "scandir" version))
14803 (sha256
14804 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14805 (build-system python-build-system)
14806 (home-page "https://github.com/benhoyt/scandir")
14807 (synopsis "Directory iteration function")
14808 (description
14809 "Directory iteration function like os.listdir(), except that instead of
14810 returning a list of bare filenames, it yields DirEntry objects that include
14811 file type and stat information along with the name. Using scandir() increases
14812 the speed of os.walk() by 2-20 times (depending on the platform and file
14813 system) by avoiding unnecessary calls to os.stat() in most cases.")
14814 (license license:bsd-3)))
14815
14816 (define-public python2-scandir
14817 (package-with-python2 python-scandir))
14818
14819 (define-public python2-stemming
14820 (package
14821 (name "python2-stemming")
14822 (version "1.0.1")
14823 (source
14824 (origin
14825 (method url-fetch)
14826 (uri (pypi-uri "stemming" version))
14827 (sha256
14828 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14829 (build-system python-build-system)
14830 (arguments
14831 `(#:python ,python-2))
14832 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14833 (synopsis "Python implementations of various stemming algorithms")
14834 (description
14835 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14836 stemming algorithms for English. These implementations are straightforward and
14837 efficient, unlike some Python versions of the same algorithms available on the
14838 Web. This package is an extraction of the stemming code included in the Whoosh
14839 search engine.")
14840 (license license:public-domain)))
14841
14842 (define-public python-factory-boy
14843 (package
14844 (name "python-factory-boy")
14845 (version "2.8.1")
14846 (source
14847 (origin
14848 (method url-fetch)
14849 (uri (pypi-uri "factory_boy" version))
14850 (sha256
14851 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14852 (build-system python-build-system)
14853 (arguments
14854 ;; Tests are not included in the tarball.
14855 `(#:tests? #f))
14856 (propagated-inputs
14857 `(("faker" ,python-faker)))
14858 (home-page "https://github.com/benhoyt/scandir")
14859 (synopsis "Versatile test fixtures replacement")
14860 (description
14861 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14862
14863 As a fixtures replacement tool, it aims to replace static, hard to maintain
14864 fixtures with easy-to-use factories for complex object.
14865
14866 Instead of building an exhaustive test setup with every possible combination
14867 of corner cases, factory_boy allows you to use objects customized for the
14868 current test, while only declaring the test-specific fields")
14869 (license license:expat)))
14870
14871 (define-public python2-factory-boy
14872 (package-with-python2 python-factory-boy))
14873
14874 (define-public python-translate-toolkit
14875 (package
14876 (name "python-translate-toolkit")
14877 (version "2.1.0")
14878 (source
14879 (origin
14880 (method url-fetch)
14881 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14882 (sha256
14883 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14884 (build-system python-build-system)
14885 (native-inputs
14886 `(("python-pytest" ,python-pytest)
14887 ("python-sphinx" ,python-sphinx)))
14888 (propagated-inputs
14889 `(("python-babel" ,python-babel)
14890 ("python-beautifulsoup4" ,python-beautifulsoup4)
14891 ("python-chardet" ,python-chardet)
14892 ("python-diff-match-patch" ,python-diff-match-patch)
14893 ("python-levenshtein" ,python-levenshtein)
14894 ("python-lxml" ,python-lxml)
14895 ("python-six" ,python-six)
14896 ("python-vobject" ,python-vobject)
14897 ("python-pyyaml" ,python-pyyaml)))
14898 (arguments
14899 ;; TODO: tests are not run, because they end with
14900 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14901 ;; 'parse_funcs'
14902 ;; during test setup.
14903 `(#:tests? #f))
14904 (home-page "http://toolkit.translatehouse.org")
14905 (synopsis "Tools and API for translation and localization engineering")
14906 (description
14907 "Tools and API for translation and localization engineering. It contains
14908 several utilities, as well as an API for building localization tools.")
14909 (license license:gpl2+)))
14910
14911 (define-public python2-translate-toolkit
14912 (package-with-python2 python-translate-toolkit))
14913
14914 (define-public python-mysqlclient
14915 (package
14916 (name "python-mysqlclient")
14917 (version "1.3.10")
14918 (source
14919 (origin
14920 (method url-fetch)
14921 (uri (pypi-uri "mysqlclient" version))
14922 (sha256
14923 (base32
14924 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14925 (build-system python-build-system)
14926 (native-inputs
14927 `(("mariadb" ,mariadb)
14928 ("nose" ,python-nose)
14929 ("mock" ,python-mock)
14930 ("py.test" ,python-pytest)))
14931 (inputs
14932 `(("mysql" ,mysql)
14933 ("libz" ,zlib)
14934 ("openssl" ,openssl)))
14935 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14936 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14937 (description "MySQLdb is an interface to the popular MySQL database server
14938 for Python. The design goals are:
14939 @enumerate
14940 @item Compliance with Python database API version 2.0 [PEP-0249],
14941 @item Thread-safety,
14942 @item Thread-friendliness (threads will not block each other).
14943 @end enumerate")
14944 (license license:gpl2)))
14945
14946 (define-public python2-mysqlclient
14947 (package-with-python2 python-mysqlclient))
14948
14949 (define-public python-hiredis
14950 (package
14951 (name "python-hiredis")
14952 (version "0.2.0")
14953 (source
14954 (origin
14955 (method url-fetch)
14956 (uri (pypi-uri "hiredis" version))
14957 (sha256
14958 (base32
14959 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14960 (build-system python-build-system)
14961 (arguments
14962 ;; no tests
14963 `(#:tests? #f))
14964 (home-page "https://github.com/redis/hiredis-py")
14965 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14966 (description "Python-hiredis is a python extension that wraps protocol
14967 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14968 (license license:bsd-3)))
14969
14970 (define-public python2-hiredis
14971 (package-with-python2 python-hiredis))
14972
14973 (define-public python-fakeredis
14974 (package
14975 (name "python-fakeredis")
14976 (version "0.8.2")
14977 (source
14978 (origin
14979 (method url-fetch)
14980 (uri (pypi-uri "fakeredis" version))
14981 (sha256
14982 (base32
14983 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14984 (build-system python-build-system)
14985 (arguments
14986 ;; no tests
14987 `(#:tests? #f))
14988 (home-page "https://github.com/jamesls/fakeredis")
14989 (synopsis "Fake implementation of redis API for testing purposes")
14990 (description "Fakeredis is a pure python implementation of the redis-py
14991 python client that simulates talking to a redis server. This was created for a
14992 single purpose: to write unittests. Setting up redis is not hard, but many time
14993 you want to write unittests that do not talk to an external server (such as
14994 redis). This module now allows tests to simply use this module as a reasonable
14995 substitute for redis.")
14996 (license license:bsd-3)))
14997
14998 (define-public python2-fakeredis
14999 (package-with-python2 python-fakeredis))
15000
15001 (define-public python-behave-web-api
15002 (package
15003 (name "python-behave-web-api")
15004 (version "1.0.6")
15005 (source
15006 (origin
15007 (method url-fetch)
15008 (uri (pypi-uri "behave-web-api" version))
15009 (sha256
15010 (base32
15011 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
15012 (build-system python-build-system)
15013 (arguments
15014 `(#:phases
15015 (modify-phases %standard-phases
15016 (add-after 'unpack 'fix-dependencies
15017 (lambda _
15018 (substitute* "setup.py"
15019 (("'wheel'") "") ; We don't use it.
15020 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
15021 (propagated-inputs
15022 `(("behave" ,behave)
15023 ("python-requests" ,python-requests)))
15024 (home-page "https://github.com/jefersondaniel/behave-web-api")
15025 (synopsis "Provides testing for JSON APIs with Behave for Python")
15026 (description "This package provides testing utility modules for testing
15027 JSON APIs with Behave.")
15028 (license license:expat)))
15029
15030 (define-public python2-behave-web-api
15031 (package-with-python2 python-behave-web-api))
15032
15033 (define-public python-flask-script
15034 (package
15035 (name "python-flask-script")
15036 (version "2.0.5")
15037 (source
15038 (origin
15039 (method url-fetch)
15040 (uri (pypi-uri "Flask-Script" version))
15041 (sha256
15042 (base32
15043 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
15044 (build-system python-build-system)
15045 (propagated-inputs
15046 `(("python-flask" ,python-flask)
15047 ("python-argcomplete" ,python-argcomplete)
15048 ("python-werkzeug" ,python-werkzeug)))
15049 (native-inputs
15050 `(("python-pytest" ,python-pytest)))
15051 (home-page
15052 "http://github.com/smurfix/flask-script")
15053 (synopsis "Scripting support for Flask")
15054 (description "The Flask-Script extension provides support for writing
15055 external scripts in Flask. This includes running a development server,
15056 a customised Python shell, scripts to set up your database, cronjobs,
15057 and other command-line tasks that belong outside the web application
15058 itself.")
15059 (license license:bsd-3)))
15060
15061 (define-public python2-flask-script
15062 (package-with-python2 python-flask-script))
15063
15064 (define-public python-flask-migrate
15065 (package
15066 (name "python-flask-migrate")
15067 (version "2.0.3")
15068 (source
15069 (origin
15070 (method url-fetch)
15071 (uri (pypi-uri "Flask-Migrate" version))
15072 (sha256
15073 (base32
15074 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
15075 (build-system python-build-system)
15076 (propagated-inputs
15077 `(("python-flask" ,python-flask)
15078 ("python-alembic" ,python-alembic)
15079 ("python-sqlalchemy" ,python-sqlalchemy)
15080 ("python-flask-script" ,python-flask-script)
15081 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
15082 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
15083 (synopsis "SQLAlchemy database migrations for Flask programs using
15084 Alembic")
15085 (description "This package contains SQLAlchemy database migration tools
15086 for Flask programs that are using @code{python-alembic}.")
15087 (license license:expat)))
15088
15089 (define-public python2-flask-migrate
15090 (package-with-python2 python-flask-migrate))
15091
15092 (define-public python-packaging
15093 (package
15094 (name "python-packaging")
15095 (version "16.8")
15096 (source
15097 (origin
15098 (method url-fetch)
15099 (uri (pypi-uri "packaging" version))
15100 (sha256
15101 (base32
15102 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
15103 (build-system python-build-system)
15104 (native-inputs
15105 `(("python-pretend" ,python-pretend)
15106 ("python-pytest" ,python-pytest)))
15107 (propagated-inputs
15108 `(("python-pyparsing" ,python-pyparsing)
15109 ("python-six" ,python-six)))
15110 (home-page "https://github.com/pypa/packaging")
15111 (synopsis "Core utilities for Python packages")
15112 (description "Packaging is a Python module for dealing with Python packages.
15113 It offers an interface for working with package versions, names, and dependency
15114 information.")
15115 ;; From 'LICENSE': This software is made available under the terms of
15116 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15117 ;; Contributions to this software is made under the terms of *both* these
15118 ;; licenses.
15119 (license (list license:asl2.0 license:bsd-2))))
15120
15121 (define-public python2-packaging
15122 (package-with-python2 python-packaging))
15123
15124 (define-public python-sql
15125 (package
15126 (name "python-sql")
15127 (version "0.9")
15128 (source
15129 (origin
15130 (method url-fetch)
15131 (uri (pypi-uri "python-sql" version))
15132 (sha256
15133 (base32
15134 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15135 (build-system python-build-system)
15136 (home-page "https://python-sql.tryton.org/")
15137 (synopsis "Library to write SQL queries in a pythonic way")
15138 (description "@code{python-sql} is a library to write SQL queries, that
15139 transforms idiomatic python function calls to well-formed SQL queries.")
15140 (license license:bsd-3)))
15141
15142 (define-public python2-sql
15143 (package-with-python2 python-sql))
15144
15145 (define-public python-genshi
15146 (package
15147 (name "python-genshi")
15148 (version "0.7")
15149 (source
15150 (origin
15151 (method url-fetch)
15152 (uri (string-append
15153 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15154 version ".tar.gz"))
15155 (patches
15156 (search-patches
15157 ;; The first 4 patches are in the master branch upstream.
15158 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15159 ;; The last 2 are NOT in any branch.
15160 ;; They were sent as attachments to a ticket opened at
15161 ;; https://genshi.edgewall.org/ticket/602#no1
15162 "python-genshi-stripping-of-unsafe-script-tags.patch"
15163 "python-genshi-disable-speedups-on-python-3.3.patch"
15164 "python-genshi-isstring-helper.patch"
15165 "python-genshi-add-support-for-python-3.4-AST.patch"
15166 "python-genshi-fix-tests-on-python-3.5.patch"
15167 "python-genshi-buildable-on-python-2.7.patch"))
15168 (sha256
15169 (base32
15170 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15171 (build-system python-build-system)
15172 (home-page "https://genshi.edgewall.org/")
15173 (synopsis "Toolkit for generation of output for the web")
15174 (description "Genshi is a Python library that provides an integrated set
15175 of components for parsing, generating, and processing HTML, XML or other
15176 textual content for output generation on the web.")
15177 (license license:bsd-3)))
15178
15179 ;; The linter here claims that patch file names should start with the package
15180 ;; name. But, in this case the patches are inherited from python-genshi with
15181 ;; the "python-genshi-" prefix instead of "python2-genshi-".
15182 (define-public python2-genshi
15183 (package-with-python2 python-genshi))
15184
15185 (define-public python-relatorio
15186 (package
15187 (name "python-relatorio")
15188 (version "0.6.4")
15189 (source
15190 (origin
15191 (method url-fetch)
15192 (uri (pypi-uri "relatorio" version))
15193 (sha256
15194 (base32
15195 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15196 (build-system python-build-system)
15197 (propagated-inputs
15198 `(("python-lxml" ,python-lxml)
15199 ("python-genshi" ,python-genshi)))
15200 (home-page "https://relatorio.tryton.org/")
15201 (synopsis "Templating library able to output ODT and PDF files")
15202 (description "Relatorio is a templating library which provides a way to
15203 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15204 for more filetypes can be easily added by creating plugins for them.")
15205 (license license:gpl3+)))
15206
15207 (define-public python2-relatorio
15208 (package-with-python2 python-relatorio))
15209
15210 (define-public python-radon
15211 (package
15212 (name "python-radon")
15213 (version "1.5.0")
15214 (source
15215 (origin
15216 (method url-fetch)
15217 (uri (pypi-uri "radon" version))
15218 (sha256
15219 (base32
15220 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15221 (build-system python-build-system)
15222 (propagated-inputs
15223 `(("python-colorama" ,python-colorama)
15224 ("python-flake8-polyfill" ,python-flake8-polyfill)
15225 ("python-mando" ,python-mando-0.3.1)))
15226 (native-inputs
15227 `(("python-flake8" ,python-flake8)
15228 ("python-tox" ,python-tox)
15229 ("python-pytest" ,python-pytest)
15230 ("python-paramunittest" ,python-paramunittest)))
15231 (home-page "https://radon.readthedocs.org/")
15232 (synopsis "Code Metrics in Python")
15233 (description "Radon is a Python tool which computes various code metrics.
15234 Supported metrics are:
15235 @itemize @bullet
15236 @item raw metrics: SLOC, comment lines, blank lines, &c.
15237 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15238 @item Halstead metrics (all of them)
15239 @item the Maintainability Index (a Visual Studio metric)
15240 @end itemize")
15241 (license license:expat)))
15242
15243 (define-public python2-radon
15244 (package-with-python2 python-radon))
15245
15246 (define-public python-sure
15247 (package
15248 (name "python-sure")
15249 (version "1.4.6")
15250 (source
15251 (origin
15252 (method url-fetch)
15253 (uri (pypi-uri "sure" version))
15254 (sha256
15255 (base32
15256 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15257 (build-system python-build-system)
15258 (propagated-inputs
15259 `(("python-mock" ,python-mock)
15260 ("python-six" ,python-six)))
15261 (native-inputs
15262 `(("python-nose" ,python-nose)))
15263 (home-page "https://github.com/gabrielfalcao/sure")
15264 (synopsis "Automated testing library in python for python")
15265 (description
15266 "Sure is a python library that leverages a DSL for writing assertions.
15267 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15268 (license license:gpl3+)))
15269
15270 (define-public python2-sure
15271 (package-with-python2 python-sure))
15272
15273 (define-public python2-couleur
15274 ;; This package does not seem to support python3 at all, hence,
15275 ;; only the python2 variant definition is provided.
15276 (package
15277 (name "python2-couleur")
15278 (version "0.6.2")
15279 (source
15280 (origin
15281 (method url-fetch)
15282 (uri (pypi-uri "couleur" version))
15283 (sha256
15284 (base32
15285 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15286 (build-system python-build-system)
15287 (arguments
15288 `(#:python ,python-2))
15289 (home-page "https://github.com/gabrielfalcao/couleur")
15290 (synopsis
15291 "ANSI terminal tool for python, colored shell and other handy fancy features")
15292 (description
15293 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15294 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15295 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15296 ;; https://github.com/gabrielfalcao/couleur/issues/11
15297 (license license:lgpl3+)))
15298
15299 (define-public python-misaka
15300 (package
15301 (name "python-misaka")
15302 (version "2.1.0")
15303 (source
15304 (origin
15305 (method url-fetch)
15306 (uri (pypi-uri "misaka" version))
15307 (sha256
15308 (base32
15309 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15310 (build-system python-build-system)
15311 (arguments
15312 `(;; Line 37 of setup.py calls self.run_command('develop')
15313 ;; in the 'check' phase. This command seems to be trying
15314 ;; to write to
15315 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15316 ;; for which it does not have the permission to write.
15317 #:tests? #f))
15318 (propagated-inputs
15319 `(("python-cffi" ,python-cffi)))
15320 (home-page "https://github.com/FSX/misaka")
15321 (synopsis "Python binding for Hoedown")
15322 (description
15323 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15324 library written in C. It features a fast HTML renderer and functionality to make custom
15325 renderers (e.g. man pages or LaTeX).")
15326 (license license:expat)))
15327
15328 (define-public python2-misaka
15329 (package-with-python2 python-misaka))
15330
15331 (define-public python2-steadymark
15332 ;; This is forced into being a python2 only variant
15333 ;; due to its dependence on couleur that has no support
15334 ;; for python3
15335 (package
15336 (name "python2-steadymark")
15337 (version "0.7.3")
15338 (source
15339 (origin
15340 (method url-fetch)
15341 (uri (pypi-uri "steadymark" version))
15342 (sha256
15343 (base32
15344 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15345 (build-system python-build-system)
15346 (native-inputs
15347 `(("python-couleur" ,python2-couleur)
15348 ("python-sure" ,python2-sure)
15349 ("python-misaka" ,python2-misaka)))
15350 (arguments
15351 `(#:python ,python-2
15352 #:phases
15353 (modify-phases %standard-phases
15354 (add-before 'build 'patch-setup-py
15355 (lambda _
15356 ;; Update requirements from dependency==version
15357 ;; to dependency>=version
15358 (substitute* "setup.py"
15359 (("==") ">="))
15360 #t)))))
15361 (home-page "https://github.com/gabrielfalcao/steadymark")
15362 (synopsis "Markdown-based test runner for python")
15363 (description
15364 "@code{Steadymark} allows documentation to be written in github-flavoured
15365 markdown. The documentation may contain snippets of code surrounded by python
15366 code blocks and @code{Steadymark} will find these snippets and run them, making
15367 sure that there are no old malfunctional examples in the documentation examples.")
15368 (license license:expat)))
15369
15370 (define-public python-nose-randomly
15371 (package
15372 (name "python-nose-randomly")
15373 (version "1.2.5")
15374 (source
15375 (origin
15376 (method url-fetch)
15377 (uri (pypi-uri "nose-randomly" version))
15378 (sha256
15379 (base32
15380 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15381 (build-system python-build-system)
15382 (native-inputs
15383 `(("python-nose" ,python-nose)
15384 ("python-numpy" ,python-numpy)))
15385 (home-page "https://github.com/adamchainz/nose-randomly")
15386 (synopsis
15387 "Nose plugin to randomly order tests and control random.seed")
15388 (description
15389 "This is a @code{Nose} plugin to randomly order tests which can be quite
15390 powerful in discovering hidden flaws in the tests themselves, while helping to
15391 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15392 by resetting it to a repeatable number for each test, enabling the tests to
15393 create data based on random numbers and yet remain repeatable.")
15394 (license license:bsd-3)))
15395
15396 (define-public python2-nose-randomly
15397 (package-with-python2 python-nose-randomly))
15398
15399 (define-public python-jsonpointer
15400 (package
15401 (name "python-jsonpointer")
15402 (version "1.10")
15403 (source
15404 (origin
15405 (method url-fetch)
15406 (uri (pypi-uri "jsonpointer" version))
15407 (sha256
15408 (base32
15409 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15410 (build-system python-build-system)
15411 (home-page "https://github.com/stefankoegl/python-json-pointer")
15412 (synopsis "Identify specific nodes in a JSON document")
15413 (description "@code{jsonpointer} allows you to access specific nodes
15414 by path in a JSON document (see RFC 6901).")
15415 (license license:bsd-3)))
15416
15417 (define-public python2-jsonpointer
15418 (package-with-python2 python-jsonpointer))
15419
15420 (define-public python-jsonpatch
15421 (package
15422 (name "python-jsonpatch")
15423 (version "1.16")
15424 (source
15425 (origin
15426 (method url-fetch)
15427 ;; pypi version lacks tests.js
15428 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15429 "archive/v" version ".tar.gz"))
15430 (file-name (string-append name "-" version ".tar.gz"))
15431 (sha256
15432 (base32
15433 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
15434 (build-system python-build-system)
15435 (native-inputs
15436 `(("python-jsonpointer" ,python-jsonpointer)))
15437 (home-page "https://github.com/stefankoegl/python-json-patch")
15438 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15439 (description "@code{jsonpatch} is a library and program that allows
15440 applying JSON Patches according to RFC 6902.")
15441 (license license:bsd-3)))
15442
15443 (define-public python2-jsonpatch
15444 (package-with-python2 python-jsonpatch))
15445
15446 (define-public python-jsonpatch-0.4
15447 (package (inherit python-jsonpatch)
15448 (name "python-jsonpatch")
15449 (version "0.4")
15450 (source
15451 (origin
15452 (method url-fetch)
15453 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15454 "archive/v" version ".tar.gz"))
15455 (file-name (string-append name "-" version ".tar.gz"))
15456 (sha256
15457 (base32
15458 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
15459
15460 (define-public python2-jsonpatch-0.4
15461 (package-with-python2 python-jsonpatch-0.4))
15462
15463 (define-public python-rfc3987
15464 (package
15465 (name "python-rfc3987")
15466 (version "1.3.7")
15467 (source
15468 (origin
15469 (method url-fetch)
15470 (uri (pypi-uri "rfc3987" version))
15471 (sha256
15472 (base32
15473 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15474 (build-system python-build-system)
15475 (home-page "http://pypi.python.org/pypi/rfc3987")
15476 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15477 (description "@code{rfc3987} provides routines for parsing and
15478 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15479 (license license:gpl3+)))
15480
15481 (define-public python2-rfc3987
15482 (package-with-python2 python-rfc3987))
15483
15484 (define-public python-validate-email
15485 (package
15486 (name "python-validate-email")
15487 (version "1.3")
15488 (source
15489 (origin
15490 (method url-fetch)
15491 (uri (pypi-uri "validate_email" version))
15492 (sha256
15493 (base32
15494 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15495 (build-system python-build-system)
15496 (home-page "http://github.com/syrusakbary/validate_email")
15497 (synopsis "Verifies if an email address is valid and really exists")
15498 (description "@code{validate_email} can be used to verify if an email
15499 address is valid and really exists.")
15500 (license license:lgpl3+)))
15501
15502 (define-public python2-validate-email
15503 (package-with-python2 python-validate-email))
15504
15505 (define-public python-flex
15506 (package
15507 (name "python-flex")
15508 (version "6.10.0")
15509 (source
15510 (origin
15511 (method url-fetch)
15512 (uri (pypi-uri "flex" version))
15513 (sha256
15514 (base32
15515 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15516 (build-system python-build-system)
15517 (propagated-inputs
15518 `(("python-click" ,python-click)
15519 ("python-iso8601" ,python-iso8601)
15520 ("python-jsonpointer" ,python-jsonpointer)
15521 ("python-pyyaml" ,python-pyyaml)
15522 ("python-requests" ,python-requests)
15523 ("python-rfc3987" ,python-rfc3987)
15524 ("python-six" ,python-six)
15525 ("python-validate-email" ,python-validate-email)))
15526 (home-page "https://github.com/pipermerriam/flex")
15527 (synopsis "Validates Swagger schemata")
15528 (description "@code{flex} can be used to validate Swagger schemata.")
15529 (license license:bsd-3)))
15530
15531 (define-public python2-flex
15532 (package-with-python2 python-flex))
15533
15534 (define-public python-marshmallow
15535 (package
15536 (name "python-marshmallow")
15537 (version "3.0.0b2")
15538 (source
15539 (origin
15540 (method url-fetch)
15541 (uri (pypi-uri "marshmallow" version))
15542 (sha256
15543 (base32
15544 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15545 (build-system python-build-system)
15546 (propagated-inputs
15547 `(("python-dateutil" ,python-dateutil)
15548 ("python-simplejson" ,python-simplejson)))
15549 (native-inputs
15550 `(("python-pytest-3.0" ,python-pytest-3.0)
15551 ("python-pytz" ,python-pytz)))
15552 (home-page "https://github.com/marshmallow-code/marshmallow")
15553 (synopsis "Convert complex datatypes to and from native
15554 Python datatypes.")
15555 (description "@code{marshmallow} provides a library for converting
15556 complex datatypes to and from native Python datatypes.")
15557 (license license:expat)))
15558
15559 (define-public python2-marshmallow
15560 (package-with-python2 python-marshmallow))
15561
15562 (define-public python-bottle
15563 (package
15564 (name "python-bottle")
15565 (version "0.12.13")
15566 (source
15567 (origin
15568 (method url-fetch)
15569 (uri (pypi-uri "bottle" version))
15570 (sha256
15571 (base32
15572 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15573 (build-system python-build-system)
15574 (home-page "http://bottlepy.org/")
15575 (synopsis "WSGI framework for small web-applications.")
15576 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15577 (license license:expat)))
15578
15579 (define-public python2-bottle
15580 (package-with-python2 python-bottle))
15581
15582 (define-public python-apispec
15583 (package
15584 (name "python-apispec")
15585 (version "0.22.0")
15586 (source
15587 (origin
15588 (method url-fetch)
15589 (uri (pypi-uri "apispec" version))
15590 (sha256
15591 (base32
15592 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15593 (build-system python-build-system)
15594 (propagated-inputs
15595 `(("python-pyyaml" ,python-pyyaml)))
15596 (native-inputs
15597 `(("python-pytest-3.0" ,python-pytest-3.0)
15598 ("python-flask" ,python-flask)
15599 ("python-marshmallow" ,python-marshmallow)
15600 ("python-tornado" ,python-tornado)
15601 ("python-bottle" ,python-bottle)
15602 ("python-mock" ,python-mock)))
15603 (home-page "https://github.com/marshmallow-code/apispec")
15604 (synopsis "Swagger 2.0 API specification generator")
15605 (description "@code{python-apispec} is a pluggable API specification
15606 generator. Currently supports the OpenAPI specification (f.k.a.
15607 Swagger 2.0).")
15608 (license license:expat)))
15609
15610 (define-public python2-apispec
15611 (package-with-python2 python-apispec))
15612
15613 (define-public python-flasgger
15614 (package
15615 (name "python-flasgger")
15616 (version "0.6.3")
15617 (source
15618 (origin
15619 (method url-fetch)
15620 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15621 version ".tar.gz"))
15622 (file-name (string-append name "-" version ".tar.gz"))
15623 (sha256
15624 (base32
15625 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15626 (build-system python-build-system)
15627 (arguments
15628 `(#:phases
15629 (modify-phases %standard-phases
15630 (replace 'check
15631 (lambda* (#:key inputs outputs #:allow-other-keys)
15632 (substitute* "Makefile"
15633 (("flake8 flasgger --ignore=F403")
15634 "flake8 flasgger --ignore=E731,F403"))
15635 (setenv "PYTHONPATH" (string-append (getcwd)
15636 ":"
15637 (getenv "PYTHONPATH")))
15638 (zero? (system* "py.test")))))))
15639 (propagated-inputs
15640 `(("python-flask" ,python-flask)
15641 ("python-pyyaml" ,python-pyyaml)
15642 ("python-jsonschema" ,python-jsonschema)
15643 ("python-mistune" ,python-mistune)
15644 ("python-six" ,python-six)))
15645 (native-inputs
15646 `(("python-decorator" ,python-decorator)
15647 ("python-flake8" ,python-flake8)
15648 ("python-flask-restful" ,python-flask-restful)
15649 ("python-flex" ,python-flex)
15650 ("python-pytest-3.0" ,python-pytest-3.0)
15651 ("python-pytest-cov" ,python-pytest-cov)
15652 ("python-marshmallow" ,python-marshmallow)
15653 ("python-apispec" ,python-apispec)))
15654 (home-page "https://github.com/rochacbruno/flasgger/")
15655 (synopsis "Extract Swagger specs from your Flask project")
15656 (description "@code{python-flasgger} allows extracting Swagger specs
15657 from your Flask project. It is a fork of Flask-Swagger.")
15658 (license license:expat)))
15659
15660 (define-public python2-flasgger
15661 (package-with-python2 python-flasgger))
15662
15663 (define-public python-swagger-spec-validator
15664 (package
15665 (name "python-swagger-spec-validator")
15666 (version "2.1.0")
15667 (source
15668 (origin
15669 (method url-fetch)
15670 (uri (pypi-uri "swagger-spec-validator" version))
15671 (sha256
15672 (base32
15673 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15674 (build-system python-build-system)
15675 (propagated-inputs
15676 `(("python-jsonschema" ,python-jsonschema)
15677 ("python-six" ,python-six)))
15678 (home-page
15679 "http://github.com/Yelp/swagger_spec_validator")
15680 (synopsis "Validation of Swagger specifications")
15681 (description "@code{swagger_spec_validator} provides a library for
15682 validating Swagger API specifications.")
15683 (license license:asl2.0)))
15684
15685 (define-public python2-swagger-spec-validator
15686 (package-with-python2 python-swagger-spec-validator))
15687
15688 (define-public python-apache-libcloud
15689 (package
15690 (name "python-apache-libcloud")
15691 (version "2.0.0")
15692 (source
15693 (origin
15694 (method url-fetch)
15695 (uri (pypi-uri "apache-libcloud" version))
15696 (sha256
15697 (base32
15698 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15699 (build-system python-build-system)
15700 (arguments
15701 `(#:phases
15702 (modify-phases %standard-phases
15703 (add-after 'unpack 'patch-ssh
15704 (lambda* (#:key inputs #:allow-other-keys)
15705 (substitute* "libcloud/compute/ssh.py"
15706 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15707 "/bin/ssh" "'")))
15708 #t))
15709 (add-after 'unpack 'patch-tests
15710 (lambda _
15711 (substitute* "./libcloud/test/test_file_fixtures.py"
15712 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15713 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15714 return (httplib.OK,
15715 \"1234abcd\",
15716 {\"test\": \"value\"},
15717 httplib.responses[httplib.OK])
15718 def _ascii"))
15719 (substitute* "libcloud/test/compute/test_ssh_client.py"
15720 (("class ShellOutSSHClientTests")
15721 "@unittest.skip(\"Guix container doesn't have ssh service\")
15722 class ShellOutSSHClientTests")
15723 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15724 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15725 (("'.xF0', '.x90', '.x8D', '.x88'")
15726 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15727 #t)))))
15728 (inputs
15729 `(("openssh" ,openssh)))
15730 (propagated-inputs
15731 `(("python-paramiko" ,python-paramiko)
15732 ("python-requests" ,python-requests)))
15733 (native-inputs
15734 `(("python-lockfile" ,python-lockfile)
15735 ("python-mock" ,python-mock)
15736 ("python-requests-mock" ,python-requests-mock)))
15737 (home-page "https://libcloud.apache.org/")
15738 (synopsis "Unified Cloud API")
15739 (description "@code{libcloud} is a Python library for interacting with
15740 many of the popular cloud service providers using a unified API.")
15741 (license license:asl2.0)))
15742
15743 (define-public python2-apache-libcloud
15744 (package-with-python2 python-apache-libcloud))
15745
15746 (define-public python-smmap2
15747 (package
15748 (name "python-smmap2")
15749 (version "2.0.3")
15750 (source
15751 (origin
15752 (method url-fetch)
15753 (uri (pypi-uri "smmap2" version))
15754 (sha256
15755 (base32
15756 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
15757 (build-system python-build-system)
15758 (native-inputs
15759 `(("python-nosexcover" ,python-nosexcover)))
15760 (home-page "https://github.com/Byron/smmap")
15761 (synopsis "Python sliding window memory map manager")
15762 (description "@code{smmap2} is a pure Python implementation of a sliding
15763 window memory map manager.")
15764 (license license:bsd-3)))
15765
15766 (define-public python2-smmap2
15767 (package-with-python2 python-smmap2))
15768
15769 (define-public python-regex
15770 (package
15771 (name "python-regex")
15772 (version "2017.06.07")
15773 (source (origin
15774 (method url-fetch)
15775 (uri (pypi-uri "regex" version))
15776 (sha256
15777 (base32
15778 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
15779 (build-system python-build-system)
15780 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15781 (synopsis "Alternative regular expression module")
15782 (description "This regular expression implementation is backwards-
15783 compatible with the standard @code{re} module, but offers additional
15784 functionality like full case-folding for case-insensitive matches in Unicode.")
15785 (license license:psfl)))
15786
15787 (define-public python2-regex
15788 (package-with-python2 python-regex))
15789
15790 (define-public python2-pyopengl
15791 (package
15792 (name "python2-pyopengl")
15793 (version "3.1.0")
15794 (source
15795 (origin
15796 (method url-fetch)
15797 (uri (pypi-uri "PyOpenGL" version))
15798 (sha256
15799 (base32
15800 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15801 (arguments
15802 `(#:python ,python-2))
15803 (build-system python-build-system)
15804 (home-page "http://pyopengl.sourceforge.net")
15805 (synopsis "Standard OpenGL bindings for Python")
15806 (description
15807 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15808 related APIs. The binding is created using the standard @code{ctypes}
15809 library.")
15810 (license license:bsd-3)))
15811
15812 (define-public python-rencode
15813 (package
15814 (name "python-rencode")
15815 (version "1.0.3")
15816 (source
15817 (origin
15818 (method url-fetch)
15819 (uri (pypi-uri "rencode" version))
15820 (sha256
15821 (base32
15822 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
15823 (build-system python-build-system)
15824 (native-inputs `(("pkg-config" ,pkg-config)
15825 ("python-cython", python-cython)))
15826 (home-page "https://github.com/aresch/rencode")
15827 (synopsis "Serialization of heterogeneous data structures")
15828 (description
15829 "The @code{rencode} module is a data structure serialization library,
15830 similar to @code{bencode} from the BitTorrent project. For complex,
15831 heterogeneous data structures with many small elements, r-encoding stake up
15832 significantly less space than b-encodings. This version of rencode is a
15833 complete rewrite in Cython to attempt to increase the performance over the
15834 pure Python module.")
15835 (license license:bsd-3)))
15836
15837 (define-public python2-rencode
15838 (package-with-python2 python-rencode))