gnu: Add librdkafka.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
6a44697d 14;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
a01b6da7
NK
23;;;
24;;; This file is part of GNU Guix.
25;;;
26;;; GNU Guix is free software; you can redistribute it and/or modify it
27;;; under the terms of the GNU General Public License as published by
28;;; the Free Software Foundation; either version 3 of the License, or (at
29;;; your option) any later version.
30;;;
31;;; GNU Guix is distributed in the hope that it will be useful, but
32;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34;;; GNU General Public License for more details.
35;;;
36;;; You should have received a copy of the GNU General Public License
37;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38
1ffa7090 39(define-module (gnu packages python)
011b18c3 40 #:use-module ((guix licenses)
45203542 41 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
63bcec71 42 gpl2 gpl2+ gpl3 gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
548d7165 43 isc mpl2.0 psfl public-domain repoze unlicense x11-style
7517e73c 44 zpl2.1))
bd3fa666 45 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
3fdc99da 46 #:use-module (gnu packages)
8e451885 47 #:use-module (gnu packages algebra)
d79a343b 48 #:use-module (gnu packages adns)
89b2e0b0 49 #:use-module (gnu packages attr)
d96034ed 50 #:use-module (gnu packages backup)
1ffa7090 51 #:use-module (gnu packages compression)
4ed20663 52 #:use-module (gnu packages databases)
5e1c9367 53 #:use-module (gnu packages file)
4ed20663 54 #:use-module (gnu packages fontutils)
4ed20663
AE
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages ghostscript)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gtk)
421a80a2 59 #:use-module (gnu packages icu4c)
c937562e 60 #:use-module (gnu packages image)
4ed20663 61 #:use-module (gnu packages imagemagick)
d79a343b 62 #:use-module (gnu packages libevent)
b10ab723 63 #:use-module (gnu packages libffi)
89b2e0b0 64 #:use-module (gnu packages linux)
0da98533 65 #:use-module (gnu packages maths)
4ed20663 66 #:use-module (gnu packages multiprecision)
45203542 67 #:use-module (gnu packages networking)
be7134bf 68 #:use-module (gnu packages ncurses)
c9b1b4f9 69 #:use-module (gnu packages pcre)
4ed20663 70 #:use-module (gnu packages perl)
b10ab723 71 #:use-module (gnu packages pkg-config)
4ed20663 72 #:use-module (gnu packages readline)
c9b1b4f9 73 #:use-module (gnu packages statistics)
8f9ac901 74 #:use-module (gnu packages tex)
1c65314c 75 #:use-module (gnu packages texinfo)
cc2b77df 76 #:use-module (gnu packages tls)
e25f0174 77 #:use-module (gnu packages version-control)
8d12be1e 78 #:use-module (gnu packages web)
ce0614dd 79 #:use-module (gnu packages base)
26b307e2 80 #:use-module (gnu packages xml)
6fa14469 81 #:use-module (gnu packages xorg)
0bdc1671 82 #:use-module (gnu packages xdisorg)
4ed20663 83 #:use-module (gnu packages zip)
afa181ff 84 #:use-module (gnu packages tcl)
63bcec71
DM
85 #:use-module (gnu packages bdw-gc)
86 #:use-module (gnu packages pcre)
a01b6da7
NK
87 #:use-module (guix packages)
88 #:use-module (guix download)
ea5456c8 89 #:use-module (guix git-download)
11bb85a1 90 #:use-module (guix utils)
acc26ff1 91 #:use-module (guix build-system gnu)
d8c4998f 92 #:use-module (guix build-system cmake)
898238b9 93 #:use-module (guix build-system python)
1c65314c
FB
94 #:use-module (guix build-system trivial)
95 #:use-module (srfi srfi-1))
a01b6da7 96
45848023 97(define-public python-2.7
a01b6da7
NK
98 (package
99 (name "python")
ff6f33cf 100 (version "2.7.10")
a01b6da7
NK
101 (source
102 (origin
103 (method url-fetch)
9b43a0ff 104 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
105 version "/Python-" version ".tar.xz"))
106 (sha256
107 (base32
6a20289d 108 "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw"))
fc1adab1
AK
109 (patches (search-patches
110 "python-2.7-search-paths.patch"
111 "python-2-deterministic-build-info.patch"
112 "python-2.7-source-date-epoch.patch"))))
02f0c3b2
LC
113 (outputs '("out"
114 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 115 (build-system gnu-build-system)
3fdc99da 116 (arguments
af807dea 117 `(#:tests? #f
ff6f33cf
ED
118 ;; 268 tests OK.
119 ;; 103 tests failed:
120 ;; test_distutils test_shutil test_signal test_site test_slice
121 ;; test_smtplib test_smtpnet test_socket test_socketserver
122 ;; test_softspace test_sort test_spwd test_sqlite test_ssl
123 ;; test_startfile test_stat test_str test_strftime test_string
124 ;; test_stringprep test_strop test_strptime test_strtod test_struct
125 ;; test_structmembers test_structseq test_subprocess test_sunau
126 ;; test_sunaudiodev test_sundry test_symtable test_syntax test_sys
127 ;; test_sys_setprofile test_sys_settrace test_sysconfig test_tarfile
128 ;; test_tcl test_telnetlib test_tempfile test_textwrap test_thread
129 ;; test_threaded_import test_threadedtempfile test_threading
130 ;; test_threading_local test_threadsignals test_time test_timeit
131 ;; test_timeout test_tk test_tokenize test_tools test_trace
132 ;; test_traceback test_transformer test_ttk_guionly test_ttk_textonly
133 ;; test_tuple test_typechecks test_ucn test_unary
134 ;; test_undocumented_details test_unicode test_unicode_file
135 ;; test_unicodedata test_univnewlines test_univnewlines2k test_unpack
136 ;; test_urllib test_urllib2 test_urllib2_localnet test_urllib2net
137 ;; test_urllibnet test_urlparse test_userdict test_userlist
138 ;; test_userstring test_uu test_uuid test_wait3 test_wait4
139 ;; test_warnings test_wave test_weakref test_weakset test_whichdb
140 ;; test_winreg test_winsound test_with test_wsgiref test_xdrlib
141 ;; test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc
142 ;; test_xpickle test_xrange test_zipfile test_zipfile64
143 ;; test_zipimport test_zipimport_support test_zlib
144 ;; 30 tests skipped:
145 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
146 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
147 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_crypt
148 ;; test_curses test_dl test_gdb test_gl test_idle test_imageop
149 ;; test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos
150 ;; test_macostools test_msilib test_nis test_ossaudiodev
151 ;; test_scriptpackages
152 ;; 6 skips unexpected on linux2:
153 ;; test_bsddb test_bsddb3 test_crypt test_gdb test_idle test_ioctl
154 ;; One of the typical errors:
155 ;; test_unicode
156 ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No
157 ;; such file or directory
af807dea 158 #:test-target "test"
3fdc99da 159 #:configure-flags
6a20289d
LC
160 (list "--enable-shared" ;allow embedding
161 "--with-system-ffi" ;build ctypes
162 (string-append "LDFLAGS=-Wl,-rpath="
163 (assoc-ref %outputs "out") "/lib"))
fd982732 164
d2cc9c7c
LC
165 #:modules ((ice-9 ftw) (ice-9 match)
166 (guix build utils) (guix build gnu-build-system))
fd982732 167 #:phases
46472ecd
MW
168 (modify-phases %standard-phases
169 (add-before
170 'configure 'patch-lib-shells
171 (lambda _
172 ;; Filter for existing files, since some may not exist in all
173 ;; versions of python that are built with this recipe.
174 (substitute* (filter file-exists?
175 '("Lib/subprocess.py"
176 "Lib/popen2.py"
177 "Lib/distutils/tests/test_spawn.py"
178 "Lib/test/test_subprocess.py"))
179 (("/bin/sh") (which "sh")))
dedc8320
LC
180
181 ;; Use zero as the timestamp in .pyc files so that builds are
182 ;; deterministic. TODO: Remove it when this variable is set in
183 ;; gnu-build-system.scm.
a665996f 184 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 185 #t))
5b4e2791
LC
186 (add-before 'configure 'do-not-record-configure-flags
187 (lambda* (#:key configure-flags #:allow-other-keys)
188 ;; Remove configure flags from the installed '_sysconfigdata.py'
189 ;; and 'Makefile' so we don't end up keeping references to the
190 ;; build tools.
191 ;;
192 ;; Preserve at least '--with-system-ffi' since otherwise the
193 ;; thing tries to build libffi, fails, and we end up with a
194 ;; Python that lacks ctypes.
195 (substitute* "configure"
196 (("^CONFIG_ARGS=.*$")
197 (format #f "CONFIG_ARGS='~a'\n"
198 (if (member "--with-system-ffi" configure-flags)
199 "--with-system-ffi"
200 ""))))
201 #t))
46472ecd
MW
202 (add-before
203 'check 'pre-check
204 (lambda _
205 ;; 'Lib/test/test_site.py' needs a valid $HOME
206 (setenv "HOME" (getcwd))
207 #t))
208 (add-after
209 'unpack 'set-source-file-times-to-1980
210 ;; XXX One of the tests uses a ZIP library to pack up some of the
211 ;; source tree, and fails with "ZIP does not support timestamps
212 ;; before 1980". Work around this by setting the file times in the
213 ;; source tree to sometime in early 1980.
214 (lambda _
215 (let ((circa-1980 (* 10 366 24 60 60)))
216 (ftw "." (lambda (file stat flag)
217 (utime file circa-1980 circa-1980)
218 #t))
02f0c3b2
LC
219 #t)))
220 (add-after 'install 'move-tk-inter
221 (lambda* (#:key outputs #:allow-other-keys)
222 ;; When Tkinter support is built move it to a separate output so
223 ;; that the main output doesn't contain a reference to Tcl/Tk.
224 (let ((out (assoc-ref outputs "out"))
225 (tk (assoc-ref outputs "tk")))
226 (when tk
227 (match (find-files out "tkinter.*\\.so")
228 ((tkinter.so)
229 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
230 ;; want it under TK/lib/pythonX.Y/site-packages.
231 (let* ((len (string-length out))
232 (target (string-append
233 tk "/"
234 (string-drop
235 (dirname (dirname tkinter.so))
236 len)
237 "/site-packages")))
238 (install-file tkinter.so target)
239 (delete-file tkinter.so)))))
240 #t))))))
a01b6da7 241 (inputs
3fdc99da
CR
242 `(("bzip2" ,bzip2)
243 ("gdbm" ,gdbm)
b10ab723 244 ("libffi" ,libffi) ; for ctypes
b88e1b0a 245 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 246 ("openssl" ,openssl)
3fdc99da 247 ("readline" ,readline)
afa181ff
LC
248 ("zlib" ,zlib)
249 ("tcl" ,tcl)
250 ("tk" ,tk))) ; for tkinter
b10ab723
CR
251 (native-inputs
252 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
253 (native-search-paths
254 (list (search-path-specification
255 (variable "PYTHONPATH")
af070955 256 (files '("lib/python2.7/site-packages")))))
a01b6da7 257 (home-page "http://python.org")
afa181ff 258 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
259 (description
260 "Python is a remarkably powerful dynamic programming language that
261is used in a wide variety of application domains. Some of its key
262distinguishing features include: clear, readable syntax; strong
263introspection capabilities; intuitive object orientation; natural
264expression of procedural code; full modularity, supporting hierarchical
265packages; exception-based error handling; and very high level dynamic
266data types.")
267 (license psfl)))
acc26ff1 268
45848023
HG
269;; Current 2.x version.
270(define-public python-2 python-2.7)
271
272(define-public python-3.4
b24d1cfc 273 (package (inherit python-2)
08c04509 274 (version "3.4.3")
717003e3
LC
275 (source (origin
276 (method url-fetch)
277 (uri (string-append "https://www.python.org/ftp/python/"
278 version "/Python-" version ".tar.xz"))
fc1adab1
AK
279 (patches (search-patches
280 "python-fix-tests.patch"
281 ;; XXX Try removing this patch for python > 3.4.3
282 "python-disable-ssl-test.patch"
283 "python-3-deterministic-build-info.patch"
284 "python-3-search-paths.patch"))
717003e3
LC
285 (patch-flags '("-p0"))
286 (sha256
287 (base32
08c04509 288 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
1f434457
MW
289 (arguments (substitute-keyword-arguments (package-arguments python-2)
290 ((#:tests? _) #t)))
1aebc0cb
AE
291 (native-search-paths
292 (list (search-path-specification
293 (variable "PYTHONPATH")
0e05d01e
SB
294 (files (list (string-append "lib/python"
295 (version-major+minor version)
296 "/site-packages"))))))))
f26a77ff 297
45848023
HG
298;; Current 3.x version.
299(define-public python-3 python-3.4)
300
301;; Current major version.
302(define-public python python-3)
303
95288fcc
LC
304;; Minimal variants of Python, mostly used to break the cycle between Tk and
305;; Python (Tk -> libxcb -> Python.)
306
307(define-public python2-minimal
308 (package (inherit python-2)
309 (name "python-minimal")
02f0c3b2 310 (outputs '("out"))
95288fcc
LC
311 (arguments
312 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
313 ((#:configure-flags cf)
314 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
315 (inputs '()))) ;none of the optional dependencies
316
317(define-public python-minimal
898238b9 318 (package (inherit python)
95288fcc 319 (name "python-minimal")
02f0c3b2 320 (outputs '("out"))
95288fcc
LC
321 (arguments
322 (substitute-keyword-arguments (package-arguments python)
c5a05e31
LC
323 ((#:configure-flags cf)
324 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
325
326 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
327 ;; zlib is required by 'zipimport', used by pip.
328 (inputs `(("openssl" ,openssl)
329 ("zlib" ,zlib)))))
330
64cb064c
LC
331(define* (wrap-python3 python
332 #:optional
333 (name (string-append (package-name python) "-wrapper")))
898238b9 334 (package (inherit python)
95288fcc 335 (name name)
898238b9
AE
336 (source #f)
337 (build-system trivial-build-system)
02f0c3b2 338 (outputs '("out"))
3c0f2329 339 (propagated-inputs `(("python" ,python)))
898238b9
AE
340 (arguments
341 `(#:modules ((guix build utils))
342 #:builder
343 (begin
344 (use-modules (guix build utils))
345 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
346 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
347 (mkdir-p bin)
348 (for-each
349 (lambda (old new)
350 (symlink (string-append python old)
351 (string-append bin "/" new)))
b3546174
MW
352 `("python3" ,"pydoc3" ,"idle3")
353 `("python" ,"pydoc" ,"idle"))))))
0d56e3e1
LC
354 (synopsis "Wrapper for the Python 3 commands")
355 (description
356 "This package provides wrappers for the commands of Python@tie{}3.x such
357that they can be invoked under their usual name---e.g., @command{python}
358instead of @command{python3}.")))
359
95288fcc
LC
360(define-public python-wrapper (wrap-python3 python))
361(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 362
aaf625b8
RW
363(define-public python-psutil
364 (package
365 (name "python-psutil")
f56777be 366 (version "3.3.0")
aaf625b8
RW
367 (source
368 (origin
369 (method url-fetch)
f56777be 370 (uri (pypi-uri "psutil" version))
aaf625b8
RW
371 (sha256
372 (base32
f56777be 373 "11bd1555vf2ibjnmqf64im5cp55vcqfq45ccinm9ll3bs68na6s2"))))
aaf625b8
RW
374 (build-system python-build-system)
375 (native-inputs
376 `(("python-setuptools" ,python-setuptools)))
377 (home-page "https://pypi.python.org/pypi/psutil/")
378 (synopsis "Library for retrieving information on running processes")
379 (description
380 "psutil (Python system and process utilities) is a library for retrieving
381information on running processes and system utilization (CPU, memory, disks,
382network) in Python. It is useful mainly for system monitoring, profiling and
383limiting process resources and management of running processes. It implements
384many functionalities offered by command line tools such as: ps, top, lsof,
385netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
386pidof, tty, taskset, pmap.")
387 (license bsd-3)))
388
389(define-public python2-psutil
390 (package-with-python2 python-psutil))
898238b9 391
f9da1d8a
ED
392(define-public python-passlib
393 (package
394 (name "python-passlib")
690e8c66 395 (version "1.6.5")
f9da1d8a
ED
396 (source
397 (origin
398 (method url-fetch)
690e8c66 399 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
400 (sha256
401 (base32
690e8c66 402 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
403 (build-system python-build-system)
404 (native-inputs
405 `(("python-nose" ,python-nose)
406 ("python-setuptools" ,python-setuptools)))
407 (inputs
408 `(("python-py-bcrypt" ,python-py-bcrypt)))
409 (arguments
410 `(#:phases
411 (alist-cons-before
412 'check 'set-PYTHON_EGG_CACHE
413 ;; some tests require access to "$HOME/.cython"
414 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
415 %standard-phases)))
416 (home-page "https://bitbucket.org/ecollins/passlib")
417 (synopsis
418 "Comprehensive password hashing framework")
419 (description
420 "Passlib is a password hashing library for Python 2 & 3, which provides
421cross-platform implementations of over 30 password hashing algorithms, as well
422as a framework for managing existing password hashes. It's designed to be
423useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
424to providing full-strength password hashing for multi-user application.")
425 (license bsd-3)))
426
427(define-public python2-passlib
428 (package-with-python2 python-passlib))
429
feb0d9c3
ED
430(define-public python-py-bcrypt
431 (package
432 (name "python-py-bcrypt")
433 (version "0.4")
434 (source
435 (origin
436 (method url-fetch)
437 (uri (string-append
438 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
439 version
440 ".tar.gz"))
441 (sha256
442 (base32
443 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
444 (build-system python-build-system)
445 (native-inputs
446 `(("python-setuptools" ,python-setuptools)))
447 (home-page "https://code.google.com/p/py-bcrypt")
448 (synopsis
449 "Bcrypt password hashing and key derivation")
450 (description
451 "A python wrapper of OpenBSD's Blowfish password hashing code. This
452system hashes passwords using a version of Bruce Schneier's Blowfish block
453cipher with modifications designed to raise the cost of off-line password
454cracking and frustrate fast hardware implementation. The computation cost of
455the algorithm is parametised, so it can be increased as computers get faster.
456The intent is to make a compromise of a password database less likely to
457result in an attacker gaining knowledge of the plaintext passwords (e.g. using
458John the Ripper).")
459 ;; "sha2.c" is under BSD-3;
460 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
461 ;; the rest is under ISC.
462 (license (list isc bsd-3 bsd-4))))
463
464(define-public python2-py-bcrypt
465 (package-with-python2 python-py-bcrypt))
466
467
429fdea1
ED
468(define-public python-paramiko
469 (package
470 (name "python-paramiko")
81b9bbbd 471 (version "1.16.0")
429fdea1
ED
472 (source
473 (origin
474 (method url-fetch)
81b9bbbd 475 (uri (pypi-uri "paramiko" version))
429fdea1
ED
476 (sha256
477 (base32
81b9bbbd 478 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1
ED
479 (build-system python-build-system)
480 (native-inputs
481 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
482 (propagated-inputs
483 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 484 (inputs
a3fc12da 485 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
486 (home-page "http://www.paramiko.org/")
487 (synopsis "SSHv2 protocol library")
488 (description "Paramiko is a python implementation of the SSHv2 protocol,
489providing both client and server functionality. While it leverages a Python C
490extension for low level cryptography (PyCrypto), Paramiko itself is a pure
491Python interface around SSH networking concepts.")
492 (license lgpl2.1+)))
493
494(define-public python2-paramiko
495 (package-with-python2 python-paramiko))
496
497
de73dbf6
ED
498(define-public python-httplib2
499 (package
500 (name "python-httplib2")
286f1bac 501 (version "0.9.2")
de73dbf6
ED
502 (source
503 (origin
504 (method url-fetch)
286f1bac 505 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
506 (sha256
507 (base32
286f1bac 508 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6
ED
509 (build-system python-build-system)
510 (native-inputs
511 `(("python-setuptools" ,python-setuptools)))
286f1bac 512 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
513 (synopsis "Comprehensive HTTP client library")
514 (description
515 "A comprehensive HTTP client library supporting many features left out of
516other HTTP libraries.")
517 (license license:expat)))
518
519(define-public python2-httplib2
520 (package-with-python2 python-httplib2))
521
67039875
ED
522(define-public python-ecdsa
523 (package
524 (name "python-ecdsa")
525 (version "0.13")
526 (source
527 (origin
528 (method url-fetch)
529 (uri (string-append
530 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
531 version
532 ".tar.gz"))
533 (sha256
534 (base32
535 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
536 (build-system python-build-system)
537 (native-inputs
538 `(("python-setuptools" ,python-setuptools)))
539 (inputs
540 `(("openssl" ,openssl)))
541 (home-page
542 "http://github.com/warner/python-ecdsa")
543 (synopsis
544 "ECDSA cryptographic signature library (pure python)")
545 (description
546 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
547Curve Digital Signature Algorithm), implemented purely in Python. With this
548library, you can quickly create keypairs (signing key and verifying key), sign
549messages, and verify the signatures. The keys and signatures are very short,
550making them easy to handle and incorporate into other protocols.")
551 (license license:expat)))
552
553(define-public python2-ecdsa
554 (package-with-python2 python-ecdsa))
555
52323f32
ED
556(define-public python-ccm
557 (package
558 (name "python-ccm")
db5567f7 559 (version "2.1.6")
52323f32
ED
560 (source
561 (origin
562 (method url-fetch)
db5567f7 563 (uri (pypi-uri "ccm" version))
52323f32
ED
564 (sha256
565 (base32
db5567f7 566 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32
ED
567 (build-system python-build-system)
568 (native-inputs
569 `(("python-setuptools" ,python-setuptools)))
570 (inputs
571 `(("python-pyyaml" ,python-pyyaml)
572 ("python-six" ,python-six)))
573 (home-page "https://github.com/pcmanus/ccm")
574 (synopsis "Cassandra Cluster Manager")
575 (description "A script/library to create, launch and remove an Apache
576Cassandra cluster on localhost.")
577 (license asl2.0)))
578
579(define-public python2-ccm
580 (package-with-python2 python-ccm))
581
89114f39 582(define-public python-pytz
acc26ff1 583 (package
89114f39 584 (name "python-pytz")
61c9babb 585 (version "2016.3")
acc26ff1
CR
586 (source
587 (origin
588 (method url-fetch)
61c9babb 589 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
590 (sha256
591 (base32
61c9babb 592 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 593 (build-system python-build-system)
8498b8cf 594 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 595 (home-page "http://pythonhosted.org/pytz")
9e771e3b 596 (synopsis "Python timezone library")
acc26ff1
CR
597 (description
598 "This library allows accurate and cross platform timezone calculations
599using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 600 (license license:expat)))
5ace6e2f 601
89114f39 602(define-public python2-pytz
11bb85a1 603 (package-with-python2 python-pytz))
89114f39 604
fc50e9c6 605
89114f39 606(define-public python-babel
5ace6e2f 607 (package
89114f39 608 (name "python-babel")
3f37db6b 609 (version "2.3.2")
5ace6e2f
CR
610 (source
611 (origin
612 (method url-fetch)
b850a6d8 613 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
614 (sha256
615 (base32
3f37db6b 616 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f
CR
617 (build-system python-build-system)
618 (inputs
e1804763
AE
619 `(("python-pytz" ,python-pytz)
620 ("python-setuptools" ,python-setuptools)))
8498b8cf 621 (arguments `(#:tests? #f)) ; no test target
e1804763 622 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
623 (synopsis
624 "Tools for internationalizing Python applications")
625 (description
626 "Babel is composed of two major parts:
627- tools to build and work with gettext message catalogs
628- a Python interface to the CLDR (Common Locale Data Repository), providing
629access to various locale display names, localized number and date formatting,
630etc. ")
631 (license bsd-3)))
89114f39
AE
632
633(define-public python2-babel
11bb85a1 634 (package-with-python2 python-babel))
73adf220 635
ed377cc6
RW
636(define-public python2-backport-ssl-match-hostname
637 (package
638 (name "python2-backport-ssl-match-hostname")
f2d06d46 639 (version "3.5.0.1")
ed377cc6
RW
640 (source
641 (origin
642 (method url-fetch)
643 (uri (string-append
644 "https://pypi.python.org/packages/source/b/"
645 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
646 version ".tar.gz"))
647 (sha256
648 (base32
f2d06d46 649 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 650 (build-system python-build-system)
f2d06d46
EF
651 (arguments
652 `(#:python ,python-2
653 #:tests? #f)) ; no test target
ed377cc6
RW
654 (inputs
655 `(("python2-setuptools" ,python2-setuptools)))
f2d06d46
EF
656 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
657 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
658 (description
659 "This backport brings the ssl.match_hostname() function to users of
660earlier versions of Python. The function checks the hostname in the
661certificate returned by the server to which a connection has been established,
662and verifies that it matches the intended target hostname.")
663 (license psfl)))
664
ef5cbf9b
RW
665(define-public python-h5py
666 (package
667 (name "python-h5py")
fe147c41 668 (version "2.6.0")
ef5cbf9b
RW
669 (source
670 (origin
671 (method url-fetch)
fe147c41 672 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
673 (sha256
674 (base32
fe147c41 675 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 676 (build-system python-build-system)
797e1401
RW
677 (arguments
678 `(#:tests? #f ; no test target
679 #:phases
680 (modify-phases %standard-phases
681 (add-after 'unpack 'fix-hdf5-paths
682 (lambda* (#:key inputs #:allow-other-keys)
683 (let ((prefix (assoc-ref inputs "hdf5")))
684 (substitute* "setup_build.py"
685 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
686 (string-append "['" prefix "/lib" "']"))
687 (("'/opt/local/include', '/usr/local/include'")
688 (string-append "'" prefix "/include" "'")))
689 (substitute* "setup_configure.py"
690 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
691 (string-append "['" prefix "/lib" "']")))
692 #t))))))
3c4010b1
RW
693 (propagated-inputs
694 `(("python-numpy" ,python-numpy)))
ef5cbf9b 695 (inputs
fe147c41
EF
696 `(("hdf5" ,hdf5)
697 ("python-six" ,python-six)))
ef5cbf9b 698 (native-inputs
fe147c41
EF
699 `(("python-cython" ,python-cython)
700 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
701 (home-page "http://www.h5py.org/")
702 (synopsis "Read and write HDF5 files from Python")
703 (description
704 "The h5py package provides both a high- and low-level interface to the
705HDF5 library from Python. The low-level interface is intended to be a
706complete wrapping of the HDF5 API, while the high-level component supports
707access to HDF5 files, datasets and groups using established Python and NumPy
708concepts.")
fe147c41
EF
709 (license bsd-3)
710 (properties `((python2-variant . ,(delay python2-h5py))))))
ef5cbf9b
RW
711
712(define-public python2-h5py
fe147c41 713 (package-with-python2 (strip-python2-variant python-h5py)))
ef5cbf9b 714
c1448c69
EB
715(define-public python-lockfile
716 (package
717 (name "python-lockfile")
692add53 718 (version "0.12.2")
c1448c69
EB
719 (source
720 (origin
721 (method url-fetch)
722 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
723 "lockfile-" version ".tar.gz"))
724 (sha256
725 (base32
692add53 726 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
727 (build-system python-build-system)
728 (arguments '(#:test-target "check"))
692add53
BW
729 (native-inputs
730 `(("python-pbr" ,python-pbr)))
c1448c69
EB
731 (home-page "http://code.google.com/p/pylockfile/")
732 (synopsis "Platform-independent file locking module")
733 (description
734 "The lockfile package exports a LockFile class which provides a simple
735API for locking files.")
1804527a
BW
736 (license license:expat)
737 (properties `((python2-variant . ,(delay python2-lockfile))))))
c1448c69
EB
738
739(define-public python2-lockfile
1804527a
BW
740 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
741 (package
692add53
BW
742 (inherit base)
743 (native-inputs `(("python2-setuptools" ,python2-setuptools)
744 ,@(package-native-inputs base))))))
c1448c69 745
5a1a4bf6
EB
746(define-public python-mock
747 (package
748 (name "python-mock")
749 (version "1.0.1")
750 (source
751 (origin
752 (method url-fetch)
753 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
754 "mock-" version ".tar.gz"))
755 (sha256
756 (base32
757 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
758 (build-system python-build-system)
759 (arguments '(#:test-target "check"))
07af3e5e 760 (home-page "http://code.google.com/p/mock/")
9e771e3b 761 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
762 (description
763 "Mock is a library for testing in Python. It allows you to replace parts
764of your system under test with mock objects and make assertions about how they
765have been used.")
bd3fa666 766 (license license:expat)))
5a1a4bf6
EB
767
768(define-public python2-mock
769 (package-with-python2 python-mock))
770
fc50e9c6 771
73adf220
AE
772(define-public python-setuptools
773 (package
774 (name "python-setuptools")
62a9a23b 775 (version "18.3.1")
73adf220
AE
776 (source
777 (origin
778 (method url-fetch)
779 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
780 version ".tar.gz"))
781 (sha256
782 (base32
62a9a23b 783 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 784 (build-system python-build-system)
d3d656c5
AE
785 ;; FIXME: Tests require pytest, which itself relies on setuptools.
786 ;; One could bootstrap with an internal untested setuptools.
73adf220 787 (arguments
824af8ca 788 `(#:tests? #f))
73adf220
AE
789 (home-page "https://pypi.python.org/pypi/setuptools")
790 (synopsis
791 "Library designed to facilitate packaging Python projects")
792 (description
793 "Setuptools is a fully-featured, stable library designed to facilitate
794packaging Python projects, where packaging includes:
795Python package and module definitions,
796distribution package metadata,
797test hooks,
798project installation,
799platform-specific details,
800Python 3 support.")
801 (license psfl)))
802
803(define-public python2-setuptools
804 (package-with-python2 python-setuptools))
fc50e9c6
AE
805
806
cafc3f5a
EB
807(define-public python-pycrypto
808 (package
809 (name "python-pycrypto")
810 (version "2.6.1")
811 (source
812 (origin
813 (method url-fetch)
814 (uri (string-append "https://pypi.python.org/packages/source/p/"
815 "pycrypto/pycrypto-" version ".tar.gz"))
816 (sha256
817 (base32
818 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
819 (build-system python-build-system)
820 (native-inputs
821 `(("python-setuptools" ,python-setuptools)))
822 (inputs
823 `(("python" ,python)
824 ("gmp" ,gmp)))
825 (arguments
826 `(#:phases
827 (alist-cons-before
828 'build 'set-build-env
829 ;; pycrypto runs an autoconf configure script behind the scenes
830 (lambda _
831 (setenv "CONFIG_SHELL" (which "bash")))
832 %standard-phases)))
833 (home-page "http://www.pycrypto.org/")
834 (synopsis "Cryptographic modules for Python")
835 (description
836 "Pycrypto is a collection of both secure hash functions (such as SHA256
837and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 838etc.). The package is structured to make adding new modules easy.")
cafc3f5a
EB
839 (license public-domain)))
840
345f0611 841(define-public python2-pycrypto
1c0059da
EF
842 (let ((pycrypto (package-with-python2 python-pycrypto)))
843 (package (inherit pycrypto)
844 (inputs
845 `(("python" ,python-2)
846 ,@(alist-delete
847 "python"
848 (package-inputs pycrypto)))))))
345f0611 849
cafc3f5a
EB
850(define-public python-keyring
851 (package
852 (name "python-keyring")
13f3ff35 853 (version "8.7")
cafc3f5a
EB
854 (source
855 (origin
856 (method url-fetch)
664e6c3a 857 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
858 (sha256
859 (base32
13f3ff35 860 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
861 (build-system python-build-system)
862 (native-inputs
13f3ff35 863 `(("python-setuptools-scm" ,python-setuptools-scm)))
cafc3f5a
EB
864 (inputs
865 `(("python-pycrypto" ,python-pycrypto)))
866 (arguments
664e6c3a 867 `(#:tests? #f)) ;TODO: tests require pytest
cafc3f5a
EB
868 (home-page "http://bitbucket.org/kang/python-keyring-lib")
869 (synopsis "Store and access your passwords safely")
870 (description
871 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 872service from python. It can be used in any application that needs safe
cafc3f5a
EB
873password storage.")
874 ;; "MIT" and PSF dual license
13f3ff35
EF
875 (license x11)
876 (properties `((python2-variant . ,(delay python2-keyring))))))
cafc3f5a 877
d7af1069 878(define-public python2-keyring
13f3ff35
EF
879 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
880 (package
881 (inherit base)
882 (native-inputs `(("python2-setuptools" ,python2-setuptools)
883 ,@(package-native-inputs base))))))
d7af1069 884
a480bc41
EB
885(define-public python-six
886 (package
887 (name "python-six")
b6ab89ef 888 (version "1.10.0")
a480bc41
EB
889 (source
890 (origin
891 (method url-fetch)
b6ab89ef 892 (uri (pypi-uri "six" version))
a480bc41
EB
893 (sha256
894 (base32
b6ab89ef 895 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
896 (build-system python-build-system)
897 (inputs
898 `(("python-setuptools" ,python-setuptools)))
899 (home-page "http://pypi.python.org/pypi/six/")
900 (synopsis "Python 2 and 3 compatibility utilities")
901 (description
35b9e423 902 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
903functions for smoothing over the differences between the Python versions with
904the goal of writing Python code that is compatible on both Python versions.
35b9e423 905Six supports every Python version since 2.5. It is contained in only one
a480bc41
EB
906Python file, so it can be easily copied into your project.")
907 (license x11)))
908
0c20025c
AE
909(define-public python2-six
910 (package-with-python2 python-six))
911
cafc3f5a
EB
912(define-public python-dateutil-2
913 (package
914 (name "python-dateutil")
394b8060 915 (version "2.5.2")
cafc3f5a
EB
916 (source
917 (origin
918 (method url-fetch)
394b8060 919 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
920 (sha256
921 (base32
394b8060 922 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a
EB
923 (build-system python-build-system)
924 (inputs
394b8060 925 `(("python-six" ,python-six)))
cafc3f5a
EB
926 (home-page "http://labix.org/python-dateutil")
927 (synopsis "Extensions to the standard datetime module")
928 (description
929 "The dateutil module provides powerful extensions to the standard
930datetime module, available in Python 2.3+.")
394b8060
EF
931 (license bsd-3)
932 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
cafc3f5a
EB
933
934(define-public python2-dateutil-2
394b8060
EF
935 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
936 (package
937 (inherit base)
938 (inputs `(("python2-setuptools" ,python2-setuptools)
939 ,@(package-inputs base))))))
cafc3f5a 940
fc50e9c6
AE
941(define-public python-dateutil
942 (package
943 (name "python-dateutil")
944 (version "1.5") ; last version for python < 3
945 (source
946 (origin
947 (method url-fetch)
cafc3f5a
EB
948 (uri (string-append "http://labix.org/download/python-dateutil/"
949 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
950 (sha256
951 (base32
952 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
953 (build-system python-build-system)
954 (inputs
955 `(("python-setuptools" ,python-setuptools)))
956 (home-page "http://labix.org/python-dateutil")
cafc3f5a 957 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
958 (description
959 "The dateutil module provides powerful extensions to the standard
960datetime module, available in Python 2.3+.")
961 (license psfl)))
962
963(define-public python2-dateutil
964 (package-with-python2 python-dateutil))
1d08c01f 965
cafc3f5a
EB
966(define-public python-parsedatetime
967 (package
968 (name "python-parsedatetime")
eebf6f01 969 (version "2.1")
cafc3f5a
EB
970 (source
971 (origin
972 (method url-fetch)
eebf6f01 973 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
974 (sha256
975 (base32
eebf6f01 976 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
977 (build-system python-build-system)
978 (native-inputs
eebf6f01
EF
979 `(("python-nose" ,python-nose)
980 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
981 (home-page "http://github.com/bear/parsedatetime/")
982 (synopsis
983 "Parse human-readable date/time text")
984 (description
e881752c 985 "Parse human-readable date/time text.")
eebf6f01
EF
986 (license asl2.0)
987 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
cafc3f5a 988
38b8f9b2 989(define-public python2-parsedatetime
eebf6f01
EF
990 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
991 (package
992 (inherit base)
993 (native-inputs `(("python2-setuptools" ,python2-setuptools)
994 ,@(package-native-inputs base))))))
38b8f9b2 995
d072efcb
RW
996(define-public python-pandas
997 (package
998 (name "python-pandas")
7d0c3c8d 999 (version "0.18.1")
d072efcb
RW
1000 (source
1001 (origin
1b96f069 1002 (method url-fetch)
7d0c3c8d
EF
1003 (uri (string-append
1004 "https://pypi.python.org/packages/11/09/"
1005 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1006 "pandas-" version ".tar.gz"))
1b96f069 1007 (sha256
7d0c3c8d 1008 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1009 (build-system python-build-system)
d072efcb 1010 (propagated-inputs
42603726
EF
1011 `(("python-numpy" ,python-numpy)))
1012 (inputs
1013 `(("python-pytz" ,python-pytz)
d072efcb
RW
1014 ("python-dateutil" ,python-dateutil-2)))
1015 (native-inputs
7d0c3c8d 1016 `(("python-nose" ,python-nose)))
d072efcb
RW
1017 (home-page "http://pandas.pydata.org")
1018 (synopsis "Data structures for data analysis, time series, and statistics")
1019 (description
1020 "Pandas is a Python package providing fast, flexible, and expressive data
1021structures designed to make working with structured (tabular,
1022multidimensional, potentially heterogeneous) and time series data both easy
1023and intuitive. It aims to be the fundamental high-level building block for
1024doing practical, real world data analysis in Python.")
7d0c3c8d
EF
1025 (license bsd-3)
1026 (properties `((python2-variant . ,(delay python2-pandas))))))
d072efcb
RW
1027
1028(define-public python2-pandas
7d0c3c8d
EF
1029 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1030 (package
1031 (inherit base)
1032 (native-inputs `(("python2-setuptools" ,python2-setuptools)
dbd40ac1 1033 ,@(package-native-inputs base))))))
d072efcb 1034
cafc3f5a
EB
1035(define-public python-tzlocal
1036 (package
1037 (name "python-tzlocal")
ed80839b 1038 (version "1.2.2")
cafc3f5a
EB
1039 (source
1040 (origin
1041 (method url-fetch)
226d3331 1042 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1043 (sha256
1044 (base32
ed80839b 1045 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1046 (build-system python-build-system)
ed80839b 1047 (inputs `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1048 (home-page "https://github.com/regebro/tzlocal")
1049 (synopsis
35b9e423 1050 "Local timezone information for Python")
cafc3f5a
EB
1051 (description
1052 "Tzlocal returns a tzinfo object with the local timezone information.
1053This module attempts to fix a glaring hole in pytz, that there is no way to
1054get the local timezone information, unless you know the zoneinfo name, and
1055under several distributions that's hard or impossible to figure out.")
1056 (license cc0)))
1057
1d08c01f
AE
1058(define-public python2-pysqlite
1059 (package
1060 (name "python2-pysqlite")
fe476868 1061 (version "2.8.1")
1d08c01f
AE
1062 (source
1063 (origin
1064 (method url-fetch)
fe476868 1065 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1066 (sha256
1067 (base32
fe476868 1068 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1069 (build-system python-build-system)
1070 (inputs
1071 `(("sqlite" ,sqlite)))
1072 (arguments
1073 `(#:python ,python-2 ; incompatible with Python 3
1074 #:tests? #f)) ; no test target
fe476868 1075 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1076 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1077 (description
1078 "Pysqlite provides SQLite bindings for Python that comply to the
1079Database API 2.0T.")
ed0cdf83 1080 (license license:zlib)))
1d08c01f 1081
2875caf5
AE
1082
1083(define-public python2-mechanize
1084 (package
1085 (name "python2-mechanize")
1086 (version "0.2.5")
1087 (source
1088 (origin
1089 (method url-fetch)
1090 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1091 version ".tar.gz"))
1092 (sha256
1093 (base32
1094 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1095 (build-system python-build-system)
1096 (inputs
1097 `(("python2-setuptools" ,python2-setuptools)))
1098 (arguments
1099 `(#:python ,python-2 ; apparently incompatible with Python 3
1100 #:tests? #f))
1101 ;; test fails with message
1102 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1103 ;; (python-3.3.2) or
1104 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1105 ;; (python-2.7.5).
1106 ;; The source code is from March 2011 and probably not up-to-date
1107 ;; with respect to python unit tests.
1108 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1109 (synopsis
1110 "Stateful programmatic web browsing in Python")
1111 (description
1112 "Mechanize implements stateful programmatic web browsing in Python,
1113after Andy Lester’s Perl module WWW::Mechanize.")
166191b3 1114 (license (non-copyleft "file://COPYING"
e881752c 1115 "See COPYING in the distribution."))))
2875caf5 1116
0352532e
AE
1117
1118(define-public python-simplejson
1119 (package
1120 (name "python-simplejson")
1121 (version "3.3.0")
1122 (source
1123 (origin
1124 (method url-fetch)
1125 (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-"
1126 version ".tar.gz"))
1127 (sha256
1128 (base32
1129 "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks"))))
1130 (build-system python-build-system)
1131 (home-page "http://simplejson.readthedocs.org/en/latest/")
1132 (synopsis
1133 "Json library for Python")
1134 (description
e881752c
AK
1135 "JSON (JavaScript Object Notation) is a subset of JavaScript
1136syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1137format.
0352532e
AE
1138
1139Simplejson exposes an API familiar to users of the standard library marshal
1140and pickle modules. It is the externally maintained version of the json
1141library contained in Python 2.6, but maintains compatibility with Python 2.5
1142and (currently) has significant performance advantages, even without using
1143the optional C extension for speedups. Simplejson is also supported on
1144Python 3.3+.")
1145 (license x11)))
1146
1147(define-public python2-simplejson
1148 (package-with-python2 python-simplejson))
421a80a2
AE
1149
1150
ed07b08d 1151(define-public python-pyicu
421a80a2 1152 (package
ed07b08d 1153 (name "python-pyicu")
d3b29319 1154 (version "1.9.2")
421a80a2
AE
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1159 version ".tar.gz"))
1160 (sha256
1161 (base32
d3b29319 1162 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1163 (build-system python-build-system)
1164 (inputs
1165 `(("icu4c" ,icu4c)))
421a80a2 1166 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1167 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1168 (description
1169 "PyICU is a python extension wrapping the ICU C++ API.")
ed07b08d
LF
1170 (license x11)
1171 (properties `((python2-variant . ,(delay python2-pyicu))))))
1172
1173(define-public python2-pyicu
1174 (package
1175 (inherit (package-with-python2
1176 (strip-python2-variant python-pyicu)))
1177 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cc20a22a
LC
1178
1179(define-public python2-dogtail
1180 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1181 ;; spaces in indentation" with Python 3.
1182 (package
1183 (name "python2-dogtail")
1184 (version "0.8.2")
1185 (source (origin
1186 (method url-fetch)
1187 (uri (string-append
1188 "https://fedorahosted.org/released/dogtail/dogtail-"
1189 version ".tar.gz"))
1190 (sha256
1191 (base32
1192 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1193 (build-system python-build-system)
1194 (arguments `(#:python ,python-2
1195 #:tests? #f)) ; invalid command "test"
1196 (home-page "https://fedorahosted.org/dogtail/")
1197 (synopsis "GUI test tool and automation framework written in ​Python")
1198 (description
35b9e423 1199 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1200It uses Accessibility (a11y) technologies to communicate with desktop
1201applications. dogtail scripts are written in Python and executed like any
1202other Python program.")
1203 (license gpl2+)))
515e6878 1204
011b18c3
LC
1205(define-public python2-empy
1206 (package
1207 (name "python2-empy")
1208 (version "3.3")
1209 (source (origin
1210 (method url-fetch)
1211 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1212 version ".tar.gz"))
1213 (sha256
1214 (base32
1215 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1216 (build-system python-build-system)
1217 (arguments
1218 `(#:python ,python-2
1219 #:phases (alist-replace
1220 'check
1221 (lambda _
1222 (zero? (system* "./test.sh")))
1223 %standard-phases)))
1224 (home-page "http://www.alcyone.com/software/empy/")
1225 (synopsis "Templating system for Python")
1226 (description
1227 "EmPy is a system for embedding Python expressions and statements in
1228template text; it takes an EmPy source file, processes it, and produces
1229output. This is accomplished via expansions, which are special signals to the
1cd4027c 1230EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1231EmPy can expand arbitrary Python expressions and statements in this way, as
1232well as a variety of special forms. Textual data not explicitly delimited in
1233this way is sent unaffected to the output, allowing Python to be used in
1234effect as a markup language. Also supported are callbacks via hooks,
1235recording and playback via diversions, and dynamic, chainable filters. The
1236system is highly configurable via command line options and embedded
1237commands.")
1238 (license lgpl2.1+)))
1239
8deeda0c
LC
1240(define-public python2-element-tree
1241 (package
1242 (name "python2-element-tree")
1243 (version "1.2.6")
1244 (source (origin
1245 (method url-fetch)
1246 (uri (string-append
1247 "http://effbot.org/media/downloads/elementtree-"
1248 version "-20050316.tar.gz"))
1249 (sha256
1250 (base32
1251 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1252 (build-system python-build-system)
1253 (arguments
1254 `(#:python ,python-2 ; seems to be part of Python 3
1255 #:tests? #f)) ; no 'test' sub-command
1256 (synopsis "Toolkit for XML processing in Python")
1257 (description
1258 "ElementTree is a Python library supporting lightweight XML processing.")
1259 (home-page "http://effbot.org/zone/element-index.htm")
1260 (license (x11-style "http://docs.python.org/2/license.html"
1261 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
12620.9.0 THROUGH 1.2\"."))))
1263
1264(define-public python2-pybugz
1265 (package
1266 (name "python2-pybugz")
1267 (version "0.6.11")
1268 (source (origin
1269 (method url-fetch)
1270 (uri (string-append
1271 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1272 version ".tar.gz"))
1273 (sha256
1274 (base32
6f194a1e 1275 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1276 (patches (search-patches "pybugz-stty.patch"
1277 "pybugz-encode-error.patch"))))
8deeda0c
LC
1278 (build-system python-build-system)
1279 (arguments
1280 `(#:python ,python-2 ; SyntaxError with Python 3
1281 #:tests? #f)) ; no 'test' sub-command
1282 (inputs `(("element-tree" ,python2-element-tree)))
1283 (synopsis "Python and command-line interface to Bugzilla")
1284 (description
1285 "PyBugz is a Python library and command-line tool to query the Bugzilla
1286bug tracking system. It is meant as an aid to speed up interaction with the
1287bug tracker.")
1288 (home-page "http://www.liquidx.net/pybugz/")
1289 (license gpl2)))
1290
a480bc41
EB
1291(define-public python-enum34
1292 (package
1293 (name "python-enum34")
d39ae1e5 1294 (version "1.1.0")
a480bc41
EB
1295 (source
1296 (origin
1297 (method url-fetch)
d39ae1e5 1298 (uri (pypi-uri "enum34" version))
a480bc41
EB
1299 (sha256
1300 (base32
d39ae1e5 1301 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1302 (build-system python-build-system)
a480bc41
EB
1303 (arguments
1304 `(#:phases
1305 (alist-replace
1306 'check
1307 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1308 %standard-phases)))
1309 (home-page "https://pypi.python.org/pypi/enum34")
1310 (synopsis "Backported Python 3.4 Enum")
1311 (description
1312 "Enum34 is the new Python stdlib enum module available in Python 3.4
1313backported for previous versions of Python from 2.4 to 3.3.")
1314 (license bsd-3)))
1315
820acd1b
LF
1316(define-public python2-enum34
1317 (package-with-python2 python-enum34))
1318
a480bc41
EB
1319(define-public python-parse-type
1320 (package
1321 (name "python-parse-type")
1322 (version "0.3.4")
1323 (source
1324 (origin
1325 (method url-fetch)
1326 (uri (string-append "https://pypi.python.org/packages/source/p/"
1327 "parse_type/parse_type-" version ".tar.gz"))
1328 (sha256
1329 (base32
1330 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1331 (build-system python-build-system)
1332 (inputs
1333 `(("python-setuptools" ,python-setuptools)
1334 ("python-six" ,python-six)
68f1cdec 1335 ("python-parse" ,python-parse)))
a480bc41
EB
1336 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1337 (home-page "https://github.com/jenisys/parse_type")
1338 (synopsis "Extended parse module")
1339 (description
1340 "Parse_type extends the python parse module.")
1341 (license bsd-3)))
1342
1343(define-public python-parse
1344 (package
1345 (name "python-parse")
eb3d3503 1346 (version "1.6.6")
a480bc41
EB
1347 (source
1348 (origin
1349 (method url-fetch)
eb3d3503 1350 (uri (pypi-uri "parse" version))
a480bc41
EB
1351 (sha256
1352 (base32
eb3d3503 1353 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
a480bc41
EB
1354 (build-system python-build-system)
1355 (arguments
1356 `(#:phases
1357 (alist-replace
1358 'check
1359 (lambda _ (zero? (system* "python" "test_parse.py")))
1360 %standard-phases)))
1361 (home-page "https://github.com/r1chardj0n3s/parse")
1362 (synopsis "Parse strings")
1363 (description
1364 "Parse strings using a specification based on the Python format()
1365syntax.")
1366 (license x11)))
1367
1368
515e6878
LC
1369(define-public scons
1370 (package
1371 (name "scons")
a3f61425 1372 (version "2.3.4")
515e6878
LC
1373 (source (origin
1374 (method url-fetch)
1375 (uri (string-append "mirror://sourceforge/scons/scons-"
1376 version ".tar.gz"))
1377 (sha256
1378 (base32
a3f61425 1379 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1380 (build-system python-build-system)
1381 (arguments
1382 ;; With Python 3.x, fails to build with a syntax error.
1383 `(#:python ,python-2
1384 #:tests? #f)) ; no 'python setup.py test' command
1385 (home-page "http://scons.org/")
1386 (synopsis "Software construction tool written in Python")
1387 (description
1388 "SCons is a software construction tool. Think of SCons as an improved,
1389cross-platform substitute for the classic Make utility with integrated
1390functionality similar to autoconf/automake and compiler caches such as ccache.
1391In short, SCons is an easier, more reliable and faster way to build
1392software.")
1393 (license x11)))
011b18c3 1394
c15a5c0e
DT
1395(define-public python-extras
1396 (package
1397 (name "python-extras")
1398 (version "0.0.3")
1399 (source
1400 (origin
1401 (method url-fetch)
1402 (uri (string-append
1403 "https://pypi.python.org/packages/source/e/extras/extras-"
1404 version ".tar.gz"))
1405 (sha256
1406 (base32
1407 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1408 (build-system python-build-system)
1409 (inputs
1410 `(("python-setuptools" ,python-setuptools)))
1411 (arguments
1412 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1413 '(#:tests? #f))
1414 (home-page "https://github.com/testing-cabal/extras")
1415 (synopsis "Useful extensions to the Python standard library")
1416 (description
1417 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1418 (license license:expat)))
c15a5c0e
DT
1419
1420(define-public python2-extras
1421 (package-with-python2 python-extras))
1422
56ea0efd
DT
1423(define-public python-mimeparse
1424 (package
1425 (name "python-mimeparse")
1426 (version "0.1.4")
1427 (source
1428 (origin
1429 (method url-fetch)
1430 (uri (string-append
1431 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1432 version ".tar.gz"))
1433 (sha256
1434 (base32
1435 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1436 (build-system python-build-system)
1437 (inputs
1438 `(("python-setuptools" ,python-setuptools)))
1439 (arguments
1440 '(#:tests? #f)) ; no setup.py test command
1441 (home-page
1442 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1443 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1444 (description
1445 "Mimeparse provides basic functions for parsing MIME type names and
1446matching them against a list of media-ranges.")
bd3fa666 1447 (license license:expat)))
56ea0efd
DT
1448
1449(define-public python2-mimeparse
1450 (package-with-python2 python-mimeparse))
1451
4435427e
DT
1452(define-public python-nose
1453 (package
1454 (name "python-nose")
f7cb9841 1455 (version "1.3.7")
4435427e
DT
1456 (source
1457 (origin
1458 (method url-fetch)
f7cb9841 1459 (uri (pypi-uri "nose" version))
4435427e
DT
1460 (sha256
1461 (base32
f7cb9841 1462 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1463 (build-system python-build-system)
1464 (inputs
1465 `(("python-setuptools" ,python-setuptools)))
1466 (arguments
1467 '(#:tests? #f)) ; FIXME: test suite fails
1468 (home-page "http://readthedocs.org/docs/nose/")
1469 (synopsis "Python testing library")
1470 (description
1471 "Nose extends the unittest library to make testing easier.")
1472 (license lgpl2.0+)))
1473
1474(define-public python2-nose
1475 (package-with-python2 python-nose))
1476
6cd9c356
DT
1477(define-public python-unittest2
1478 (package
1479 (name "python-unittest2")
1480 (version "0.5.1")
1481 (source
1482 (origin
1483 (method url-fetch)
1484 (uri (string-append
1485 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1486 version ".tar.gz"))
1487 (sha256
1488 (base32
1489 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1490 (build-system python-build-system)
1491 (inputs
1492 `(("python-setuptools" ,python-setuptools)))
1493 (home-page "http://pypi.python.org/pypi/unittest2")
1494 (synopsis "Python unit testing library")
1495 (description
1496 "Unittest2 is a replacement for the unittest module in the Python
1497standard library.")
1498 (license psfl)))
1499
1500(define-public python2-unittest2
1501 (package (inherit python-unittest2)
1502 (name "python2-unittest2")
1503 (version "0.5.1")
1504 (source
1505 (origin
1506 (method url-fetch)
1507 (uri (string-append
1508 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1509 version ".tar.gz"))
1510 (sha256
1511 (base32
1512 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1513 (inputs
7957fe6c 1514 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1515 (arguments
1516 `(#:python ,python-2
1517 #:tests? #f)))) ; no setup.py test command
1518
542ad60f
DT
1519(define-public python-py
1520 (package
1521 (name "python-py")
71c8a804 1522 (version "1.4.31")
542ad60f
DT
1523 (source
1524 (origin
1525 (method url-fetch)
71c8a804 1526 (uri (pypi-uri "py" version))
542ad60f
DT
1527 (sha256
1528 (base32
71c8a804 1529 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1530 (build-system python-build-system)
1531 (inputs
1532 `(("python-setuptools" ,python-setuptools)))
1533 (home-page "http://pylib.readthedocs.org/")
1534 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1535 (description
1536 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1537code introspection, and logging.")
bd3fa666 1538 (license license:expat)))
542ad60f
DT
1539
1540(define-public python2-py
1541 (package-with-python2 python-py))
1542
855d4761
DT
1543(define-public python-pytest
1544 (package
1545 (name "python-pytest")
61a4332d 1546 (version "2.7.3")
855d4761
DT
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (string-append
1551 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1552 version ".tar.gz"))
1553 (sha256
1554 (base32
61a4332d 1555 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1556 (modules '((guix build utils)))
1557 (snippet
1558 ;; One of the tests involves the /usr directory, so it fails.
1559 '(substitute* "testing/test_argcomplete.py"
1560 (("def test_remove_dir_prefix\\(self\\):")
1561 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1562 (build-system python-build-system)
1563 (inputs
1564 `(("python-setuptools" ,python-setuptools)
1565 ("python-py" ,python-py)
1566 ("python-nose" ,python-nose)
1567 ("python-mock" ,python-mock)))
1568 (home-page "http://pytest.org")
1569 (synopsis "Python testing library")
1570 (description
1571 "Pytest is a testing tool that provides auto-discovery of test modules
1572and functions, detailed info on failing assert statements, modular fixtures,
1573and many external plugins.")
bd3fa666 1574 (license license:expat)))
855d4761
DT
1575
1576(define-public python2-pytest
1577 (package-with-python2 python-pytest))
1578
358c3d61
EF
1579(define-public python-pytest-cov
1580 (package
1581 (name "python-pytest-cov")
545f4a1c 1582 (version "2.2.1")
358c3d61
EF
1583 (source
1584 (origin
1585 (method url-fetch)
1586 (uri (pypi-uri "pytest-cov" version))
1587 (sha256
545f4a1c
EF
1588 (base32
1589 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1590 (build-system python-build-system)
545f4a1c 1591 (inputs
10468636
EF
1592 `(("python-coverage" ,python-coverage)
1593 ("python-pytest" ,python-pytest)))
10468636
EF
1594 (home-page "https://github.com/pytest-dev/pytest-cov")
1595 (synopsis "Pytest plugin for measuring coverage")
1596 (description
1597 "Pytest-cov produces coverage reports. It supports centralised testing and
1598distributed testing in both @code{load} and @code{each} modes. It also
1599supports coverage of subprocesses.")
545f4a1c
EF
1600 (license license:expat)
1601 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
358c3d61
EF
1602
1603(define-public python2-pytest-cov
545f4a1c
EF
1604 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1605 (package
1606 (inherit base)
1607 (inputs `(("python2-setuptools" ,python2-setuptools)
1608 ,@(package-inputs base))))))
358c3d61 1609
6784f2e3
RW
1610(define-public python-pytest-runner
1611 (package
1612 (name "python-pytest-runner")
1613 (version "2.6.2")
1614 (source
1615 (origin
1616 (method url-fetch)
54cd239b 1617 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1618 (sha256
1619 (base32
1620 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1621 (build-system python-build-system)
1622 (arguments
1623 `(#:phases
1624 (modify-phases %standard-phases
1625 ;; The fancy way of setting the version with setuptools_scm does not
1626 ;; seem to work here.
1627 (add-after 'unpack 'set-version
1628 (lambda _
1629 (substitute* "docs/conf.py"
1630 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1631 (string-append "version = \"" ,version "\"")))
1632 #t)))))
1633 (native-inputs
1634 `(("python-pytest" ,python-pytest)
1635 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1636 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1637 (synopsis "Invoke py.test as a distutils command")
1638 (description
1639 "This package provides a @command{pytest-runner} command that
1640@file{setup.py} files can use to run tests.")
54cd239b
EF
1641 (license license:expat)
1642 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1643
1644(define-public python2-pytest-runner
1645 (let ((base (package-with-python2
1646 (strip-python2-variant python-pytest-runner))))
1647 (package
1648 (inherit base)
1649 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1650 ,@(package-native-inputs base))))))
6784f2e3
RW
1651
1652(define-public python2-pytest-runner
1653 (package-with-python2 python-pytest-runner))
1654
8fa58fc9
CAW
1655(define-public python-pytest-xdist
1656 (package
1657 (name "python-pytest-xdist")
1658 (version "1.14")
1659 (source
1660 (origin
1661 (method url-fetch)
1662 (uri (pypi-uri "pytest-xdist" version ".zip"))
1663 (sha256
1664 (base32
1665 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))))
1666 (build-system python-build-system)
1667 (native-inputs
1668 `(("unzip" ,unzip)
8fa58fc9 1669 ("python-setuptools-scm" ,python-setuptools-scm)))
fbe9abcc
EF
1670 (inputs
1671 `(("python-apipkg" ,python-apipkg)
1672 ("python-execnet" ,python-execnet)
8fa58fc9
CAW
1673 ("python-pytest" ,python-pytest)
1674 ("python-py" ,python-py)))
1675 (home-page
1676 "https://github.com/pytest-dev/pytest-xdist")
1677 (synopsis
1678 "Plugin for py.test with distributed testing and loop-on-failing modes")
1679 (description
1680 "The pytest-xdist plugin extends py.test with some unique test execution
1681modes: parallelization, running tests in boxed subprocesses, the ability
1682to run tests repeatedly when failed, and the ability to run tests on multiple
1683Python interpreters or platforms. It uses rsync to copy the existing
1684program code to a remote location, executes there, and then syncs the
1685result back.")
fbe9abcc
EF
1686 (license license:expat)
1687 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
8fa58fc9
CAW
1688
1689(define-public python2-pytest-xdist
fbe9abcc
EF
1690 (let ((base (package-with-python2
1691 (strip-python2-variant python-pytest-xdist))))
1692 (package
1693 (inherit base)
1694 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1695 ,@(package-native-inputs base))))))
8fa58fc9 1696
84d24017
DT
1697(define-public python-scripttest
1698 (package
1699 (name "python-scripttest")
1700 (version "1.3")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (string-append
1705 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1706 version ".tar.gz"))
1707 (sha256
1708 (base32
1709 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1710 (build-system python-build-system)
1711 (inputs
1712 `(("python-setuptools" ,python-setuptools)
1713 ("python-pytest" ,python-pytest)))
1714 (home-page "http://pythonpaste.org/scripttest/")
1715 (synopsis "Python library to test command-line scripts")
1716 (description "Scripttest is a Python helper library for testing
1717interactive command-line applications. With it you can run a script in a
1718subprocess and see the output as well as any file modifications.")
bd3fa666 1719 (license license:expat)))
84d24017
DT
1720
1721(define-public python2-scripttest
1722 (package-with-python2 python-scripttest))
1723
d8fa80e1
DT
1724(define-public python-testtools
1725 (package
1726 (name "python-testtools")
1727 (version "1.0.0")
1728 (source
1729 (origin
1730 (method url-fetch)
1731 (uri (string-append
1732 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1733 version ".tar.gz"))
1734 (sha256
1735 (base32
1736 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1737 (build-system python-build-system)
0e88cbf8
CR
1738 (propagated-inputs
1739 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1740 (inputs
1741 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1742 ("python-extras" ,python-extras)))
1743 (home-page "https://github.com/testing-cabal/testtools")
1744 (synopsis
1745 "Extensions to the Python standard library unit testing framework")
1746 (description
1747 "Testtools extends the Python standard library unit testing framework to
1748provide matchers, more debugging information, and cross-Python
1749compatibility.")
1750 (license psfl)))
1751
1752(define-public python2-testtools
1753 (package-with-python2 python-testtools))
1754
5bf3afea
DT
1755(define-public python-testscenarios
1756 (package
1757 (name "python-testscenarios")
1758 (version "0.4")
1759 (source
1760 (origin
1761 (method url-fetch)
1762 (uri (string-append
1763 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1764 version ".tar.gz"))
1765 (sha256
1766 (base32
1767 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1768 (build-system python-build-system)
1769 (inputs
1770 `(("python-setuptools" ,python-setuptools)
1771 ("python-testtools" ,python-testtools)
1772 ("python-mimeparse" ,python-mimeparse)))
1773 (home-page "https://launchpad.net/testscenarios")
1774 (synopsis "Pyunit extension for dependency injection")
1775 (description
1776 "Testscenarios provides clean dependency injection for Python unittest
1777style tests.")
1778 (license (list bsd-3 asl2.0)))) ; at the user's option
1779
1780(define-public python2-testscenarios
1781 (package-with-python2 python-testscenarios))
1782
dac79ecc
DT
1783(define-public python-testresources
1784 (package
1785 (name "python-testresources")
1786 (version "0.2.7")
1787 (source
1788 (origin
1789 (method url-fetch)
1790 (uri (string-append
1791 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1792 version ".tar.gz"))
1793 (sha256
1794 (base32
1795 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1796 (build-system python-build-system)
1797 (inputs
1798 `(("python-setuptools" ,python-setuptools)))
1799 (home-page "https://launchpad.net/testresources")
1800 (synopsis
1801 "Pyunit extension for managing test resources")
1802 (description
1803 "Testresources is an extension to Python's unittest to allow declarative
1804use of resources by test cases.")
1805 (license (list bsd-3 asl2.0)))) ; at the user's option
1806
1807(define-public python2-testresources
1808 (package-with-python2 python-testresources))
1809
070ab058
DT
1810(define-public python-subunit
1811 (package
1812 (name "python-subunit")
1813 (version "0.0.21")
1814 (source
1815 (origin
1816 (method url-fetch)
1817 (uri (string-append
1818 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1819 version ".tar.gz"))
1820 (sha256
1821 (base32
1822 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1823 (build-system python-build-system)
1824 (inputs
1825 `(("python-setuptools" ,python-setuptools)
1826 ("python-testtools" ,python-testtools)
1827 ("python-mimeparse" ,python-mimeparse)
1828 ("python-testscenarios" ,python-testscenarios)))
1829 (home-page "http://launchpad.net/subunit")
1830 (synopsis "Python implementation of the subunit protocol")
1831 (description
1832 "Python-subunit is a Python implementation of the subunit test streaming
1833protocol.")
1834 (license (list bsd-3 asl2.0)))) ; at the user's option
1835
1836(define-public python2-subunit
1837 (package-with-python2 python-subunit))
1838
7787ef76
CR
1839;; Recent versions of python-fixtures need a recent version of python-pbr,
1840;; which needs a recent version of python-fixtures. To fix this circular
1841;; dependency, we keep old versions of python-fixtures and python-pbr to
1842;; bootstrap the whole thing:
1843;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1844;; - python-pbr-0.11 is used to build python-fixtures
1845;; - python-fixtures is used to build python-pbr
1846(define-public python-fixtures-0.3.16
cd49454b
DT
1847 (package
1848 (name "python-fixtures")
1849 (version "0.3.16")
1850 (source
1851 (origin
1852 (method url-fetch)
1853 (uri (string-append
1854 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1855 version ".tar.gz"))
1856 (sha256
1857 (base32
1858 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1859 (build-system python-build-system)
1860 (inputs
1861 `(("python-setuptools" ,python-setuptools)))
1862 (arguments
1863 '(#:tests? #f)) ; no setup.py test command
1864 (home-page "https://launchpad.net/python-fixtures")
1865 (synopsis "Python test fixture library")
1866 (description
1867 "Fixtures provides a way to create reusable state, useful when writing
1868Python tests.")
1869 (license (list bsd-3 asl2.0)))) ; at user's option
1870
7787ef76
CR
1871(define-public python2-fixtures-0.3.16
1872 (package-with-python2 python-fixtures-0.3.16))
1873
1874(define-public python-pbr-0.11
1875 (package
1876 (name "python-pbr")
1877 (version "0.11.0")
1878 (source
1879 (origin
1880 (method url-fetch)
1881 (uri (string-append
1882 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1883 version ".tar.gz"))
1884 (sha256
1885 (base32
1886 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1887 (build-system python-build-system)
1888 (arguments
1889 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1890 (inputs
1891 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1892 ("python-pip" ,python-pip)
1893 ("python-setuptools" ,python-setuptools)))
1894 (home-page "https://launchpad.net/pbr")
1895 (synopsis "Change the default behavior of Python’s setuptools")
1896 (description
1897 "Python Build Reasonableness (PBR) is a library that injects some useful
1898and sensible default behaviors into your setuptools run.")
1899 (license asl2.0)))
1900
1901(define-public python2-pbr-0.11
1902 (package-with-python2 python-pbr-0.11))
1903
1ef09c0c 1904(define-public python-pbr
e25f0174
BW
1905 (package
1906 (name "python-pbr")
1ef09c0c
BW
1907 (version "1.8.1")
1908 (source
e25f0174
BW
1909 (origin
1910 (method url-fetch)
1911 (uri (string-append
1912 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1913 version
1914 ".tar.gz"))
1915 (sha256
1916 (base32
1917 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1ef09c0c 1918 (build-system python-build-system)
e25f0174
BW
1919 (arguments
1920 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1921 (propagated-inputs
1922 `(("python-testrepository" ,python-testrepository)
1923 ("git" ,git))) ;; pbr actually uses the "git" binary.
1ef09c0c 1924 (inputs
e25f0174
BW
1925 `(("python-fixtures" ,python-fixtures)
1926 ("python-mimeparse" ,python-mimeparse)
1927 ("python-mock" ,python-mock)
1928 ("python-setuptools" ,python-setuptools)
1929 ("python-six" ,python-six)
1930 ("python-sphinx" ,python-sphinx)
1931 ("python-testrepository" ,python-testrepository)
1932 ("python-testresources" ,python-testresources)
1933 ("python-testscenarios" ,python-testscenarios)
1934 ("python-testtools" ,python-testtools)
1935 ("python-virtualenv" ,python-virtualenv)))
1936 (home-page "https://launchpad.net/pbr")
1937 (synopsis "Change the default behavior of Python’s setuptools")
1938 (description
1939 "Python Build Reasonableness (PBR) is a library that injects some useful
1940and sensible default behaviors into your setuptools run.")
1941 (license asl2.0)))
1ef09c0c
BW
1942
1943(define-public python2-pbr
e25f0174 1944 (package-with-python2 python-pbr))
1ef09c0c 1945
7787ef76
CR
1946(define-public python-fixtures
1947 (package
1948 (name "python-fixtures")
13fcc6df 1949 (version "1.4.0")
7787ef76
CR
1950 (source
1951 (origin
1952 (method url-fetch)
13fcc6df 1953 (uri (pypi-uri "fixtures" version))
7787ef76
CR
1954 (sha256
1955 (base32
13fcc6df 1956 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
1957 (build-system python-build-system)
1958 (propagated-inputs
1959 `(("python-six" ,python-six)
1960 ("python-pbr-0.11" ,python-pbr-0.11)))
1961 (inputs
1962 `(("python-pip" ,python-pip)
1963 ("python-setuptools" ,python-setuptools)
1964 ;; Tests
1965 ("python-testtools" ,python-testtools)))
1966 (arguments
1967 '(#:tests? #f)) ; no setup.py test command
1968 (home-page "https://launchpad.net/python-fixtures")
1969 (synopsis "Python test fixture library")
1970 (description
1971 "Fixtures provides a way to create reusable state, useful when writing
1972Python tests.")
1973 (license (list bsd-3 asl2.0)))) ; at user's option
1974
cd49454b
DT
1975(define-public python2-fixtures
1976 (package-with-python2 python-fixtures))
1977
b24a0c00
DT
1978(define-public python-testrepository
1979 (package
1980 (name "python-testrepository")
1981 (version "0.0.20")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (string-append
1986 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1987 version ".tar.gz"))
1988 (sha256
1989 (base32
1990 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1991 (build-system python-build-system)
05de40c5 1992 (propagated-inputs
7787ef76 1993 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 1994 ("python-testtools" ,python-testtools)))
b24a0c00
DT
1995 (inputs
1996 `(("python-setuptools" ,python-setuptools)
b24a0c00 1997 ("python-subunit" ,python-subunit)
b24a0c00
DT
1998 ("python-mimeparse" ,python-mimeparse)))
1999 (home-page "https://launchpad.net/testrepository")
2000 (synopsis "Database for Python test results")
2001 (description "Testrepository provides a database of test results which can
2002be used as part of a developer's workflow to check things such as what tests
2003have failed since the last commit or what tests are currently failing.")
2004 (license (list bsd-3 asl2.0)))) ; at user's option
2005
2006(define-public python2-testrepository
2007 (package-with-python2 python-testrepository))
2008
243a009a
DT
2009(define-public python-coverage
2010 (package
2011 (name "python-coverage")
82a3c582 2012 (version "4.0.3")
243a009a
DT
2013 (source
2014 (origin
2015 (method url-fetch)
82a3c582 2016 (uri (pypi-uri "coverage" version))
243a009a
DT
2017 (sha256
2018 (base32
82a3c582 2019 "0qjlja8ny4gcfp8abqfwdrvr8qw9kr69lkja0b4cqqbsdmdjgcc5"))))
243a009a
DT
2020 (build-system python-build-system)
2021 (inputs
2022 `(("python-setuptools" ,python-setuptools)))
2023 (home-page "http://nedbatchelder.com/code/coverage")
2024 (synopsis "Code coverage measurement for Python")
2025 (description
2026 "Coverage measures code coverage, typically during test execution. It
2027uses the code analysis tools and tracing hooks provided in the Python standard
2028library to determine which lines are executable, and which have been
2029executed.")
2030 (license bsd-3)))
2031
2032(define-public python2-coverage
2033 (package-with-python2 python-coverage))
2034
041358fb
DT
2035(define-public python-discover
2036 (package
2037 (name "python-discover")
2038 (version "0.4.0")
2039 (source
2040 (origin
2041 (method url-fetch)
2042 (uri (string-append
2043 "https://pypi.python.org/packages/source/d/discover/discover-"
2044 version ".tar.gz"))
2045 (sha256
2046 (base32
2047 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2048 (build-system python-build-system)
2049 (inputs
2050 `(("python-setuptools" ,python-setuptools)))
2051 (home-page "http://pypi.python.org/pypi/discover/")
2052 (synopsis
2053 "Python test discovery for unittest")
2054 (description
2055 "Discover provides test discovery for unittest, a feature that has been
e881752c 2056backported from Python 2.7 for Python 2.4+.")
041358fb
DT
2057 (license bsd-3)))
2058
2059(define-public python2-discover
2060 (package-with-python2 python-discover))
2061
a480bc41
EB
2062(define-public behave
2063 (package
2064 (name "behave")
2065 (version "1.2.4")
2066 (source (origin
2067 (method url-fetch)
2068 (uri (string-append "https://pypi.python.org/packages/source/b/"
2069 name "/" name "-" version ".tar.gz"))
2070 (sha256
2071 (base32
2072 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
2073 (build-system python-build-system)
2074 (inputs
2075 `(("python-setuptools" ,python-setuptools)
2076 ("python-six" ,python-six)
a480bc41
EB
2077 ("python-parse" ,python-parse)
2078 ("python-parse-type" ,python-parse-type)))
2079 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2080 ;PyHamcrest>=1.8
2081 (home-page "http://github.com/behave/behave")
2082 (synopsis "Python behavior-driven development")
2083 (description
2084 "Behave is a tool for behavior-driven development in python.
2085Behavior-driven development (or BDD) is an agile software development
2086technique that encourages collaboration between developers, QA and
2087non-technical or business participants in a software project. Behave uses
2088tests written in a natural language style, backed up by Python code.")
2089 (license x11)))
c7303d3c
DT
2090
2091(define-public python-exif-read
2092 (package
2093 (name "python-exif-read")
2a2d0981 2094 (version "2.1.2")
c7303d3c
DT
2095 (source (origin
2096 (method url-fetch)
2a2d0981 2097 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2098 (sha256
2099 (base32
2a2d0981 2100 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2101 (build-system python-build-system)
2102 (inputs
2103 `(("python-setuptools" ,python-setuptools)))
2104 (arguments `(#:tests? #f)) ; no tests
2105 (home-page "https://github.com/ianare/exif-py")
2106 (synopsis "Python library to extract EXIF data from image files")
2107 (description
2108 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2109files.")
2110 (license bsd-3)))
2111
2112(define-public python2-exif-read
2113 (package-with-python2 python-exif-read))
d5f89b22
DT
2114
2115(define-public python-pyld
2116 (package
2117 (name "python-pyld")
af1ab773 2118 (version "0.6.8")
d5f89b22
DT
2119 (source (origin
2120 (method url-fetch)
af1ab773 2121 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2122 (sha256
2123 (base32
af1ab773 2124 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22
DT
2125 (build-system python-build-system)
2126 (inputs
2127 `(("python-setuptools" ,python-setuptools)))
2128 (arguments `(#:tests? #f)) ; no tests
2129 (home-page "http://github.com/digitalbazaar/pyld")
2130 (synopsis "Python implementation of the JSON-LD specification")
2131 (description
2132 "PyLD is an implementation of the JSON-LD specification.")
2133 (license bsd-3)))
2134
2135(define-public python2-pyld
2136 (package-with-python2 python-pyld))
3a1f9a68
DT
2137
2138(define-public python-certifi
2139 (package
2140 (name "python-certifi")
9a41f443 2141 (version "2015.11.20.1")
3a1f9a68
DT
2142 (source (origin
2143 (method url-fetch)
9a41f443 2144 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2145 (sha256
2146 (base32
9a41f443 2147 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
3a1f9a68
DT
2148 (build-system python-build-system)
2149 (inputs
2150 `(("python-setuptools" ,python-setuptools)))
2151 (arguments `(#:tests? #f)) ; no tests
2152 (home-page "http://python-requests.org/")
2153 (synopsis "Python CA certificate bundle")
2154 (description
2155 "Certifi is a Python library that contains a CA certificate bundle, which
2156is used by the Requests library to verify HTTPS requests.")
2157 (license asl2.0)))
2158
2159(define-public python2-certifi
2160 (package-with-python2 python-certifi))
e6cfbd36 2161
12c270dd
RW
2162(define-public python-click
2163 (package
2164 (name "python-click")
5bd88cf1 2165 (version "6.2")
12c270dd
RW
2166 (source
2167 (origin
2168 (method url-fetch)
5bd88cf1 2169 (uri (pypi-uri "click" version))
12c270dd 2170 (sha256
5bd88cf1 2171 (base32 "10kavbisnk9m93jl2wi34pw7ryr2qbxshh2cysxwxd7bymqgz87v"))))
12c270dd
RW
2172 (build-system python-build-system)
2173 (native-inputs
2174 `(("python-setuptools" ,python-setuptools)))
2175 (home-page "http://click.pocoo.org")
2176 (synopsis "Command line library for Python")
2177 (description
2178 "Click is a Python package for creating command line interfaces in a
2179composable way with as little code as necessary. Its name stands for
2180\"Command Line Interface Creation Kit\". It's highly configurable but comes
2181with sensible defaults out of the box.")
2182 (license bsd-3)))
2183
2184(define-public python2-click
2185 (package-with-python2 python-click))
2186
addc808d
EF
2187(define-public python-wheel
2188 (package
2189 (name "python-wheel")
40981b5c 2190 (version "0.29.0")
e1ba0749
EF
2191 (source
2192 (origin
2193 (method url-fetch)
2194 (uri (pypi-uri "wheel" version))
2195 (sha256
2196 (base32
40981b5c 2197 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2198 (build-system python-build-system)
2199 (native-inputs
2200 `(("python-setuptools" ,python-setuptools)
2201 ("python-jsonschema" ,python-jsonschema)
2202 ("python-pytest-cov" ,python-pytest-cov)))
2203 (home-page "https://bitbucket.org/pypa/wheel/")
2204 (synopsis "Format for built Python packages")
2205 (description
2206 "A wheel is a ZIP-format archive with a specially formatted filename and
2207the @code{.whl} extension. It is designed to contain all the files for a PEP
2208376 compatible install in a way that is very close to the on-disk format. Many
2209packages will be properly installed with only the @code{Unpack} step and the
2210unpacked archive preserves enough information to @code{Spread} (copy data and
2211scripts to their final locations) at any later time. Wheel files can be
2212installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2213 (license license:expat)
2214 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2215
2216(define-public python2-wheel
8ad4ae20
LF
2217 (let ((wheel (package-with-python2
2218 (strip-python2-variant python-wheel))))
264ae686 2219 (package (inherit wheel)
8ad4ae20
LF
2220 (native-inputs `(("python2-functools32" ,python2-functools32)
2221 ,@(package-native-inputs wheel))))))
2222
addc808d 2223
ae641128 2224(define-public python-requests
e6cfbd36 2225 (package
ae641128 2226 (name "python-requests")
74a066f9 2227 (version "2.9.1")
e6cfbd36
DT
2228 (source (origin
2229 (method url-fetch)
5d691657 2230 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2231 (sha256
2232 (base32
74a066f9 2233 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2234 (build-system python-build-system)
5d691657 2235 (native-inputs
6a308947
EF
2236 `(("python-setuptools" ,python-setuptools)
2237 ("python-py" ,python-py)
5d691657
EF
2238 ("python-pytest" ,python-pytest)
2239 ("python-pytest-cov" ,python-pytest-cov)
2240 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2241 (home-page "http://python-requests.org/")
2242 (synopsis "Python HTTP library")
2243 (description
2244 "Requests is a Python HTTP client library. It aims to be easier to use
2245than Python’s urllib2 library.")
2246 (license asl2.0)))
864b5211 2247
e9005180
DT
2248;; Some software requires an older version of Requests, notably Docker
2249;; Compose.
2250(define-public python-requests-2.7
2251 (package (inherit python-requests)
2252 (version "2.7.0")
2253 (source (origin
2254 (method url-fetch)
2255 (uri (pypi-uri "requests" version))
2256 (sha256
2257 (base32
2258 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2259
ae641128 2260(define-public python2-requests
8ad4ae20 2261 (package-with-python2 python-requests))
ae641128 2262
ea521b42
DT
2263(define-public python-vcversioner
2264 (package
2265 (name "python-vcversioner")
2266 (version "2.14.0.0")
2267 (source
2268 (origin
2269 (method url-fetch)
2270 (uri (pypi-uri "vcversioner" version))
2271 (sha256
2272 (base32
2273 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2274 (build-system python-build-system)
2275 (inputs
2276 `(("python-setuptools" ,python-setuptools)))
2277 (synopsis "Python library for version number discovery")
2278 (description "Vcversioner is a Python library that inspects tagging
2279information in a variety of version control systems in order to discover
2280version numbers.")
2281 (home-page "https://github.com/habnabit/vcversioner")
2282 (license isc)))
2283
2284(define-public python2-vcversioner
2285 (package-with-python2 python-vcversioner))
ae641128 2286
864b5211
DT
2287(define-public python-jsonschema
2288 (package
2289 (name "python-jsonschema")
b3667afb 2290 (version "2.5.1")
864b5211
DT
2291 (source (origin
2292 (method url-fetch)
2293 (uri
2294 (string-append
2295 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2296 version ".tar.gz"))
2297 (sha256
2298 (base32
b3667afb 2299 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211
DT
2300 (build-system python-build-system)
2301 (inputs
b3667afb
DT
2302 `(("python-setuptools" ,python-setuptools)
2303 ("python-vcversioner" ,python-vcversioner)))
864b5211
DT
2304 (home-page "http://github.com/Julian/jsonschema")
2305 (synopsis "Implementation of JSON Schema for Python")
2306 (description
2307 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2308 (license license:expat)
2309 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2310
2311(define-public python2-jsonschema
a14600ec
LF
2312 (let ((jsonschema (package-with-python2
2313 (strip-python2-variant python-jsonschema))))
264ae686
EF
2314 (package (inherit jsonschema)
2315 (inputs
2316 `(("python2-functools32" ,python2-functools32)
2317 ,@(package-inputs jsonschema))))))
850189b8
DT
2318
2319(define-public python-unidecode
2320 (package
2321 (name "python-unidecode")
8925d4f3 2322 (version "0.04.18")
850189b8
DT
2323 (source (origin
2324 (method url-fetch)
8925d4f3 2325 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2326 (sha256
2327 (base32
8925d4f3 2328 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2329 (build-system python-build-system)
2330 (inputs
2331 `(("python-setuptools" ,python-setuptools)))
2332 (home-page "https://pypi.python.org/pypi/Unidecode")
2333 (synopsis "ASCII transliterations of Unicode text")
2334 (description
2335 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2336useful when integrating with legacy code that doesn't support Unicode, or for
2337ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2338machine identifiers from human-readable Unicode strings that should still be
2339somewhat intelligeble.")
2340 (license gpl2+)))
2341
2342(define-public python2-unidecode
2343 (package-with-python2 python-unidecode))
6d45fef4
DT
2344
2345(define-public python-pyjwt
2346 (package
2347 (name "python-pyjwt")
eb31d4b4 2348 (version "1.4.0")
6d45fef4
DT
2349 (source
2350 (origin
2351 (method url-fetch)
eb31d4b4 2352 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2353 (sha256
2354 (base32
eb31d4b4 2355 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2356 (build-system python-build-system)
eb31d4b4
EF
2357 (native-inputs
2358 `(("python-setuptools" ,python-setuptools)
2359 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2360 (arguments
2361 '(#:tests? #f)) ; test suite doesn't work
2362 (home-page "http://github.com/progrium/pyjwt")
2363 (synopsis "JSON Web Token implementation in Python")
2364 (description
2365 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2366 (license license:expat)))
6d45fef4
DT
2367
2368(define-public python2-pyjwt
2369 (package-with-python2 python-pyjwt))
2370
2cec1f6f
DT
2371(define-public python-oauthlib
2372 (package
2373 (name "python-oauthlib")
bde2171d 2374 (version "1.0.3")
2cec1f6f
DT
2375 (source (origin
2376 (method url-fetch)
bde2171d 2377 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2378 (sha256
2379 (base32
bde2171d 2380 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2381 (build-system python-build-system)
bde2171d 2382 (native-inputs
59f151ec 2383 `(("python-coverage" ,python-coverage)
2cec1f6f
DT
2384 ("python-nose" ,python-nose)
2385 ("python-mock" ,python-mock)))
bde2171d
EF
2386 (inputs
2387 `(("python-blinker" ,python-blinker)
2388 ("python-cryptography" ,python-cryptography)
2389 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2390 (home-page "https://github.com/idan/oauthlib")
2391 (synopsis "OAuth implementation for Python")
2392 (description
2393 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2394OAuth request-signing logic.")
59f151ec
EF
2395 (license bsd-3)
2396 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2397
2398(define-public python2-oauthlib
59f151ec 2399 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2400 (package
2401 (inherit base)
59f151ec
EF
2402 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2403 ("python2-unittest2" ,python2-unittest2)
2404 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2405
2406(define-public python-itsdangerous
2407 (package
2408 (name "python-itsdangerous")
2409 (version "0.24")
2410 (source
2411 (origin
2412 (method url-fetch)
2413 (uri (string-append
2414 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2415 version ".tar.gz"))
2416 (sha256
2417 (base32
2418 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2419 (build-system python-build-system)
ec5dbb5c
DT
2420 (home-page "http://github.com/mitsuhiko/itsdangerous")
2421 (synopsis "Python library for passing data to/from untrusted environments")
2422 (description
2423 "Itsdangerous provides various helpers to pass trusted data to untrusted
2424environments and back.")
194d0d98
EF
2425 (license bsd-3)
2426 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
ec5dbb5c
DT
2427
2428(define-public python2-itsdangerous
194d0d98
EF
2429 (let ((base (package-with-python2
2430 (strip-python2-variant python-itsdangerous))))
2431 (package
2432 (inherit base)
2433 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2434 ,@(package-native-inputs base))))))
5731cae3 2435
8d12be1e
RW
2436(define-public python-pyyaml
2437 (package
2438 (name "python-pyyaml")
2439 (version "3.11")
2440 (source
2441 (origin
2442 (method url-fetch)
2443 (uri (string-append
2444 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2445 version ".tar.gz"))
2446 (sha256
2447 (base32
2448 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2449 (build-system python-build-system)
2450 (inputs
2451 `(("libyaml" ,libyaml)))
2452 (native-inputs
2453 `(("python-setuptools" ,python-setuptools)))
2454 (home-page "http://pyyaml.org/wiki/PyYAML")
2455 (synopsis "YAML parser and emitter for Python")
2456 (description
2457 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2458complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2459API, and sensible error messages. PyYAML supports standard YAML tags and
2460provides Python-specific tags that allow to represent an arbitrary Python
2461object.")
2462 (license license:expat)))
2463
2464(define-public python2-pyyaml
2465 (package-with-python2 python-pyyaml))
2466
5731cae3
DT
2467(define-public python-virtualenv
2468 (package
2469 (name "python-virtualenv")
17804240 2470 (version "13.1.2")
5731cae3
DT
2471 (source
2472 (origin
2473 (method url-fetch)
17804240 2474 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2475 (sha256
2476 (base32
17804240 2477 "1p732accxwqfjbdna39k8w8lp9gyw91vr4kzkhm8mgfxikqqxg5a"))))
5731cae3 2478 (build-system python-build-system)
17804240
EF
2479 (arguments
2480 `(#:phases
2481 (modify-phases %standard-phases
2482 (replace 'check
2483 (lambda _ (zero? (system* "py.test")))))))
5731cae3
DT
2484 (inputs
2485 `(("python-setuptools" ,python-setuptools)
2486 ("python-mock" ,python-mock)
17804240 2487 ("python-pytest" ,python-pytest)))
5731cae3
DT
2488 (home-page "https://virtualenv.pypa.io/")
2489 (synopsis "Virtual Python environment builder")
2490 (description
2491 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2492 (license license:expat)))
5731cae3
DT
2493
2494(define-public python2-virtualenv
2495 (package-with-python2 python-virtualenv))
8176d4d5
DT
2496
2497(define-public python-markupsafe
2498 (package
2499 (name "python-markupsafe")
2500 (version "0.23")
2501 (source
2502 (origin
2503 (method url-fetch)
2504 (uri (string-append
2505 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2506 version ".tar.gz"))
2507 (sha256
2508 (base32
2509 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2510 (build-system python-build-system)
2511 (inputs
2512 `(("python-setuptools" ,python-setuptools)))
2513 (home-page "http://github.com/mitsuhiko/markupsafe")
2514 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2515 (description
2516 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2517for Python.")
2518 (license bsd-3)))
2519
2520(define-public python2-markupsafe
2521 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2522
2523(define-public python-jinja2
2524 (package
2525 (name "python-jinja2")
e98149b3 2526 (version "2.8")
fe34f0d1
DT
2527 (source
2528 (origin
2529 (method url-fetch)
e98149b3 2530 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2531 (sha256
2532 (base32
e98149b3 2533 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2534 (build-system python-build-system)
2535 (inputs
2536 `(("python-setuptools" ,python-setuptools)
2537 ("python-markupsafe" ,python-markupsafe)))
2538 (home-page "http://jinja.pocoo.org/")
2539 (synopsis "Python template engine")
2540 (description
2541 "Jinja2 is a small but fast and easy to use stand-alone template engine
2542written in pure Python.")
2543 (license bsd-3)))
2544
2545(define-public python2-jinja2
2546 (package-with-python2 python-jinja2))
3580ab8b 2547
f7d17ac7
EE
2548(define-public python-pystache
2549 (package
2550 (name "python-pystache")
2551 (version "0.5.4")
2552 (source (origin
2553 (method url-fetch)
2554 (uri (pypi-uri "pystache" version))
2555 (sha256
2556 (base32
2557 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2558 (build-system python-build-system)
2559 (native-inputs
2560 `(("python-setuptools" ,python-setuptools)))
2561 (home-page "http://defunkt.io/pystache/")
2562 (synopsis "Python logic-less template engine")
2563 (description
2564 "Pystache is a Python implementation of the framework agnostic,
2565logic-free templating system Mustache.")
2566 (license license:expat)))
2567
2568(define-public python2-pystache
2569 (package-with-python2 python-pystache))
2570
1285119b
RW
2571(define-public python-joblib
2572 (package
2573 (name "python-joblib")
2574 (version "0.9.0b4")
2575 (source (origin
2576 (method url-fetch)
2577 (uri (string-append "https://pypi.python.org/packages/source/"
2578 "j/joblib/joblib-" version ".tar.gz"))
2579 (sha256
2580 (base32
2581 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2582 (build-system python-build-system)
2583 (native-inputs
2584 `(("python-setuptools" ,python-setuptools)
2585 ("python-nose" ,python-nose)))
2586 (home-page "http://pythonhosted.org/joblib/")
2587 (synopsis "Using Python functions as pipeline jobs")
2588 (description
2589 "Joblib is a set of tools to provide lightweight pipelining in Python.
2590In particular, joblib offers: transparent disk-caching of the output values
2591and lazy re-evaluation (memoize pattern), easy simple parallel computing
2592logging and tracing of the execution.")
2593 (license bsd-3)))
2594
2595(define-public python2-joblib
2596 (package-with-python2 python-joblib))
2597
3580ab8b
DT
2598(define-public python-docutils
2599 (package
2600 (name "python-docutils")
2601 (version "0.12")
2602 (source
2603 (origin
2604 (method url-fetch)
2605 (uri (string-append
2606 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2607 version ".tar.gz"))
2608 (sha256
2609 (base32
2610 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2611 (build-system python-build-system)
2612 (inputs
2613 `(("python-setuptools" ,python-setuptools)))
2614 (arguments
2615 '(#:tests? #f)) ; no setup.py test command
2616 (home-page "http://docutils.sourceforge.net/")
2617 (synopsis "Python Documentation Utilities")
2618 (description
2619 "Docutils is a modular system for processing documentation into useful
2620formats, such as HTML, XML, and LaTeX. For input Docutils supports
2621reStructuredText.")
2622 ;; Most of the source code is public domain, but some source files are
2623 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2624 (license (list public-domain psfl bsd-2 gpl3+))))
2625
2626(define-public python2-docutils
2627 (package-with-python2 python-docutils))
fb35b7c0
DT
2628
2629(define-public python-pygments
2630 (package
2631 (name "python-pygments")
9f442285 2632 (version "2.0.2")
fb35b7c0
DT
2633 (source
2634 (origin
2635 (method url-fetch)
9f442285 2636 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2637 (sha256
2638 (base32
9f442285 2639 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2640 (build-system python-build-system)
2641 (inputs
2642 `(("python-setuptools" ,python-setuptools)))
2643 (home-page "http://pygments.org/")
2644 (synopsis "Syntax highlighting")
2645 (description
2646 "Pygments is a syntax highlighting package written in Python.")
2647 (license bsd-2)))
2648
2649(define-public python2-pygments
2650 (package-with-python2 python-pygments))
9dd6078d
DT
2651
2652(define-public python-sphinx
2653 (package
2654 (name "python-sphinx")
2655 (version "1.2.3")
2656 (source
2657 (origin
2658 (method url-fetch)
2659 (uri (string-append
2660 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2661 version ".tar.gz"))
2662 (sha256
2663 (base32
2664 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2665 (build-system python-build-system)
2666 (inputs
2667 `(("python-setuptools" ,python-setuptools)
2668 ("python-jinja2" ,python-jinja2)
2669 ("python-docutils" ,python-docutils)
2670 ("python-pygments" ,python-pygments)))
2671 (home-page "http://sphinx-doc.org/")
2672 (synopsis "Python documentation generator")
2673 (description "Sphinx is a tool that makes it easy to create documentation
2674for Python projects or other documents consisting of multiple reStructuredText
2675sources.")
2676 (license bsd-3)))
2677
2678(define-public python2-sphinx
2679 (package-with-python2 python-sphinx))
6888830b 2680
ad320b20
RW
2681(define-public python-sphinx-rtd-theme
2682 (package
2683 (name "python-sphinx-rtd-theme")
2684 (version "0.1.6")
2685 (source
2686 (origin
2687 (method url-fetch)
2688 (uri (string-append "https://pypi.python.org/packages/source/s/"
2689 "sphinx_rtd_theme/sphinx_rtd_theme-"
2690 version ".tar.gz"))
2691 (sha256
2692 (base32
2693 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2694 (build-system python-build-system)
2695 (arguments
2696 `(;; With standard flags, the install phase attempts to create a zip'd
2697 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2698 ;; before 1980'
2699 #:configure-flags '("--single-version-externally-managed"
2700 "--record=sphinx-rtd-theme.txt")))
2701 (native-inputs
2702 `(("python-setuptools" ,python-setuptools)))
2703 (inputs
2704 `(("python-docutils" ,python-docutils)
2705 ("python-sphinx" ,python-sphinx)))
2706 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2707 (synopsis "ReadTheDocs.org theme for Sphinx")
2708 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2709 (license license:expat)))
ad320b20
RW
2710
2711(define-public python2-sphinx-rtd-theme
2712 (package-with-python2 python-sphinx-rtd-theme))
2713
f4de5b3b
CAW
2714(define-public python-feedgenerator
2715 (package
2716 (name "python-feedgenerator")
f0412aa2 2717 (version "1.8")
f4de5b3b 2718 (source
f4de5b3b 2719 (origin
f0412aa2
EF
2720 (method url-fetch)
2721 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2722 (sha256
2723 (base32
f0412aa2 2724 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
f4de5b3b 2725 (build-system python-build-system)
f0412aa2 2726 (native-inputs
f4de5b3b
CAW
2727 `(("python-setuptools" ,python-setuptools)
2728 ("python-pytz" ,python-pytz)
2729 ("python-six" ,python-six)))
f0412aa2 2730 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2731 (synopsis
2732 "Standalone version of Django's Atom/RSS feed generator")
2733 (description
2734 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2735which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2736 (license bsd-3)))
2737
2738(define-public python2-feedgenerator
2739 (package-with-python2 python-feedgenerator))
2740
59ad30e3
CAW
2741(define-public python-blinker
2742 (package
2743 (name "python-blinker")
7fb9ff4d 2744 (version "1.4")
59ad30e3
CAW
2745 (source
2746 (origin
2747 (method url-fetch)
7fb9ff4d 2748 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2749 (sha256
2750 (base32
7fb9ff4d 2751 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
2752 (build-system python-build-system)
2753 (native-inputs
2754 `(("python-setuptools" ,python-setuptools)))
2755 ;; No "test" command supplied to setuptools, so unless there's another way
2756 ;; to run tests, we're skipping them!
2757 (arguments '(#:tests? #f))
2758 (home-page "http://pythonhosted.org/blinker/")
2759 (synopsis "Fast, simple object-to-object and broadcast signaling")
2760 (description
2761 "Blinker provides a fast dispatching system that allows any number of
2762interested parties to subscribe to events, or \"signals\".")
2763 (license license:expat)))
2764
2765(define-public python2-blinker
2766 (package-with-python2 python-blinker))
2767
b8050e71
CAW
2768(define-public pelican
2769 (package
2770 (name "pelican")
11f97c27 2771 (version "3.6.3")
b8050e71
CAW
2772 (source
2773 (origin
2774 (method url-fetch)
11f97c27 2775 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2776 (sha256
2777 (base32
11f97c27 2778 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2779 (build-system python-build-system)
d9f2dece 2780 (inputs
b8050e71
CAW
2781 `(("python-feedgenerator" ,python-feedgenerator)
2782 ("python-jinja2" ,python-jinja2)
2783 ("python-pygments" ,python-pygments)
2784 ("python-docutils" ,python-docutils)
2785 ("python-pytz" ,python-pytz)
2786 ("python-blinker" ,python-blinker)
2787 ("python-unidecode" ,python-unidecode)
2788 ("python-six" ,python-six)
2789 ("python-dateutil-2" ,python-dateutil-2)))
2790 (home-page "http://getpelican.com/")
2791 (arguments
2792 `(;; XXX Requires a lot more packages to do unit tests :P
2793 #:tests? #f
2794 #:phases (modify-phases %standard-phases
2795 (add-before
2796 'install 'adjust-requires
2797 ;; Since feedgenerator is installed from git, it doesn't
2798 ;; conform to the version requirements.
2799 ;;
2800 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2801 ;; version requirement so setuptools doesn't get confused.
2802 (lambda _
2803 (substitute* "setup.py"
2804 (("['\"]feedgenerator.*?['\"]")
2805 "'feedgenerator'")))))))
2806 (synopsis "Python-based static site publishing system")
2807 (description
2808 "Pelican is a tool to generate a static blog from reStructuredText,
2809Markdown input files, and more. Pelican uses Jinja2 for templating
2810and is very extensible.")
2811 (license agpl3+)))
2812
240ca4aa
RW
2813(define-public python-scikit-learn
2814 (package
2815 (name "python-scikit-learn")
be0a4c26 2816 (version "0.16.1")
240ca4aa
RW
2817 (source
2818 (origin
2819 (method url-fetch)
2820 (uri (string-append
2821 "https://github.com/scikit-learn/scikit-learn/archive/"
2822 version ".tar.gz"))
2823 (sha256
2824 (base32
be0a4c26 2825 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2826 (build-system python-build-system)
2827 (arguments
2828 `(#:phases
2829 (alist-cons-before
2f6b3d2e
RW
2830 'check 'set-HOME
2831 ;; some tests require access to "$HOME"
2832 (lambda _ (setenv "HOME" "/tmp"))
2833 ;; Tests can only be run after the library has been installed and not
2834 ;; within the source directory.
2835 (alist-cons-after
2836 'install 'check
2837 (lambda _
2838 (with-directory-excursion "/tmp"
2839 ;; With Python 3 one test of 3334 fails
2840 ;; (sklearn.tests.test_common.test_transformers); see
2841 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2842 (system* "nosetests" "-v" "sklearn")))
2843 (alist-delete 'check %standard-phases)))))
240ca4aa 2844 (inputs
2f6b3d2e 2845 `(("openblas" ,openblas)
240ca4aa
RW
2846 ("python-nose" ,python-nose)))
2847 (propagated-inputs
2848 `(("python-numpy" ,python-numpy)
2849 ("python-scipy" ,python-scipy)))
2850 (home-page "http://scikit-learn.org/")
2851 (synopsis "Machine Learning in Python")
2852 (description
2853 "Scikit-learn provides simple and efficient tools for data
2854mining and data analysis.")
2855 (license bsd-3)))
2856
2857(define-public python2-scikit-learn
2858 (let ((scikit (package-with-python2 python-scikit-learn)))
2859 (package (inherit scikit)
2860 (propagated-inputs
2861 `(("python2-numpy" ,python2-numpy)
2862 ("python2-scipy" ,python2-scipy)
2863 ,@(alist-delete
2864 "python-numpy"
2865 (alist-delete
2866 "python-scipy" (package-propagated-inputs scikit))))))))
2867
12f8f9bb
RW
2868(define-public python-scikit-image
2869 (package
2870 (name "python-scikit-image")
2871 (version "0.11.3")
2872 (source
2873 (origin
2874 (method url-fetch)
2875 (uri (string-append
2876 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2877 version ".tar.gz"))
2878 (sha256
2879 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2880 (build-system python-build-system)
2881 (propagated-inputs
2882 `(("python-matplotlib" ,python-matplotlib)
2883 ("python-networkx" ,python-networkx)
2884 ("python-numpy" ,python-numpy)
2885 ("python-scipy" ,python-scipy)
2886 ("python-six" ,python-six)
2887 ("python-pillow" ,python-pillow)))
2888 (native-inputs
2889 `(("python-cython" ,python-cython)
2890 ("python-setuptools" ,python-setuptools)))
2891 (home-page "http://scikit-image.org/")
2892 (synopsis "Image processing in Python")
2893 (description
e881752c 2894 "Scikit-image is a collection of algorithms for image processing.")
12f8f9bb
RW
2895 (license bsd-3)))
2896
2897(define-public python2-scikit-image
2898 (let ((scikit-image (package-with-python2 python-scikit-image)))
2899 (package (inherit scikit-image)
2900 (native-inputs
2901 `(("python2-mock" ,python2-mock)
2902 ,@(package-native-inputs scikit-image)))
2903 (propagated-inputs
2904 `(("python2-pytz" ,python2-pytz)
d9bc0bf8
FB
2905 ("python2-matplotlib" ,python2-matplotlib)
2906 ("python2-numpy" ,python2-numpy)
2907 ("python2-scipy" ,python2-scipy)
2908 ,@(fold alist-delete (package-propagated-inputs scikit-image)
2909 '("python-matplotlib" "python-numpy" "python-scipy")))))))
12f8f9bb 2910
5394a6a6
RW
2911(define-public python-redis
2912 (package
2913 (name "python-redis")
2914 (version "2.10.3")
2915 (source
2916 (origin
2917 (method url-fetch)
2918 (uri (string-append
2919 "https://pypi.python.org/packages/source/r/redis/redis-"
2920 version ".tar.gz"))
2921 (sha256
2922 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2923 (build-system python-build-system)
2924 ;; Tests require a running Redis server
2925 (arguments '(#:tests? #f))
2926 (native-inputs
2927 `(("python-setuptools" ,python-setuptools)
2928 ("python-pytest" ,python-pytest)))
2929 (home-page "https://github.com/andymccurdy/redis-py")
2930 (synopsis "Redis Python client")
2931 (description
2932 "This package provides a Python interface to the Redis key-value store.")
2933 (license license:expat)))
2934
2935(define-public python2-redis
2936 (package-with-python2 python-redis))
2937
748cef5b
RW
2938(define-public python-rq
2939 (package
2940 (name "python-rq")
2941 (version "0.5.2")
2942 (source
2943 (origin
2944 (method url-fetch)
2945 (uri (string-append
2946 "https://pypi.python.org/packages/source/r/rq/rq-"
2947 version ".tar.gz"))
2948 (sha256
2949 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2950 (build-system python-build-system)
2951 (propagated-inputs
2952 `(("python-click" ,python-click)
2953 ("python-redis" ,python-redis)))
2954 (native-inputs
2955 `(("python-setuptools" ,python-setuptools)))
2956 (home-page "http://python-rq.org/")
2957 (synopsis "Simple job queues for Python")
2958 (description
2959 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2960processing them in the background with workers. It is backed by Redis and it
2961is designed to have a low barrier to entry.")
2962 (license bsd-2)))
2963
2964(define-public python2-rq
2965 (package-with-python2 python-rq))
2966
6888830b
FB
2967(define-public python-cython
2968 (package
2969 (name "python-cython")
435a0462 2970 (version "0.24")
6888830b
FB
2971 (source
2972 (origin
2973 (method url-fetch)
56918e26 2974 (uri (pypi-uri "Cython" version))
6888830b
FB
2975 (sha256
2976 (base32
435a0462 2977 "1wd3q97gia3zhsgcdlvxh26hkrf3m53i6r1l4g0yya119264vr3d"))))
6888830b
FB
2978 (build-system python-build-system)
2979 ;; we need the full python package and not just the python-wrapper
2980 ;; because we need libpython3.3m.so
2981 (inputs
2982 `(("python" ,python)))
2983 (arguments
2984 `(#:phases
2985 (alist-cons-before
2986 'check 'set-HOME
2987 ;; some tests require access to "$HOME/.cython"
2988 (lambda* _ (setenv "HOME" "/tmp"))
2989 (alist-replace
2990 'check
2991 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2992 %standard-phases))))
2993 (home-page "http://cython.org/")
2994 (synopsis "C extensions for Python")
2995 (description "Cython is an optimising static compiler for both the Python
2996programming language and the extended Cython programming language. It makes
2997writing C extensions for Python as easy as Python itself.")
48b311b1
LC
2998 (license asl2.0)
2999 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3000
3001(define-public python2-cython
48b311b1
LC
3002 (package (inherit (package-with-python2
3003 (strip-python2-variant python-cython)))
6888830b
FB
3004 (name "python2-cython")
3005 (inputs
3006 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
3007
3008;; This version of numpy is missing the documentation and is only used to
3009;; build matplotlib which is required to build numpy's documentation.
3010(define python-numpy-bootstrap
3011 (package
3012 (name "python-numpy-bootstrap")
ef9b4c04 3013 (version "1.10.4")
0da98533
FB
3014 (source
3015 (origin
3016 (method url-fetch)
3017 (uri (string-append "mirror://sourceforge/numpy"
3018 "/numpy-" version ".tar.gz"))
3019 (sha256
3020 (base32
ef9b4c04 3021 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3022 (build-system python-build-system)
3023 (inputs
3024 `(("python-nose" ,python-nose)
cba256f8
RW
3025 ("openblas" ,openblas)
3026 ("lapack" ,lapack)))
0da98533 3027 (native-inputs
19afbea1 3028 `(("gfortran" ,gfortran)))
0da98533
FB
3029 (arguments
3030 `(#:phases
3031 (alist-cons-before
3032 'build 'set-environment-variables
3033 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3034 (call-with-output-file "site.cfg"
3035 (lambda (port)
cba256f8
RW
3036 (format port
3037 "[openblas]
dbdfe515
RW
3038libraries = openblas
3039library_dirs = ~a/lib
3040include_dirs = ~a/include
cba256f8
RW
3041
3042[lapack]
3043lapack_libs = lapack
3044library_dirs = ~a/lib
3045include_dirs = ~a/include
3046"
3047 (assoc-ref inputs "openblas")
3048 (assoc-ref inputs "openblas")
3049 (assoc-ref inputs "lapack")
3050 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3051 ;; Use "gcc" executable, not "cc".
3052 (substitute* "numpy/distutils/system_info.py"
3053 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3054 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3055 #t)
6a843168
FB
3056 ;; Tests can only be run after the library has been installed and not
3057 ;; within the source directory.
3058 (alist-cons-after
3059 'install 'check
89b5c60e 3060 (lambda _
6a843168 3061 (with-directory-excursion "/tmp"
89b5c60e 3062 (zero? (system* "python" "-c"
6a843168 3063 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3064 (alist-delete
3065 'check
6a843168 3066 %standard-phases)))))
0da98533
FB
3067 (home-page "http://www.numpy.org/")
3068 (synopsis "Fundamental package for scientific computing with Python")
3069 (description "NumPy is the fundamental package for scientific computing
e881752c 3070with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3071object, sophisticated (broadcasting) functions, tools for integrating C/C++
3072and Fortran code, useful linear algebra, Fourier transform, and random number
3073capabilities.")
3074 (license bsd-3)))
3075
3076(define python2-numpy-bootstrap
3077 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3078
3a1bfe18
RW
3079(define-public python2-fastlmm
3080 (package
3081 (name "python2-fastlmm")
b074e7d4 3082 (version "0.2.21")
3a1bfe18
RW
3083 (source
3084 (origin
3085 (method url-fetch)
b074e7d4 3086 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3087 (sha256
3088 (base32
b074e7d4 3089 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3090 (build-system python-build-system)
3091 (arguments
3092 `(#:python ,python-2)) ; only Python 2.7 is supported
3093 (propagated-inputs
3094 `(("python2-numpy" ,python2-numpy)
3095 ("python2-scipy" ,python2-scipy)
3096 ("python2-matplotlib" ,python2-matplotlib)
3097 ("python2-pandas" ,python2-pandas)
3098 ("python2-scikit-learn" ,python2-scikit-learn)
3099 ("python2-cython" ,python2-cython)
3100 ("python2-pysnptools" ,python2-pysnptools)))
3101 (native-inputs
3102 `(("unzip" ,unzip)
3103 ("python2-mock" ,python2-mock)
3104 ("python2-setuptools" ,python2-setuptools)))
3105 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3106 (synopsis "Perform genome-wide association studies on large data sets")
3107 (description
3108 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3109Models, is a program for performing both single-SNP and SNP-set genome-wide
3110association studies (GWAS) on extremely large data sets.")
3111 (license asl2.0)))
3112
2ee8869a
FB
3113(define-public python-numpy
3114 (package (inherit python-numpy-bootstrap)
3115 (name "python-numpy")
3116 (outputs '("out" "doc"))
89b5c60e 3117 (inputs
2ee8869a
FB
3118 `(("which" ,which)
3119 ("python-setuptools" ,python-setuptools)
3120 ("python-matplotlib" ,python-matplotlib)
3121 ("python-sphinx" ,python-sphinx)
3122 ("python-pyparsing" ,python-pyparsing)
3123 ("python-numpydoc" ,python-numpydoc)
3124 ,@(package-inputs python-numpy-bootstrap)))
3125 (native-inputs
3126 `(("pkg-config" ,pkg-config)
3127 ("texlive" ,texlive)
3128 ("texinfo" ,texinfo)
3129 ("perl" ,perl)
3130 ,@(package-native-inputs python-numpy-bootstrap)))
3131 (arguments
89b5c60e 3132 `(,@(substitute-keyword-arguments
2ee8869a
FB
3133 (package-arguments python-numpy-bootstrap)
3134 ((#:phases phases)
3135 `(alist-cons-after
3136 'install 'install-doc
3137 (lambda* (#:key outputs #:allow-other-keys)
3138 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3139 (doc (string-append
3140 data "/doc/" ,name "-"
2ee8869a
FB
3141 ,(package-version python-numpy-bootstrap)))
3142 (info (string-append data "/info"))
3143 (html (string-append doc "/html"))
3144 (pyver ,(string-append "PYVER=")))
3145 (with-directory-excursion "doc"
3146 (mkdir-p html)
3147 (system* "make" "html" pyver)
3148 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3149 (system* "make" "-C" "build/latex"
2ee8869a
FB
3150 "all-pdf" "PAPER=a4" pyver)
3151 ;; FIXME: Generation of the info file fails.
3152 ;; (system* "make" "info" pyver)
3153 ;; (mkdir-p info)
3154 ;; (copy-file "build/texinfo/numpy.info"
3155 ;; (string-append info "/numpy.info"))
3156 (for-each (lambda (file)
3157 (copy-file (string-append "build/latex" file)
3158 (string-append doc file)))
3159 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3160 (with-directory-excursion "build/html"
3161 (for-each (lambda (file)
3162 (let* ((dir (dirname file))
3163 (tgt-dir (string-append html "/" dir)))
3164 (unless (equal? "." dir)
3165 (mkdir-p tgt-dir))
96c46210 3166 (install-file file html)))
2ee8869a
FB
3167 (find-files "." ".*"))))))
3168 ,phases)))))))
3169
764c077b 3170(define-public python2-numpy
57b7b8cd 3171 (package-with-python2 python-numpy))
2ee8869a 3172
15bfe6d6
FB
3173(define-public python-pyparsing
3174 (package
3175 (name "python-pyparsing")
e0669289 3176 (version "2.0.3")
15bfe6d6
FB
3177 (source
3178 (origin
3179 (method url-fetch)
3180 (uri (string-append "mirror://sourceforge/pyparsing"
3181 "/pyparsing-" version ".tar.gz"))
3182 (sha256
3183 (base32
e0669289 3184 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3185 (build-system python-build-system)
3186 (outputs '("out" "doc"))
3187 (arguments
3188 `(#:tests? #f ; no test target
3189 #:modules ((guix build python-build-system)
3190 (guix build utils))
3191 #:phases
3192 (alist-cons-after
3193 'install 'install-doc
3194 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3195 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3196 "/share/doc/" ,name "-" ,version))
3197 (html-doc (string-append doc "/html"))
3198 (examples (string-append doc "/examples")))
3199 (mkdir-p html-doc)
3200 (mkdir-p examples)
89b5c60e 3201 (for-each
15bfe6d6 3202 (lambda (dir tgt)
89b5c60e 3203 (map (lambda (file)
96c46210 3204 (install-file file tgt))
15bfe6d6
FB
3205 (find-files dir ".*")))
3206 (list "docs" "htmldoc" "examples")
3207 (list doc html-doc examples))))
3208 %standard-phases)))
3209 (home-page "http://pyparsing.wikispaces.com")
3210 (synopsis "Python parsing class library")
3211 (description
3212 "The pyparsing module is an alternative approach to creating and
3213executing simple grammars, vs. the traditional lex/yacc approach, or the use
3214of regular expressions. The pyparsing module provides a library of classes
3215that client code uses to construct the grammar directly in Python code.")
bd3fa666 3216 (license license:expat)))
15bfe6d6
FB
3217
3218(define-public python2-pyparsing
3219 (package-with-python2 python-pyparsing))
3220
ec00de35
FB
3221(define-public python-numpydoc
3222 (package
3223 (name "python-numpydoc")
3224 (version "0.5")
3225 (source
3226 (origin
3227 (method url-fetch)
89b5c60e 3228 (uri (string-append
ec00de35
FB
3229 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3230 version ".tar.gz"))
3231 (sha256
3232 (base32
5e4d8f67
AE
3233 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3234 (modules '((guix build utils)))
3235 (snippet
3236 '(begin
3237 ;; Drop a test requiring matplotlib, which we cannot add as an
3238 ;; input since it would create a circular dependency: Extend the
3239 ;; test for Python 3, where it is already dropped, to Python 2.
3240 (substitute* "numpydoc/tests/test_plot_directive.py"
3241 (("3") "2"))))))
ec00de35
FB
3242 (build-system python-build-system)
3243 (inputs
3244 `(("python-setuptools" ,python-setuptools)
3245 ("python-docutils" ,python-docutils)
3246 ("python-sphinx" ,python-sphinx)
3247 ("python-nose" ,python-nose)))
3248 (home-page "https://pypi.python.org/pypi/numpydoc")
3249 (synopsis
3250 "Numpy's Sphinx extensions")
3251 (description
3252 "Sphinx extension to support docstrings in Numpy format.")
3253 (license bsd-2)))
3254
3255(define-public python2-numpydoc
5e4d8f67 3256 (package-with-python2 python-numpydoc))
1c65314c 3257
1e656049
RW
3258(define-public python-numexpr
3259 (package
3260 (name "python-numexpr")
3261 (version "2.4.4")
3262 (source
3263 (origin
3264 (method url-fetch)
3265 (uri (string-append "https://pypi.python.org/packages/source/"
3266 "n/numexpr/numexpr-" version ".tar.gz"))
3267 (sha256
3268 (base32
3269 "0nsnff5312fm38w6dm34bw7ghfqqy8vl9gig0al963h4mz8zm8nz"))))
3270 (build-system python-build-system)
3271 (arguments `(#:tests? #f)) ; no tests included
3272 (propagated-inputs
3273 `(("python-numpy" ,python-numpy)))
3274 (home-page "https://github.com/pydata/numexpr")
3275 (synopsis "Fast numerical expression evaluator for NumPy")
3276 (description
3277 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3278expressions that operate on arrays are accelerated and use less memory than
3279doing the same calculation in Python. In addition, its multi-threaded
3280capabilities can make use of all your cores, which may accelerate
3281computations, most specially if they are not memory-bounded (e.g. those using
3282transcendental functions).")
3283 (license license:expat)))
3284
3285(define-public python2-numexpr
3286 (let ((numexpr (package-with-python2 python-numexpr)))
3287 (package (inherit numexpr)
3288 ;; Make sure to use special packages for Python 2 instead
3289 ;; of those automatically rewritten by package-with-python2.
3290 (propagated-inputs
3291 `(("python2-numpy" ,python2-numpy)
3292 ,@(alist-delete "python-numpy"
3293 (package-propagated-inputs numexpr)))))))
3294
1c65314c
FB
3295(define-public python-matplotlib
3296 (package
3297 (name "python-matplotlib")
1bbc659f 3298 (version "1.4.3")
1c65314c
FB
3299 (source
3300 (origin
3301 (method url-fetch)
3302 (uri (string-append "mirror://sourceforge/matplotlib"
3303 "/matplotlib-" version ".tar.gz"))
3304 (sha256
3305 (base32
1bbc659f 3306 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3307 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3308 (build-system python-build-system)
3309 (outputs '("out" "doc"))
25f9a068
FB
3310 (propagated-inputs ; the following packages are all needed at run time
3311 `(("python-pyparsing" ,python-pyparsing)
3312 ("python-pygobject" ,python-pygobject)
3313 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3314 ("python-tkinter" ,python "tk")
25f9a068
FB
3315 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3316 ;; from 'gtk+') provides the required 'typelib' files used by
3317 ;; 'gobject-introspection'. The location of these files is set with the
3318 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3319 ;; is done automatically by a 'native-search-path' procedure. However,
3320 ;; at run-time the user must set this variable as follows:
3321 ;;
3322 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3323 ("gtk+" ,gtk+)
3324 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3325 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3326 ;; object. For this reason we need to import both libraries.
3327 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3328 ("python-pycairo" ,python-pycairo)
3329 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3330 (inputs
3331 `(("python-setuptools" ,python-setuptools)
3332 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3333 ("python-six" ,python-six)
3334 ("python-pytz" ,python-pytz)
3335 ("python-numpy" ,python-numpy-bootstrap)
3336 ("python-sphinx" ,python-sphinx)
3337 ("python-numpydoc" ,python-numpydoc)
3338 ("python-nose" ,python-nose)
3339 ("python-mock" ,python-mock)
3340 ("libpng" ,libpng)
3341 ("imagemagick" ,imagemagick)
3342 ("freetype" ,freetype)
25f9a068
FB
3343 ("cairo" ,cairo)
3344 ("glib" ,glib)
4e7a137a 3345 ("python-pillow" ,python-pillow)
1c65314c 3346 ;; FIXME: Add backends when available.
1c65314c
FB
3347 ;("python-wxpython" ,python-wxpython)
3348 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3349 ("tcl" ,tcl)
3350 ("tk" ,tk)))
1c65314c
FB
3351 (native-inputs
3352 `(("pkg-config" ,pkg-config)
3353 ("texlive" ,texlive)
3354 ("texinfo" ,texinfo)))
3355 (arguments
3356 `(#:phases
25f9a068
FB
3357 (alist-cons-before
3358 'build 'configure-environment
3359 (lambda* (#:key outputs inputs #:allow-other-keys)
3360 (let ((cairo (assoc-ref inputs "cairo"))
3361 (gtk+ (assoc-ref inputs "gtk+")))
3362 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3363 ;; has not effect.
25f9a068
FB
3364 (setenv "LD_LIBRARY_PATH"
3365 (string-append cairo "/lib:" gtk+ "/lib"))
3366 (setenv "HOME" (getcwd))
3367 (call-with-output-file "setup.cfg"
3368 (lambda (port)
1bbc659f
FB
3369 (format port "[directories]~%
3370basedirlist = ~a,~a~%
57b7b8cd 3371 [rc_options]~%
1bbc659f
FB
3372backend = TkAgg~%"
3373 (assoc-ref inputs "tcl")
3374 (assoc-ref inputs "tk"))))))
25f9a068
FB
3375 (alist-cons-after
3376 'install 'install-doc
3377 (lambda* (#:key outputs #:allow-other-keys)
3378 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3379 (doc (string-append data "/doc/" ,name "-" ,version))
3380 (info (string-append data "/info"))
3381 (html (string-append doc "/html")))
3382 (with-directory-excursion "doc"
25f9a068
FB
3383 ;; Produce pdf in 'A4' format.
3384 (substitute* (find-files "." "conf\\.py")
3385 (("latex_paper_size = 'letter'")
3386 "latex_paper_size = 'a4'"))
3387 (mkdir-p html)
3388 (mkdir-p info)
3389 ;; The doc recommends to run the 'html' target twice.
3390 (system* "python" "make.py" "html")
3391 (system* "python" "make.py" "html")
18b31516 3392 (copy-recursively "build/html" html)
25f9a068
FB
3393 (system* "python" "make.py" "latex")
3394 (system* "python" "make.py" "texinfo")
18b31516
FB
3395 (symlink (string-append html "/_images")
3396 (string-append info "/matplotlib-figures"))
3397 (with-directory-excursion "build/texinfo"
3398 (substitute* "matplotlib.texi"
3399 (("@image\\{([^,]*)" all file)
3400 (string-append "@image{matplotlib-figures/" file)))
3401 (symlink (string-append html "/_images")
3402 "./matplotlib-figures")
3403 (system* "makeinfo" "--no-split"
3404 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3405 (copy-file "build/texinfo/matplotlib.info"
3406 (string-append info "/matplotlib.info"))
3407 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3408 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3409 %standard-phases))))
1c65314c
FB
3410 (home-page "http://matplotlib.org")
3411 (synopsis "2D plotting library for Python")
3412 (description
3413 "Matplotlib is a Python 2D plotting library which produces publication
3414quality figures in a variety of hardcopy formats and interactive environments
3415across platforms. Matplotlib can be used in Python scripts, the python and
3416ipython shell, web application servers, and six graphical user interface
3417toolkits.")
57b7b8cd
LC
3418 (license psfl)
3419 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3420
764c077b 3421(define-public python2-matplotlib
57b7b8cd
LC
3422 (let ((matplotlib (package-with-python2
3423 (strip-python2-variant python-matplotlib))))
764c077b 3424 (package (inherit matplotlib)
88c26834
AE
3425 ;; Make sure to use special packages for Python 2 instead
3426 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3427 (propagated-inputs
7ca0dbc3 3428 `(("python2-pycairo" ,python2-pycairo)
764c077b 3429 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3430 ("python2-tkinter" ,python-2 "tk")
3431 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3432 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3433
0dde6232
RW
3434(define-public python2-pysnptools
3435 (package
3436 (name "python2-pysnptools")
a800018e 3437 (version "0.3.9")
0dde6232
RW
3438 (source
3439 (origin
3440 (method url-fetch)
3f2e9675 3441 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3442 (sha256
3443 (base32
a800018e 3444 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3445 (build-system python-build-system)
3446 (arguments
3447 `(#:python ,python-2)) ; only Python 2.7 is supported
3448 (propagated-inputs
3449 `(("python2-numpy" ,python2-numpy)
3450 ("python2-scipy" ,python2-scipy)
a800018e 3451 ("python2-pytz" ,python2-pytz)
0dde6232 3452 ("python2-cython" ,python2-cython)))
a800018e
EF
3453 (inputs
3454 `(("python2-dateutil-2" ,python2-dateutil-2)
3455 ("python2-pandas" ,python2-pandas)
3456 ("python2-six" ,python2-six)))
0dde6232
RW
3457 (native-inputs
3458 `(("unzip" ,unzip)
3459 ("python2-setuptools" ,python2-setuptools)))
3460 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3461 (synopsis "Library for reading and manipulating genetic data")
3462 (description
3463 "PySnpTools is a library for reading and manipulating genetic data. It
3464can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3465those files. It can also efficiently manipulate ranges of integers using set
3466operators such as union, intersection, and difference.")
3467 (license asl2.0)))
3468
c9b1b4f9
RW
3469(define-public python-rpy2
3470 (package
3471 (name "python-rpy2")
ec3bcbc7 3472 (version "2.7.6")
c9b1b4f9
RW
3473 (source
3474 (origin
3475 (method url-fetch)
ec3bcbc7 3476 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3477 (sha256
3478 (base32
ec3bcbc7 3479 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3480 (build-system python-build-system)
3481 (inputs
3482 `(("python-six" ,python-six)
3483 ("readline" ,readline)
3484 ("icu4c" ,icu4c)
3485 ("pcre" ,pcre)
3486 ("r" ,r)))
3487 (native-inputs
5ff6575b
RW
3488 `(("python-setuptools" ,python-setuptools)
3489 ("zlib" ,zlib)))
c9b1b4f9
RW
3490 (home-page "http://rpy.sourceforge.net/")
3491 (synopsis "Python interface to the R language")
3492 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3493low-level interface to R from Python, a proposed high-level interface,
3494including wrappers to graphical libraries, as well as R-like structures and
3495functions.")
3496 (license gpl3+)))
3497
3498(define-public python2-rpy2
3499 (let ((rpy2 (package-with-python2 python-rpy2)))
3500 (package (inherit rpy2)
3501 (native-inputs
3502 `(("python2-singledispatch" ,python2-singledispatch)
3503 ,@(package-native-inputs rpy2))))))
3504
bb986599
FB
3505(define-public python-scipy
3506 (package
3507 (name "python-scipy")
ba8a0824 3508 (version "0.16.0")
bb986599
FB
3509 (source
3510 (origin
3511 (method url-fetch)
3512 (uri (string-append "mirror://sourceforge/scipy"
da6ce3f1 3513 "/scipy-" version ".tar.xz"))
bb986599
FB
3514 (sha256
3515 (base32
ba8a0824 3516 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3517 (build-system python-build-system)
dd86c0d1 3518 (propagated-inputs
bb986599
FB
3519 `(("python-numpy" ,python-numpy)
3520 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3521 ("python-pyparsing" ,python-pyparsing)))
3522 (inputs
3523 `(("lapack" ,lapack)
719b01c1 3524 ("openblas" ,openblas)))
bb986599 3525 (native-inputs
dd86c0d1
RW
3526 `(("python-nose" ,python-nose)
3527 ("python-sphinx" ,python-sphinx)
5248d49e 3528 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3529 ("gfortran" ,gfortran)
bb986599
FB
3530 ("texlive" ,texlive)
3531 ("perl" ,perl)))
3532 (outputs '("out" "doc"))
3533 (arguments
3534 `(#:phases
3535 (alist-cons-before
719b01c1 3536 'build 'configure-openblas
bb986599 3537 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3538 (call-with-output-file "site.cfg"
3539 (lambda (port)
3540 (format port
3541 "[blas]
3542libraries = openblas
3543library_dirs = ~a/lib
3544include_dirs = ~a/include
3545[atlas]
3546library_dirs = ~a/lib
3547atlas_libs = openblas
3548"
3549 (assoc-ref inputs "openblas")
3550 (assoc-ref inputs "openblas")
3551 (assoc-ref inputs "openblas"))))
3552 #t)
bb986599
FB
3553 (alist-cons-after
3554 'install 'install-doc
3555 (lambda* (#:key outputs #:allow-other-keys)
3556 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3557 (doc (string-append data "/doc/" ,name "-" ,version))
3558 (html (string-append doc "/html"))
3559 (pyver ,(string-append "PYVER=")))
3560 (with-directory-excursion "doc"
bb986599
FB
3561 ;; Fix generation of images for mathematical expressions.
3562 (substitute* (find-files "source" "conf\\.py")
3563 (("pngmath_use_preview = True")
3564 "pngmath_use_preview = False"))
3565 (mkdir-p html)
3566 (system* "make" "html" pyver)
3567 (system* "make" "latex" "PAPER=a4" pyver)
3568 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3569 (copy-file "build/latex/scipy-ref.pdf"
3570 (string-append doc "/scipy-ref.pdf"))
3571 (with-directory-excursion "build/html"
3572 (for-each (lambda (file)
3573 (let* ((dir (dirname file))
3574 (tgt-dir (string-append html "/" dir)))
96c46210 3575 (install-file file html)))
bb986599
FB
3576 (find-files "." ".*"))))))
3577 ;; Tests can only be run after the library has been installed and not
3578 ;; within the source directory.
3579 (alist-cons-after
3580 'install 'check
89b5c60e 3581 (lambda _
bb986599
FB
3582 (with-directory-excursion "/tmp"
3583 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3584 (alist-delete
3585 'check
4f9ff21e
RW
3586 (alist-cons-after
3587 'unpack 'fix-tests
3588 (lambda _
3589 (substitute* "scipy/integrate/tests/test_quadpack.py"
3590 (("libm.so") "libm.so.6"))
3591 #t)
3592 %standard-phases)))))))
bb986599
FB
3593 (home-page "http://www.scipy.org/")
3594 (synopsis "The Scipy library provides efficient numerical routines")
3595 (description "The SciPy library is one of the core packages that make up
3596the SciPy stack. It provides many user-friendly and efficient numerical
3597routines such as routines for numerical integration and optimization.")
3598 (license bsd-3)))
3599
764c077b 3600(define-public python2-scipy
57b7b8cd 3601 (package-with-python2 python-scipy))
bb986599 3602
94914805
EB
3603(define-public python-sqlalchemy
3604 (package
3605 (name "python-sqlalchemy")
a4ba286b 3606 (version "1.0.12")
94914805
EB
3607 (source
3608 (origin
3609 (method url-fetch)
3610 (uri (string-append "https://pypi.python.org/packages/source/S/"
3611 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3612 (sha256
3613 (base32
a4ba286b 3614 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3615 (build-system python-build-system)
3616 (native-inputs
3617 `(("python-cython" ,python-cython) ;for c extensions
3618 ("python-pytest" ,python-pytest)
3619 ("python-mock" ,python-mock))) ;for tests
3620 (arguments
3621 `(#:phases (alist-replace
3622 'check
3623 (lambda _ (zero? (system* "py.test")))
3624 %standard-phases)))
3625 (home-page "http://www.sqlalchemy.org")
3626 (synopsis "Database abstraction library")
3627 (description
3628 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3629gives application developers the full power and flexibility of SQL. It
3630provides a full suite of well known enterprise-level persistence patterns,
3631designed for efficient and high-performing database access, adapted into a
3632simple and Pythonic domain language.")
3633 (license x11)))
3634
3635(define-public python2-sqlalchemy
3636 (package-with-python2 python-sqlalchemy))
c937562e 3637
af5a4602
CAW
3638(define-public python-alembic
3639 (package
3640 (name "python-alembic")
3641 (version "0.8.4")
3642 (source
3643 (origin
3644 (method url-fetch)
3645 (uri (pypi-uri "alembic" version))
3646 (sha256
3647 (base32
3648 "0jk23a852l3ybv7gfz81xzslyrnqnpjds5x15zd234y9rh9gq1w5"))))
3649 (build-system python-build-system)
3650 (native-inputs
3651 `(("python-mock" ,python-mock)
3652 ("python-pytest-cov" ,python-pytest-cov)))
3653 (propagated-inputs
3654 `(("python-sqlalchemy" ,python-sqlalchemy)
3655 ("python-mako" ,python-mako)
3656 ("python-editor" ,python-editor)))
3657 (home-page "http://bitbucket.org/zzzeek/alembic")
3658 (synopsis
3659 "Database migration tool for SQLAlchemy")
3660 (description
3661 "Alembic is a lightweight database migration tool for usage with the
3662SQLAlchemy Database Toolkit for Python.")
3663 (license license:expat)
3664 (properties `((python2-variant . ,(delay python2-alembic))))))
3665
3666(define-public python2-alembic
3667 (let ((alembic (package-with-python2
3668 (strip-python2-variant python-alembic))))
3669 (package
3670 (inherit alembic)
3671 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3672 ,@(package-native-inputs alembic))))))
3673
1671c07c
EB
3674(define-public python-distutils-extra
3675 (package
3676 (name "python-distutils-extra")
3677 (version "2.38")
3678 (source
3679 (origin
3680 (method url-fetch)
3681 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3682 version "/+download/python-distutils-extra-"
3683 version ".tar.gz"))
3684 (sha256
3685 (base32
3686 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3687 (build-system python-build-system)
3688 (native-inputs
3689 `(("python-setuptools" ,python-setuptools)))
3690 (home-page "https://launchpad.net/python-distutils-extra/")
3691 (synopsis "Enhancements to Python's distutils")
3692 (description
3693 "The python-distutils-extra module enables you to easily integrate
3694gettext support, themed icons, and scrollkeeper-based documentation into
3695Python's distutils.")
3696 (license gpl2)))
3697
3698(define-public python2-distutils-extra
3699 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3700
3701(define-public python2-elib.intl
3702 (package
3703 (name "python2-elib.intl")
3704 (version "0.0.3")
3705 (source
3706 (origin
3707 ;; This project doesn't tag releases or publish tarballs, so we take
3708 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3709 (method git-fetch)
3710 (uri (git-reference
3711 (url "https://github.com/dieterv/elib.intl.git")
3712 (commit "d09997cfef")))
3713 (sha256
3714 (base32
3715 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3716 (build-system python-build-system)
3717 (native-inputs
3718 `(("python2-setuptools" ,python2-setuptools)))
3719 (arguments
3720 ;; incompatible with Python 3 (exception syntax)
3721 `(#:python ,python-2
3722 #:tests? #f
3723 ;; With standard flags, the install phase attempts to create a zip'd
3724 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3725 ;; before 1980'
3726 #:configure-flags '("--single-version-externally-managed"
3727 "--record=elib.txt")))
3728 (home-page "https://github.com/dieterv/elib.intl")
3729 (synopsis "Enhanced internationalization for Python")
3730 (description
3731 "The elib.intl module provides enhanced internationalization (I18N)
3732services for your Python modules and applications.")
3733 (license lgpl3+)))
3734
c937562e
EB
3735(define-public python-pillow
3736 (package
3737 (name "python-pillow")
16095d27 3738 (version "3.1.1")
c937562e
EB
3739 (source
3740 (origin
3741 (method url-fetch)
f1d9231d 3742 (uri (pypi-uri "Pillow" version))
c937562e
EB
3743 (sha256
3744 (base32
16095d27 3745 "1zwzakr5v0skdh0azp5cd6fwzbll5305dsk33k5jk570vv6lqvs8"))))
c937562e
EB
3746 (build-system python-build-system)
3747 (native-inputs
3748 `(("python-setuptools" ,python-setuptools)
3749 ("python-nose" ,python-nose)))
3750 (inputs
5ff408d9
SB
3751 `(("freetype" ,freetype)
3752 ("lcms" ,lcms)
c937562e
EB
3753 ("zlib" ,zlib)
3754 ("libjpeg" ,libjpeg)
3755 ("openjpeg" ,openjpeg)
5ff408d9
SB
3756 ("libtiff" ,libtiff)
3757 ("libwebp" ,libwebp)))
c937562e
EB
3758 (propagated-inputs
3759 `(;; Used at runtime for pkg_resources
3760 ("python-setuptools" ,python-setuptools)))
3761 (arguments
e5358a6b
LC
3762 `(#:phases (modify-phases %standard-phases
3763 (add-before
3764 'install 'disable-egg-compression
3765 (lambda _
3766 ;; Leave the .egg uncompressed since compressing it would
3767 ;; prevent the GC from identifying run-time dependencies.
3768 ;; See <http://bugs.gnu.org/20765>.
3769 (let ((port (open-file "setup.cfg" "a")))
3770 (display "\n[easy_install]\nzip_ok = 0\n"
3771 port)
3772 (close-port port)
3773 #t)))
3774 (add-after
3775 'install 'check-installed
3776 (lambda _
3777 (begin
3778 (setenv "HOME" (getcwd))
3779 (and (zero? (system* "python" "selftest.py"
3780 "--installed"))
3781 (zero? (system* "python" "test-installed.py"))))))
3782 (delete 'check))))
c937562e
EB
3783 (home-page "https://pypi.python.org/pypi/Pillow")
3784 (synopsis "Fork of the Python Imaging Library")
3785 (description
3786 "The Python Imaging Library adds image processing capabilities to your
3787Python interpreter. This library provides extensive file format support, an
3788efficient internal representation, and fairly powerful image processing
3789capabilities. The core image library is designed for fast access to data
3790stored in a few basic pixel formats. It should provide a solid foundation for
3791a general image processing tool.")
3792 (license (x11-style
3793 "http://www.pythonware.com/products/pil/license.htm"
3794 "The PIL Software License"))))
3795
3796(define-public python2-pillow
3797 (package-with-python2 python-pillow))
bb986599 3798
a415f036
FB
3799(define-public python-pycparser
3800 (package
3801 (name "python-pycparser")
38eb6919 3802 (version "2.14")
a415f036
FB
3803 (source
3804 (origin
3805 (method url-fetch)
38eb6919 3806 (uri (pypi-uri "pycparser" version))
a415f036
FB
3807 (sha256
3808 (base32
38eb6919 3809 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
3810 (outputs '("out" "doc"))
3811 (build-system python-build-system)
3812 (native-inputs
3813 `(("pkg-config" ,pkg-config)
3814 ("python-setuptools" ,python-setuptools)))
3815 (arguments
89b5c60e 3816 `(#:phases
a415f036
FB
3817 (alist-replace
3818 'check
3819 (lambda _
3820 (with-directory-excursion "tests"
3821 (zero? (system* "python" "all_tests.py"))))
3822 (alist-cons-after
3823 'install 'install-doc
3824 (lambda* (#:key outputs #:allow-other-keys)
3825 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3826 (doc (string-append data "/doc/" ,name "-" ,version))
3827 (examples (string-append doc "/examples")))
3828 (mkdir-p examples)
3829 (for-each (lambda (file)
3830 (copy-file (string-append "." file)
3831 (string-append doc file)))
3832 '("/README.rst" "/CHANGES" "/LICENSE"))
3833 (copy-recursively "examples" examples)))
3834 %standard-phases))))
3835 (home-page "https://github.com/eliben/pycparser")
3836 (synopsis "C parser in Python")
3837 (description
3838 "Pycparser is a complete parser of the C language, written in pure Python
3839using the PLY parsing library. It parses C code into an AST and can serve as
3840a front-end for C compilers or analysis tools.")
3841 (license bsd-3)))
3842
3843(define-public python2-pycparser
3844 (package-with-python2 python-pycparser))
57c3f716
FB
3845
3846(define-public python-cffi
3847 (package
3848 (name "python-cffi")
2d3a437c 3849 (version "1.4.2")
57c3f716
FB
3850 (source
3851 (origin
3852 (method url-fetch)
2d3a437c 3853 (uri (pypi-uri "cffi" version))
89b5c60e 3854 (sha256
2d3a437c 3855 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
3856 (build-system python-build-system)
3857 (outputs '("out" "doc"))
3858 (inputs
3859 `(("libffi" ,libffi)))
3860 (propagated-inputs ; required at run-time
3861 `(("python-pycparser" ,python-pycparser)))
3862 (native-inputs
3863 `(("pkg-config" ,pkg-config)
3864 ("python-sphinx" ,python-sphinx)
4179f952 3865 ("python-pytest" ,python-pytest)
57c3f716
FB
3866 ("python-setuptools" ,python-setuptools)))
3867 (arguments
4179f952 3868 `(#:phases
57c3f716
FB
3869 (alist-cons-after
3870 'install 'install-doc
3871 (lambda* (#:key outputs #:allow-other-keys)
3872 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3873 (doc (string-append data "/doc/" ,name "-" ,version))
3874 (html (string-append doc "/html")))
3875 (with-directory-excursion "doc"
3876 (system* "make" "html")
3877 (mkdir-p html)
3878 (copy-recursively "build/html" html))
3879 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3880 %standard-phases)))
3881 (home-page "http://cffi.readthedocs.org")
3882 (synopsis "Foreign function interface for Python")
3883 (description
3884 "Foreign Function Interface for Python calling C code.")
bd3fa666 3885 (license license:expat)))
57c3f716
FB
3886
3887(define-public python2-cffi
3888 (package-with-python2 python-cffi))
6fa14469
FB
3889
3890(define-public python-xcffib
3891 (package
3892 (name "python-xcffib")
3893 (version "0.1.9")
3894 (source
3895 (origin
3896 (method url-fetch)
3897 (uri (string-append "https://pypi.python.org/packages/source/x/"
3898 "xcffib/xcffib-" version ".tar.gz"))
3899 (sha256
3900 (base32
3901 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3902 (build-system python-build-system)
3903 (inputs
3904 `(("libxcb" ,libxcb)
3905 ("python-six" ,python-six)))
3906 (native-inputs
3907 `(("python-setuptools" ,python-setuptools)))
3908 (propagated-inputs
3909 `(("python-cffi" ,python-cffi))) ; used at run time
3910 (arguments
89b5c60e 3911 `(#:phases
6fa14469
FB
3912 (alist-cons-after
3913 'install 'install-doc
3914 (lambda* (#:key outputs #:allow-other-keys)
3915 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3916 "/doc/" ,name "-" ,version)))
3917 (mkdir-p doc)
3918 (copy-file "README.md"
3919 (string-append doc "/README.md"))))
3920 %standard-phases)))
3921 (home-page "https://github.com/tych0/xcffib")
3922 (synopsis "XCB Python bindings")
3923 (description
3924 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3925support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 3926 (license license:expat)))
6fa14469
FB
3927
3928(define-public python2-xcffib
3929 (package-with-python2 python-xcffib))
3930
9e099723
FB
3931(define-public python-cairocffi
3932 (package
3933 (name "python-cairocffi")
3934 (version "0.6")
3935 (source
3936 (origin
3937 (method url-fetch)
3938 ;; The archive on pypi is missing the 'utils' directory!
3939 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3940 version ".tar.gz"))
f586c877 3941 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
3942 (sha256
3943 (base32
3944 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3945 (build-system python-build-system)
3946 (outputs '("out" "doc"))
3947 (inputs
3948 `(("gdk-pixbuf" ,gdk-pixbuf)
3949 ("cairo" ,cairo)))
3950 (native-inputs
3951 `(("pkg-config" ,pkg-config)
3952 ("python-sphinx" ,python-sphinx)
3953 ("python-docutils" ,python-docutils)
3954 ("python-setuptools" ,python-setuptools)))
3955 (propagated-inputs
3956 `(("python-xcffib" ,python-xcffib))) ; used at run time
3957 (arguments
89b5c60e 3958 `(#:phases
9e099723
FB
3959 (alist-cons-after
3960 'install 'install-doc
3961 (lambda* (#:key inputs outputs #:allow-other-keys)
3962 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3963 (doc (string-append data "/doc/" ,name "-" ,version))
3964 (html (string-append doc "/html")))
89b5c60e 3965 (setenv "LD_LIBRARY_PATH"
9e099723
FB
3966 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3967 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3968 (setenv "LANG" "en_US.UTF-8")
3969 (mkdir-p html)
3970 (for-each (lambda (file)
3971 (copy-file (string-append "." file)
3972 (string-append doc file)))
3973 '("/README.rst" "/CHANGES" "/LICENSE"))
3974 (system* "python" "setup.py" "build_sphinx")
3975 (copy-recursively "docs/_build/html" html)))
3976 %standard-phases)))
3977 (home-page "https://github.com/SimonSapin/cairocffi")
3978 (synopsis "Python bindings and object-oriented API for Cairo")
3979 (description
3980 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3981Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3982graphics library with support for multiple backends including image buffers,
3983PNG, PostScript, PDF, and SVG file output.")
3984 (license bsd-3)))
3985
3986(define-public python2-cairocffi
3987 (package-with-python2 python-cairocffi))
3988
3cff95cb
RW
3989(define-public python-decorator
3990 (package
3991 (name "python-decorator")
eb6e2e81 3992 (version "4.0.9")
3cff95cb
RW
3993 (source
3994 (origin
3995 (method url-fetch)
e21338be 3996 (uri (pypi-uri "decorator" version))
3cff95cb 3997 (sha256
eb6e2e81 3998 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
3999 (build-system python-build-system)
4000 (arguments '(#:tests? #f)) ; no test target
4001 (native-inputs
4002 `(("python-setuptools" ,python-setuptools)))
eb6e2e81 4003 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4004 (synopsis "Python module to simplify usage of decorators")
4005 (description
4006 "The aim of the decorator module is to simplify the usage of decorators
4007for the average programmer, and to popularize decorators usage giving examples
4008of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4009etc. The core of this module is a decorator factory.")
4010 (license license:expat)))
4011
4012(define-public python2-decorator
4013 (package-with-python2 python-decorator))
4014
2c0499ad
RW
4015(define-public python-drmaa
4016 (package
4017 (name "python-drmaa")
4018 (version "0.7.6")
4019 (source
4020 (origin
4021 (method url-fetch)
4022 (uri (string-append
4023 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4024 version ".tar.gz"))
4025 (sha256
4026 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4027 (build-system python-build-system)
4028 ;; The test suite requires libdrmaa which is provided by the cluster
4029 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4030 ;; should be set to the path of the libdrmaa library.
4031 (arguments '(#:tests? #f))
4032 (native-inputs
4033 `(("python-nose" ,python-nose)
4034 ("python-setuptools" ,python-setuptools)))
4035 (home-page "https://pypi.python.org/pypi/drmaa")
4036 (synopsis "Python bindings for the DRMAA library")
4037 (description
4038 "A Python package for Distributed Resource Management (DRM) job
4039submission and control. This package is an implementation of the DRMAA 1.0
4040Python language binding specification.")
4041 (license bsd-3)))
4042
4043(define-public python2-drmaa
4044 (package-with-python2 python-drmaa))
4045
d05c6da0
RW
4046(define-public python-gridmap
4047 (package
4048 (name "python-gridmap")
4049 (version "0.13.0")
4050 (source
4051 (origin
4052 (method url-fetch)
4053 (uri (string-append
4054 "https://github.com/pygridtools/gridmap/archive/v"
4055 version ".tar.gz"))
4056 (file-name (string-append name "-" version ".tar.gz"))
4057 (sha256
4058 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4059 (build-system python-build-system)
4060 (inputs
4061 `(("python-psutil" ,python-psutil)
4062 ("python-drmaa" ,python-drmaa)
4063 ("python-pyzmq" ,python-pyzmq)))
4064 (native-inputs
4065 `(("python-setuptools" ,python-setuptools)))
4066 (home-page "https://github.com/pygridtools/gridmap")
4067 (synopsis "Create jobs on a cluster directly from Python")
4068 (description
4069 "Gridmap is a Python package to allow you to easily create jobs on the
4070cluster directly from Python. You can directly map Python functions onto the
4071cluster without needing to write any wrapper code yourself.")
4072 (license gpl3+)))
4073
4074(define-public python2-gridmap
4075 (package-with-python2 python-gridmap))
4076
cb6d5c54
RW
4077(define-public python-pexpect
4078 (package
4079 (name "python-pexpect")
4080 (version "3.3")
4081 (source
4082 (origin
4083 (method url-fetch)
4084 (uri (string-append "https://pypi.python.org/packages/source/p/"
4085 "pexpect/pexpect-" version ".tar.gz"))
4086 (sha256
4087 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4088 (build-system python-build-system)
4089 (arguments
4090 `(#:phases
4091 (modify-phases %standard-phases
4092 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4093 (native-inputs
4094 `(("python-nose" ,python-nose)))
4095 (home-page "http://pexpect.readthedocs.org/")
4096 (synopsis "Controlling interactive console applications")
4097 (description
4098 "Pexpect is a pure Python module for spawning child applications;
4099controlling them; and responding to expected patterns in their output.
4100Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4101child application and control it as if a human were typing commands.")
4102 (license isc)))
4103
4104(define-public python2-pexpect
4105 (package-with-python2 python-pexpect))
4106
229ad120
RW
4107(define-public python-setuptools-scm
4108 (package
4109 (name "python-setuptools-scm")
383af6b0 4110 (version "1.9.0")
229ad120
RW
4111 (source (origin
4112 (method url-fetch)
383af6b0 4113 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4114 (sha256
4115 (base32
383af6b0 4116 "0y24bl893zk6nrklbvdrlmpkalf214zjn6k1xrglljd29rrn4wxi"))))
229ad120 4117 (build-system python-build-system)
383af6b0 4118 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4119 (home-page "https://github.com/pypa/setuptools_scm/")
4120 (synopsis "Manage Python package versions in SCM metadata")
4121 (description
383af6b0 4122 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4123@dfn{software configuration management} (SCM) metadata instead of declaring
4124them as the version argument or in a SCM managed file.")
4125 (license license:expat)))
4126
4127(define-public python2-setuptools-scm
4128 (package-with-python2 python-setuptools-scm))
4129
b74270ee
RW
4130(define-public python-pathpy
4131 (package
4132 (name "python-pathpy")
4133 (version "8.1.1")
4134 (source
4135 (origin
4136 (method url-fetch)
4137 (uri (string-append "https://pypi.python.org/packages/source/p/"
4138 "path.py/path.py-" version ".tar.gz"))
4139 (sha256
4140 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4141 (build-system python-build-system)
4142 (propagated-inputs
4143 `(("python-appdirs" ,python-appdirs)))
4144 (native-inputs
553b709b
EF
4145 `(("python-setuptools" ,python-setuptools)
4146 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4147 ("python-pytest" ,python-pytest)
4148 ("python-pytest-runner" ,python-pytest-runner)))
4149 (home-page "http://github.com/jaraco/path.py")
4150 (synopsis "Python module wrapper for built-in os.path")
4151 (description
4152 "@code{path.py} implements path objects as first-class entities, allowing
4153common operations on files to be invoked on those path objects directly.")
4154 (license license:expat)))
4155
4156(define-public python2-pathpy
4157 (package-with-python2 python-pathpy))
4158
0d34e01b
RW
4159(define-public python-pickleshare
4160 (package
4161 (name "python-pickleshare")
4162 (version "0.5")
4163 (source
4164 (origin
4165 (method url-fetch)
4166 (uri (string-append "https://pypi.python.org/packages/source/p/"
4167 "pickleshare/pickleshare-" version ".tar.gz"))
4168 (sha256
4169 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4170 (build-system python-build-system)
4171 (propagated-inputs
4172 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4173 (native-inputs
4174 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4175 (home-page "https://github.com/vivainio/pickleshare")
4176 (synopsis "Tiny key value database with concurrency support")
4177 (description
4178 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4179Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4180shelve, many processes can access the database simultaneously. Changing a
4181value in database is immediately visible to other processes accessing the same
4182database. Concurrency is possible because the values are stored in separate
4183files. Hence the “database” is a directory where all files are governed by
4184PickleShare.")
4185 (license license:expat)))
4186
4187(define-public python2-pickleshare
4188 (package-with-python2 python-pickleshare))
4189
cd6e5189
RW
4190(define-public python-simplegeneric
4191 (package
4192 (name "python-simplegeneric")
4193 (version "0.8.1")
4194 (source
4195 (origin
4196 (method url-fetch)
4197 (uri (string-append "https://pypi.python.org/packages/source/s/"
4198 "simplegeneric/simplegeneric-" version ".zip"))
4199 (sha256
4200 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4201 (build-system python-build-system)
4202 (native-inputs
69b96e5e
RW
4203 `(("python-setuptools" ,python-setuptools)
4204 ("unzip" ,unzip)))
cd6e5189
RW
4205 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4206 (synopsis "Python module for simple generic functions")
4207 (description
4208 "The simplegeneric module lets you define simple single-dispatch generic
4209functions, akin to Python’s built-in generic functions like @code{len()},
4210@code{iter()} and so on. However, instead of using specially-named methods,
4211these generic functions use simple lookup tables, akin to those used by
4212e.g. @code{pickle.dump()} and other generic functions found in the Python
4213standard library.")
4214 (license zpl2.1)))
4215
4216(define-public python2-simplegeneric
4217 (package-with-python2 python-simplegeneric))
4218
ddc7d8ed
RW
4219(define-public python-ipython-genutils
4220 (package
4221 (name "python-ipython-genutils")
4222 (version "0.1.0")
4223 (source
4224 (origin
4225 (method url-fetch)
4226 (uri (string-append "https://pypi.python.org/packages/source/i/"
4227 "ipython_genutils/ipython_genutils-"
4228 version ".tar.gz"))
4229 (sha256
4230 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4231 (build-system python-build-system)
4232 (arguments `(#:tests? #f)) ; no tests
4233 (home-page "http://ipython.org")
4234 (synopsis "Vestigial utilities from IPython")
4235 (description
4236 "This package provides retired utilities from IPython.")
4237 (license bsd-3)))
4238
4239(define-public python2-ipython-genutils
4240 (package-with-python2 python-ipython-genutils))
4241
2b10eb48
RW
4242(define-public python-traitlets
4243 (package
4244 (name "python-traitlets")
cc0c4fde 4245 (version "4.1.0")
2b10eb48
RW
4246 (source
4247 (origin
4248 (method url-fetch)
cc0c4fde 4249 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4250 (sha256
4251 (base32
cc0c4fde 4252 "0nxgj8jxlm1kqf8cx2x7vjid05zdgbxpqhjbdl46r8njlpgkh3j4"))))
2b10eb48
RW
4253 (build-system python-build-system)
4254 (arguments
4255 `(#:phases
4256 (modify-phases %standard-phases
4257 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4258 (propagated-inputs
4259 `(("python-ipython-genutils" ,python-ipython-genutils)
4260 ("python-decorator" ,python-decorator)))
4261 (native-inputs
cc0c4fde
EF
4262 `(("python-mock" ,python-mock)
4263 ("python-nose" ,python-nose)))
2b10eb48
RW
4264 (home-page "http://ipython.org")
4265 (synopsis "Configuration system for Python applications")
4266 (description
4267 "Traitlets is a framework that lets Python classes have attributes with
4268type checking, dynamically calculated default values, and ‘on change’
4269callbacks. The package also includes a mechanism to use traitlets for
4270configuration, loading values from files or from command line arguments. This
4271is a distinct layer on top of traitlets, so you can use traitlets in your code
4272without using the configuration machinery.")
4273 (license bsd-3)))
4274
4275(define-public python2-traitlets
4276 (package-with-python2 python-traitlets))
4277
ae1ab9fe
FB
4278(define-public python-ipython
4279 (package
4280 (name "python-ipython")
3a0b1b9a 4281 (version "3.2.1")
ae1ab9fe
FB
4282 (source
4283 (origin
fceac880 4284 (method url-fetch)
fc1adab1 4285 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
fceac880
FB
4286 (uri (string-append "https://pypi.python.org/packages/source/i/"
4287 "ipython/ipython-" version ".tar.gz"))
4288 (sha256
4289 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4290 (build-system python-build-system)
4291 (outputs '("out" "doc"))
3a0b1b9a
FB
4292 (propagated-inputs
4293 `(("python-pyzmq" ,python-pyzmq)
4294 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4295 (inputs
4296 `(("readline" ,readline)
3a0b1b9a 4297 ("which" ,which)
ae1ab9fe 4298 ("python-matplotlib" ,python-matplotlib)
5d26e542 4299 ("python-numpy" ,python-numpy)
ae1ab9fe 4300 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4301 ("python-jinja2" ,python-jinja2)
4302 ("python-mistune" ,python-mistune)
4303 ("python-jsonschema" ,python-jsonschema)
4304 ("python-pygments" ,python-pygments)
4305 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4306 ("python-nose" ,python-nose)))
4307 (native-inputs
4308 `(("pkg-config" ,pkg-config)
4309 ("python-sphinx" ,python-sphinx)
4310 ("texlive" ,texlive)
4311 ("texinfo" ,texinfo)
4312 ("python-setuptools" ,python-setuptools)))
4313 (arguments
89b5c60e 4314 `(#:phases
3a0b1b9a
FB
4315 (modify-phases %standard-phases
4316 (add-after
4317 'install 'install-doc
4318 (lambda* (#:key inputs outputs #:allow-other-keys)
4319 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4320 (doc (string-append data "/doc/" ,name "-" ,version))
4321 (html (string-append doc "/html"))
4322 (man1 (string-append data "/man/man1"))
4323 (info (string-append data "/info"))
4324 (examples (string-append doc "/examples")))
afd3d931 4325 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4326 (with-directory-excursion "docs"
4327 ;; FIXME: html and pdf fail to build
4328 ;; (system* "make" "html")
4329 ;; (system* "make" "pdf" "PAPER=a4")
4330 (system* "make" "info"))
4331 (copy-recursively "docs/man" man1)
4332 (copy-recursively "examples" examples)
4333 ;; (copy-recursively "docs/build/html" html)
4334 ;; (copy-file "docs/build/latex/ipython.pdf"
4335 ;; (string-append doc "/ipython.pdf"))
4336 (mkdir-p info)
4337 (copy-file "docs/build/texinfo/ipython.info"
4338 (string-append info "/ipython.info"))
4339 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4340 ;; Tests can only be run after the library has been installed and not
4341 ;; within the source directory.
4342 (delete 'check)
4343 (add-after
4344 'install 'check
4345 (lambda* (#:key outputs tests? #:allow-other-keys)
4346 (if tests?
4347 (with-directory-excursion "/tmp"
4348 (setenv "HOME" "/tmp/") ;; required by a test
4349 (zero? (system* (string-append (assoc-ref outputs "out")
4350 "/bin/iptest"))))
4351 #t)))
4352 (add-before
4353 'install 'fix-tests
4354 (lambda* (#:key inputs #:allow-other-keys)
4355 (substitute* "./IPython/utils/_process_posix.py"
4356 (("/usr/bin/env', 'which") (which "which")))
4357 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4358 (("#!/usr/bin/env python")
4359 (string-append "#!" (which "python"))))
4360 ;; Disable 1 failing test
4361 (substitute* "./IPython/core/tests/test_magic.py"
4362 (("def test_dirops\\(\\):" all)
4363 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4364 (home-page "http://ipython.org")
4365 (synopsis "IPython is a tool for interactive computing in Python")
4366 (description
4367 "IPython provides a rich architecture for interactive computing with:
4368Powerful interactive shells, a browser-based notebook, support for interactive
4369data visualization, embeddable interpreters and tools for parallel
4370computing.")
4371 (license bsd-3)))
4372
4373(define-public python2-ipython
4374 (let ((ipython (package-with-python2 python-ipython)))
3a0b1b9a
FB
4375 (package
4376 (inherit ipython)
4377 ;; FIXME: some tests are failing
4378 (arguments
4379 `(#:tests? #f ,@(package-arguments ipython)))
ae1ab9fe 4380 ;; Make sure we use custom python2-NAME packages.
3a0b1b9a 4381 ;; FIXME: add pyreadline once available.
667d90df
RW
4382 (propagated-inputs
4383 `(("python2-terminado" ,python2-terminado)
4384 ,@(alist-delete "python-terminado"
4385 (package-propagated-inputs ipython))))
89b5c60e 4386 (inputs
264ae686
EF
4387 `(("python2-jsonschema" ,python2-jsonschema)
4388 ("python2-mock" ,python2-mock)
3a0b1b9a 4389 ("python2-matplotlib" ,python2-matplotlib)
5587253a 4390 ("python2-numpy" ,python2-numpy)
264ae686 4391 ("python2-requests" ,python2-requests)
5587253a 4392 ,@(fold alist-delete (package-inputs ipython)
264ae686 4393 '("python-jsonschema" "python-matplotlib" "python-numpy" "python-requests")))))))
03411993
AE
4394
4395(define-public python-isodate
4396 (package
4397 (name "python-isodate")
b6785c2e 4398 (version "0.5.4")
03411993
AE
4399 (source
4400 (origin
4401 (method url-fetch)
b6785c2e 4402 (uri (pypi-uri "isodate" version))
03411993
AE
4403 (sha256
4404 (base32
b6785c2e 4405 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993
AE
4406 (build-system python-build-system)
4407 (inputs
4408 `(("python-setuptools" ,python-setuptools)))
4409 (home-page
4410 "http://cheeseshop.python.org/pypi/isodate")
4411 (synopsis
4412 "Python date parser and formatter")
4413 (description
4414 "Python-isodate is a python module for parsing and formatting
4415ISO 8601 dates, time and duration.")
4416 (license bsd-3)))
4417
4418(define-public python2-isodate
4419 (package-with-python2 python-isodate))
673ab897
AE
4420
4421(define-public python-html5lib
4422 (package
4423 (name "python-html5lib")
fee04c19 4424 (version "1.0b8")
673ab897
AE
4425 (source
4426 (origin
4427 (method url-fetch)
fee04c19 4428 (uri (pypi-uri "html5lib" version))
673ab897
AE
4429 (sha256
4430 (base32
fee04c19 4431 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 4432 (build-system python-build-system)
3dd75476
AE
4433 (propagated-inputs
4434 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4435 (inputs
4436 `(("python-setuptools" ,python-setuptools)))
4437 (arguments
4438 `(#:test-target "check"))
4439 (home-page
4440 "https://github.com/html5lib/html5lib-python")
4441 (synopsis
4442 "Python HTML parser based on the WHATWG HTML specifcation")
4443 (description
4444 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4445and written in Python.")
bd3fa666 4446 (license license:expat)))
673ab897
AE
4447
4448(define-public python2-html5lib
4449 (package-with-python2 python-html5lib))
e99f4211
MW
4450
4451(define-public python-urwid
4452 (package
4453 (name "python-urwid")
4454 (version "1.3.0")
4455 (source
4456 (origin
4457 (method url-fetch)
b97c1bfd 4458 (uri (pypi-uri "urwid" version))
e99f4211
MW
4459 (sha256
4460 (base32
4461 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
4462 (build-system python-build-system)
b97c1bfd
LF
4463 (arguments
4464 `(#:phases
4465 (modify-phases %standard-phases
4466 ;; Disable failing test. Bug filed upstream:
4467 ;; https://github.com/wardi/urwid/issues/164
4468 ;; TODO: check again for python-urwid > 1.3.0 or python > 3.4.3.
4469 (add-after 'unpack 'disable-failing-test
4470 (lambda _
4471 (substitute* "urwid/tests/test_event_loops.py"
4472 (("test_remove_watch_file")
4473 "disable_remove_watch_file")))))))
e99f4211
MW
4474 (native-inputs `(("python-setuptools" ,python-setuptools)))
4475 (home-page "http://urwid.org")
4476 (synopsis "Console user interface library for Python")
4477 (description
4478 "Urwid is a curses-based UI/widget library for Python. It includes many
4479features useful for text console applications.")
4480 (license lgpl2.1+)))
4481
4482(define-public python2-urwid
4483 (package-with-python2 python-urwid))
d95a56c6
PAR
4484
4485(define-public python-dbus
4486 (package
4487 (name "python-dbus")
4488 (version "1.2.0")
4489 (source
4490 (origin
4491 (method url-fetch)
4492 (uri (string-append
5cc3096c 4493 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
4494 version ".tar.gz"))
4495 (sha256
4496 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4497 (build-system gnu-build-system)
6717c879
SB
4498 (arguments
4499 '(#:phases
4500 (modify-phases %standard-phases
4501 (add-before
4502 'check 'pre-check
4503 (lambda _
4504 ;; XXX: For the missing '/etc/machine-id'.
4505 (substitute* "test/run-test.sh"
4506 (("DBUS_FATAL_WARNINGS=1")
4507 "DBUS_FATAL_WARNINGS=0"))
4508 #t)))))
d95a56c6
PAR
4509 (native-inputs
4510 `(("pkg-config" ,pkg-config)))
4511 (inputs
4512 `(("python" ,python)
2e88d113 4513 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4514 (synopsis "Python bindings for D-bus")
4515 (description "python-dbus provides bindings for libdbus, the reference
4516implementation of D-Bus.")
4517 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4518 (license license:expat)))
b52af02b
MW
4519
4520(define-public python2-dbus
4521 (package (inherit python-dbus)
4522 (name "python2-dbus")
4523 (inputs `(("python" ,python-2)
4524 ,@(alist-delete "python"
4525 (package-inputs python-dbus)
4526 equal?)))
4527 ;; FIXME: on Python 2, the test_utf8 fails with:
4528 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4529 (arguments `(#:tests? #f))))
a6ac8332
AE
4530
4531(define-public python-apsw
4532 (package
4533 (name "python-apsw")
917708c2 4534 (version "3.9.2-r1")
a6ac8332
AE
4535 (source
4536 (origin
4537 (method url-fetch)
917708c2 4538 (uri (pypi-uri "apsw" version))
a6ac8332
AE
4539 (sha256
4540 (base32
917708c2 4541 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
4542 (build-system python-build-system)
4543 (inputs
4544 `(("python-setuptools" ,python-setuptools)
4545 ("sqlite" ,sqlite)))
4546 (arguments
4547 `(#:phases
4548 ;; swap check and install phases
4549 (alist-cons-after
4550 'install 'check
4551 (assoc-ref %standard-phases 'check)
4552 (alist-delete
4553 'check
4554 %standard-phases))))
4555 (home-page "https://github.com/rogerbinns/apsw/")
4556 (synopsis "Another Python SQLite Wrapper")
4557 (description "APSW is a Python wrapper for the SQLite
4558embedded relational database engine. In contrast to other wrappers such as
4559pysqlite it focuses on being a minimal layer over SQLite attempting just to
4560translate the complete SQLite API into Python.")
abde5f37 4561 (license license:zlib)))
a6ac8332
AE
4562
4563(define-public python2-apsw
4564 (package-with-python2 python-apsw))
26b307e2
AE
4565
4566(define-public python-lxml
4567 (package
4568 (name "python-lxml")
97bbc480 4569 (version "3.5.0")
26b307e2
AE
4570 (source
4571 (origin
4572 (method url-fetch)
97bbc480 4573 (uri (pypi-uri "lxml" version))
26b307e2
AE
4574 (sha256
4575 (base32
97bbc480 4576 "0y7m2s8ci6q642zl85y5axkj8z827l0vhjl532acb75hlkir77rl"))))
26b307e2
AE
4577 (build-system python-build-system)
4578 (inputs
4579 `(("libxml2" ,libxml2)
4580 ("libxslt" ,libxslt)
4581 ("python-setuptools" ,python-setuptools)))
4582 (home-page "http://lxml.de/")
4583 (synopsis
4584 "Python XML processing library")
4585 (description
4586 "The lxml XML toolkit is a Pythonic binding for the C libraries
4587libxml2 and libxslt.")
4588 (license bsd-3))) ; and a few more, see LICENSES.txt
4589
4590(define-public python2-lxml
4591 (package-with-python2 python-lxml))
4ed20663 4592
b32a1e47
CAW
4593;; beautifulsoup4 has a totally different namespace than 3.x,
4594;; and pypi seems to put it under its own name, so I guess we should too
4595(define-public python-beautifulsoup4
4596 (package
4597 (name "python-beautifulsoup4")
4598 (version "4.4.1")
4599 (source
4600 (origin
4601 (method url-fetch)
4602 (uri (pypi-uri "beautifulsoup4" version))
4603 (sha256
4604 (base32
4605 "1d36lc4pfkvl74fmzdib2nqnvknm0jddgf2n9yd7im150qyh3m47"))))
4606 (build-system python-build-system)
4607 (home-page
4608 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4609 (synopsis
4610 "Python screen-scraping library")
4611 (description
4612 "Beautiful Soup is a Python library designed for rapidly setting up
4613screen-scraping projects. It offers Pythonic idioms for navigating,
4614searching, and modifying a parse tree, providing a toolkit for
4615dissecting a document and extracting what you need. It automatically
4616converts incoming documents to Unicode and outgoing documents to UTF-8.")
4617 (license license:expat)
4618 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4619
4620(define-public python2-beautifulsoup4
4621 (package
4622 (inherit (package-with-python2
4623 (strip-python2-variant python-beautifulsoup4)))
4624 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
4625
092e86f5
AE
4626(define-public python2-cssutils
4627 (package
4628 (name "python2-cssutils")
4629 (version "1.0")
4630 (source
4631 (origin
4632 (method url-fetch)
4633 (uri (string-append
4634 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
4635 version
4636 ".zip"))
4637 (sha256
4638 (base32
4639 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
4640 (build-system python-build-system)
4641 (native-inputs
4642 `(("python2-mock" ,python2-mock) ; for the tests
4643 ("unzip" ,unzip))) ; for unpacking the source
4644 (inputs
4645 `(("python2-setuptools" ,python2-setuptools)))
4646 (arguments
4647 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4648 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4649 ))
092e86f5
AE
4650 (home-page "http://cthedot.de/cssutils/")
4651 (synopsis
4652 "CSS Cascading Style Sheets library for Python")
4653 (description
4654 "Cssutils is a Python package for parsing and building CSS
4655Cascading Style Sheets. Currently it provides a DOM only and no rendering
4656options.")
4657 (license lgpl3+)))
880ff77c
AE
4658
4659(define-public python-cssselect
4660 (package
4661 (name "python-cssselect")
4662 (version "0.9.1")
4663 (source
4664 (origin
4665 (method url-fetch)
4666 (uri (string-append
4667 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
4668 version
4669 ".tar.gz"))
4670 (sha256
4671 (base32
4672 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
4673 (build-system python-build-system)
4674 (inputs
4675 `(("python-setuptools" ,python-setuptools)))
4676 (arguments
4677 ;; tests fail with message
4678 ;; AttributeError: 'module' object has no attribute 'tests'
4679 `(#:tests? #f))
4680 (home-page
4681 "https://pythonhosted.org/cssselect/")
4682 (synopsis
4683 "CSS3 selector parser and translator to XPath 1.0")
4684 (description
4685 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4686them to XPath 1.0 expressions. Such expressions can be used in lxml or
4687another XPath engine to find the matching elements in an XML or HTML document.")
4688 (license bsd-3)))
4689
4690(define-public python2-cssselect
4691 (package-with-python2 python-cssselect))
60357f99
AE
4692
4693(define-public python-netifaces
4694 (package
4695 (name "python-netifaces")
4696 (version "0.10.4")
4697 (source
4698 (origin
4699 (method url-fetch)
4700 (uri (string-append
4701 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4702 version
4703 ".tar.gz"))
4704 (sha256
4705 (base32
4706 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4707 (build-system python-build-system)
4708 (inputs
4709 `(("python-setuptools" ,python-setuptools)))
4710 (home-page
4711 "https://bitbucket.org/al45tair/netifaces")
4712 (synopsis
4713 "Python module for portable network interface information")
4714 (description
4715 "Netifaces is a Python module providing information on network
4716interfaces in an easy and portable manner.")
4717 (license license:expat)))
4718
4719(define-public python2-netifaces
4720 (package-with-python2 python-netifaces))
92cb152b 4721
32f77c04
RW
4722(define-public python-networkx
4723 (package
4724 (name "python-networkx")
a4d9609c 4725 (version "1.11")
32f77c04
RW
4726 (source
4727 (origin
4728 (method url-fetch)
a4d9609c 4729 (uri (pypi-uri "networkx" version))
32f77c04 4730 (sha256
a4d9609c 4731 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
4732 (build-system python-build-system)
4733 ;; python-decorator is needed at runtime
4734 (propagated-inputs
4735 `(("python-decorator" ,python-decorator)))
4736 (native-inputs
4737 `(("python-setuptools" ,python-setuptools)
4738 ("python-nose" ,python-nose)))
4739 (home-page "http://networkx.github.io/")
4740 (synopsis "Python module for creating and manipulating graphs and networks")
4741 (description
4742 "NetworkX is a Python package for the creation, manipulation, and study
4743of the structure, dynamics, and functions of complex networks.")
4744 (license bsd-3)))
4745
4746(define-public python2-networkx
4747 (package-with-python2 python-networkx))
4748
92cb152b
RW
4749(define-public snakemake
4750 (package
4751 (name "snakemake")
4752 (version "3.2.1")
4753 (source
4754 (origin
4755 (method url-fetch)
4756 (uri (string-append
4757 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4758 version ".tar.gz"))
4759 (sha256
4760 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4761 (build-system python-build-system)
4762 (inputs `(("python-setuptools" ,python-setuptools)))
4763 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4764 (synopsis "Python-based execution environment for make-like workflows")
4765 (description
4766 "Snakemake aims to reduce the complexity of creating workflows by
4767providing a clean and modern domain specific specification language (DSL) in
4768Python style, together with a fast and comfortable execution environment.")
4769 (license license:expat)))
a1920bc9 4770
35de1fbd
RW
4771(define-public python-seaborn
4772 (package
4773 (name "python-seaborn")
fc899d4f 4774 (version "0.7.0")
35de1fbd
RW
4775 (source
4776 (origin
4777 (method url-fetch)
fc899d4f 4778 (uri (pypi-uri "seaborn" version))
35de1fbd 4779 (sha256
fc899d4f 4780 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
4781 (build-system python-build-system)
4782 (propagated-inputs
4783 `(("python-pandas" ,python-pandas)
4784 ("python-matplotlib" ,python-matplotlib)
4785 ("python-scipy" ,python-scipy)))
35de1fbd
RW
4786 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4787 (synopsis "Statistical data visualization")
4788 (description
4789 "Seaborn is a library for making attractive and informative statistical
4790graphics in Python. It is built on top of matplotlib and tightly integrated
4791with the PyData stack, including support for numpy and pandas data structures
4792and statistical routines from scipy and statsmodels.")
fc899d4f
EF
4793 (license bsd-3)
4794 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
4795
4796(define-public python2-seaborn
fc899d4f
EF
4797 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
4798 (package
4799 (inherit base)
4800 (propagated-inputs `(("python2-pytz" ,python2-pytz)
4801 ,@(package-propagated-inputs base)))
4802 (native-inputs `(("python2-setuptools" ,python2-setuptools)
4803 ,@(package-native-inputs base))))))
35de1fbd 4804
90fc547f
RW
4805(define-public python-sympy
4806 (package
4807 (name "python-sympy")
4808 (version "0.7.6")
4809 (source
4810 (origin
4811 (method url-fetch)
4812 (uri (string-append
4813 "https://github.com/sympy/sympy/releases/download/sympy-"
4814 version "/sympy-" version ".tar.gz"))
4815 (sha256
4816 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4817 (build-system python-build-system)
4818 (native-inputs
4819 `(("python-setuptools" ,python-setuptools)))
4820 (home-page "http://www.sympy.org/")
4821 (synopsis "Python library for symbolic mathematics")
4822 (description
4823 "SymPy is a Python library for symbolic mathematics. It aims to become a
4824full-featured computer algebra system (CAS) while keeping the code as simple
4825as possible in order to be comprehensible and easily extensible.")
4826 (license bsd-3)))
4827
4828(define-public python2-sympy
4829 (package-with-python2 python-sympy))
4830
a1920bc9
FB
4831(define-public python-testlib
4832 (package
4833 (name "python-testlib")
4834 (version "0.6.5")
4835 (source
4836 (origin
4837 (method url-fetch)
4838 (uri (string-append
4839 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4840 version ".zip"))
4841 (sha256
4842 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4843 (build-system python-build-system)
4844 (inputs
4845 `(("python-setuptools" ,python-setuptools)))
4846 (native-inputs
4847 `(("unzip" ,unzip)))
4848 (arguments
4849 `(#:phases
4850 (alist-replace
4851 'unpack
4852 (lambda* (#:key inputs outputs #:allow-other-keys)
4853 (let ((unzip (string-append (assoc-ref inputs "unzip")
4854 "/bin/unzip"))
4855 (source (assoc-ref inputs "source")))
4856 (and (zero? (system* unzip source))
4857 (chdir (string-append "testlib-" ,version)))))
4858 %standard-phases)))
4859 (synopsis "Python micro test suite harness")
4860 (description "A micro unittest suite harness for Python.")
4861 (home-page "https://github.com/trentm/testlib")
1cb9c006 4862 (license license:expat)))
a1920bc9
FB
4863
4864(define-public python2-testlib
4865 (package-with-python2 python-testlib))
db62afa5
LC
4866
4867(define-public python2-xlib
4868 (package
4869 (name "python2-xlib")
4870 (version "0.14")
4871 (source (origin
4872 (method url-fetch)
4873 (uri (string-append "mirror://sourceforge/python-xlib/"
4874 "python-xlib-" version ".tar.gz"))
4875 (sha256
4876 (base32
4877 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4878 (build-system python-build-system)
4879 (arguments
4880 `(#:python ,python-2 ;Python 2 only
4881 #:tests? #f)) ;no tests
4882 (inputs
4883 `(("python-setuptools" ,python-setuptools)))
4884 (home-page "http://python-xlib.sourceforge.net/")
4885 (synopsis "Python X11 client library")
4886 (description
4887 "The Python X Library is intended to be a fully functional X client
4888library for Python programs. It is useful to implement low-level X clients.
4889It is written entirely in Python.")
4890 (license gpl2+)))
0234ca06
DT
4891
4892(define-public python-singledispatch
4893 (package
4894 (name "python-singledispatch")
4895 (version "3.4.0.3")
4896 (source
4897 (origin
4898 (method url-fetch)
bdb67d84 4899 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
4900 (sha256
4901 (base32
4902 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4903 (build-system python-build-system)
4904 (native-inputs
4905 `(("python-setuptools" ,python-setuptools)))
bdb67d84 4906 (inputs
0234ca06
DT
4907 `(("python-six" ,python-six)))
4908 (home-page
4909 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4910 (synopsis "Backport of singledispatch feature from Python 3.4")
4911 (description
4912 "This library brings functools.singledispatch from Python 3.4 to Python
49132.6-3.3.")
4914 (license license:expat)))
4915
4916(define-public python2-singledispatch
4917 (package-with-python2 python-singledispatch))
feaae484 4918
310d218f
RW
4919(define-public python-tornado
4920 (package
4921 (name "python-tornado")
a724924b 4922 (version "4.3")
310d218f
RW
4923 (source
4924 (origin
4925 (method url-fetch)
a724924b 4926 (uri (pypi-uri "tornado" version))
310d218f 4927 (sha256
a724924b 4928 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 4929 (build-system python-build-system)
310d218f 4930 (native-inputs
b455439b
EF
4931 `(("python-certifi" ,python-certifi)))
4932 (inputs
4933 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 4934 (home-page "http://www.tornadoweb.org/")
310d218f
RW
4935 (synopsis "Python web framework and asynchronous networking library")
4936 (description
4937 "Tornado is a Python web framework and asynchronous networking library,
4938originally developed at FriendFeed. By using non-blocking network I/O,
4939Tornado can scale to tens of thousands of open connections, making it ideal
4940for long polling, WebSockets, and other applications that require a long-lived
4941connection to each user.")
b455439b
EF
4942 (license asl2.0)
4943 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
4944
4945(define-public python2-tornado
b455439b 4946 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f
RW
4947 (package (inherit tornado)
4948 (inputs
4949 `(("python2-backport-ssl-match-hostname"
4950 ,python2-backport-ssl-match-hostname)
b455439b
EF
4951 ("python2-singledispatch" ,python2-singledispatch)
4952 ,@(package-inputs tornado)))
4953 (native-inputs
4954 `(("python2-setuptools" ,python2-setuptools)
4955 ,@(package-native-inputs tornado))))))
310d218f 4956
6b59fc10
EF
4957;; the python- version can be removed with python-3.5
4958(define-public python-backports-abc
4959 (package
4960 (name "python-backports-abc")
4961 (version "0.4")
4962 (source
4963 (origin
4964 (method url-fetch)
4965 (uri (pypi-uri "backports_abc" version))
4966 (sha256
4967 (base32
4968 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
4969 (build-system python-build-system)
4970 (inputs
4971 `(("python-setuptools" ,python-setuptools)))
4972 (home-page "https://github.com/cython/backports_abc")
4973 (synopsis "Backport of additions to the 'collections.abc' module.")
4974 (description
4975 "Python-backports-abc provides a backport of additions to the
4976'collections.abc' module in Python-3.5.")
4977 (license psfl)))
4978
4979(define-public python2-backports-abc
4980 (package-with-python2 python-backports-abc))
4981
feaae484
SB
4982(define-public python-waf
4983 (package
4984 (name "python-waf")
4985 (version "1.8.8")
4986 (source (origin
4987 (method url-fetch)
4988 (uri (string-append "https://waf.io/"
4989 "waf-" version ".tar.bz2"))
4990 (sha256
4991 (base32
4992 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4993 (build-system python-build-system)
4994 (arguments
4995 '(#:phases
4996 (modify-phases %standard-phases
4997 (replace 'build
4998 (lambda _
4999 (zero? (begin
5000 (system* "python" "waf-light" "configure")
5001 (system* "python" "waf-light" "build")))))
5002 (replace 'check
5003 (lambda _
5004 (zero? (system* "python" "waf" "--version"))))
5005 (replace 'install
5006 (lambda _
5007 (copy-file "waf" %output))))))
5008 (home-page "https://waf.io/")
5009 (synopsis "Python-based build system")
5010 (description
5011 "Waf is a Python-based framework for configuring, compiling and installing
5012applications.")
5013 (license bsd-3)))
5014
5015(define-public python2-waf
5016 (package-with-python2 python-waf))
45203542
RW
5017
5018(define-public python-pyzmq
5019 (package
5020 (name "python-pyzmq")
3655ee76 5021 (version "15.1.0")
45203542
RW
5022 (source
5023 (origin
5024 (method url-fetch)
3655ee76 5025 (uri (pypi-uri "pyzmq" version))
45203542 5026 (sha256
3655ee76 5027 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5028 (build-system python-build-system)
5029 (arguments
5030 `(#:configure-flags
5031 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5032 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5033 ;; --inplace' for 'python setup.py test' to work.
5034 #:tests? #f))
5035 (inputs
5036 `(("zeromq" ,zeromq)))
5037 (native-inputs
5038 `(("pkg-config" ,pkg-config)
5039 ("python-nose" ,python-nose)
5040 ("python-setuptools" ,python-setuptools)))
5041 (home-page "http://github.com/zeromq/pyzmq")
5042 (synopsis "Python bindings for 0MQ")
5043 (description
5044 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5045 (license bsd-4)))
5046
5047(define-public python2-pyzmq
5048 (package-with-python2 python-pyzmq))
d889e6c4
CR
5049
5050(define-public python-pep8
5051 (package
5052 (name "python-pep8")
db251311 5053 (version "1.7.0")
d889e6c4
CR
5054 (source
5055 (origin
5056 (method url-fetch)
db251311 5057 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5058 (sha256
5059 (base32
db251311 5060 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4
CR
5061 (build-system python-build-system)
5062 (inputs
5063 `(("python-setuptools" ,python-setuptools)))
5064 (home-page "http://pep8.readthedocs.org/")
5065 (synopsis "Python style guide checker")
5066 (description
5067 "This tools checks Python code against some of the style conventions in
5068PEP 8.")
5069 (license license:expat)))
5070
5071(define-public python2-pep8
5072 (package-with-python2 python-pep8))
e31d7f44
CR
5073
5074(define-public python-pyflakes
5075 (package
5076 (name "python-pyflakes")
2abc3972 5077 (version "1.0.0")
e31d7f44
CR
5078 (source
5079 (origin
5080 (method url-fetch)
2abc3972 5081 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5082 (sha256
5083 (base32
2abc3972 5084 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5085 (build-system python-build-system)
5086 (inputs
5087 `(("python-setuptools" ,python-setuptools)))
5088 (home-page
5089 "https://github.com/pyflakes/pyflakes")
5090 (synopsis "Passive checker of Python programs")
5091 (description
5092 "Pyflakes statically checks Python source code for common errors.")
5093 (license license:expat)))
a59e017c 5094
7261d9eb
CR
5095(define-public python2-pyflakes
5096 (package-with-python2 python-pyflakes))
5097
a59e017c
CR
5098(define-public python-mccabe
5099 (package
5100 (name "python-mccabe")
c6ebd40d 5101 (version "0.4.0")
a59e017c
CR
5102 (source
5103 (origin
5104 (method url-fetch)
c6ebd40d 5105 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5106 (sha256
5107 (base32
c6ebd40d 5108 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c
CR
5109 (build-system python-build-system)
5110 (inputs
c6ebd40d
EF
5111 `(("python-pytest" ,python-pytest)
5112 ("python-pytest-runner" ,python-pytest-runner)
5113 ("python-setuptools" ,python-setuptools)))
a59e017c
CR
5114 (home-page "https://github.com/flintwork/mccabe")
5115 (synopsis "McCabe checker, plugin for flake8")
5116 (description
5117 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5118complexity of Python source code.")
7362371d 5119 (license license:expat)))
a59e017c
CR
5120
5121(define-public python2-mccabe
5122 (package-with-python2 python-mccabe))
e8df8f47 5123
7477fbb1
CR
5124(define-public python-mccabe-0.2.1
5125 (package (inherit python-mccabe)
5126 (version "0.2.1")
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (pypi-uri "mccabe" version))
5131 (sha256
5132 (base32
c6ebd40d 5133 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
b3546174 5134 (inputs `(("python-setuptools" ,python-setuptools)))))
7477fbb1
CR
5135
5136(define-public python2-mccabe-0.2.1
5137 (package-with-python2 python-mccabe-0.2.1))
5138
e8df8f47
CR
5139;; Flake8 2.4.1 requires an older version of pep8.
5140;; This should be removed ASAP.
5141(define-public python-pep8-1.5.7
5142 (package (inherit python-pep8)
5143 (version "1.5.7")
5144 (source
5145 (origin
5146 (method url-fetch)
5147 (uri (string-append
5148 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5149 version
5150 ".tar.gz"))
5151 (sha256
5152 (base32
5153 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5154
5155(define-public python2-pep8-1.5.7
5156 (package-with-python2 python-pep8-1.5.7))
5157
5158;; Flake8 2.4.1 requires an older version of pyflakes.
5159;; This should be removed ASAP.
5160(define-public python-pyflakes-0.8.1
5161 (package (inherit python-pyflakes)
5162 (version "0.8.1")
5163 (source
5164 (origin
5165 (method url-fetch)
5166 (uri (string-append
5167 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5168 version
5169 ".tar.gz"))
5170 (sha256
5171 (base32
5172 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5173
5174(define-public python2-pyflakes-0.8.1
7261d9eb 5175 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5176
5177(define-public python-flake8
5178 (package
5179 (name "python-flake8")
43789136 5180 (version "2.5.4")
e8df8f47
CR
5181 (source
5182 (origin
5183 (method url-fetch)
1b995533 5184 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5185 (sha256
5186 (base32
43789136 5187 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
e8df8f47
CR
5188 (build-system python-build-system)
5189 (inputs
5190 `(("python-setuptools" ,python-setuptools)
43789136
EF
5191 ("python-pep8" ,python-pep8)
5192 ("python-pyflakes" ,python-pyflakes)
e8df8f47
CR
5193 ("python-mccabe" ,python-mccabe)
5194 ("python-mock" ,python-mock)
5195 ("python-nose" ,python-nose)))
5196 (home-page "https://gitlab.com/pycqa/flake8")
5197 (synopsis
5198 "The modular source code checker: pep8, pyflakes and co")
5199 (description
5200 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5201 (license license:expat)))
5202
5203(define-public python2-flake8
5204 (package-with-python2 python-flake8))
61b9ac53 5205
abf21efc
CR
5206;; This will only be needed by the python-hacking package and will not be
5207;; necessary once python-hacking > 0.10.2 is released.
5208(define-public python-flake8-2.2.4
5209 (package (inherit python-flake8)
5210 (inputs
5211 `(("python-setuptools" ,python-setuptools)
5212 ("python-pep8" ,python-pep8-1.5.7)
5213 ("python-pyflakes" ,python-pyflakes-0.8.1)
5214 ("python-mccabe" ,python-mccabe-0.2.1)
5215 ("python-mock" ,python-mock)
5216 ("python-nose" ,python-nose)))
5217 (version "2.2.4")
5218 (source
5219 (origin
5220 (method url-fetch)
5221 (uri (pypi-uri "flake8" version))
5222 (sha256
5223 (base32
5224 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5225
5226(define-public python2-flake8-2.2.4
5227 (package-with-python2 python-flake8-2.2.4))
5228
61b9ac53
FB
5229(define-public python-mistune
5230 (package
5231 (name "python-mistune")
5232 (version "0.7")
5233 (source
5234 (origin
5235 (method url-fetch)
5236 (uri (string-append
5237 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5238 version
5239 ".tar.gz"))
5240 (sha256
5241 (base32
5242 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5243 (build-system python-build-system)
5244 (inputs
5245 `(("python-setuptools" ,python-setuptools)
5246 ("python-nose" ,python-nose)
5247 ("python-cython" ,python-cython)))
5248 (home-page "https://github.com/lepture/mistune")
5249 (synopsis "Markdown parser in pure Python")
5250 (description "This package provides a fast markdown parser in pure
5251Python.")
5252 (license bsd-3)))
5253
5254(define-public python2-mistune
5255 (package-with-python2 python-mistune))
6d992d07 5256
b9893908
EE
5257(define-public python-markdown
5258 (package
5259 (name "python-markdown")
5260 (version "2.6.5")
5261 (source
5262 (origin
5263 (method url-fetch)
5264 (uri (pypi-uri "Markdown" version))
5265 (sha256
5266 (base32
5267 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5268 (build-system python-build-system)
5269 (arguments
5270 `(#:phases
5271 (modify-phases %standard-phases
5272 (replace 'check
5273 (lambda _
5274 (zero? (system* "python" "run-tests.py")))))))
5275 (native-inputs
5276 `(("python-nose" ,python-nose)
5277 ("python-pyyaml" ,python-pyyaml)))
5278 (home-page "https://pythonhosted.org/Markdown/")
5279 (synopsis "Python implementation of Markdown")
5280 (description
5281 "This package provides a Python implementation of John Gruber's
5282Markdown. The library features international input, various Markdown
5283extensions, and several HTML output formats. A command line wrapper
5284markdown_py is also provided to convert Markdown files to HTML.")
5285 (license bsd-3)))
5286
5287(define-public python2-markdown
5288 (package-with-python2 python-markdown))
5289
6d992d07
FB
5290(define-public python-ptyprocess
5291 (package
5292 (name "python-ptyprocess")
5293 (version "0.5")
5294 (source
5295 (origin
5296 (method url-fetch)
5297 (uri (string-append
5298 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5299 version ".tar.gz"))
5300 (sha256
5301 (base32
5302 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5303 (build-system python-build-system)
5304 (inputs
5305 `(("python-setuptools" ,python-setuptools)
5306 ("python-nose" ,python-nose)))
5307 (arguments
5308 `(#:phases
5309 (modify-phases %standard-phases
5310 (replace 'check
5311 (lambda _
5312 (zero? (system* "nosetests")))))))
5313 (home-page "https://github.com/pexpect/ptyprocess")
5314 (synopsis "Run a subprocess in a pseudo terminal")
5315 (description
5316 "This package provides a Python library used to launch a subprocess in a
5317pseudo terminal (pty), and interact with both the process and its pty.")
5318 (license isc)))
5319
5320(define-public python2-ptyprocess
5321 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5322
5323(define-public python-terminado
5324 (package
5325 (name "python-terminado")
783fb0a3 5326 (version "0.6")
4aadb1df
FB
5327 (source
5328 (origin
5329 (method url-fetch)
783fb0a3 5330 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5331 (sha256
5332 (base32
783fb0a3 5333 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5334 (build-system python-build-system)
5335 (propagated-inputs
5336 `(("python-tornado" ,python-tornado)
5337 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5338 (native-inputs
5339 `(("python-nose" ,python-nose)))
4aadb1df
FB
5340 (arguments
5341 `(#:phases
5342 (modify-phases %standard-phases
5343 (replace 'check
5344 (lambda _
5345 (zero? (system* "nosetests")))))))
5346 (home-page "https://github.com/takluyver/terminado")
5347 (synopsis "Terminals served to term.js using Tornado websockets")
5348 (description "This package provides a Tornado websocket backend for the
5349term.js Javascript terminal emulator library.")
783fb0a3
EF
5350 (license bsd-2)
5351 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5352
5353(define-public python2-terminado
783fb0a3 5354 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5355 (package (inherit terminado)
783fb0a3
EF
5356 (propagated-inputs
5357 `(("python2-backport-ssl-match-hostname"
5358 ,python2-backport-ssl-match-hostname)
5359 ,@(package-propagated-inputs terminado)))
5360 (native-inputs
5361 `(("python2-setuptools" ,python2-setuptools)
5362 ,@(package-native-inputs terminado))))))
5faa5ce4 5363
d582eaac
SB
5364(define-public python-fonttools
5365 (package
5366 (name "python-fonttools")
5367 (version "2.5")
5368 (source (origin
5369 (method url-fetch)
5370 (uri (string-append
5371 "https://pypi.python.org/packages/source/F/FontTools/"
5372 "fonttools-" version ".tar.gz"))
5373 (sha256
5374 (base32
5375 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5376 (build-system python-build-system)
5377 (arguments '(#:test-target "check"))
5378 (propagated-inputs
5379 ;; XXX: module not found if setuptools is not available.
5380 `(("python-setuptools" ,python-setuptools)))
5381 (home-page "http://github.com/behdad/fonttools")
5382 (synopsis "Tools to manipulate font files")
5383 (description
5384 "FontTools/TTX is a library to manipulate font files from Python. It
5385supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5386of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5387also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5388from an XML-based format.")
5389 (license (non-copyleft "file://LICENSE.txt"
5390 "See LICENSE.txt in the distribution."))))
5391
5392(define-public python2-fonttools
5393 (package-with-python2 python-fonttools))
75710da6 5394
5faa5ce4
RW
5395(define-public python-ly
5396 (package
5397 (name "python-ly")
5135354f 5398 (version "0.9.4")
5faa5ce4
RW
5399 (source
5400 (origin
5401 (method url-fetch)
5135354f
RW
5402 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5403 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5404 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5405 (sha256
5406 (base32
5135354f 5407 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4
RW
5408 (build-system python-build-system)
5409 (native-inputs
5410 `(("python-setuptools" ,python-setuptools)))
5411 (synopsis "Tool and library for manipulating LilyPond files")
5412 (description "This package provides a Python library to parse, manipulate
5413or create documents in LilyPond format. A command line program ly is also
5414provided that can be used to do various manipulations with LilyPond files.")
5415 (home-page "https://pypi.python.org/pypi/python-ly")
5416 (license gpl2+)))
7e7b27d9
CR
5417
5418(define-public python-appdirs
5419 (package
5420 (name "python-appdirs")
5421 (version "1.4.0")
5422 (source
5423 (origin
5424 (method url-fetch)
5425 (uri (string-append
5426 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5427 version
5428 ".tar.gz"))
5429 (sha256
5430 (base32
5431 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5432 (build-system python-build-system)
5433 (inputs
5434 `(("python-setuptools" ,python-setuptools)))
5435 (home-page "http://github.com/ActiveState/appdirs")
5436 (synopsis
5437 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5438 (description
5439 "This module provides a portable way of finding out where user data
5440should be stored on various operating systems.")
5441 (license license:expat)))
5442
5443(define-public python2-appdirs
5444 (package-with-python2 python-appdirs))
89b2e0b0
LF
5445
5446(define-public python-llfuse
5447 (package
5448 (name "python-llfuse")
10240c7c 5449 (version "1.1")
89b2e0b0
LF
5450 (source (origin
5451 (method url-fetch)
5452 (uri (string-append
5453 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5454 "llfuse-" version ".tar.bz2"))
5455 (sha256
5456 (base32
10240c7c 5457 "1ywzbqkahrfl9kkcasxrmgilv6fybapvh6pqvimimnfh7sgxal72"))))
89b2e0b0
LF
5458 (build-system python-build-system)
5459 (inputs
5460 `(("fuse" ,fuse)
5461 ("attr" ,attr)))
5462 (native-inputs
5463 `(("pkg-config" ,pkg-config)
5464 ("python-setuptools" ,python-setuptools)))
5465 (synopsis "Python bindings for FUSE")
5466 (description
5467 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5468 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
cd0569c4
LF
5469 (license lgpl2.0+)
5470 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
5471
5472(define-public python2-llfuse
cd0569c4
LF
5473 (package (inherit (package-with-python2
5474 (strip-python2-variant python-llfuse)))
5475 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5476
5477;; For attic-0.16
5478(define-public python-llfuse-0.41
5479 (package (inherit python-llfuse)
229b3661 5480 (version "0.41.1")
cd0569c4
LF
5481 (source (origin
5482 (method url-fetch)
5483 (uri (string-append
5484 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5485 "llfuse-" version ".tar.bz2"))
5486 (sha256
5487 (base32
229b3661 5488 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
5489 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5490 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5491 (license (list license:expat lgpl2.0+))))
641c9871
LF
5492
5493(define-public python-msgpack
5494 (package
5495 (name "python-msgpack")
ae831df4 5496 (version "0.4.7")
641c9871
LF
5497 (source (origin
5498 (method url-fetch)
ae831df4 5499 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
5500 (sha256
5501 (base32
ae831df4 5502 "0syd7bs83qs9qmxw540jbgsildbqk4yb57fmrlns1021llli402y"))))
641c9871 5503 (build-system python-build-system)
641c9871
LF
5504 (synopsis "MessagePack (de)serializer")
5505 (description "MessagePack is a fast, compact binary serialization format,
5506suitable for similar data to JSON. This package provides CPython bindings for
5507reading and writing MessagePack data.")
5508 (home-page "https://pypi.python.org/pypi/msgpack-python/")
bd74be7b
LF
5509 (license asl2.0)
5510 (properties `((python2-variant . ,(delay python2-msgpack))))))
5511
5512(define-public python2-msgpack
5513 (package (inherit (package-with-python2
5514 (strip-python2-variant python-msgpack)))
5515 (native-inputs
5516 `(("python2-setuptools" ,python2-setuptools)))))
641c9871
LF
5517
5518(define-public python2-msgpack
5519 (package-with-python2 python-msgpack))
6e5e39f4
CR
5520
5521(define-public python-netaddr
5522 (package
5523 (name "python-netaddr")
5524 (version "0.7.18")
5525 (source
5526 (origin
5527 (method url-fetch)
5528 (uri (string-append
5529 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5530 version
5531 ".tar.gz"))
5532 (sha256
5533 (base32
5534 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5535 (build-system python-build-system)
5536 (arguments `(#:tests? #f)) ;; No tests.
5537 (inputs
5538 `(("python-setuptools" ,python-setuptools)))
5539 (home-page "https://github.com/drkjam/netaddr/")
5540 (synopsis "Pythonic manipulation of network addresses")
5541 (description
5542 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5543and MAC network addresses.")
5544 (license bsd-3)))
5545
5546(define-public python2-netaddr
5547 (package-with-python2 python-netaddr))
8c692a52
CR
5548
5549(define-public python-wrapt
5550 (package
5551 (name "python-wrapt")
5552 (version "1.10.5")
5553 (source
5554 (origin
5555 (method url-fetch)
5556 (uri (string-append
5557 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5558 version
5559 ".tar.gz"))
5560 (sha256
5561 (base32
5562 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5563 (build-system python-build-system)
5564 (arguments
5565 ;; Tests are not included in the tarball, they are only available in the
5566 ;; git repository.
5567 `(#:tests? #f))
5568 (inputs
5569 `(("python-setuptools" ,python-setuptools)))
5570 (home-page "https://github.com/GrahamDumpleton/wrapt")
5571 (synopsis "Module for decorators, wrappers and monkey patching")
5572 (description
5573 "The aim of the wrapt module is to provide a transparent object proxy for
5574 Python, which can be used as the basis for the construction of function
5575 wrappers and decorator functions.")
5576 (license bsd-2)))
5577
5578(define-public python2-wrapt
5579 (package-with-python2 python-wrapt))
b85c85be
CR
5580
5581(define-public python-iso8601
5582 (package
5583 (name "python-iso8601")
5584 (version "0.1.10")
5585 (source
5586 (origin
5587 (method url-fetch)
5588 (uri (string-append
5589 "https://pypi.python.org/packages/source/i/iso8601/iso8601-"
5590 version
5591 ".tar.gz"))
5592 (sha256
5593 (base32
5594 "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7"))))
5595 (build-system python-build-system)
5596 (inputs
5597 `(("python-setuptools" ,python-setuptools)))
5598 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5599 (synopsis "Module to parse ISO 8601 dates")
5600 (description
5601 "This module parses the most common forms of ISO 8601 date strings (e.g.
5602@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5603 (license license:expat)))
5604
5605(define-public python2-iso8601
5606 (package-with-python2 python-iso8601))
5e412b63
CR
5607
5608(define-public python-monotonic
5609 (package
5610 (name "python-monotonic")
5611 (version "0.3")
5612 (source
5613 (origin
5614 (method url-fetch)
5615 (uri (string-append
5616 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5617 version
5618 ".tar.gz"))
5619 (sha256
5620 (base32
5621 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5622 (build-system python-build-system)
5623 (inputs
5624 `(("python-setuptools" ,python-setuptools)))
5625 (home-page "https://github.com/atdt/monotonic")
5626 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5627 (description
5628 "This module provides a monotonic() function which returns the value (in
5629fractional seconds) of a clock which never goes backwards.")
5630 (license asl2.0)))
5631
5632(define-public python2-monotonic
5633 (package-with-python2 python-monotonic))
de34afac
CR
5634
5635(define-public python-webob
5636 (package
5637 (name "python-webob")
b8834c21 5638 (version "1.5.1")
de34afac
CR
5639 (source
5640 (origin
5641 (method url-fetch)
b8834c21 5642 (uri (pypi-uri "WebOb" version))
de34afac
CR
5643 (sha256
5644 (base32
b8834c21 5645 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
5646 (build-system python-build-system)
5647 (inputs
5648 `(("python-nose" ,python-nose)
5649 ("python-setuptools" ,python-setuptools)))
5650 (home-page "http://webob.org/")
5651 (synopsis "WSGI request and response object")
5652 (description
5653 "WebOb provides wrappers around the WSGI request environment, and an
5654object to help create WSGI responses.")
5655 (license license:expat)))
5656
5657(define-public python2-webob
5658 (package-with-python2 python-webob))
350ba0a3 5659
02a8a187
BW
5660(define-public python-xlrd
5661 (package
5662 (name "python-xlrd")
5663 (version "0.9.4")
5664 (source (origin
5665 (method url-fetch)
5666 (uri (string-append "https://pypi.python.org/packages/source/x/"
5667 "xlrd/xlrd-" version ".tar.gz"))
5668 (sha256
5669 (base32
5670 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5671 (build-system python-build-system)
5672 (arguments
5673 `(#:phases
5674 (modify-phases %standard-phases
5675 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5676 ;; run tests instead for now.
5677 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5678 (native-inputs `(("python-nose" ,python-nose)
5679 ("python-setuptools" ,python-setuptools)))
5680 (home-page "http://www.python-excel.org/")
5681 (synopsis "Library for extracting data from Excel files")
5682 (description "This packages provides a library to extract data from
5683spreadsheets using Microsoft Excel® proprietary file formats @samp{.xls} and
5684@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5685Unicode-aware. It is not intended as an end-user tool.")
5686 (license bsd-3)))
5687
5688(define-public python2-xlrd
5689 (package-with-python2 python-xlrd))
5690
350ba0a3
CR
5691(define-public python-prettytable
5692 (package
5693 (name "python-prettytable")
5694 (version "0.7.2")
5695 (source
5696 (origin
5697 (method url-fetch)
5698 (uri (string-append
5699 "https://pypi.python.org/packages/source/P/PrettyTable/"
5700 "prettytable-" version ".tar.bz2"))
5701 (sha256
5702 (base32
5703 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5704 (build-system python-build-system)
5705 (inputs
5706 `(("python-setuptools" ,python-setuptools)))
5707 (home-page "http://code.google.com/p/prettytable/")
5708 (synopsis "Display tabular data in an ASCII table format")
5709 (description
5710 "A library designed to represent tabular data in visually appealing ASCII
5711tables. PrettyTable allows for selection of which columns are to be printed,
5712independent alignment of columns (left or right justified or centred) and
5713printing of sub-tables by specifying a row range.")
5714 (license bsd-3)))
5715
5716(define-public python2-prettytable
5717 (package-with-python2 python-prettytable))
7a8ac75a
RW
5718
5719(define-public python-pyasn1
5720 (package
5721 (name "python-pyasn1")
5722 (version "0.1.8")
5723 (source
5724 (origin
5725 (method url-fetch)
5726 (uri (string-append "https://pypi.python.org/packages/source/p/"
5727 "pyasn1/pyasn1-" version ".tar.gz"))
5728 (sha256
5729 (base32
5730 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5731 (build-system python-build-system)
5732 (home-page "http://pyasn1.sourceforge.net/")
5733 (synopsis "ASN.1 types and codecs")
5734 (description
5735 "This is an implementation of ASN.1 types and codecs in Python. It is
5736suitable for a wide range of protocols based on the ASN.1 specification.")
5737 (license bsd-2)))
5738
5739(define-public python2-pyasn1
5740 (package-with-python2 python-pyasn1))
9a49a535 5741
5988c299
EF
5742(define-public python-pyasn1-modules
5743 (package
5744 (name "python-pyasn1-modules")
5745 (version "0.0.8")
5746 (source
5747 (origin
5748 (method url-fetch)
5749 (uri (pypi-uri "pyasn1-modules" version))
5750 (sha256
5751 (base32
5752 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
5753 (build-system python-build-system)
5754 (native-inputs
5755 `(("python-setuptools" ,python-setuptools)))
5756 (propagated-inputs
5757 `(("python-pyasn1" ,python-pyasn1)))
5758 (home-page "http://sourceforge.net/projects/pyasn1/")
5759 (synopsis "ASN.1 codec implementations")
5760 (description
5761 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
5762implementations of ASN.1-based codecs and protocols.")
5763 (license bsd-3)))
5764
5765(define-public python2-pyasn1-modules
5766 (package-with-python2 python-pyasn1-modules))
5767
9a49a535
RW
5768(define-public python2-ipaddress
5769 (package
5770 (name "python2-ipaddress")
5771 (version "1.0.14")
5772 (source
5773 (origin
5774 (method url-fetch)
5775 (uri (string-append "https://pypi.python.org/packages/source/i/"
5776 "ipaddress/ipaddress-" version ".tar.gz"))
5777 (sha256
5778 (base32
5779 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5780 (build-system python-build-system)
5781 (arguments
5782 `(#:tests? #f ; no tests
5783 #:python ,python-2))
5784 (home-page "https://github.com/phihag/ipaddress")
5785 (synopsis "IP address manipulation library")
5786 (description
5787 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5788in Python. This library is used to create, poke at, and manipulate IPv4 and
5789IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5790module to older versions of Python.")
5791 (license psfl)))
3f00e078 5792
4a238186
HG
5793(define-public python2-ipaddr
5794 (package
5795 (name "python2-ipaddr")
5796 (version "2.1.11")
5797 (source
5798 (origin
5799 (method url-fetch)
5800 (uri (pypi-uri "ipaddr" version))
5801 (sha256
5802 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
5803 (build-system python-build-system)
5804 (arguments
5805 `(#:python ,python-2 ;version 2 only
5806 #:phases
5807 (modify-phases %standard-phases
5808 (replace 'check
5809 (lambda* _
5810 (zero? (system* "python" "ipaddr_test.py")))))))
5811 (home-page "https://github.com/google/ipaddr-py")
5812 (synopsis "IP address manipulation library")
5813 (description
5814 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
5815IPv6 addresses and networks.
5816
5817For new implementations you may prefer to use the standard module
5818@code{ipaddress}, which was introduced in Python 3.3 and backported to older
5819versions of Python.")
5820 (license asl2.0)))
5821
3f00e078
RW
5822(define-public python-idna
5823 (package
5824 (name "python-idna")
5825 (version "2.0")
5826 (source
5827 (origin
5828 (method url-fetch)
5829 (uri (string-append "https://pypi.python.org/packages/source/i/"
5830 "idna/idna-" version ".tar.gz"))
5831 (sha256
5832 (base32
5833 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5834 (build-system python-build-system)
5835 (native-inputs
5836 `(("python-setuptools" ,python-setuptools)))
5837 (home-page "https://github.com/kjd/idna")
5838 (synopsis "Internationalized domain names in applications")
5839 (description
5840 "This is a library to support the Internationalised Domain Names in
5841Applications (IDNA) protocol as specified in RFC 5891. This version of the
5842protocol is often referred to as “IDNA2008” and can produce different results
5843from the earlier standard from 2003. The library is also intended to act as a
5844suitable drop-in replacement for the “encodings.idna” module that comes with
5845the Python standard library but currently only supports the older 2003
5846specification.")
5847 (license bsd-4)))
5848
5849(define-public python2-idna
5850 (package-with-python2 python-idna))
36ebf972
RW
5851
5852(define-public python-pretend
5853 (package
5854 (name "python-pretend")
5855 (version "1.0.8")
5856 (source
5857 (origin
5858 (method url-fetch)
5859 (uri (string-append "https://pypi.python.org/packages/source/p/"
5860 "pretend/pretend-" version ".tar.gz"))
5861 (sha256
5862 (base32
5863 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5864 (build-system python-build-system)
5865 (native-inputs
5866 `(("python-setuptools" ,python-setuptools)))
5867 (home-page "https://github.com/alex/pretend")
5868 (synopsis "Library for stubbing in Python")
5869 (description
5870 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5871technique for writing tests. You may hear the term mixed up with mocks,
5872fakes, or doubles. Basically, a stub is an object that returns pre-canned
5873responses, rather than doing any computation.")
5874 (license bsd-3)))
5875
5876(define-public python2-pretend
5877 (package-with-python2 python-pretend))
aa759a51
RW
5878
5879(define-public python-cryptography-vectors
5880 (package
5881 (name "python-cryptography-vectors")
b4370be9 5882 (version "1.3.2")
aa759a51
RW
5883 (source
5884 (origin
5885 (method url-fetch)
b4370be9
LF
5886 (uri (string-append
5887 "https://pypi.python.org/packages/"
5888 "3f/fd/"
5889 "5883a7fdfcdf6edec55c58605be99d8c36ce97a9b729763ea9cf30e761b7"
5890 "/cryptography_vectors-" version ".tar.gz"))
aa759a51
RW
5891 (sha256
5892 (base32
b4370be9 5893 "0ss682bpgzdfy2vam8yhhrx7p5gnw89ydlvaswqp52za8sd8nsh0"))))
aa759a51
RW
5894 (build-system python-build-system)
5895 (native-inputs
5896 `(("python-setuptools" ,python-setuptools)))
5897 (home-page "https://github.com/pyca/cryptography")
5898 (synopsis "Test vectors for the cryptography package.")
5899 (description
5900 "This package contains test vectors for the cryptography package.")
5901 ;; Distributed under either BSD-3 or ASL2.0
5902 (license (list bsd-3 asl2.0))))
5903
5904(define-public python2-cryptography-vectors
5905 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
5906
5907(define-public python-cryptography
5908 (package
5909 (name "python-cryptography")
b4370be9 5910 (version "1.3.2")
88b47cb0
RW
5911 (source
5912 (origin
5913 (method url-fetch)
b4370be9
LF
5914 (uri (string-append
5915 "https://pypi.python.org/packages/"
5916 "04/da/"
5917 "35f9a1d34dab5d777f65fb87731288f338ab0ae46a525ffdf0405b573dd0"
5918 "/cryptography-" version ".tar.gz"))
88b47cb0
RW
5919 (sha256
5920 (base32
b4370be9 5921 "121067qdbzd0ir0nxjdf0kgai7qlsc9yh2xhrj4cavcn4y4gmapv"))))
88b47cb0
RW
5922 (build-system python-build-system)
5923 (inputs
5924 `(("openssl" ,openssl)))
5925 (propagated-inputs
5926 `(("python-cffi" ,python-cffi)
5927 ("python-six" ,python-six)
5928 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
5929 ("python-idna" ,python-idna)
5930 ("python-iso8601" ,python-iso8601)))
5931 (native-inputs
5932 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 5933 ("python-hypothesis" ,python-hypothesis)
88b47cb0
RW
5934 ("python-setuptools" ,python-setuptools)
5935 ("python-pretend" ,python-pretend)
ce6c13ee
EF
5936 ("python-pyasn1" ,python-pyasn1)
5937 ("python-pyasn1-modules" ,python-pyasn1-modules)
88b47cb0
RW
5938 ("python-pytest" ,python-pytest)))
5939 (home-page "https://github.com/pyca/cryptography")
5940 (synopsis "Cryptographic recipes and primitives for Python")
5941 (description
5942 "cryptography is a package which provides cryptographic recipes and
5943primitives to Python developers. It aims to be the “cryptographic standard
5944library” for Python. The package includes both high level recipes, and low
5945level interfaces to common cryptographic algorithms such as symmetric ciphers,
5946message digests and key derivation functions.")
5947 ;; Distributed under either BSD-3 or ASL2.0
519e2f4f
LF
5948 (license (list bsd-3 asl2.0))
5949 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
5950
5951(define-public python2-cryptography
519e2f4f
LF
5952 (let ((crypto (package-with-python2
5953 (strip-python2-variant python-cryptography))))
88b47cb0
RW
5954 (package (inherit crypto)
5955 (propagated-inputs
5956 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
5957 ("python2-backport-ssl-match-hostname"
5958 ,python2-backport-ssl-match-hostname)
68f1cdec 5959 ("python2-enum34" ,python2-enum34)
88b47cb0 5960 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
5961
5962(define-public python-pyopenssl
5963 (package
5964 (name "python-pyopenssl")
2fc629dd 5965 (version "16.0.0")
5af999b8
RW
5966 (source
5967 (origin
5968 (method url-fetch)
5969 (uri (string-append "https://pypi.python.org/packages/source/p/"
5970 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
5971 (sha256
5972 (base32
2fc629dd 5973 "0zfijaxlq4vgi6jz0d4i5xq9ygqnyps6br7lmigjhqnh8gp10g9n"))))
5af999b8 5974 (build-system python-build-system)
5af999b8
RW
5975 (propagated-inputs
5976 `(("python-cryptography" ,python-cryptography)
5977 ("python-six" ,python-six)))
5978 (inputs
5979 `(("openssl" ,openssl)))
5980 (native-inputs
5981 `(("python-setuptools" ,python-setuptools)))
5982 (home-page "https://github.com/pyca/pyopenssl")
5983 (synopsis "Python wrapper module around the OpenSSL library")
5984 (description
5985 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
5986library.")
5987 (license asl2.0)))
5988
5989(define-public python2-pyopenssl
519e2f4f 5990 (package-with-python2 python-pyopenssl))
643725a1
CR
5991
5992(define-public python-pip
5993 (package
5994 (name "python-pip")
6fb54e3b 5995 (version "8.0.2")
643725a1
CR
5996 (source
5997 (origin
5998 (method url-fetch)
6fb54e3b 5999 (uri (pypi-uri "pip" version))
643725a1
CR
6000 (sha256
6001 (base32
6fb54e3b 6002 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6003 (build-system python-build-system)
6004 (inputs
6005 `(("python-setuptools" ,python-setuptools)
6006 ("python-virtualenv" ,python-virtualenv)
6007 ;; Tests
6008 ("python-mock" ,python-mock)
6009 ("python-pytest" ,python-pytest)
6010 ("python-scripttest" ,python-scripttest)))
6011 (home-page "https://pip.pypa.io/")
6012 (synopsis
6013 "Package manager for Python software")
6014 (description
6015 "Pip is a package manager for Python software, that finds packages on the
6016Python Package Index (PyPI).")
6017 (license license:expat)))
6018
6019(define-public python2-pip
6020 (package-with-python2 python-pip))
d8c4998f
LC
6021
6022(define-public python-tlsh
6023 (package
6024 (name "python-tlsh")
99b00dc7 6025 (version "3.4.4")
d8c4998f
LC
6026 (home-page "https://github.com/trendmicro/tlsh")
6027 (source (origin
99b00dc7
EF
6028 (method url-fetch)
6029 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6030 version ".tar.gz"))
d8c4998f
LC
6031 (sha256
6032 (base32
99b00dc7
EF
6033 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6034 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6035 (build-system cmake-build-system)
6036 (arguments
6037 '(#:out-of-source? #f
6038 #:phases (modify-phases %standard-phases
6039 (replace
6040 'install
6041 (lambda* (#:key outputs #:allow-other-keys)
6042 ;; Build and install the Python bindings. The underlying
6043 ;; C++ library is apparently not meant to be installed.
6044 (let ((out (assoc-ref outputs "out")))
6045 (with-directory-excursion "py_ext"
6046 (and (system* "python" "setup.py" "build")
6047 (system* "python" "setup.py" "install"
6048 (string-append "--prefix=" out))))))))))
6049 (inputs `(("python" ,python-wrapper))) ;for the bindings
6050 (synopsis "Fuzzy matching library for Python")
6051 (description
6052 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6053Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6054value which can be used for similarity comparisons. Similar objects have
6055similar hash values, which allows for the detection of similar objects by
6056comparing their hash values. The byte stream should have a sufficient amount
6057of complexity; for example, a byte stream of identical bytes will not generate
6058a hash value.")
6059 (license asl2.0)))
6060
6061(define-public python2-tlsh
6062 (package
6063 (inherit python-tlsh)
6064 (name "python2-tlsh")
6065 (inputs `(("python" ,python-2)))))
d96034ed
LC
6066
6067(define-public python-libarchive-c
6068 (package
6069 (name "python-libarchive-c")
03fd001c 6070 (version "2.2")
d96034ed
LC
6071 (source (origin
6072 (method url-fetch)
03fd001c 6073 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6074 (sha256
6075 (base32
03fd001c 6076 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6077 (build-system python-build-system)
6078 (arguments
6079 '(#:phases (modify-phases %standard-phases
6080 (add-before
6081 'build 'reference-libarchive
6082 (lambda* (#:key inputs #:allow-other-keys)
6083 ;; Retain the absolute file name of libarchive.so.
6084 (let ((libarchive (assoc-ref inputs "libarchive")))
6085 (substitute* "libarchive/ffi.py"
6086 (("find_library\\('archive'\\)")
6087 (string-append "'" libarchive
6088 "/lib/libarchive.so'"))))
6089
6090 ;; Do not make a compressed egg (see
6091 ;; <http://bugs.gnu.org/20765>).
6092 (let ((port (open-file "setup.cfg" "a")))
6093 (display "\n[easy_install]\nzip_ok = 0\n"
6094 port)
6095 (close-port port)
6096 #t))))))
6097 (inputs
6098 `(("python-setuptools" ,python-setuptools)
6099 ("libarchive" ,libarchive)))
6100 (home-page "https://github.com/Changaco/python-libarchive-c")
6101 (synopsis "Python interface to libarchive")
6102 (description
6103 "This package provides Python bindings to libarchive, a C library to
6104access possibly compressed archives in many different formats. It uses
6105Python's @code{ctypes} foreign function interface (FFI).")
6106 (license lgpl2.0+)))
6107
6108(define-public python2-libarchive-c
6109 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6110
6111(define-public python-file
6112 (package
6113 (inherit file)
6114 (name "python-file")
6115 (build-system python-build-system)
6116 (arguments
6117 '(#:tests? #f ;no tests
6118 #:phases (modify-phases %standard-phases
6119 (add-before 'build 'change-directory
6120 (lambda _
6121 (chdir "python")
6122 #t))
6123 (add-before 'build 'set-library-file-name
6124 (lambda* (#:key inputs #:allow-other-keys)
6125 (let ((file (assoc-ref inputs "file")))
6126 (substitute* "magic.py"
6127 (("find_library\\('magic'\\)")
6128 (string-append "'" file "/lib/libmagic.so'")))
6129 #t))))))
6130 (inputs `(("file" ,file)))
6131 (self-native-input? #f)
daeeea71
CM
6132 (synopsis "Python bindings to the libmagic file type guesser. Note that
6133this module and the python-magic module both provide a \"magic.py\" file;
6134these two modules, which are different and were developed separately, both
6135serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6136
6137(define-public python2-file
6138 (package-with-python2 python-file))
85d4aeac
LC
6139
6140(define-public python-debian
6141 (package
6142 (name "python-debian")
6143 (version "0.1.23")
6144 (source
6145 (origin
6146 (method url-fetch)
6147 (uri (string-append
6148 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6149 version ".tar.gz"))
6150 (sha256
6151 (base32
6152 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6153 (build-system python-build-system)
6154 (inputs
6155 `(("python-six" ,python-six)))
6156 (native-inputs
6157 `(("python-setuptools" ,python-setuptools)))
6158 (home-page "http://packages.debian.org/sid/python-debian")
6159 (synopsis "Debian package related modules")
6160 (description
5c7bdc9a
LC
6161 ;; XXX: Use @enumerate instead of @itemize to work around
6162 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6163 "This package provides Python modules that abstract many formats of
6164Debian-related files, such as:
6165
5c7bdc9a 6166@enumerate
85d4aeac
LC
6167@item Debtags information;
6168@item @file{debian/changelog} files;
6169@item packages files, pdiffs;
6170@item control files of single or multiple RFC822-style paragraphs---e.g.
6171 @file{debian/control}, @file{.changes}, @file{.dsc};
6172@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6173 contained files and meta-information.
5c7bdc9a 6174@end enumerate\n")
85d4aeac
LC
6175
6176 ;; Modules are either GPLv2+ or GPLv3+.
6177 (license gpl3+)))
6178
6179(define-public python2-debian
6180 (package-with-python2 python-debian))
816a6538
LC
6181
6182(define-public python-chardet
6183 (package
6184 (name "python-chardet")
6185 (version "2.3.0")
6186 (source
6187 (origin
6188 (method url-fetch)
6189 (uri (string-append
6190 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6191 version
6192 ".tar.gz"))
6193 (sha256
6194 (base32
6195 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6196 (build-system python-build-system)
6197 (native-inputs
6198 `(("python-setuptools" ,python-setuptools)))
6199 (home-page "https://github.com/chardet/chardet")
6200 (synopsis "Universal encoding detector for Python 2 and 3")
6201 (description
6202 "This package provides @code{chardet}, a Python module that can
6203automatically detect a wide range of file encodings.")
6204 (license lgpl2.1+)))
6205
6206(define-public python2-chardet
6207 (package-with-python2 python-chardet))
2fc5f186 6208
1872f1bb
KM
6209(define-public python-docopt
6210 (package
6211 (name "python-docopt")
6212 (version "0.6.2")
6213 (source
6214 (origin
6215 (method url-fetch)
6216 ;; The release on PyPI does not include tests.
6217 (uri (string-append
6218 "https://github.com/docopt/docopt/archive/"
6219 version ".tar.gz"))
6220 (file-name (string-append name "-" version ".tar.gz"))
6221 (sha256
6222 (base32
6223 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6224 (build-system python-build-system)
6225 (native-inputs
6226 `(("python-pytest" ,python-pytest)
6227 ("python-setuptools" ,python-setuptools)))
6228 (arguments
6229 `(#:phases (alist-replace
6230 'check
6231 (lambda _ (zero? (system* "py.test")))
6232 %standard-phases)))
6233 (home-page "http://docopt.org")
6234 (synopsis "Command-line interface description language for Python")
6235 (description "This library allows the user to define a command-line
6236interface from a program's help message rather than specifying it
6237programatically with command-line parsers like @code{getopt} and
6238@code{argparse}.")
6239 (license license:expat)))
6240
6241(define-public python2-docopt
6242 (package-with-python2 python-docopt))
6243
2fc5f186
LF
6244(define-public python-zope-event
6245 (package
6246 (name "python-zope-event")
6247 (version "4.1.0")
6248 (source
6249 (origin
6250 (method url-fetch)
6251 (uri (string-append "https://pypi.python.org/packages/source/z"
6252 "/zope.event/zope.event-" version ".tar.gz"))
6253 (sha256
6254 (base32
6255 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6256 (build-system python-build-system)
6257 (inputs
6258 `(("python-setuptools" ,python-setuptools)))
6259 (home-page "http://pypi.python.org/pypi/zope.event")
6260 (synopsis "Event publishing system for Python")
6261 (description "Zope.event provides an event publishing API, intended for
6262use by applications which are unaware of any subscribers to their events. It
6263is a simple event-dispatching system on which more sophisticated event
6264dispatching systems can be built.")
6265 (license zpl2.1)))
6266
6267(define-public python2-zope-event
6268 (package-with-python2 python-zope-event))
97abe268
LF
6269
6270(define-public python-zope-interface
6271 (package
6272 (name "python-zope-interface")
6273 (version "4.1.3")
6274 (source
6275 (origin
6276 (method url-fetch)
6277 (uri (string-append "https://pypi.python.org/packages/source/z"
6278 "/zope.interface/zope.interface-" version ".tar.gz"))
6279 (sha256
6280 (base32
6281 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6282 (build-system python-build-system)
6283 (propagated-inputs
6284 `(("python-zope-event" ,python-zope-event)))
6285 (home-page "https://github.com/zopefoundation/zope.interface")
6286 (synopsis "Python implementation of the \"design by contract\"
6287methodology")
6288 (description "Zope.interface provides an implementation of \"object
6289interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6290conforming to a given API or contract.")
6291 (license zpl2.1)))
6292
6293(define-public python2-zope-interface
6294 (package-with-python2 python-zope-interface))
81f2373c
LF
6295
6296(define-public python-zope-exceptions
6297 (package
6298 (name "python-zope-exceptions")
6299 (version "4.0.8")
6300 (source
6301 (origin
6302 (method url-fetch)
6303 (uri (string-append "https://pypi.python.org/packages/source/z"
6304 "/zope.exceptions/zope.exceptions-"
6305 version ".tar.gz"))
6306 (sha256
6307 (base32
6308 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6309 (build-system python-build-system)
6310 (arguments
6311 '(#:tests? #f)) ; circular dependency with zope.testrunner
6312 (propagated-inputs
6313 `(("python-zope-interface" ,python-zope-interface)))
6314 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6315 (synopsis "Zope exceptions")
6316 (description "Zope.exceptions provides general-purpose exception types
6317that have uses outside of the Zope framework.")
6318 (license zpl2.1)))
6319
6320(define-public python2-zope-exceptions
6321 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6322
6323(define-public python-zope-testing
6324 (package
6325 (name "python-zope-testing")
6326 (version "4.5.0")
6327 (source
6328 (origin
6329 (method url-fetch)
6330 (uri (string-append "https://pypi.python.org/packages/source/z"
6331 "/zope.testing/zope.testing-" version ".tar.gz"))
6332 (sha256
6333 (base32
6334 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6335 (build-system python-build-system)
6336 (native-inputs
6337 `(("python-zope-exceptions" ,python-zope-exceptions)))
6338 (propagated-inputs
6339 `(("python-zope-interface" ,python-zope-interface)))
6340 (home-page "http://pypi.python.org/pypi/zope.testing")
6341 (synopsis "Zope testing helpers")
6342 (description "Zope.testing provides a number of testing utilities for HTML
6343forms, HTTP servers, regular expressions, and more.")
6344 (license zpl2.1)))
6345
6346(define-public python2-zope-testing
6347 (package-with-python2 python-zope-testing))
01614c4f
LF
6348
6349(define-public python-zope-testrunner
6350 (package
6351 (name "python-zope-testrunner")
6352 (version "4.4.9")
6353 (source
6354 (origin
6355 (method url-fetch)
6356 (uri (string-append "https://pypi.python.org/packages/source/z"
6357 "/zope.testrunner/zope.testrunner-"
6358 version ".zip"))
6359 (sha256
6360 (base32
6361 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6362 (build-system python-build-system)
6363 (native-inputs
6364 `(("python-six" ,python-six)
6365 ("python-zope-exceptions" ,python-zope-exceptions)
6366 ("python-zope-testing" ,python-zope-testing)
6367 ("unzip" ,unzip)))
6368 (propagated-inputs
6369 `(("python-zope-interface" ,python-zope-interface)))
6370 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6371 (synopsis "Zope testrunner script")
6372 (description "Zope.testrunner provides a script for running Python
6373tests.")
6374 (license zpl2.1)))
6375
6376(define-public python2-zope-testrunner
6377 (let ((base (package-with-python2 python-zope-testrunner)))
6378 (package
6379 (inherit base)
6380 (native-inputs
6381 (append (package-native-inputs base)
6382 `(("python2-subunit" ,python2-subunit)
6383 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6384
6385(define-public python-zope-i18nmessageid
6386 (package
6387 (name "python-zope-i18nmessageid")
6388 (version "4.0.3")
6389 (source
6390 (origin
6391 (method url-fetch)
6392 (uri (string-append
6393 "https://pypi.python.org/packages/source/z"
6394 "/zope.i18nmessageid/zope.i18nmessageid-"
6395 version ".tar.gz"))
6396 (sha256
6397 (base32
6398 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6399 (build-system python-build-system)
6400 (inputs
6401 `(("python-setuptools" ,python-setuptools)))
6402 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6403 (synopsis "Message identifiers for internationalization")
6404 (description "Zope.i18nmessageid provides facilities for declaring
6405internationalized messages within program source text.")
6406 (license zpl2.1)))
6407
6408(define-public python2-zope-i18nmessageid
6409 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6410
6411(define-public python-zope-schema
6412 (package
6413 (name "python-zope-schema")
6414 (version "4.4.2")
6415 (source
6416 (origin
6417 (method url-fetch)
6418 (uri (string-append "https://pypi.python.org/packages/source/z"
6419 "/zope.schema/zope.schema-" version ".tar.gz"))
6420 (sha256
6421 (base32
6422 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6423 (build-system python-build-system)
6424 (propagated-inputs
6425 `(("python-zope-event" ,python-zope-event)
6426 ("python-zope-interface" ,python-zope-interface)))
6427 (native-inputs
6428 `(("python-zope-testing" ,python-zope-testing)))
6429 (home-page "http://pypi.python.org/pypi/zope.schema")
6430 (synopsis "Zope data schemas")
6431 (description "Zope.scheme provides extensions to zope.interface for
6432defining data schemas.")
6433 (license zpl2.1)))
6434
6435(define-public python2-zope-schema
6436 (package-with-python2 python-zope-schema))
fbac9b17
LF
6437
6438(define-public python-zope-configuration
6439 (package
6440 (name "python-zope-configuration")
6441 (version "4.0.3")
6442 (source (origin
6443 (method url-fetch)
6444 (uri (string-append "https://pypi.python.org/packages/source/z"
6445 "/zope.configuration/zope.configuration-"
6446 version ".tar.gz"))
6447 (sha256
6448 (base32
6449 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6450 (build-system python-build-system)
6451 (propagated-inputs
6452 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6453 ("python-zope-schema" ,python-zope-schema)))
6454 (home-page "http://pypi.python.org/pypi/zope.configuration")
6455 (synopsis "Zope Configuration Markup Language")
6456 (description "Zope.configuration implements ZCML, the Zope Configuration
6457Markup Language.")
6458 (license zpl2.1)))
6459
6460(define-public python2-zope-configuration
6461 (package-with-python2 python-zope-configuration))
2ad52086
LF
6462
6463(define-public python-zope-proxy
6464 (package
6465 (name "python-zope-proxy")
6466 (version "4.1.6")
6467 (source
6468 (origin
6469 (method url-fetch)
6470 (uri (string-append "https://pypi.python.org/packages/source/z"
6471 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6472 (sha256
6473 (base32
6474 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6475 (build-system python-build-system)
6476 (propagated-inputs
6477 `(("python-zope-interface" ,python-zope-interface)))
6478 (home-page "http://pypi.python.org/pypi/zope.proxy")
6479 (synopsis "Generic, transparent proxies")
6480 (description "Zope.proxy provides generic, transparent proxies for Python.
6481Proxies are special objects which serve as mostly-transparent wrappers around
6482another object, intervening in the apparent behavior of the wrapped object
6483only when necessary to apply the policy (e.g., access checking, location
6484brokering, etc.) for which the proxy is responsible.")
6485 (license zpl2.1)))
6486
6487(define-public python2-zope-proxy
6488 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6489
6490(define-public python-zope-location
6491 (package
6492 (name "python-zope-location")
6493 (version "4.0.3")
6494 (source
6495 (origin
6496 (method url-fetch)
6497 (uri (string-append "https://pypi.python.org/packages/source/z"
6498 "/zope.location/zope.location-" version ".tar.gz"))
6499 (sha256
6500 (base32
6501 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6502 (build-system python-build-system)
6503 (native-inputs
6504 `(("python-zope-proxy" ,python-zope-proxy)
6505 ("python-zope-schema" ,python-zope-schema)))
6506 (home-page "http://pypi.python.org/pypi/zope.location/")
6507 (synopsis "Zope location library")
6508 (description "Zope.location implements the concept of \"locations\" in
6509Zope3, which are are special objects that have a structural location.")
6510 (license zpl2.1)))
6511
6512(define-public python2-zope-location
6513 (package-with-python2 python-zope-location))
d4b77f36
LF
6514
6515(define-public python-zope-security
6516 (package
6517 (name "python-zope-security")
6518 (version "4.0.3")
6519 (source
6520 (origin
6521 (method url-fetch)
6522 (uri (string-append "https://pypi.python.org/packages/source/z"
6523 "/zope.security/zope.security-" version ".tar.gz"))
6524 (sha256
6525 (base32
6526 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6527 (build-system python-build-system)
6528 (propagated-inputs
6529 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6530 ("python-zope-component" ,python-zope-component)
6531 ("python-zope-location" ,python-zope-location)
6532 ("python-zope-proxy" ,python-zope-proxy)
6533 ("python-zope-schema" ,python-zope-schema)
6534 ("python-zope-testrunner" ,python-zope-testrunner)
6535 ("python-zope-testing" ,python-zope-testing)))
6536 (home-page "http://pypi.python.org/pypi/zope.security")
6537 (synopsis "Zope security framework")
6538 (description "Zope.security provides a generic mechanism to implement
6539security policies on Python objects.")
6540 (license zpl2.1)))
6541
6542(define-public python2-zope-security
04417662
EF
6543 (let ((zope-security (package-with-python2 python-zope-security)))
6544 (package (inherit zope-security)
6545 (propagated-inputs
6546 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6547 ,@(alist-delete
6548 "python-zope-testrunner"
6549 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6550
6551(define-public python-zope-component
6552 (package
6553 (name "python-zope-component")
6554 (version "4.2.2")
6555 (source
6556 (origin
6557 (method url-fetch)
6558 (uri (string-append "https://pypi.python.org/packages/source/z"
6559 "/zope.component/zope.component-" version ".tar.gz"))
6560 (sha256
6561 (base32
6562 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6563 (build-system python-build-system)
6564 (arguments
6565 ;; Skip tests due to circular dependency with python-zope-security.
6566 '(#:tests? #f))
6567 (native-inputs
6568 `(("python-zope-testing" ,python-zope-testing)))
6569 (propagated-inputs
6570 `(("python-zope-event" ,python-zope-event)
6571 ("python-zope-interface" ,python-zope-interface)
6572 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6573 ("python-zope-configuration" ,python-zope-configuration)))
6574 (home-page "https://github.com/zopefoundation/zope.component")
6575 (synopsis "Zope Component Architecture")
6576 (description "Zope.component represents the core of the Zope Component
6577Architecture. Together with the zope.interface package, it provides
6578facilities for defining, registering and looking up components.")
6579 (license zpl2.1)))
6580
6581(define-public python2-zope-component
6582 (package-with-python2 python-zope-component))
3859ac12 6583
b5f218be
LF
6584(define-public python2-pythondialog
6585 (package
6586 (name "python2-pythondialog")
6587 (version "3.3.0")
6588 (source
6589 (origin
6590 (method url-fetch)
6591 (uri (string-append "https://pypi.python.org/packages/source/p/"
6592 "python2-pythondialog/python2-pythondialog-"
6593 version ".tar.gz"))
6594 (sha256
6595 (base32
6596 "1yhkagsh99bfi592ymczf8rnw8rk6n9hdqy3dd98m3yrx8zmjvry"))))
6597 (build-system python-build-system)
6598 (arguments
6599 `(#:phases
6600 (modify-phases %standard-phases
6601 (add-after 'unpack 'patch-path
6602 (lambda* (#:key inputs #:allow-other-keys)
6603 (let* ((dialog (assoc-ref inputs "dialog")))
6604 ;; Since this library really wants to grovel the search path, we
6605 ;; must hardcode dialog's store path into it.
6606 (substitute* "dialog.py"
6607 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6608 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6609 #t))))
6610 #:python ,python-2
6611 #:tests? #f)) ; no test suite
6612 (propagated-inputs
6613 `(("dialog" ,dialog)))
6614 (home-page "http://pythondialog.sourceforge.net/")
6615 (synopsis "Python interface to the UNIX dialog utility")
6616 (description "A Python wrapper for the dialog utility. Its purpose is to
6617provide an easy to use, pythonic and comprehensive Python interface to dialog.
6618This allows one to make simple text-mode user interfaces on Unix-like systems")
6619 (license lgpl2.1)))
6620
3859ac12
LF
6621(define-public python-pyrfc3339
6622 (package
6623 (name "python-pyrfc3339")
d9aa097b 6624 (version "1.0")
3859ac12
LF
6625 (source
6626 (origin
6627 (method url-fetch)
d9aa097b 6628 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
6629 (sha256
6630 (base32
d9aa097b 6631 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
6632 (build-system python-build-system)
6633 (propagated-inputs
6634 `(("python-pytz" ,python-pytz)))
6635 (native-inputs
6636 `(("python-nose" ,python-nose)
6637 ("python-setuptools" ,python-setuptools)))
6638 (home-page "https://github.com/kurtraschke/pyRFC3339")
6639 (synopsis "Python timestamp library")
6640 (description "Python library for generating and parsing RFC 3339-compliant
6641timestamps.")
6642 (license license:expat)))
6643
6644(define-public python2-pyrfc3339
6645 (package-with-python2 python-pyrfc3339))
5eea2005
LF
6646
6647(define-public python-werkzeug
6648 (package
6649 (name "python-werkzeug")
4b47cbfa 6650 (version "0.11.5")
5eea2005
LF
6651 (source
6652 (origin
6653 (method url-fetch)
4b47cbfa 6654 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
6655 (sha256
6656 (base32
4b47cbfa 6657 "0r41xqp4cypzcgsf6zbspbqd272wnzf20igb4w4b5wzfhgqh9nxg"))))
5eea2005
LF
6658 (build-system python-build-system)
6659 (native-inputs
6660 `(("python-pytest" ,python-pytest)))
6661 (home-page "http://werkzeug.pocoo.org/")
6662 (synopsis "Utilities for WSGI applications")
6663 (description "One of the most advanced WSGI utility modules. It includes a
6664powerful debugger, full-featured request and response objects, HTTP utilities to
6665handle entity tags, cache control headers, HTTP dates, cookie handling, file
6666uploads, a powerful URL routing system and a bunch of community-contributed
6667addon modules.")
6668 (license x11)))
6669
6670(define-public python2-werkzeug
6671 (package-with-python2 python-werkzeug))
99fffa8a
LF
6672
6673(define-public python-configobj
6674 (package
6675 (name "python-configobj")
6676 (version "5.0.6")
6677 (source (origin
6678 (method url-fetch)
6679 (uri (string-append
6680 "https://pypi.python.org/packages/source/c/configobj/"
6681 "configobj-" version ".tar.gz"))
6682 (sha256
6683 (base32
6684 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6685 ;; Patch setup.py so it looks for python-setuptools, which is
6686 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 6687 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a
LF
6688 (build-system python-build-system)
6689 (native-inputs
6690 `(("python-setuptools" ,python-setuptools)
6691 ("python-six" ,python-six)))
6692 (synopsis "Config file reading, writing and validation")
6693 (description "ConfigObj is a simple but powerful config file reader and
6694writer: an ini file round tripper. Its main feature is that it is very easy to
6695use, with a straightforward programmer’s interface and a simple syntax for
6696config files.")
6697 (home-page "https://github.com/DiffSK/configobj")
6698 (license bsd-3)))
6699
6700(define-public python2-configobj
6701 (package-with-python2 python-configobj))
79e8a291
LF
6702
6703(define-public python-configargparse
6704 (package
6705 (name "python-configargparse")
6706 (version "0.10.0")
6707 (source (origin
6708 (method url-fetch)
6709 (uri (string-append
6710 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6711 "ConfigArgParse-" version ".tar.gz"))
6712 (sha256
6713 (base32
6714 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6715 (build-system python-build-system)
6716 (arguments
6717 ;; FIXME: Bug in test suite filed upstream:
6718 ;; https://github.com/bw2/ConfigArgParse/issues/32
6719 '(#:tests? #f))
6720 (synopsis "Replacement for argparse")
6721 (description "A drop-in replacement for argparse that allows options to also
6722be set via config files and/or environment variables.")
6723 (home-page "https://github.com/bw2/ConfigArgParse")
6724 (license license:expat)))
6725
6726(define-public python2-configargparse
6727 (package-with-python2 python-configargparse))
ab41f979
LF
6728
6729(define-public python-ndg-httpsclient
6730 (package
6731 (name "python-ndg-httpsclient")
6732 (version "0.4.0")
6733 (source (origin
6734 (method url-fetch)
6735 (uri (string-append
6736 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6737 "ndg_httpsclient-" version ".tar.gz"))
6738 (sha256
6739 (base32
6740 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6741 (build-system python-build-system)
6742 (propagated-inputs
6743 `(("python-pyopenssl" ,python-pyopenssl)))
6744 (synopsis "HTTPS support for Python's httplib and urllib2")
6745 (description "This is a HTTPS client implementation for httplib and urllib2
6746based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6747over the default provided with Python and importantly enables full verification
6748of the SSL peer.")
6749 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6750 (license bsd-3)))
6751
6752;; python2-openssl requires special care, so package-with-python2 is
6753;; insufficient.
6754(define-public python2-ndg-httpsclient
6755 (package (inherit python-ndg-httpsclient)
6756 (name "python2-ndg-httpsclient")
6757 (arguments `(#:python ,python-2))
6758 (propagated-inputs
6759 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
6760
6761(define-public python-contextlib2
6762 (package
6763 (name "python-contextlib2")
6764 (version "0.4.0")
6765 (source
6766 (origin
6767 (method url-fetch)
6768 (uri (pypi-uri "contextlib2" version))
6769 (sha256
6770 (base32
6771 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6772 (build-system python-build-system)
6773 (arguments
6774 `(#:phases
6775 (modify-phases %standard-phases
6776 (replace 'check
6777 (lambda _ (zero?
6778 (system*
b3546174 6779 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
6780 (home-page "http://contextlib2.readthedocs.org/")
6781 (synopsis "Tools for decorators and context managers")
6782 (description "This module is primarily a backport of the Python
67833.2 contextlib to earlier Python versions. Like contextlib, it
6784provides utilities for common tasks involving decorators and context
6785managers. It also contains additional features that are not part of
6786the standard library.")
6787 (license psfl)))
6788
6789(define-public python2-contextlib2
6790 (package-with-python2 python-contextlib2))
210bf497
DT
6791
6792(define-public python-texttable
6793 (package
6794 (name "python-texttable")
6795 (version "0.8.4")
6796 (source
6797 (origin
6798 (method url-fetch)
6799 (uri (pypi-uri "texttable" version))
6800 (sha256
6801 (base32
6802 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
6803 (build-system python-build-system)
6804 (arguments '(#:tests? #f)) ; no tests
6805 (home-page "https://github.com/foutaise/texttable/")
6806 (synopsis "Python module for creating simple ASCII tables")
6807 (description "Texttable is a Python module for creating simple ASCII
6808tables.")
6809 (license lgpl2.1+)))
6810
6811(define-public python2-texttable
6812 (package-with-python2 python-texttable))
67c52bb3
DT
6813
6814(define-public python-websocket-client
6815 (package
6816 (name "python-websocket-client")
6817 (version "0.34.0")
6818 (source
6819 (origin
6820 (method url-fetch)
6821 (uri (string-append "https://pypi.python.org/packages/source/w"
6822 "/websocket-client/websocket_client-"
6823 version ".tar.gz"))
6824 (sha256
6825 (base32
6826 "1prdx6d49f1cff17kzj15bnz09palfdgc1m5dkq9jd4mr90n4ak8"))))
6827 (build-system python-build-system)
6828 (native-inputs
6829 `(("python-six" ,python-six))) ; for tests
6830 (inputs
6831 `(("python-setuptools" ,python-setuptools)))
6832 (home-page "https://github.com/liris/websocket-client")
6833 (synopsis "WebSocket client for Python")
6834 (description "The Websocket-client module provides the low level APIs for
6835WebSocket usage in Python programs.")
6836 (license lgpl2.1+)))
6837
6838(define-public python2-websocket-client
6839 (package-with-python2 python-websocket-client))
5c6eea2a
LF
6840
6841(define-public python-atomicwrites
6842 (package
6843 (name "python-atomicwrites")
54c30ebc 6844 (version "1.0.0")
5c6eea2a
LF
6845 (source (origin
6846 (method url-fetch)
6847 (uri (pypi-uri "atomicwrites" version))
6848 (sha256
6849 (base32
54c30ebc 6850 "019fa4771q7fb1167yfbh6msdzcqini6v7i59rmf72mzdjd7x5qv"))))
5c6eea2a
LF
6851 (build-system python-build-system)
6852 (synopsis "Atomic file writes in Python")
6853 (description "Library for atomic file writes using platform dependent tools
6854for atomic filesystem operations.")
6855 (home-page "https://github.com/untitaker/python-atomicwrites")
9bb6d184
LF
6856 (license license:expat)
6857 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
6858
6859(define-public python2-atomicwrites
6860 (package (inherit (package-with-python2
6861 (strip-python2-variant python-atomicwrites)))
6862 (native-inputs
6863 `(("python2-setuptools" ,python2-setuptools)))))
561bb3cb
LF
6864
6865(define-public python-requests-toolbelt
6866 (package
6867 (name "python-requests-toolbelt")
da8b011d 6868 (version "0.6.0")
561bb3cb
LF
6869 (source (origin
6870 (method url-fetch)
6871 (uri (pypi-uri "requests-toolbelt" version))
6872 (sha256
6873 (base32
da8b011d 6874 "07slish560haspn0hpwgy2izhk2snqq06s6acp8xzmhhz079qknc"))))
561bb3cb
LF
6875 (build-system python-build-system)
6876 (propagated-inputs
6877 `(("python-requests" ,python-requests)))
6878 (synopsis "Extensions to python-requests")
6879 (description "This is a toolbelt of useful classes and functions to be used
6880with python-requests.")
6881 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
6882 (license asl2.0)))
d1deb90b
LF
6883
6884(define-public python-click-threading
6885 (package
6886 (name "python-click-threading")
6887 (version "0.1.2")
6888 (source (origin
6889 (method url-fetch)
6890 (uri (pypi-uri "click-threading" version))
6891 (sha256
6892 (base32
6893 "0jmrv4334lfxa2ss53c06dafdwqbk1pb3ihd26izn5igw1bm8145"))))
6894 (build-system python-build-system)
6895 (propagated-inputs
6896 `(("python-click" ,python-click)))
6897 (synopsis "Utilities for multithreading in Click")
6898 (description "This package provides utilities for multithreading in Click
6899applications.")
6900 (home-page "https://github.com/click-contrib/click-threading")
6901 (license license:expat)))
7b17cab9
LF
6902
6903(define-public python-click-log
6904 (package
6905 (name "python-click-log")
a9da8fec 6906 (version "0.1.3")
7b17cab9
LF
6907 (source (origin
6908 (method url-fetch)
6909 (uri (pypi-uri "click-log" version))
6910 (sha256
6911 (base32
a9da8fec 6912 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
6913 (build-system python-build-system)
6914 (propagated-inputs
6915 `(("python-click" ,python-click)))
6916 (synopsis "Logging for click applications")
6917 (description "This package provides a Python library for logging Click
6918applications.")
6919 (home-page "https://github.com/click-contrib/click-log")
6920 (license license:expat)))
7b3a4ee4
LF
6921
6922(define-public python-apipkg
6923 (package
6924 (name "python-apipkg")
6925 (version "1.4")
6926 (source (origin
6927 (method url-fetch)
6928 (uri (pypi-uri "apipkg" version))
6929 (sha256
6930 (base32
6931 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
6932 (build-system python-build-system)
b43bab3c 6933 (inputs
7b3a4ee4
LF
6934 `(("python-pytest" ,python-pytest)))
6935 (synopsis "Namespace control and lazy-import mechanism")
6936 (description "With apipkg you can control the exported namespace of a Python
6937package and greatly reduce the number of imports for your users. It is a small
6938pure Python module that works on virtually all Python versions.")
6939 (home-page "https://bitbucket.org/hpk42/apipkg")
e08739c3
CAW
6940 (license license:expat)
6941 (properties `((python2-variant . ,(delay python2-apipkg))))))
6942
6943(define-public python2-apipkg
6944 (package
6945 (inherit (package-with-python2
6946 (strip-python2-variant python-apipkg)))
6947 (native-inputs
6948 `(("python2-setuptools" ,python2-setuptools)))))
848964fe
LF
6949
6950(define-public python-execnet
6951 (package
6952 (name "python-execnet")
6953 (version "1.4.1")
6954 (source (origin
6955 (method url-fetch)
6956 (uri (pypi-uri "execnet" version))
6957 (sha256
6958 (base32
6959 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
6960 (build-system python-build-system)
6961 (native-inputs
6962 `(("python-setuptools-scm" ,python-setuptools-scm)))
584d068f 6963 (inputs
848964fe
LF
6964 `(("python-apipkg" ,python-apipkg)))
6965 (synopsis "Rapid multi-Python deployment")
6966 (description "Execnet provides a share-nothing model with
6967channel-send/receive communication for distributing execution across many
6968Python interpreters across version, platform and network barriers. It has a
6969minimal and fast API targetting the following uses:
6970@enumerate
6971@item distribute tasks to (many) local or remote CPUs
6972@item write and deploy hybrid multi-process applications
6973@item write scripts to administer multiple environments
6974@end enumerate")
6975 (home-page "http://codespeak.net/execnet/")
16c84f90
CAW
6976 (license license:expat)
6977 (properties `((python2-variant . ,(delay python2-execnet))))))
6978
6979(define-public python2-execnet
6980 (let ((execnet (package-with-python2
6981 (strip-python2-variant python-execnet))))
6982 (package
6983 (inherit execnet)
6984 (native-inputs
6985 `(("python2-setuptools" ,python2-setuptools)
6986 ,@(package-native-inputs execnet))))))
6720dbb4
LF
6987
6988;;; The software provided by this package was integrated into pytest 2.8.
6989(define-public python-pytest-cache
6990 (package
6991 (name "python-pytest-cache")
6992 (version "1.0")
6993 (source (origin
6994 (method url-fetch)
6995 (uri (pypi-uri "pytest-cache" version))
6996 (sha256
6997 (base32
6998 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
6999 (build-system python-build-system)
630d938f
EF
7000 (inputs
7001 `(("python-apipkg" ,python-apipkg)
7002 ("python-execnet" ,python-execnet)
7003 ("python-py" ,python-py)
7004 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7005 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7006 (description "The pytest-cache plugin provides tools to rerun failures from
7007the last py.test invocation.")
7008 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7009 (license license:expat)))
d7e729fe
LF
7010
7011(define-public python-pytest-localserver
7012 (package
7013 (name "python-pytest-localserver")
29f20168 7014 (version "0.3.5")
d7e729fe
LF
7015 (source (origin
7016 (method url-fetch)
29f20168 7017 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7018 (sha256
7019 (base32
29f20168 7020 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7021 (build-system python-build-system)
7022 (arguments
7023 `(#:phases (modify-phases %standard-phases
7024 (replace 'check
7025 (lambda _
7026 (zero? (system* "py.test" "--genscript=runtests.py"))
7027 (zero? (system* "py.test")))))))
7028 (native-inputs
d7e729fe
LF
7029 `(("python-pytest" ,python-pytest)
7030 ("python-requests" ,python-requests)
9ba40f05
EF
7031 ("python-six" ,python-six)))
7032 (inputs
7033 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7034 (synopsis "Py.test plugin to test server connections locally")
7035 (description "Pytest-localserver is a plugin for the pytest testing
7036framework which enables you to test server connections locally.")
7037 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7038 (license license:expat)))
28cecbb7
LF
7039
7040(define-public python-wsgi-intercept
7041 (package
7042 (name "python-wsgi-intercept")
9d813ec1 7043 (version "1.1.2")
28cecbb7
LF
7044 (source (origin
7045 (method url-fetch)
7046 (uri (pypi-uri "wsgi_intercept" version))
7047 (sha256
7048 (base32
9d813ec1 7049 "14ajy415ch5d0dnspg4b592p66wlgzah7ay218flp13517fp49zl"))))
28cecbb7
LF
7050 (build-system python-build-system)
7051 (native-inputs
9d813ec1
EF
7052 `(("python-pytest" ,python-pytest)
7053 ("python-six" ,python-six)))
28cecbb7
LF
7054 (propagated-inputs
7055 `(("python-httplib2" ,python-httplib2)
7056 ("python-requests" ,python-requests)))
7057 (synopsis "Puts a WSGI application in place of a real URI for testing")
7058 (description "Wsgi_intercept installs a WSGI application in place of a real
7059URI for testing. Testing a WSGI application normally involves starting a
7060server at a local host and port, then pointing your test code to that address.
7061Instead, this library lets you intercept calls to any specific host/port
7062combination and redirect them into a WSGI application importable by your test
7063program. Thus, you can avoid spawning multiple processes or threads to test
7064your Web app.")
7065 (home-page "https://github.com/cdent/wsgi-intercept")
7066 (license license:expat)))
89b8a551
LF
7067
7068(define-public python-pytest-xprocess
7069 (package
7070 (name "python-pytest-xprocess")
7071 (version "0.9.1")
7072 (source (origin
7073 (method url-fetch)
7074 (uri (pypi-uri "pytest-xprocess" version))
7075 (sha256
7076 (base32
7077 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7078 (build-system python-build-system)
7079 (propagated-inputs
7080 `(("python-pytest" ,python-pytest)
7081 ("python-pytest-cache" ,python-pytest-cache)
7082 ("python-psutil" ,python-psutil)))
7083 (synopsis "Pytest plugin to manage external processes across test runs")
7084 (description "Pytest-xprocess is an experimental py.test plugin for managing
7085processes across test runs.")
7086 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7087 (license license:expat)))
5c299bf0
LF
7088
7089(define-public python-icalendar
7090 (package
7091 (name "python-icalendar")
7092 (version "3.9.1")
7093 (source (origin
7094 (method url-fetch)
7095 (uri (pypi-uri "icalendar" version))
7096 (sha256
7097 (base32
7098 "0fhrczdj3jxy5bvswphp3vys7vwv5c9bpwg7asykqwa3z6253q6q"))))
7099 (build-system python-build-system)
7100 (propagated-inputs
7101 `(("python-dateutil-2" ,python-dateutil-2)
7102 ("python-pytz" ,python-pytz)))
7103 (synopsis "Python library for parsing iCalendar files")
7104 (description "The icalendar package is a parser/generator of iCalendar
7105files for use with Python.")
7106 (home-page "https://github.com/collective/icalendar")
7107 (license bsd-2)))
6bbbb53e
LF
7108
7109(define-public python-sphinxcontrib-newsfeed
7110 (package
7111 (name "python-sphinxcontrib-newsfeed")
7112 (version "0.1.4")
7113 (source (origin
7114 (method url-fetch)
7115 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7116 (sha256
7117 (base32
7118 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7119 (build-system python-build-system)
7120 (propagated-inputs
7121 `(("python-docutils" ,python-docutils)
7122 ("python-sphinx" ,python-sphinx)))
7123 (synopsis "News Feed extension for Sphinx")
7124 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7125Blog, News or Announcements section to a Sphinx website.")
7126 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7127 (license bsd-2)))
2216e15c
SB
7128
7129(define-public python-args
7130 (package
7131 (name "python-args")
7132 (version "0.1.0")
7133 (source (origin
7134 (method url-fetch)
7135 (uri (pypi-uri "args" version))
7136 (sha256
7137 (base32
7138 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7139 (build-system python-build-system)
7140 (inputs
7141 `(("python-setuptools" ,python-setuptools)))
7142 (home-page "https://github.com/kennethreitz/args")
7143 (synopsis "Command-line argument parser")
7144 (description
7145 "This library provides a Python module to parse command-line arguments.")
7146 (license bsd-3)))
7147
7148(define-public python2-args
7149 (package-with-python2 python-args))
c06a3de9
SB
7150
7151(define-public python-clint
7152 (package
7153 (name "python-clint")
7154 (version "0.5.1")
7155 (source (origin
7156 (method url-fetch)
7157 (uri (pypi-uri "clint" version))
7158 (sha256
7159 (base32
7160 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7161 (build-system python-build-system)
7162 (inputs
7163 `(("python-args" ,python-args)
7164 ("python-setuptools" ,python-setuptools)))
7165 (home-page "https://github.com/kennethreitz/clint")
7166 (synopsis "Command-line interface tools")
7167 (description
7168 "Clint is a Python module filled with a set of tools for developing
7169command-line applications, including tools for colored and indented
7170output, progress bar display, and pipes.")
7171 (license isc)))
7172
7173(define-public python2-clint
7174 (package-with-python2 python-clint))
4ecdeef8
SB
7175
7176(define-public python-astor
7177 (package
7178 (name "python-astor")
7179 (version "0.5")
7180 (source (origin
7181 (method url-fetch)
7182 (uri (pypi-uri "astor" version))
7183 (sha256
7184 (base32
7185 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7186 (build-system python-build-system)
7187 (inputs
7188 `(("python-setuptools" ,python-setuptools)))
7189 (home-page "https://github.com/berkerpeksag/astor")
7190 (synopsis "Read and write Python ASTs")
7191 (description
7192 "Astor is designed to allow easy manipulation of Python source via the
7193Abstract Syntax Tree.")
7194 (license bsd-3)))
7195
7196(define-public python2-astor
7197 (package-with-python2 python-astor))
e224b7d0
SB
7198
7199(define-public python-rply
7200 (package
7201 (name "python-rply")
7202 (version "0.7.4")
7203 (source (origin
7204 (method url-fetch)
7205 (uri (pypi-uri "rply" version))
7206 (sha256
7207 (base32
7208 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7209 (build-system python-build-system)
7210 (inputs
7211 `(("python-appdirs" ,python-appdirs)
7212 ("python-setuptools" ,python-setuptools)))
7213 (home-page "https://github.com/alex/rply")
7214 (synopsis "Parser generator for Python")
7215 (description
7216 "This package provides a pure Python based parser generator, that also
7217works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7218with a new public API, and RPython support.")
7219 (license bsd-3)))
7220
7221(define-public python2-rply
7222 (package-with-python2 python-rply))
c3e919d7
SB
7223
7224(define-public python-hy
7225 (package
7226 (name "python-hy")
7227 (version "0.11.1")
7228 (source (origin
7229 (method url-fetch)
7230 (uri (pypi-uri "hy" version))
7231 (sha256
7232 (base32
7233 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7234 (build-system python-build-system)
7235 (inputs
7236 `(("python-astor" ,python-astor)
7237 ("python-clint" ,python-clint)
7238 ("python-rply" ,python-rply)
7239 ("python-setuptools" ,python-setuptools)))
7240 (home-page "http://hylang.org/")
7241 (synopsis "Lisp frontend to Python")
7242 (description
7243 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7244its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7245Python at your fingertips, in Lisp form.")
7246 (license license:expat)))
7247
7248(define-public python2-hy
7249 (package-with-python2 python-hy))
7a5b944e 7250
81f7f297
EF
7251(define-public python-rauth
7252 (package
7253 (name "python-rauth")
7254 (version "0.7.2")
7255 (source
7256 (origin
7257 (method url-fetch)
7258 (uri (pypi-uri "rauth" version))
7259 (sha256
7260 (base32
7261 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7262 (build-system python-build-system)
7263 (arguments
7264 `(#:test-target "check"))
0848d8d3 7265 (inputs
81f7f297
EF
7266 `(("python-requests" ,python-requests)))
7267 (home-page "https://github.com/litl/rauth")
7268 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7269 (description
7270 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7271provides service wrappers for convenient connection initialization and
7272authenticated session objects providing things like keep-alive.")
0848d8d3
EF
7273 (license license:expat)
7274 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
7275
7276(define-public python2-rauth
0848d8d3
EF
7277 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7278 (package
7279 (inherit base)
7280 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7281 ("python2-unittest2" ,python2-unittest2)
7282 ,@(package-native-inputs base))))))
81f7f297 7283
1abe448d
EF
7284(define-public python2-functools32
7285 (package
7286 (name "python2-functools32")
7287 (version "3.2.3-2")
7288 (source
7289 (origin
7290 (method url-fetch)
7291 (uri (pypi-uri "functools32" version))
7292 (sha256
7293 (base32
7294 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7295 (build-system python-build-system)
7296 (arguments
7297 `(#:python ,python-2
7298 #:tests? #f)) ; no test target
7299 (native-inputs
7300 `(("python2-setuptools" ,python2-setuptools)))
7301 (home-page "https://github.com/MiCHiLU/python-functools32")
7302 (synopsis
7303 "Backport of the functools module from Python 3.2.3")
7304 (description
7305 "This package is a backport of the @code{functools} module from Python
73063.2.3 for use with older versions of Python and PyPy.")
7307 (license license:expat)))
7308
877889f3 7309(define-public python2-futures
7a5b944e 7310 (package
877889f3 7311 (name "python2-futures")
7a5b944e
EF
7312 (version "3.0.3")
7313 (source
7314 (origin
7315 (method url-fetch)
7316 (uri (pypi-uri "futures" version))
7317 (sha256
7318 (base32
7319 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7320 (build-system python-build-system)
877889f3 7321 (arguments `(#:python ,python-2))
7a5b944e 7322 (native-inputs
877889f3 7323 `(("python2-setuptools" ,python2-setuptools)))
7a5b944e
EF
7324 (home-page "https://github.com/agronholm/pythonfutures")
7325 (synopsis
7326 "Backport of the concurrent.futures package from Python 3.2")
7327 (description
7328 "The concurrent.futures module provides a high-level interface for
7329asynchronously executing callables. This package backports the
7330concurrent.futures package from Python 3.2")
7331 (license bsd-3)))
7332
c18f6368
EF
7333(define-public python-urllib3
7334 (package
7335 (name "python-urllib3")
7336 (version "1.13.1")
7337 (source
7338 (origin
7339 (method url-fetch)
7340 (uri (pypi-uri "urllib3" version))
7341 (sha256
7342 (base32
7343 "10rrbr6c6k7j5dvfsyj4b2gsgxg9gggnn708qixf6ll57xqivfkf"))))
7344 (build-system python-build-system)
7345 (arguments `(#:tests? #f))
7346 (native-inputs
7347 `(("python-setuptools" ,python-setuptools)
7348 ;; some packages for tests
7349 ("python-nose" ,python-nose)
7350 ("python-mock" ,python-mock)
7351 ("python-tornado" ,python-tornado)))
7352 (propagated-inputs
7353 `(;; packages for https security
7354 ("python-certifi" ,python-certifi)
7355 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7356 ("python-pyasn1" ,python-pyasn1)
7357 ("python-pyopenssl" ,python-pyopenssl)))
7358 (home-page "http://urllib3.readthedocs.org/")
7359 (synopsis "HTTP library with thread-safe connection pooling")
7360 (description
7361 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7362can reuse the same socket connection for multiple requests, it can POST files,
7363supports url redirection and retries, and also gzip and deflate decoding.")
7364 (license license:expat)))
7365
7366(define-public python2-urllib3
7367 (package-with-python2 python-urllib3))
2b2f2fc1
DT
7368
7369(define-public python-colorama
7370 (package
7371 (name "python-colorama")
7372 (version "0.3.3")
7373 (source
7374 (origin
7375 (method url-fetch)
7376 (uri (pypi-uri "colorama" version))
7377 (sha256
7378 (base32
7379 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7380 (build-system python-build-system)
7381 (inputs
7382 `(("python-setuptools" ,python-setuptools)))
7383 (synopsis "colored terminal text rendering for Python")
7384 (description "Colorama is a Python library for rendering colored terminal
7385text.")
7386 (home-page "https://pypi.python.org/pypi/colorama")
7387 (license bsd-3)))
7388
7389(define-public python2-colorama
7390 (package-with-python2 python-colorama))
f5bcec6e
DT
7391
7392(define-public python-rsa
7393 (package
7394 (name "python-rsa")
7395 (version "3.2")
7396 (source
7397 (origin
7398 (method url-fetch)
7399 (uri (pypi-uri "rsa" version))
7400 (sha256
7401 (base32
7402 "0xwp929g7lvb1sghxfpqlxvgg96qcwqdbhh27sjplx30n3xp3wrh"))))
7403 (build-system python-build-system)
7404 (inputs
7405 `(("python-pyasn1" ,python-pyasn1)
7406 ("python-setuptools" ,python-setuptools)))
7407 (synopsis "Pure-Python RSA implementation")
7408 (description "Python-RSA is a pure-Python RSA implementation. It supports
7409encryption and decryption, signing and verifying signatures, and key
7410generation according to PKCS#1 version 1.5. It can be used as a Python
7411library as well as on the command line.")
7412 (home-page "http://stuvel.eu/rsa")
7413 (license asl2.0)))
7414
7415(define-public python2-rsa
7416 (package-with-python2 python-rsa))
c0aacfa5
DT
7417
7418(define-public python-pluggy
7419 (package
7420 (name "python-pluggy")
7421 (version "0.3.1")
7422 (source
7423 (origin
7424 (method url-fetch)
7425 (uri (pypi-uri "pluggy" version))
7426 (sha256
7427 (base32
7428 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7429 (build-system python-build-system)
7430 (inputs
7431 `(("python-setuptools" ,python-setuptools)))
7432 (synopsis "Plugin and hook calling mechanism for Python")
7433 (description "Pluggy is an extraction of the plugin manager as used by
7434Pytest but stripped of Pytest specific details.")
7435 (home-page "https://pypi.python.org/pypi/pluggy")
7436 (license license:expat)))
7437
7438(define-public python2-pluggy
7439 (package-with-python2 python-pluggy))
a4af21ca
DT
7440
7441(define-public python-tox
7442 (package
7443 (name "python-tox")
7444 (version "2.3.1")
7445 (source
7446 (origin
7447 (method url-fetch)
7448 (uri (pypi-uri "tox" version))
7449 (sha256
7450 (base32
7451 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7452 (build-system python-build-system)
7453 (arguments
7454 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7455 ;; pytest breaks other packages.
7456 '(#:tests? #f))
7457 (inputs
7458 `(("python-setuptools" ,python-setuptools)
7459 ("python-pluggy" ,python-pluggy)
7460 ("python-py" ,python-py)
7461 ("python-virtualenv" ,python-virtualenv)
7462 ("python-pytest" ,python-pytest)))
7463 (home-page "http://tox.testrun.org/")
7464 (synopsis "Virtualenv-based automation of test activities")
7465 (description "Tox is a generic virtualenv management and test command line
7466tool. It can be used to check that a package installs correctly with
7467different Python versions and interpreters, or run tests in each type of
7468supported environment, or act as a frontend to continuous integration
7469servers.")
7470 (license license:expat)))
7471
7472(define-public python2-tox
7473 (package-with-python2 python-tox))
ba9da248
DT
7474
7475(define-public python-jmespath
7476 (package
7477 (name "python-jmespath")
7478 (version "0.9.0")
7479 (source
7480 (origin
7481 (method url-fetch)
7482 (uri (pypi-uri "jmespath" version))
7483 (sha256
7484 (base32
7485 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7486 (build-system python-build-system)
7487 (inputs
7488 `(("python-setuptools" ,python-setuptools)))
7489 (synopsis "JSON Matching Expressions")
7490 (description "JMESPath (pronounced “james path”) is a Python library that
7491allows one to declaratively specify how to extract elements from a JSON
7492document.")
7493 (home-page "https://github.com/jmespath/jmespath.py")
7494 (license license:expat)))
7495
7496(define-public python2-jmespath
7497 (package-with-python2 python-jmespath))
935fcd5c
DT
7498
7499(define-public python-botocore
7500 (package
7501 (name "python-botocore")
7502 (version "1.3.17")
7503 (source
7504 (origin
7505 (method url-fetch)
7506 (uri (pypi-uri "botocore" version))
7507 (sha256
7508 (base32
7509 "08vpvdixx1c1lfv6vzjig68bpiir7wfyhzf49ysxgvhbprg5ra0w"))))
7510 (build-system python-build-system)
7511 (inputs
7512 `(("python-dateutil" ,python-dateutil-2)
7513 ("python-docutils" ,python-docutils)
7514 ("python-mock" ,python-mock)
7515 ("python-nose" ,python-nose)
7516 ("python-setuptools" ,python-setuptools)
7517 ("python-tox" ,python-tox)
7518 ("python-wheel" ,python-wheel)
7519 ("python-jmespath" ,python-jmespath)))
7520 (home-page "https://github.com/boto/botocore")
7521 (synopsis "Low-level interface to AWS")
7522 (description "Botocore is a Python library that provides a low-level
7523interface to the Amazon Web Services (AWS) API.")
7524 (license asl2.0)))
7525
7526(define-public python2-botocore
7527 (package-with-python2 python-botocore))
f861b8b8
DT
7528
7529(define-public awscli
7530 (package
7531 (name "awscli")
7532 (version "1.9.17")
7533 (source
7534 (origin
7535 (method url-fetch)
7536 (uri (string-append
7537 "https://pypi.python.org/packages/source/a/awscli/awscli-"
7538 version ".tar.gz"))
7539 (sha256
7540 (base32
7541 "1nj7jqvlpq57hfhby1njsbf8303gapa3njc4dramr6p3ffzvfi2i"))))
7542 (build-system python-build-system)
7543 (inputs
7544 `(("python-colorama" ,python-colorama)
7545 ("python-docutils" ,python-docutils)
7546 ("python-mock" ,python-mock)
7547 ("python-nose" ,python-nose)
7548 ("python-rsa" ,python-rsa)
7549 ("python-setuptools" ,python-setuptools)
7550 ("python-sphinx" ,python-sphinx)
7551 ("python-tox" ,python-tox)
7552 ("python-wheel" ,python-wheel)
7553 ("python-botocore" ,python-botocore)))
7554 (home-page "http://aws.amazon.com/cli/")
7555 (synopsis "Command line client for AWS")
7556 (description "AWS CLI provides a unified command line interface to the
7557Amazon Web Services (AWS) API.")
7558 (license asl2.0)))
6a44697d
LF
7559
7560(define-public python-hypothesis
7561 (package
7562 (name "python-hypothesis")
bea6d94d 7563 (version "3.1.0")
6a44697d
LF
7564 (source (origin
7565 (method url-fetch)
7566 (uri (pypi-uri "hypothesis" version))
7567 (sha256
7568 (base32
bea6d94d 7569 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 7570 (build-system python-build-system)
6a44697d
LF
7571 (propagated-inputs
7572 `(("python-flake8" ,python-flake8)
7573 ("python-pytest" ,python-pytest)))
7574 (synopsis "Library for property based testing")
7575 (description "Hypothesis is a library for testing your Python code against a
7576much larger range of examples than you would ever want to write by hand. It’s
7577based on the Haskell library, Quickcheck, and is designed to integrate
7578seamlessly into your existing Python unit testing work flow.")
7579 (home-page "https://github.com/DRMacIver/hypothesis")
6f068e08
EF
7580 (license mpl2.0)
7581 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
7582
7583(define-public python2-hypothesis
6f068e08
EF
7584 (let ((hypothesis (package-with-python2
7585 (strip-python2-variant python-hypothesis))))
7586 (package (inherit hypothesis)
7587 (native-inputs
7588 `(("python2-enum34" ,python2-enum34)
7589 ("python2-setuptools" ,python2-setuptools))))))
7517e73c
LF
7590
7591(define-public python-pytest-subtesthack
7592 (package
7593 (name "python-pytest-subtesthack")
7594 (version "0.1.1")
7595 (source (origin
7596 (method url-fetch)
7597 (uri (pypi-uri "pytest-subtesthack" version))
7598 (sha256
7599 (base32
7600 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
7601 (build-system python-build-system)
7602 (native-inputs
7603 `(;; setuptools required for python-2 variant
7604 ("python-setuptools" ,python-setuptools)))
7605 (propagated-inputs
7606 `(("python-pytest" ,python-pytest)))
7607 (synopsis "Set-up and tear-down fixtures for unit tests")
7608 (description "This plugin allows you to set up and tear down fixtures within
7609unit test functions that use @code{py.test}. This is useful for using
7610@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
7611function multiple times, without setting up or tearing down fixture state as is
7612normally the case.")
7613 (home-page "https://github.com/untitaker/pytest-subtesthack/")
7614 (license unlicense)))
7615
7616(define-public python2-pytest-subtesthack
7617 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
7618
7619(define-public python2-xdo
7620 (package
7621 (name "python2-xdo")
7622 (version "0.2")
7623 (source (origin
7624 (method url-fetch)
7625 (uri (string-append
7626 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7627 "python-xdo_" version ".orig.tar.gz"))
7628 (sha256
7629 (base32
7630 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
7631 (build-system python-build-system)
7632 (arguments
7633 `(#:python ,python-2
7634 #:tests? #f)) ; no tests provided
7635 (inputs
7636 `(("xdotool" ,xdotool)
7637 ("libX11" ,libx11)))
7638 (home-page "https://tracker.debian.org/pkg/python-xdo")
7639 (synopsis "Python library for simulating X11 keyboard/mouse input")
7640 (description "Provides bindings to libxdo for manipulating X11 via simulated
7641input. (Note that this is mostly a legacy library; you may wish to look at
7642python-xdo for newer bindings.)")
7643 (license bsd-3)))
7644
cb34dc6c
CAW
7645(define-public python-wtforms
7646 (package
7647 (name "python-wtforms")
7648 (version "2.1")
7649 (source
7650 (origin
7651 (method url-fetch)
7652 (uri (pypi-uri "WTForms" version ".zip"))
7653 (sha256
7654 (base32
7655 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
7656 (build-system python-build-system)
7657 (native-inputs
7658 `(("unzip" ,unzip)))
7659 (home-page "http://wtforms.simplecodes.com/")
7660 (synopsis
7661 "Form validation and rendering library for Python web development")
7662 (description
7663 "WTForms is a flexible forms validation and rendering library
7664for Python web development. It is very similar to the web form API
7665available in Django, but is a standalone package.")
7666 (license bsd-3)
7667 (properties `((python2-variant . ,(delay python2-wtforms))))))
7668
7669(define-public python2-wtforms
7670 (package
7671 (inherit (package-with-python2
7672 (strip-python2-variant python-wtforms)))
7673 (inputs `(("python2-setuptools" ,python2-setuptools)))))
50aaec25
DT
7674
7675(define-public python-mako
7676 (package
7677 (name "python-mako")
7678 (version "1.0.3")
7679 (source
7680 (origin
7681 (method url-fetch)
7682 (uri (pypi-uri "Mako" version))
7683 (sha256
7684 (base32
7685 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
7686 (build-system python-build-system)
7687 (native-inputs
7688 `(("python-markupsafe" ,python-markupsafe)
7689 ("python-mock" ,python-mock)
7690 ("python-nose" ,python-nose)))
7691 (home-page "http://www.makotemplates.org/")
7692 (synopsis "Templating language for Python")
7693 (description "Mako is a templating language for Python that compiles
7694templates into Python modules.")
7695 (license license:expat)
7696 (properties `((python2-variant . ,(delay python2-mako))))))
7697
7698(define-public python2-mako
7699 (let ((base (package-with-python2
7700 (strip-python2-variant python-mako))))
7701 (package
7702 (inherit base)
7703 (native-inputs
7704 (cons `("python2-setuptools" ,python2-setuptools)
7705 (package-native-inputs base))))))
ae00a41f
CAW
7706
7707(define-public python-waitress
7708 (package
7709 (name "python-waitress")
7710 (version "0.8.10")
7711 (source
7712 (origin
7713 (method url-fetch)
7714 (uri (pypi-uri "waitress" version))
7715 (sha256
7716 (base32
7717 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
7718 (build-system python-build-system)
7719 (home-page "https://github.com/Pylons/waitress")
7720 (synopsis "Waitress WSGI server")
7721 (description "Waitress is meant to be a production-quality pure-Python WSGI
7722server with very acceptable performance.")
7723 (license zpl2.1)
7724 (properties `((python2-variant . ,(delay python2-waitress))))))
7725
7726(define-public python2-waitress
7727 (package
7728 (inherit (package-with-python2
7729 (strip-python2-variant python-waitress)))
7730 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
778a284b
CAW
7731
7732(define-public python-wsgiproxy2
7733 (package
7734 (name "python-wsgiproxy2")
7735 (version "0.4.2")
7736 (source
7737 (origin
7738 (method url-fetch)
7739 (uri (pypi-uri "WSGIProxy2" version ".zip"))
7740 (sha256
7741 (base32
7742 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
7743 (build-system python-build-system)
7744 (native-inputs
7745 `(("unzip" ,unzip)
7746 ("python-nose" ,python-nose)
7747 ("python-coverage" ,python-coverage)))
7748 (propagated-inputs
7749 `(("python-six" ,python-six)
7750 ("python-webob" ,python-webob)))
7751 (home-page
7752 "https://github.com/gawel/WSGIProxy2/")
7753 (synopsis "WSGI Proxy with various http client backends")
7754 (description "WSGI turns HTTP requests into WSGI function calls.
7755WSGIProxy turns WSGI function calls into HTTP requests.
7756It also includes code to sign requests and pass private data,
7757and to spawn subprocesses to handle requests.")
7758 (license license:expat)
7759 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
7760
7761(define-public python2-wsgiproxy2
7762 (let ((wsgiproxy2 (package-with-python2
7763 (strip-python2-variant python-wsgiproxy2))))
7764 (package
7765 (inherit wsgiproxy2)
7766 (inputs `(("python2-setuptools" ,python2-setuptools)
7767 ,@(package-inputs wsgiproxy2))))))
bb7518b1
CAW
7768
7769(define-public python-pastedeploy
7770 (package
7771 (name "python-pastedeploy")
7772 (version "1.5.2")
7773 (source
7774 (origin
7775 (method url-fetch)
7776 (uri (pypi-uri "PasteDeploy" version))
7777 (sha256
7778 (base32
7779 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
7780 (build-system python-build-system)
7781 (native-inputs
7782 `(("python-nose" ,python-nose)))
7783 (propagated-inputs
7784 ;; This package uses pkg_resources, part of setuptools, during runtime,
7785 ;; hence why not a native-input.
7786 `(("python-setuptools" ,python-setuptools)))
7787 (home-page "http://pythonpaste.org/deploy/")
7788 (synopsis
7789 "Load, configure, and compose WSGI applications and servers")
7790 (description
7791 "This tool provides code to load WSGI applications and servers from URIs;
7792these URIs can refer to Python Eggs for INI-style configuration files. Paste
7793Script provides commands to serve applications based on this configuration
7794file.")
7795 (license license:expat)))
7796
7797(define-public python2-pastedeploy
7798 (package-with-python2 python-pastedeploy))
1cf53652 7799
c4a7904c
CAW
7800(define-public python-paste
7801 (package
7802 (name "python-paste")
7803 (version "2.0.2")
7804 (source
7805 (origin
7806 (method url-fetch)
7807 (uri (pypi-uri "Paste" version))
7808 (sha256
7809 (base32
7810 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
7811 (patches (search-patches "python-paste-remove-website-test.patch"
7812 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
7813 (build-system python-build-system)
7814 (native-inputs
7815 `(("python-nose" ,python-nose)))
7816 (propagated-inputs
7817 `(;; Uses pkg_resources provided by setuptools internally.
7818 ("python-setuptools" ,python-setuptools)
7819 ("python-six" ,python-six)))
7820 (arguments
7821 '(;; Tests don't pass on Python 3, but work fine on Python 2.
7822 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
7823 ;; but is usable enough for the minimal amount it's used in MediaGoblin
7824 ;; still... things should be better by the next Paste release.)
7825 #:tests? #f))
7826 (home-page "http://pythonpaste.org")
7827 (synopsis
7828 "Python web development tools, focusing on WSGI")
7829 (description
7830 "Paste provides a variety of web development tools and middleware which
7831can be nested together to build web applications. Paste's design closely
7832follows ideas flowing from WSGI (Web Standard Gateway Interface).")
7833 (license license:expat)
7834 (properties `((python2-variant . ,(delay python2-paste))))))
7835
7836(define-public python2-paste
7837 (let ((paste (package-with-python2
7838 (strip-python2-variant python-paste))))
7839 (package
7840 (inherit paste)
7841 (arguments
7842 ;; Tests are back for Python 2!
7843 `(#:tests? #t
7844 ,@(package-arguments paste))))))
7845
a8f20f63
CAW
7846(define-public python-pastescript
7847 (package
7848 (name "python-pastescript")
7849 (version "2.0.2")
7850 (source
7851 (origin
7852 (method url-fetch)
7853 (uri (pypi-uri "PasteScript" version))
7854 (sha256
7855 (base32
7856 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
7857 (build-system python-build-system)
7858 (native-inputs
7859 `(("python-nose" ,python-nose)))
7860 (propagated-inputs
7861 `(;; Uses pkg_resources provided by setuptools internally.
7862 ("python-setuptools" ,python-setuptools)
7863 ("python-paste" ,python-paste)
7864 ("python-pastedeploy" ,python-pastedeploy)))
7865 (home-page "http://pythonpaste.org/script/")
7866 (arguments
7867 '(;; Unfortunately, this requires the latest unittest2,
7868 ;; but that requires traceback2 which requires linecache2 which requires
7869 ;; unittest2. So we're skipping tests for now.
7870 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
7871 ;; so in theory we could get around this situation somehow.)
7872 #:tests? #f))
7873 (synopsis
7874 "Pluggable command line tool for serving web applications and more")
7875 (description
7876 "PasteScript is a plugin-friendly command line tool which provides a
7877variety of features, from launching web applications to bootstrapping project
7878layouts.")
7879 (license license:expat)))
7880
7881(define-public python2-pastescript
7882 (package-with-python2 python-pastescript))
7883
1cf53652
CAW
7884(define-public python-pyquery
7885 (package
7886 (name "python-pyquery")
7887 (version "1.2.11")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (pypi-uri "pyquery" version))
7892 (sha256
7893 (base32
7894 "1ikz1387nsp0pp7mzzr6ip9n5gr67acpap24yn33987v7fkjp0sa"))))
7895 (build-system python-build-system)
7896 (propagated-inputs
7897 `(("python-lxml" ,python-lxml)
7898 ("python-cssselect" ,python-cssselect)))
7899 (home-page "https://github.com/gawel/pyquery")
7900 (synopsis "Make jQuery-like queries on xml documents")
7901 (description "pyquery allows you to make jQuery queries on xml documents.
7902The API is as much as possible the similar to jQuery. pyquery uses lxml for
7903fast xml and html manipulation.")
7904 (license bsd-3)
7905 (properties `((python2-variant . ,(delay python2-pyquery))))))
7906
7907(define-public python2-pyquery
7908 (let ((pyquery (package-with-python2
7909 (strip-python2-variant python-pyquery))))
7910 (package
7911 (inherit pyquery)
7912 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
aa6313d6
CAW
7913
7914(define-public python-webtest
7915 (package
7916 (name "python-webtest")
7917 (version "2.0.20")
7918 (source
7919 (origin
7920 (method url-fetch)
7921 (uri (pypi-uri "WebTest" version))
7922 (sha256
7923 (base32
7924 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
7925 (build-system python-build-system)
7926 (arguments
7927 `(;; Unfortunately we have to disable tests!
7928 ;; This release of WebTest is pinned to python-nose < 1.3,
7929 ;; but older versions of python-nose are plagued with the following
7930 ;; bug(s), which rears its ugly head during test execution:
7931 ;; https://github.com/nose-devs/nose/issues/759
7932 ;; https://github.com/nose-devs/nose/pull/811
7933 #:tests? #f))
7934 ;; Commented out code is no good, but in this case, once tests
7935 ;; are ready to be enabled again, we should put the following
7936 ;; in place:
7937 ;; (native-inputs
7938 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
7939 ;; ; but see above comment
7940 ;; ("python-coverage" ,python-coverage)
7941 ;; ("python-mock" ,python-mock)
7942 ;; ("python-pastedeploy" ,python-pastedeploy)
7943 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
7944 ;; ("python-pyquery" ,python-pyquery)))
7945 (propagated-inputs
7946 `(("python-waitress" ,python-waitress)
7947 ("python-webob" ,python-webob)
7948 ("python-six" ,python-six)
7949 ("python-beautifulsoup4" ,python-beautifulsoup4)))
7950 (home-page "http://webtest.pythonpaste.org/")
7951 (synopsis "Helper to test WSGI applications")
7952 (description "Webtest allows you to test your Python web applications
7953without starting an HTTP server. It supports anything that supports the
7954minimum of WSGI.")
7955 (license license:expat)
7956 (properties `((python2-variant . ,(delay python2-webtest))))))
7957
7958(define-public python2-webtest
7959 (let ((webtest (package-with-python2
7960 (strip-python2-variant python-webtest))))
7961 (package
7962 (inherit webtest)
7963 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7964 ,@(package-native-inputs webtest))))))
4cb122cd
CAW
7965
7966(define-public python-anyjson
7967 (package
7968 (name "python-anyjson")
7969 (version "0.3.3")
7970 (source
7971 (origin
7972 (method url-fetch)
7973 (uri (pypi-uri "anyjson" version))
7974 (sha256
7975 (base32
7976 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7977 (build-system python-build-system)
7978 (arguments
7979 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7980 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7981 ;; whatever) so this transformation needs to be done before the tests
7982 ;; can be run. Maybe we could add a build step to transform beforehand
7983 ;; but it could be annoying/difficult.
7984 ;; We can enable tests for the Python 2 version, though, and do below.
7985 #:tests? #f))
7986 (home-page "http://bitbucket.org/runeh/anyjson/")
7987 (synopsis
7988 "Wraps best available JSON implementation in a common interface")
7989 (description
7990 "Anyjson loads whichever is the fastest JSON module installed
7991and provides a uniform API regardless of which JSON implementation is used.")
7992 (license bsd-3)
7993 (properties `((python2-variant . ,(delay python2-anyjson))))))
7994
7995(define-public python2-anyjson
7996 (let ((anyjson (package-with-python2
7997 (strip-python2-variant python-anyjson))))
7998 (package
7999 (inherit anyjson)
8000 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8001 #:tests? #t
8002 ,@(package-arguments anyjson)))
8003 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8004 ("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8005
8006(define-public python-amqp
8007 (package
8008 (name "python-amqp")
8009 (version "1.4.9")
8010 (source
8011 (origin
8012 (method url-fetch)
8013 (uri (pypi-uri "amqp" version))
8014 (sha256
8015 (base32
8016 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8017 (build-system python-build-system)
8018 (native-inputs
8019 `(("python-nose" ,python-nose)
8020 ("python-mock" ,python-mock)))
8021 (home-page "http://github.com/celery/py-amqp")
8022 (synopsis
8023 "Low-level AMQP client for Python (fork of amqplib)")
8024 (description
8025 "This is a fork of amqplib which was originally written by Barry Pederson.
8026It is maintained by the Celery project, and used by kombu as a pure python
8027alternative when librabbitmq is not available.")
8028 (license lgpl2.1+)
8029 (properties `((python2-variant . ,(delay python2-amqp))))))
8030
8031(define-public python2-amqp
8032 (let ((amqp (package-with-python2
8033 (strip-python2-variant python-amqp))))
8034 (package
8035 (inherit amqp)
8036 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8037 ;; unmaintained. Weirdly, does not do this on the python 3
8038 ;; version?
8039 #:tests? #f
8040 ,@(package-arguments amqp)))
8041 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8042 ,@(package-native-inputs amqp))))))
7d387305
CAW
8043
8044(define-public python-kombu
8045 (package
8046 (name "python-kombu")
8047 (version "3.0.33")
8048 (source
8049 (origin
8050 (method url-fetch)
8051 (uri (pypi-uri "kombu" version))
8052 (sha256
8053 (base32
8054 "16brjx2lgwbj2a37d0pjbfb84nvld6irghmqrs3qfncajp51hgc5"))))
8055 (build-system python-build-system)
8056 (native-inputs
8057 `(("python-mock" ,python-mock)
8058 ("python-nose" ,python-nose)))
8059 (propagated-inputs
8060 `(("python-anyjson" ,python-anyjson)
8061 ("python-amqp" ,python-amqp)))
8062 (home-page "http://kombu.readthedocs.org")
8063 (synopsis "Message passing library for Python")
8064 (description "The aim of Kombu is to make messaging in Python as easy as
8065possible by providing an idiomatic high-level interface for the AMQ protocol,
8066and also provide proven and tested solutions to common messaging problems.
8067AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8068message orientation, queuing, routing, reliability and security, for which the
8069RabbitMQ messaging server is the most popular implementation.")
8070 (license bsd-3)
8071 (properties `((python2-variant . ,(delay python2-kombu))))))
8072
8073(define-public python2-kombu
8074 (let ((kombu (package-with-python2
8075 (strip-python2-variant python-kombu))))
8076 (package
8077 (inherit kombu)
8078 (inputs `(("python2-setuptools" ,python2-setuptools)
8079 ("python2-unittest2" ,python2-unittest2)
8080 ,@(package-inputs kombu))))))
b6f0b9fb
CAW
8081
8082(define-public python-billiard
8083 (package
8084 (name "python-billiard")
8085 (version "3.3.0.22")
8086 (source
8087 (origin
8088 (method url-fetch)
8089 (uri (pypi-uri "billiard" version))
8090 (sha256
8091 (base32
8092 "0zp7h6a58alrb3mwdw61jds07395j4j0mj6iqsb8czrihw9ih5nj"))))
8093 (build-system python-build-system)
8094 (native-inputs
8095 `(("python-nose" ,python-nose)))
8096 (home-page "http://github.com/celery/billiard")
8097 (synopsis
8098 "Python multiprocessing fork with improvements and bugfixes")
8099 (description
8100 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8101multiprocessing package itself is a renamed and updated version of R Oudkerk's
8102pyprocessing package. This standalone variant is intended to be compatible with
8103Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8104 (license bsd-3)
8105 (properties `((python2-variant . ,(delay python2-billiard))))))
8106
8107(define-public python2-billiard
8108 (let ((billiard (package-with-python2
8109 (strip-python2-variant python-billiard))))
8110 (package
8111 (inherit billiard)
8112 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8113 ("python2-unittest2" ,python2-unittest2)
8114 ("python2-mock" ,python2-mock)
8115 ,@(package-native-inputs billiard))))))
22df6419
CAW
8116
8117(define-public python-celery
8118 (package
8119 (name "python-celery")
8120 (version "3.1.20")
8121 (source
8122 (origin
8123 (method url-fetch)
8124 (uri (pypi-uri "celery" version))
8125 (sha256
8126 (base32
8127 "1md6ywg1s0946qyp8ndnsd677wm0yax933h2sb4m3a4j7lf1jbyh"))))
8128 (build-system python-build-system)
8129 (native-inputs
8130 `(("python-nose" ,python-nose)))
a64cbb6f 8131 (inputs
22df6419 8132 `(("python-pytz" ,python-pytz)
a64cbb6f
EF
8133 ("python-amqp" ,python-amqp)
8134 ("python-anyjson" ,python-anyjson)
22df6419
CAW
8135 ("python-billiard" ,python-billiard)
8136 ("python-kombu" ,python-kombu)))
8137 (home-page "http://celeryproject.org")
8138 (synopsis "Distributed Task Queue")
8139 (description "Celery is an asynchronous task queue/job queue based on
8140distributed message passing. It is focused on real-time operation, but
8141supports scheduling as well. The execution units, called tasks, are executed
8142concurrently on a single or more worker servers using multiprocessing,
8143Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8144synchronously (wait until ready).")
8145 (license bsd-3)
8146 (properties `((python2-variant . ,(delay python2-celery))))))
8147
8148(define-public python2-celery
8149 (let ((celery (package-with-python2
8150 (strip-python2-variant python-celery))))
8151 (package
8152 (inherit celery)
8153 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8154 ("python2-unittest2" ,python2-unittest2)
8155 ("python2-mock" ,python2-mock)
8156 ,@(package-native-inputs celery))))))
97e32948
CAW
8157
8158(define-public python-translitcodec
8159 (package
8160 (name "python-translitcodec")
8161 (version "0.4.0")
8162 (source
8163 (origin
8164 (method url-fetch)
8165 (uri (pypi-uri "translitcodec" version))
8166 (sha256
8167 (base32
8168 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8169 (build-system python-build-system)
8170 (arguments
8171 `(#:tests? #f)) ; no tests provided
8172 (home-page
8173 "https://github.com/claudep/translitcodec")
8174 (synopsis
8175 "Unicode to 8-bit charset transliteration codec")
8176 (description
8177 "This package contains codecs for transliterating ISO 10646 texts into
8178best-effort representations using smaller coded character sets (ASCII,
8179ISO 8859, etc.).")
8180 (license license:expat)
8181 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8182
8183(define-public python2-translitcodec
8184 (package
8185 (inherit (package-with-python2
8186 (strip-python2-variant python-translitcodec)))
8187 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0c3b90d4
CAW
8188
8189(define-public python-editor
8190 (package
8191 (name "python-editor")
8192 (version "0.5")
8193 (source
8194 (origin
8195 (method url-fetch)
8196 (uri (pypi-uri "python-editor" version))
8197 (sha256
8198 (base32
8199 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8200 (build-system python-build-system)
8201 (home-page
8202 "https://github.com/fmoo/python-editor")
8203 (synopsis
8204 "Programmatically open an editor, capture the result")
8205 (description
8206 "python-editor is a library that provides the editor module for
8207programmatically interfacing with your system's $EDITOR.")
8208 (license asl2.0)
8209 (properties `((python2-variant . ,(delay python2-editor))))))
8210
8211(define-public python2-editor
8212 (package
8213 (inherit (package-with-python2
8214 (strip-python2-variant python-editor)))
8215 (inputs `(("python2-setuptools" ,python2-setuptools)))))
3276517c
LF
8216
8217(define-public python-sphinxcontrib-programoutput
8218 (package
8219 (name "python-sphinxcontrib-programoutput")
8220 (version "0.8")
8221 (source (origin
8222 (method url-fetch)
8223 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8224 (sha256
8225 (base32
8226 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8227 (build-system python-build-system)
8228 (propagated-inputs
8229 `(("python-docutils" ,python-docutils)
8230 ("python-sphinx" ,python-sphinx)))
8231 (synopsis "Sphinx extension to include program output")
8232 (description "A Sphinx extension to literally insert the output of arbitrary
8233commands into documents, helping you to keep your command examples up to date.")
8234 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8235 (license bsd-2)
8236 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
8237
8238(define-public python2-sphinxcontrib-programoutput
8239 (package
8240 (inherit (package-with-python2
8241 (strip-python2-variant python-sphinxcontrib-programoutput)))
8242 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
548d7165
LF
8243
8244(define-public python-sphinx-repoze-autointerface
8245 (package
8246 (name "python-sphinx-repoze-autointerface")
8247 (version "0.7.1")
8248 (source (origin
8249 (method url-fetch)
8250 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8251 (sha256
8252 (base32
8253 "016mv3wbylw278wl7z33y2liyra8ljp08zq1g0anzadh1an5zvwp"))))
8254 (build-system python-build-system)
8255 (propagated-inputs
8256 `(("python-docutils" ,python-docutils)
8257 ("python-sphinx" ,python-sphinx)
8258 ("python-zope-interface" ,python-zope-interface)))
8259 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8260 (description "This package defines an extension for the Sphinx documentation
8261system. The extension allows generation of API documentation by
8262introspection of @code{zope.interface} instances in code.")
8263 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8264 (license repoze)))
8265
8266(define-public python2-sphinx-repoze-autointerface
8267 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
8268
8269(define-public python-psycopg2
8270 (package
8271 (name "python-psycopg2")
8272 (version "2.6.1")
8273 (source
8274 (origin
8275 (method url-fetch)
8276 (uri (pypi-uri "psycopg2" version))
8277 (sha256
8278 (base32
8279 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8280 (build-system python-build-system)
8281 (arguments
8282 ;; Tests would require a postgresql database "psycopg2_test"
8283 ;; and a running postgresql database management service.
8284 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8285 (inputs
8286 `(("postgresql" ,postgresql))) ; libpq
8287 (home-page "http://initd.org/psycopg/")
8288 (synopsis "Python PostgreSQL adapter")
8289 (description
8290 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8291 (license lgpl3+)
8292 (properties `((python2-variant . ,(delay python2-psycopg2))))))
8293
8294(define-public python2-psycopg2
8295 (package
8296 (inherit (package-with-python2
8297 (strip-python2-variant python-psycopg2)))
8298 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
eed1a61f
LF
8299
8300(define-public python-vobject
8301 (package
8302 (name "python-vobject")
9bed9b15 8303 (version "0.9.2")
eed1a61f
LF
8304 (source (origin
8305 (method url-fetch)
8306 (uri (pypi-uri "vobject" version))
8307 (sha256
8308 (base32
9bed9b15 8309 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f
LF
8310 (build-system python-build-system)
8311 (inputs
8312 `(("python-dateutil-2" ,python-dateutil-2)
8313 ("python-pyicu" ,python-pyicu)))
8314 (synopsis "Parse and generate vCard and vCalendar files")
8315 (description "Vobject is intended to be a full featured Python package for
8316parsing and generating vCard and vCalendar files. Currently, iCalendar files
8317are supported and well tested. vCard 3.0 files are supported, and all data
8318should be imported, but only a few components are understood in a sophisticated
8319way.")
8320 (home-page "http://eventable.github.io/vobject/")
8321 (license asl2.0)
8322 (properties `((python2-variant . ,(delay python2-vobject))))))
8323
8324(define-public python2-vobject
8325 (package
8326 (inherit (package-with-python2
8327 (strip-python2-variant python-vobject)))
8328 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cedac813
LF
8329
8330(define-public python-munkres
8331 (package
8332 (name "python-munkres")
8333 (version "1.0.7")
8334 (source (origin
8335 (method url-fetch)
8336 (uri (pypi-uri "munkres" version))
8337 (sha256
8338 (base32
8339 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
8340 (build-system python-build-system)
8341 (arguments
8342 '(#:tests? #f)) ; no test suite
8343 (home-page "http://software.clapper.org/munkres/")
8344 (synopsis "Implementation of the Munkres algorithm")
8345 (description "The Munkres module provides an implementation of the Munkres
8346algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8347useful for solving the Assignment Problem.")
8348 (license bsd-3)))
8349
8350(define-public python2-munkres
8351 (package-with-python2 python-munkres))
f3b3d78f
LF
8352
8353(define-public python-flask
8354 (package
8355 (name "python-flask")
8356 (version "0.10.1")
8357 (source (origin
8358 (method url-fetch)
8359 (uri (pypi-uri "Flask" version))
8360 (sha256
8361 (base32
8362 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
8363 (build-system python-build-system)
8364 (propagated-inputs
8365 `(("python-itsdangerous" ,python-itsdangerous)
8366 ("python-jinja2" ,python-jinja2)
8367 ("python-werkzeug" ,python-werkzeug)))
8368 (home-page "https://github.com/mitsuhiko/flask/")
8369 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
8370 (description "Flask is a micro web framework based on the Werkzeug toolkit
8371and Jinja2 template engine. It is called a micro framework because it does not
8372presume or force a developer to use a particular tool or library.")
8373 (license bsd-3)
8374 (properties `((python2-variant . ,(delay python2-flask))))))
8375
8376(define-public python2-flask
8377 (package (inherit (package-with-python2
8378 (strip-python2-variant python-flask)))
8379 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
603d665b
LF
8380
8381(define-public python-cookies
8382 (package
8383 (name "python-cookies")
8384 (version "2.2.1")
8385 (source (origin
8386 (method url-fetch)
8387 (uri (pypi-uri "cookies" version))
8388 (sha256
8389 (base32
8390 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
8391 (build-system python-build-system)
8392 (arguments
8393 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
8394 #:tests? #f))
8395 (native-inputs
8396 `(("python-pytest" ,python2-pytest)))
8397 (synopsis "HTTP cookie parser and renderer")
8398 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
8399Python.")
8400 (home-page "https://gitlab.com/sashahart/cookies")
8401 (license license:expat)
8402 (properties `((python2-variant . ,(delay python2-cookies))))))
8403
8404(define-public python2-cookies
8405 (let ((cookies (package-with-python2
8406 (strip-python2-variant python-cookies))))
8407 (package (inherit cookies)
8408 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8409 ,@(package-native-inputs cookies))))))
0efde7d6
LF
8410
8411(define-public python-responses
8412 (package
8413 (name "python-responses")
8414 (version "0.5.1")
8415 (source (origin
8416 (method url-fetch)
8417 (uri (pypi-uri "responses" version))
8418 (sha256
8419 (base32
8420 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
8421 (build-system python-build-system)
8422 (arguments
8423 `(;; Test suite is not distributed:
8424 ;; https://github.com/getsentry/responses/issues/38
8425 #:tests? #f))
8426 (native-inputs
8427 `(("python-cookies" ,python-cookies)
8428 ("python-mock" ,python-mock)))
8429 (propagated-inputs
8430 `(("python-requests" ,python-requests)
8431 ("python-six" ,python-six)))
8432 (home-page "https://github.com/getsentry/responses")
8433 (synopsis "Utility for mocking out the `requests` Python library")
8434 (description "A utility library for mocking out the `requests` Python
8435library.")
8436 (license asl2.0)
8437 (properties `((python2-variant . ,(delay python2-responses))))))
8438
8439(define-public python2-responses
8440 (let ((responses (package-with-python2
8441 (strip-python2-variant python-responses))))
8442 (package (inherit responses)
8443 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8444 ,@(package-native-inputs responses))))))
76b94885
LF
8445
8446(define-public python-pathlib
8447 (package
8448 (name "python-pathlib")
8449 (version "1.0.1")
8450 (source (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "pathlib" version))
8453 (sha256
8454 (base32
8455 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8456 (build-system python-build-system)
8457 (arguments
8458 `(#:phases
8459 (modify-phases %standard-phases
8460 (replace 'check
8461 (lambda _ (zero? (system* "python" "./test_pathlib.py")))))))
8462 (home-page "https://pathlib.readthedocs.org/")
8463 (synopsis "Object-oriented filesystem paths")
8464 (description "Pathlib offers a set of classes to handle filesystem paths.
8465It offers the following advantages over using string objects:
8466
8467@enumerate
8468@item No more cumbersome use of os and os.path functions. Everything can
8469be done easily through operators, attribute accesses, and method calls.
8470@item Embodies the semantics of different path types. For example,
8471comparing Windows paths ignores casing.
8472@item Well-defined semantics, eliminating any inconsistencies or
8473ambiguities (forward vs. backward slashes, etc.).
8474@end enumerate\n")
8475 (license license:expat)))
8476
8477(define-public python2-pathlib
8478 (package-with-python2 python-pathlib))
25a7db0a
LF
8479
8480(define-public python-jellyfish
8481 (package
8482 (name "python-jellyfish")
8483 (version "0.5.3")
8484 (source (origin
8485 (method url-fetch)
8486 (uri (pypi-uri "jellyfish" version))
8487 (sha256
8488 (base32
8489 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
8490 (build-system python-build-system)
8491 (native-inputs
8492 `(("python-pytest" ,python-pytest)))
8493 (home-page "https://github.com/jamesturk/jellyfish")
8494 (synopsis "Approximate and phonetic matching of strings")
8495 (description "Jellyfish uses a variety of string comparison and phonetic
8496encoding algorithms to do fuzzy string matching.")
8497 (license bsd-2)
8498 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8499
8500(define-public python2-jellyfish
8501 (let ((jellyfish (package-with-python2
8502 (strip-python2-variant python-jellyfish))))
8503 (package (inherit jellyfish)
8504 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8505 ("python2-unicodecsv" ,python2-unicodecsv)
8506 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
8507
8508(define-public python2-unicodecsv
8509 (package
8510 (name "python2-unicodecsv")
8511 (version "0.14.1")
8512 (source (origin
8513 (method url-fetch)
8514 ;; The test suite is not included in the PyPi release.
8515 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8516 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8517 "archive/" version ".tar.gz"))
8518 (file-name (string-append name "-" version ".tar.gz"))
8519 (sha256
8520 (base32
8521 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8522 (build-system python-build-system)
8523 (arguments
8524 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8525 #:python ,python-2))
8526 (native-inputs
8527 `(("python2-setuptools" ,python2-setuptools)
8528 ("python2-unittest2" ,python2-unittest2)))
8529 (home-page "https://github.com/jdunck/python-unicodecsv")
8530 (synopsis "Unicode CSV module for Python 2")
8531 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8532module, adding support for Unicode strings.")
8533 (license bsd-2)))
064503aa
LF
8534
8535(define-public python-rarfile
8536 (package
8537 (name "python-rarfile")
8538 (version "2.7")
8539 (source (origin
8540 (method url-fetch)
8541 (uri (pypi-uri "rarfile" version))
8542 (sha256
8543 (base32
8544 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
8545 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 8546 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
8547 (build-system python-build-system)
8548 (arguments
8549 '(#:phases
8550 (modify-phases %standard-phases
8551 (replace 'check
8552 ;; Many tests fail, but the installation proceeds.
8553 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8554 (native-inputs
8555 `(("which" ,which))) ; required for tests
8556 (propagated-inputs
8557 `(("libarchive" ,libarchive)))
8558 (home-page "https://github.com/markokr/rarfile")
8559 (synopsis "RAR archive reader for Python")
8560 (description "This is Python module for RAR archive reading. The interface
8561is made as zipfile like as possible.")
8562 (license isc)))
8563
8564(define-public python2-rarfile
8565 (package-with-python2 python-rarfile))
daeeea71
CM
8566
8567(define-public python-magic
8568 (package
8569 (name "python-magic")
8570 (version "0.4.3")
8571 (source
8572 (origin
8573 (method url-fetch)
8574 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
8575 version ".tar.gz"))
8576 (sha256
8577 (base32
8578 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
8579 (file-name (string-append name "-" version "-checkout"))))
8580 (build-system python-build-system)
8581 (arguments
8582 ;; The tests are unreliable, so don't run them. The tests fail
8583 ;; under Python3 because they were written for Python2 and
8584 ;; contain import statements that do not work in Python3. One of
8585 ;; the tests fails under Python2 because its assertions are
8586 ;; overly stringent; it relies on comparing output strings which
8587 ;; are brittle and can change depending on the version of
8588 ;; libmagic being used and the system on which the test is
8589 ;; running. In my case, under GuixSD 0.10.0, only one test
8590 ;; failed, and it seems to have failed only because the version
8591 ;; of libmagic that is packaged in Guix outputs a slightly
8592 ;; different (but not wrong) string than the one that the test
8593 ;; expected.
8594 '(#:tests? #f
8595 #:phases (modify-phases %standard-phases
8596 ;; Replace a specific method call with a hard-coded
8597 ;; path to the necessary libmagic.so file in the
8598 ;; store. If we don't do this, then the method call
8599 ;; will fail to find the libmagic.so file, which in
8600 ;; turn will cause any application using
8601 ;; python-magic to fail.
8602 (add-before 'build 'hard-code-path-to-libmagic
8603 (lambda* (#:key inputs #:allow-other-keys)
8604 (let ((file (assoc-ref inputs "file")))
8605 (substitute* "magic.py"
8606 (("ctypes.util.find_library\\('magic'\\)")
8607 (string-append "'" file "/lib/libmagic.so'")))
8608 #t))))))
8609 (native-inputs
8610 `(("python-setuptools" ,python-setuptools)))
8611 (inputs
8612 ;; python-magic needs to be able to find libmagic.so.
8613 `(("file" ,file)))
8614 (home-page "https://github.com/ahupp/python-magic")
8615 (synopsis "File type identification using libmagic")
8616 (description
8617 "This module uses ctypes to access the libmagic file type
8618identification library. It makes use of the local magic database and
8619supports both textual and MIME-type output. Note that this module and
8620the python-file module both provide a \"magic.py\" file; these two
8621modules, which are different and were developed separately, both serve
8622the same purpose: to provide Python bindings for libmagic.")
8623 (license license:expat)))
8624
8625(define-public python2-magic
8626 (package-with-python2 python-magic))
12af303f
CM
8627
8628(define-public python2-s3cmd
8629 (package
8630 (name "python2-s3cmd")
8631 (version "1.6.1")
8632 (source
8633 (origin
8634 (method url-fetch)
8635 (uri (string-append "mirror://sourceforge/s3tools/"
8636 "s3cmd-" version ".tar.gz"))
8637 (sha256
8638 (base32
8639 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8640 (build-system python-build-system)
8641 (arguments
8642 ;; s3cmd is written for python2 only and contains no tests.
8643 `(#:python ,python-2
8644 #:tests? #f))
8645 (native-inputs
8646 `(("python2-setuptools" ,python2-setuptools)))
8647 (inputs
8648 `(("python2-dateutil" ,python2-dateutil)
8649 ;; The python-file package also provides a magic.py module.
8650 ;; This is an unfortunate state of affairs; however, s3cmd
8651 ;; fails to install if it cannot find specifically the
8652 ;; python-magic package. Thus we include it, instead of using
8653 ;; python-file. Ironically, s3cmd sometimes works better
8654 ;; without libmagic bindings at all:
8655 ;; https://github.com/s3tools/s3cmd/issues/198
8656 ("python2-magic" ,python2-magic)))
8657 (home-page "http://s3tools.org/s3cmd")
8658 (synopsis "Command line tool for S3-compatible storage services")
8659 (description
8660 "S3cmd is a command line tool for uploading, retrieving and managing data
8661in storage services that are compatible with the Amazon Simple Storage
8662Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8663GnuPG encryption, and more. It also supports management of Amazon's
8664CloudFront content delivery network.")
8665 (license gpl2+)))
4323a5f0
AE
8666
8667(define-public python-pkgconfig
8668 (package
8669 (name "python-pkgconfig")
8670 (version "1.1.0")
8671 (source
8672 (origin
8673 (method url-fetch)
8674 (uri (pypi-uri "pkgconfig" version))
8675 (sha256
8676 (base32
8677 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8678 (build-system python-build-system)
8679 (native-inputs
8680 `(("python-nose" ,python-nose)
8681 ("python-setuptools" ,python-setuptools)))
8682 (inputs
8683 `(("pkg-config" ,pkg-config)))
8684 (arguments
8685 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8686 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8687 #:tests? #f
8688 ;; Prevent creation of the egg. This works around
8689 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
8690 #:configure-flags '("--single-version-externally-managed" "--root=/")
8691 ;; Hard-code the path to pkg-config.
8692 #:phases
8693 (modify-phases %standard-phases
8694 (add-before
8695 'build 'patch
8696 (lambda _
8697 (substitute* "pkgconfig/pkgconfig.py"
8698 (("cmd = 'pkg-config")
8699 (string-append "cmd = '" (which "pkg-config"))))
8700 #t)))))
8701 (home-page "http://github.com/matze/pkgconfig")
8702 (synopsis "Python interface for pkg-config")
8703 (description "This module provides a Python interface to pkg-config. It
8704can be used to find all pkg-config packages, check if a package exists,
8705check if a package meets certain version requirements, query CFLAGS and
8706LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 8707 (license license:expat)))
4323a5f0
AE
8708
8709(define-public python2-pkgconfig
8710 (package-with-python2 python-pkgconfig))
8711
8e451885
AE
8712(define-public python-cysignals
8713 (package
8714 (name "python-cysignals")
8715 (version "1.1.0")
8716 (source
8717 (origin
8718 (method url-fetch)
8719 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8720 (sha256
8721 (base32
8722 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8723 (build-system python-build-system)
8724 (native-inputs
8725 `(("python-cython" ,python-cython)
8726 ("python-setuptools" ,python-setuptools)
8727 ("python-sphinx" ,python-sphinx)))
8728 (inputs
8729 `(("pari-gp" ,pari-gp)))
8730 (arguments
8731 `(#:modules ((guix build python-build-system)
8732 ((guix build gnu-build-system) #:prefix gnu:)
8733 (guix build utils))
8734 ;; FIXME: Tests are executed after installation and currently fail
8735 ;; when not installing into standard locations; the author is working
8736 ;; on a fix.
8737 #:tests? #f
8738 #:phases
8739 (modify-phases %standard-phases
8740 (add-before
8741 'build 'configure
8742 (assoc-ref gnu:%standard-phases 'configure)))))
8743 (home-page
8744 "https://github.com/sagemath/cysignals")
8745 (synopsis
8746 "Handling of interrupts and signals for Cython")
8747 (description
8748 "The cysignals package provides mechanisms to handle interrupts (and
8749other signals and errors) in Cython code, using two related approaches,
8750for mixed Cython/Python code or external C libraries and pure Cython code,
8751respectively.")
8752 (license lgpl3+)))
8753
8754(define-public python2-cysignals
8755 (package-with-python2 python-cysignals))
8756
63bcec71
DM
8757(define-public python2-shedskin
8758 (package
8759 (name "python2-shedskin")
8760 (version "0.9.4")
8761 (source
8762 (origin
8763 (method url-fetch)
8764 (uri (string-append "https://github.com/shedskin/shedskin/"
8765 "releases/download/v" version
8766 "/shedskin-" version ".tgz"))
8767 (sha256
8768 (base32
8769 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8770 (build-system python-build-system)
8771 (arguments
8772 `(#:python ,python-2
8773 #:phases (modify-phases %standard-phases
8774 (add-after 'unpack 'fix-resulting-include-libs
8775 (lambda* (#:key inputs #:allow-other-keys)
8776 (let ((libgc (assoc-ref inputs "libgc"))
8777 (pcre (assoc-ref inputs "pcre")))
8778 (substitute* "shedskin/makefile.py"
8779 (("variable == 'CCFLAGS':[ ]*")
8780 (string-append "variable == 'CCFLAGS':\n"
8781 " line += ' -I " pcre "/include"
8782 " -I " libgc "/include'"))
8783 (("variable == 'LFLAGS':[ ]*")
8784 (string-append "variable == 'LFLAGS':\n"
8785 " line += ' -L" pcre "/lib"
8786 " -L " libgc "/lib'")))
8787 #t))))))
8788 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
8789 (inputs `(("pcre" ,pcre)
8790 ("libgc" ,libgc)))
8791 (home-page "https://shedskin.github.io/")
8792 (synopsis "Experimental Python-2 to C++ Compiler")
8793 (description (string-append "This is an experimental compiler for a subset of
8794Python. It generates C++ code and a Makefile."))
8795 (license (list gpl3 bsd-3 license:expat))))
88bb4197
LG
8796
8797(define-public python2-rope
8798 (package
8799 (name "python2-rope")
8800 (version "0.10.3")
8801 (source
8802 (origin
8803 (method url-fetch)
8804 (uri (pypi-uri "rope" version))
8805 (sha256
8806 (base32
8807 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8808 (arguments
8809 ;; Rope is currently python-2 only.
8810 ;; https://github.com/python-rope/rope/issues/57
8811 `(#:python ,python-2))
8812 (build-system python-build-system)
8813 (native-inputs
8814 `(("python2-unittest2" ,python2-unittest2)
8815 ("python2-setuptools" ,python2-setuptools)))
8816 (home-page "https://github.com/python-rope/rope")
8817 (synopsis "Refactoring library for Python")
8818 (description "Rope is a refactoring library for Python. It facilitates
8819the renaming, moving and extracting of attributes, functions, modules, fields
8820and parameters in Python 2 source code. These refactorings can also be applied
8821to occurences in strings and comments.")
8822 (license gpl2)))
6ba8ca17
8823
8824(define-public python-py3status
8825 (package
8826 (name "python-py3status")
8827 (version "2.9")
8828 (source
8829 (origin
8830 (method url-fetch)
8831 (uri (pypi-uri "py3status" version))
8832 (sha256
8833 (base32
8834 "09y7h8rjay5kzwk5akq7f5f9wqnvjkxhivck04hdc8ny1nw3vqzp"))))
8835 (build-system python-build-system)
8836 (native-inputs
8837 `(("python-setuptools" ,python-setuptools)))
8838 (home-page "https://github.com/ultrabug/py3status")
8839 (synopsis "Extensible i3status wrapper written in Python")
8840 (description "py3status is an i3status wrapper which extends i3status
8841functionality in a modular way, allowing you to extend your panel with your
8842own code, responding to click events and updating clock every second.")
8843 (license bsd-3)))
b8fdbca3
HG
8844
8845(define-public python-tblib
8846 (package
8847 (name "python-tblib")
8848 (version "1.3.0")
8849 (source (origin
8850 (method url-fetch)
8851 (uri (pypi-uri "tblib" version))
8852 (sha256 (base32
8853 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
8854 (build-system python-build-system)
8855 (arguments
8856 `(#:phases
8857 (modify-phases %standard-phases
8858 (replace 'check
8859 (lambda _
8860 ;; Upstream runs tests after installation and the package itself
8861 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8862 ;; found.
8863 (setenv "PYTHONPATH"
8864 (string-append (getcwd) "/build/lib:"
8865 (getenv "PYTHONPATH")))
8866 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8867 (native-inputs
8868 `(("python-pytest" ,python-pytest)
8869 ("python-setuptools" ,python-setuptools)
8870 ("python-six" ,python-six)))
8871 (home-page "https://github.com/ionelmc/python-tblib")
8872 (synopsis "Traceback serialization library")
8873 (description
8874 "Traceback serialization allows you to:
8875
8876@enumerate
8877@item Pickle tracebacks and raise exceptions with pickled tracebacks in
8878different processes. This allows better error handling when running code over
8879multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8880
8881@item Parse traceback strings and raise with the parsed tracebacks.
8882@end itemize")
8883 (license bsd-3)))
8884
8885(define-public python2-tblib
8886 (package-with-python2 python-tblib))
1a024de4
HG
8887
8888(define-public python-sqlparse
8889 (package
8890 (name "python-sqlparse")
8891 (version "0.1.19")
8892 (source (origin
8893 (method url-fetch)
8894 (uri (pypi-uri "sqlparse" version))
8895 (sha256
8896 (base32
8897 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
8898 (build-system python-build-system)
8899 (arguments
8900 `(#:phases
8901 (modify-phases %standard-phases
8902 (replace 'check
8903 (lambda* _
8904 ;; setup.py-integrated 2to3 only affects the build files, but
8905 ;; py.test is using the source files. So we need to convert them
8906 ;; manually.
8907 (when (zero? (system* "python3"))
8908 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
8909 (zero? (system* "py.test")))))))
8910 (native-inputs
8911 `(("python-pytest" ,python-pytest)
8912 ("python-setuptools" ,python-setuptools)))
8913 (home-page "https://github.com/andialbrecht/sqlparse")
8914 (synopsis "Non-validating SQL parser")
8915 (description "Sqlparse is a non-validating SQL parser for Python. It
8916provides support for parsing, splitting and formatting SQL statements.")
8917 (license bsd-3)))
8918
8919(define-public python2-sqlparse
8920 (package-with-python2 python-sqlparse))
68b9d242
SB
8921
8922(define-public python-greenlet
8923 (package
8924 (name "python-greenlet")
8925 (version "0.4.9")
8926 (source (origin
8927 (method url-fetch)
8928 (uri (pypi-uri "greenlet" version))
8929 (sha256
8930 (base32
8931 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
8932 (build-system python-build-system)
8933 (native-inputs
8934 `(("python-setuptools" ,python-setuptools)))
8935 (home-page "https://greenlet.readthedocs.io/")
8936 (synopsis "Lightweight in-process concurrent programming")
8937 (description
8938 "Greenlet package is a spin-off of Stackless, a version of CPython
8939that supports micro-threads called \"tasklets\". Tasklets run
8940pseudo-concurrently (typically in a single or a few OS-level threads) and
8941are synchronized with data exchanges on \"channels\".")
8942 (license (list psfl license:expat))))
8943
8944(define-public python2-greenlet
8945 (package-with-python2 python-greenlet))
d79a343b
SB
8946
8947(define-public python-gevent
8948 (package
8949 (name "python-gevent")
8950 (version "1.1.1")
8951 (source (origin
8952 (method url-fetch)
8953 (uri (pypi-uri "gevent" version))
8954 (sha256
8955 (base32
8956 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
8957 (modules '((guix build utils)))
8958 (snippet
8959 '(begin
8960 ;; unbunding libev and c-ares
8961 (for-each delete-file-recursively '("libev" "c-ares"))
8962 ;; fixing testsuite
8963 (call-with-output-file "greentest/__init__.py" noop)
8964 (substitute* "greentest/testrunner.py"
8965 (("import util") "from . import util")
8966 (("from util import log") "from .util import log"))))))
8967 (build-system python-build-system)
8968 (propagated-inputs
8969 `(("python-greenlet" ,python-greenlet)))
8970 (native-inputs
8971 `(("python-setuptools" ,python-setuptools)
8972 ("python-six" ,python-six)))
8973 (inputs
8974 `(("c-ares" ,c-ares)
8975 ("libev" ,libev)))
8976 (home-page "http://www.gevent.org/")
8977 (synopsis "Coroutine-based network library")
8978 (description
8979 "gevent is a coroutine-based Python networking library that uses greenlet
8980to provide a high-level synchronous API on top of the libev event loop.")
8981 (license license:expat)))
8982
8983(define-public python2-gevent
8984 (package-with-python2 python-gevent))
da3aeeb6
SB
8985
8986(define-public python-twisted
8987 (package
8988 (name "python-twisted")
8989 (version "16.2.0")
8990 (source (origin
8991 (method url-fetch)
8992 (uri (list (pypi-uri "Twisted" version ".tar.bz2") ; 404
8993 (string-append
8994 "https://pypi.io/packages/source/T/Twisted/"
8995 "Twisted-" version ".tar.bz2")))
8996 (sha256
8997 (base32
8998 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
8999 (build-system python-build-system)
9000 (native-inputs
9001 `(("python-setuptools" ,python-setuptools)
9002 ("python-zope-interface" ,python-zope-interface)))
9003 (home-page "https://twistedmatrix.com/")
9004 (synopsis "Asynchronous networking framework written in Python")
9005 (description
9006 "Twisted is an extensible framework for Python programming, with special
9007focus on event-based network programming and multiprotocol integration.")
9008 (license license:expat)))
9009
9010(define-public python2-twisted
9011 (package-with-python2 python-twisted))
d0b6fed6
DM
9012
9013(define-public python-ply
9014 (package
9015 (name "python-ply")
9016 (version "3.8")
9017 (source
9018 (origin
9019 (method url-fetch)
9020 (uri (string-append
9021 "https://pypi.python.org/packages/"
9022 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9023 "/ply-" version ".tar.gz"))
9024 (sha256
9025 (base32
9026 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9027 (build-system python-build-system)
9028 (home-page "http://www.dabeaz.com/ply/")
9029 (synopsis "Python Lex & Yacc")
9030 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9031It uses LR parsing and does extensive error checking.")
9032 (license bsd-3)
9033 (properties `((python2-variant . ,(delay python2-ply))))))
9034
9035(define-public python2-ply
9036 (package
9037 (inherit (package-with-python2
9038 (strip-python2-variant python-ply)))
9039 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))