gnu: Add python-requests-toolbelt.
[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>
da6dd842 3;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
03411993 4;;; Copyright © 2013, 2014, 2015 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>
ad320b20 10;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
f4de5b3b 11;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2fc5f186 13;;; Copyright © 2015 David Thompson <davet@gnu.org>
89b2e0b0 14;;; Copyright © 2015 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>
383af6b0 17;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
03f964a5 19;;; Copyright © 2015 Chris Marusich <cmmarusich@gmail.com>
a01b6da7
NK
20;;;
21;;; This file is part of GNU Guix.
22;;;
23;;; GNU Guix is free software; you can redistribute it and/or modify it
24;;; under the terms of the GNU General Public License as published by
25;;; the Free Software Foundation; either version 3 of the License, or (at
26;;; your option) any later version.
27;;;
28;;; GNU Guix is distributed in the hope that it will be useful, but
29;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31;;; GNU General Public License for more details.
32;;;
33;;; You should have received a copy of the GNU General Public License
34;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
1ffa7090 36(define-module (gnu packages python)
011b18c3 37 #:use-module ((guix licenses)
45203542 38 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
b8050e71 39 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
cd6e5189 40 isc psfl public-domain x11-style zpl2.1))
bd3fa666 41 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
3fdc99da 42 #:use-module (gnu packages)
89b2e0b0 43 #:use-module (gnu packages attr)
d96034ed 44 #:use-module (gnu packages backup)
1ffa7090 45 #:use-module (gnu packages compression)
4ed20663 46 #:use-module (gnu packages databases)
5e1c9367 47 #:use-module (gnu packages file)
4ed20663 48 #:use-module (gnu packages fontutils)
4ed20663
AE
49 #:use-module (gnu packages gcc)
50 #:use-module (gnu packages ghostscript)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gtk)
421a80a2 53 #:use-module (gnu packages icu4c)
c937562e 54 #:use-module (gnu packages image)
4ed20663 55 #:use-module (gnu packages imagemagick)
b10ab723 56 #:use-module (gnu packages libffi)
89b2e0b0 57 #:use-module (gnu packages linux)
0da98533 58 #:use-module (gnu packages maths)
4ed20663 59 #:use-module (gnu packages multiprecision)
45203542 60 #:use-module (gnu packages networking)
be7134bf 61 #:use-module (gnu packages ncurses)
c9b1b4f9 62 #:use-module (gnu packages pcre)
4ed20663 63 #:use-module (gnu packages perl)
b10ab723 64 #:use-module (gnu packages pkg-config)
4ed20663 65 #:use-module (gnu packages readline)
c9b1b4f9 66 #:use-module (gnu packages statistics)
1c65314c
FB
67 #:use-module (gnu packages texlive)
68 #:use-module (gnu packages texinfo)
cc2b77df 69 #:use-module (gnu packages tls)
8d12be1e 70 #:use-module (gnu packages web)
ce0614dd 71 #:use-module (gnu packages base)
26b307e2 72 #:use-module (gnu packages xml)
6fa14469 73 #:use-module (gnu packages xorg)
4ed20663 74 #:use-module (gnu packages zip)
afa181ff 75 #:use-module (gnu packages tcl)
a01b6da7
NK
76 #:use-module (guix packages)
77 #:use-module (guix download)
ea5456c8 78 #:use-module (guix git-download)
11bb85a1 79 #:use-module (guix utils)
acc26ff1 80 #:use-module (guix build-system gnu)
d8c4998f 81 #:use-module (guix build-system cmake)
898238b9 82 #:use-module (guix build-system python)
1c65314c
FB
83 #:use-module (guix build-system trivial)
84 #:use-module (srfi srfi-1))
a01b6da7 85
b24d1cfc 86(define-public python-2
a01b6da7
NK
87 (package
88 (name "python")
ff6f33cf 89 (version "2.7.10")
a01b6da7
NK
90 (source
91 (origin
92 (method url-fetch)
9b43a0ff 93 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
94 version "/Python-" version ".tar.xz"))
95 (sha256
96 (base32
6a20289d 97 "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw"))
dedc8320
LC
98 (patches (map search-patch
99 '("python-2.7-search-paths.patch"
9820a6d4 100 "python-2-deterministic-build-info.patch"
dedc8320 101 "python-2.7-source-date-epoch.patch")))))
02f0c3b2
LC
102 (outputs '("out"
103 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 104 (build-system gnu-build-system)
3fdc99da 105 (arguments
af807dea 106 `(#:tests? #f
ff6f33cf
ED
107 ;; 268 tests OK.
108 ;; 103 tests failed:
109 ;; test_distutils test_shutil test_signal test_site test_slice
110 ;; test_smtplib test_smtpnet test_socket test_socketserver
111 ;; test_softspace test_sort test_spwd test_sqlite test_ssl
112 ;; test_startfile test_stat test_str test_strftime test_string
113 ;; test_stringprep test_strop test_strptime test_strtod test_struct
114 ;; test_structmembers test_structseq test_subprocess test_sunau
115 ;; test_sunaudiodev test_sundry test_symtable test_syntax test_sys
116 ;; test_sys_setprofile test_sys_settrace test_sysconfig test_tarfile
117 ;; test_tcl test_telnetlib test_tempfile test_textwrap test_thread
118 ;; test_threaded_import test_threadedtempfile test_threading
119 ;; test_threading_local test_threadsignals test_time test_timeit
120 ;; test_timeout test_tk test_tokenize test_tools test_trace
121 ;; test_traceback test_transformer test_ttk_guionly test_ttk_textonly
122 ;; test_tuple test_typechecks test_ucn test_unary
123 ;; test_undocumented_details test_unicode test_unicode_file
124 ;; test_unicodedata test_univnewlines test_univnewlines2k test_unpack
125 ;; test_urllib test_urllib2 test_urllib2_localnet test_urllib2net
126 ;; test_urllibnet test_urlparse test_userdict test_userlist
127 ;; test_userstring test_uu test_uuid test_wait3 test_wait4
128 ;; test_warnings test_wave test_weakref test_weakset test_whichdb
129 ;; test_winreg test_winsound test_with test_wsgiref test_xdrlib
130 ;; test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc
131 ;; test_xpickle test_xrange test_zipfile test_zipfile64
132 ;; test_zipimport test_zipimport_support test_zlib
133 ;; 30 tests skipped:
134 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
135 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
136 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_crypt
137 ;; test_curses test_dl test_gdb test_gl test_idle test_imageop
138 ;; test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos
139 ;; test_macostools test_msilib test_nis test_ossaudiodev
140 ;; test_scriptpackages
141 ;; 6 skips unexpected on linux2:
142 ;; test_bsddb test_bsddb3 test_crypt test_gdb test_idle test_ioctl
143 ;; One of the typical errors:
144 ;; test_unicode
145 ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No
146 ;; such file or directory
af807dea 147 #:test-target "test"
3fdc99da 148 #:configure-flags
6a20289d
LC
149 (list "--enable-shared" ;allow embedding
150 "--with-system-ffi" ;build ctypes
151 (string-append "LDFLAGS=-Wl,-rpath="
152 (assoc-ref %outputs "out") "/lib"))
fd982732 153
d2cc9c7c
LC
154 #:modules ((ice-9 ftw) (ice-9 match)
155 (guix build utils) (guix build gnu-build-system))
fd982732 156 #:phases
46472ecd
MW
157 (modify-phases %standard-phases
158 (add-before
159 'configure 'patch-lib-shells
160 (lambda _
161 ;; Filter for existing files, since some may not exist in all
162 ;; versions of python that are built with this recipe.
163 (substitute* (filter file-exists?
164 '("Lib/subprocess.py"
165 "Lib/popen2.py"
166 "Lib/distutils/tests/test_spawn.py"
167 "Lib/test/test_subprocess.py"))
168 (("/bin/sh") (which "sh")))
dedc8320
LC
169
170 ;; Use zero as the timestamp in .pyc files so that builds are
171 ;; deterministic. TODO: Remove it when this variable is set in
172 ;; gnu-build-system.scm.
a665996f 173 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 174 #t))
5b4e2791
LC
175 (add-before 'configure 'do-not-record-configure-flags
176 (lambda* (#:key configure-flags #:allow-other-keys)
177 ;; Remove configure flags from the installed '_sysconfigdata.py'
178 ;; and 'Makefile' so we don't end up keeping references to the
179 ;; build tools.
180 ;;
181 ;; Preserve at least '--with-system-ffi' since otherwise the
182 ;; thing tries to build libffi, fails, and we end up with a
183 ;; Python that lacks ctypes.
184 (substitute* "configure"
185 (("^CONFIG_ARGS=.*$")
186 (format #f "CONFIG_ARGS='~a'\n"
187 (if (member "--with-system-ffi" configure-flags)
188 "--with-system-ffi"
189 ""))))
190 #t))
46472ecd
MW
191 (add-before
192 'check 'pre-check
193 (lambda _
194 ;; 'Lib/test/test_site.py' needs a valid $HOME
195 (setenv "HOME" (getcwd))
196 #t))
197 (add-after
198 'unpack 'set-source-file-times-to-1980
199 ;; XXX One of the tests uses a ZIP library to pack up some of the
200 ;; source tree, and fails with "ZIP does not support timestamps
201 ;; before 1980". Work around this by setting the file times in the
202 ;; source tree to sometime in early 1980.
203 (lambda _
204 (let ((circa-1980 (* 10 366 24 60 60)))
205 (ftw "." (lambda (file stat flag)
206 (utime file circa-1980 circa-1980)
207 #t))
02f0c3b2
LC
208 #t)))
209 (add-after 'install 'move-tk-inter
210 (lambda* (#:key outputs #:allow-other-keys)
211 ;; When Tkinter support is built move it to a separate output so
212 ;; that the main output doesn't contain a reference to Tcl/Tk.
213 (let ((out (assoc-ref outputs "out"))
214 (tk (assoc-ref outputs "tk")))
215 (when tk
216 (match (find-files out "tkinter.*\\.so")
217 ((tkinter.so)
218 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
219 ;; want it under TK/lib/pythonX.Y/site-packages.
220 (let* ((len (string-length out))
221 (target (string-append
222 tk "/"
223 (string-drop
224 (dirname (dirname tkinter.so))
225 len)
226 "/site-packages")))
227 (install-file tkinter.so target)
228 (delete-file tkinter.so)))))
229 #t))))))
a01b6da7 230 (inputs
3fdc99da
CR
231 `(("bzip2" ,bzip2)
232 ("gdbm" ,gdbm)
b10ab723 233 ("libffi" ,libffi) ; for ctypes
b88e1b0a 234 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 235 ("openssl" ,openssl)
3fdc99da 236 ("readline" ,readline)
afa181ff
LC
237 ("zlib" ,zlib)
238 ("tcl" ,tcl)
239 ("tk" ,tk))) ; for tkinter
b10ab723
CR
240 (native-inputs
241 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
242 (native-search-paths
243 (list (search-path-specification
244 (variable "PYTHONPATH")
af070955 245 (files '("lib/python2.7/site-packages")))))
a01b6da7 246 (home-page "http://python.org")
afa181ff 247 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
248 (description
249 "Python is a remarkably powerful dynamic programming language that
250is used in a wide variety of application domains. Some of its key
251distinguishing features include: clear, readable syntax; strong
252introspection capabilities; intuitive object orientation; natural
253expression of procedural code; full modularity, supporting hierarchical
254packages; exception-based error handling; and very high level dynamic
255data types.")
256 (license psfl)))
acc26ff1 257
b24d1cfc
AE
258(define-public python
259 (package (inherit python-2)
08c04509 260 (version "3.4.3")
717003e3
LC
261 (source (origin
262 (method url-fetch)
263 (uri (string-append "https://www.python.org/ftp/python/"
264 version "/Python-" version ".tar.xz"))
6a20289d
LC
265 (patches (map search-patch
266 '("python-fix-tests.patch"
267 ;; XXX Try removing this patch for python > 3.4.3
268 "python-disable-ssl-test.patch"
9820a6d4 269 "python-3-deterministic-build-info.patch"
6a20289d 270 "python-3-search-paths.patch")))
717003e3
LC
271 (patch-flags '("-p0"))
272 (sha256
273 (base32
08c04509 274 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
1f434457
MW
275 (arguments (substitute-keyword-arguments (package-arguments python-2)
276 ((#:tests? _) #t)))
1aebc0cb
AE
277 (native-search-paths
278 (list (search-path-specification
279 (variable "PYTHONPATH")
0e05d01e
SB
280 (files (list (string-append "lib/python"
281 (version-major+minor version)
282 "/site-packages"))))))))
f26a77ff 283
95288fcc
LC
284;; Minimal variants of Python, mostly used to break the cycle between Tk and
285;; Python (Tk -> libxcb -> Python.)
286
287(define-public python2-minimal
288 (package (inherit python-2)
289 (name "python-minimal")
02f0c3b2 290 (outputs '("out"))
95288fcc
LC
291 (arguments
292 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
293 ((#:configure-flags cf)
294 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
295 (inputs '()))) ;none of the optional dependencies
296
297(define-public python-minimal
898238b9 298 (package (inherit python)
95288fcc 299 (name "python-minimal")
02f0c3b2 300 (outputs '("out"))
95288fcc
LC
301 (arguments
302 (substitute-keyword-arguments (package-arguments python)
c5a05e31
LC
303 ((#:configure-flags cf)
304 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
305
306 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
307 ;; zlib is required by 'zipimport', used by pip.
308 (inputs `(("openssl" ,openssl)
309 ("zlib" ,zlib)))))
310
311(define* (wrap-python3 python #:optional (name "python-wrapper"))
898238b9 312 (package (inherit python)
95288fcc 313 (name name)
898238b9
AE
314 (source #f)
315 (build-system trivial-build-system)
02f0c3b2 316 (outputs '("out"))
3c0f2329 317 (propagated-inputs `(("python" ,python)))
898238b9
AE
318 (arguments
319 `(#:modules ((guix build utils))
320 #:builder
321 (begin
322 (use-modules (guix build utils))
323 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
324 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
325 (mkdir-p bin)
326 (for-each
327 (lambda (old new)
328 (symlink (string-append python old)
329 (string-append bin "/" new)))
330 `("python3", "pydoc3", "idle3")
331 `("python", "pydoc", "idle"))))))
0d56e3e1
LC
332 (synopsis "Wrapper for the Python 3 commands")
333 (description
334 "This package provides wrappers for the commands of Python@tie{}3.x such
335that they can be invoked under their usual name---e.g., @command{python}
336instead of @command{python3}.")))
337
95288fcc
LC
338(define-public python-wrapper (wrap-python3 python))
339(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 340
aaf625b8
RW
341(define-public python-psutil
342 (package
343 (name "python-psutil")
f56777be 344 (version "3.3.0")
aaf625b8
RW
345 (source
346 (origin
347 (method url-fetch)
f56777be 348 (uri (pypi-uri "psutil" version))
aaf625b8
RW
349 (sha256
350 (base32
f56777be 351 "11bd1555vf2ibjnmqf64im5cp55vcqfq45ccinm9ll3bs68na6s2"))))
aaf625b8
RW
352 (build-system python-build-system)
353 (native-inputs
354 `(("python-setuptools" ,python-setuptools)))
355 (home-page "https://pypi.python.org/pypi/psutil/")
356 (synopsis "Library for retrieving information on running processes")
357 (description
358 "psutil (Python system and process utilities) is a library for retrieving
359information on running processes and system utilization (CPU, memory, disks,
360network) in Python. It is useful mainly for system monitoring, profiling and
361limiting process resources and management of running processes. It implements
362many functionalities offered by command line tools such as: ps, top, lsof,
363netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
364pidof, tty, taskset, pmap.")
365 (license bsd-3)))
366
367(define-public python2-psutil
368 (package-with-python2 python-psutil))
898238b9 369
f9da1d8a
ED
370(define-public python-passlib
371 (package
372 (name "python-passlib")
690e8c66 373 (version "1.6.5")
f9da1d8a
ED
374 (source
375 (origin
376 (method url-fetch)
690e8c66 377 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
378 (sha256
379 (base32
690e8c66 380 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
381 (build-system python-build-system)
382 (native-inputs
383 `(("python-nose" ,python-nose)
384 ("python-setuptools" ,python-setuptools)))
385 (inputs
386 `(("python-py-bcrypt" ,python-py-bcrypt)))
387 (arguments
388 `(#:phases
389 (alist-cons-before
390 'check 'set-PYTHON_EGG_CACHE
391 ;; some tests require access to "$HOME/.cython"
392 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
393 %standard-phases)))
394 (home-page "https://bitbucket.org/ecollins/passlib")
395 (synopsis
396 "Comprehensive password hashing framework")
397 (description
398 "Passlib is a password hashing library for Python 2 & 3, which provides
399cross-platform implementations of over 30 password hashing algorithms, as well
400as a framework for managing existing password hashes. It's designed to be
401useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
402to providing full-strength password hashing for multi-user application.")
403 (license bsd-3)))
404
405(define-public python2-passlib
406 (package-with-python2 python-passlib))
407
feb0d9c3
ED
408(define-public python-py-bcrypt
409 (package
410 (name "python-py-bcrypt")
411 (version "0.4")
412 (source
413 (origin
414 (method url-fetch)
415 (uri (string-append
416 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
417 version
418 ".tar.gz"))
419 (sha256
420 (base32
421 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
422 (build-system python-build-system)
423 (native-inputs
424 `(("python-setuptools" ,python-setuptools)))
425 (home-page "https://code.google.com/p/py-bcrypt")
426 (synopsis
427 "Bcrypt password hashing and key derivation")
428 (description
429 "A python wrapper of OpenBSD's Blowfish password hashing code. This
430system hashes passwords using a version of Bruce Schneier's Blowfish block
431cipher with modifications designed to raise the cost of off-line password
432cracking and frustrate fast hardware implementation. The computation cost of
433the algorithm is parametised, so it can be increased as computers get faster.
434The intent is to make a compromise of a password database less likely to
435result in an attacker gaining knowledge of the plaintext passwords (e.g. using
436John the Ripper).")
437 ;; "sha2.c" is under BSD-3;
438 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
439 ;; the rest is under ISC.
440 (license (list isc bsd-3 bsd-4))))
441
442(define-public python2-py-bcrypt
443 (package-with-python2 python-py-bcrypt))
444
445
429fdea1
ED
446(define-public python-paramiko
447 (package
448 (name "python-paramiko")
449 (version "1.15.2")
450 (source
451 (origin
452 (method url-fetch)
453 (uri (string-append
454 "https://pypi.python.org/packages/source/p/paramiko/paramiko-"
455 version
456 ".tar.gz"))
457 (sha256
458 (base32
459 "0mbfzm9zlrz6mla9xakrm8wkll3x035f9rj3c5pbgjzfldqscmjg"))))
460 (build-system python-build-system)
461 (native-inputs
462 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
463 (propagated-inputs
464 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 465 (inputs
a3fc12da 466 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
467 (home-page "http://www.paramiko.org/")
468 (synopsis "SSHv2 protocol library")
469 (description "Paramiko is a python implementation of the SSHv2 protocol,
470providing both client and server functionality. While it leverages a Python C
471extension for low level cryptography (PyCrypto), Paramiko itself is a pure
472Python interface around SSH networking concepts.")
473 (license lgpl2.1+)))
474
475(define-public python2-paramiko
476 (package-with-python2 python-paramiko))
477
478
de73dbf6
ED
479(define-public python-httplib2
480 (package
481 (name "python-httplib2")
482 (version "0.9.1")
483 (source
484 (origin
485 (method url-fetch)
486 (uri (string-append
487 "https://pypi.python.org/packages/source/h/httplib2/httplib2-"
488 version
489 ".tar.gz"))
490 (sha256
491 (base32
492 "1xc3clbrf77r0600kja71j7hk1218sjiq0gfmb8vjdajka8kjqxw"))))
493 (build-system python-build-system)
494 (native-inputs
495 `(("python-setuptools" ,python-setuptools)))
496 (home-page
497 "https://github.com/jcgregorio/httplib2")
498 (synopsis "Comprehensive HTTP client library")
499 (description
500 "A comprehensive HTTP client library supporting many features left out of
501other HTTP libraries.")
502 (license license:expat)))
503
504(define-public python2-httplib2
505 (package-with-python2 python-httplib2))
506
67039875
ED
507(define-public python-ecdsa
508 (package
509 (name "python-ecdsa")
510 (version "0.13")
511 (source
512 (origin
513 (method url-fetch)
514 (uri (string-append
515 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
516 version
517 ".tar.gz"))
518 (sha256
519 (base32
520 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
521 (build-system python-build-system)
522 (native-inputs
523 `(("python-setuptools" ,python-setuptools)))
524 (inputs
525 `(("openssl" ,openssl)))
526 (home-page
527 "http://github.com/warner/python-ecdsa")
528 (synopsis
529 "ECDSA cryptographic signature library (pure python)")
530 (description
531 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
532Curve Digital Signature Algorithm), implemented purely in Python. With this
533library, you can quickly create keypairs (signing key and verifying key), sign
534messages, and verify the signatures. The keys and signatures are very short,
535making them easy to handle and incorporate into other protocols.")
536 (license license:expat)))
537
538(define-public python2-ecdsa
539 (package-with-python2 python-ecdsa))
540
52323f32
ED
541(define-public python-ccm
542 (package
543 (name "python-ccm")
544 (version "2.0.4.1")
545 (source
546 (origin
547 (method url-fetch)
548 (uri (string-append
549 "https://pypi.python.org/packages/source/c/ccm/ccm-"
550 version
551 ".tar.gz"))
552 (sha256
553 (base32
554 "199jw221albs2iv6xczczq88fxnh0aw8hzmys8qkbzkd99dssng9"))))
555 (build-system python-build-system)
556 (native-inputs
557 `(("python-setuptools" ,python-setuptools)))
558 (inputs
559 `(("python-pyyaml" ,python-pyyaml)
560 ("python-six" ,python-six)))
561 (home-page "https://github.com/pcmanus/ccm")
562 (synopsis "Cassandra Cluster Manager")
563 (description "A script/library to create, launch and remove an Apache
564Cassandra cluster on localhost.")
565 (license asl2.0)))
566
567(define-public python2-ccm
568 (package-with-python2 python-ccm))
569
89114f39 570(define-public python-pytz
acc26ff1 571 (package
89114f39 572 (name "python-pytz")
b01bbbcf 573 (version "2015.7")
acc26ff1
CR
574 (source
575 (origin
576 (method url-fetch)
b01bbbcf 577 (uri (pypi-uri "pytz" version))
acc26ff1
CR
578 (sha256
579 (base32
b01bbbcf 580 "1spgdfp1ssya7v3kww7zp71xpj437skpqazcvqr3kr1p1brnw9lr"))))
acc26ff1 581 (build-system python-build-system)
8498b8cf 582 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 583 (home-page "http://pythonhosted.org/pytz")
9e771e3b 584 (synopsis "Python timezone library")
acc26ff1
CR
585 (description
586 "This library allows accurate and cross platform timezone calculations
587using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 588 (license license:expat)))
5ace6e2f 589
89114f39 590(define-public python2-pytz
11bb85a1 591 (package-with-python2 python-pytz))
89114f39 592
fc50e9c6 593
89114f39 594(define-public python-babel
5ace6e2f 595 (package
89114f39 596 (name "python-babel")
b850a6d8 597 (version "2.1.1")
5ace6e2f
CR
598 (source
599 (origin
600 (method url-fetch)
b850a6d8 601 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
602 (sha256
603 (base32
b850a6d8 604 "0j2jgfzj1a2m39pm2qc36fzr7a6p5ybwndi0xdzhi2p8zw7dbdkz"))))
5ace6e2f
CR
605 (build-system python-build-system)
606 (inputs
e1804763
AE
607 `(("python-pytz" ,python-pytz)
608 ("python-setuptools" ,python-setuptools)))
8498b8cf 609 (arguments `(#:tests? #f)) ; no test target
e1804763 610 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
611 (synopsis
612 "Tools for internationalizing Python applications")
613 (description
614 "Babel is composed of two major parts:
615- tools to build and work with gettext message catalogs
616- a Python interface to the CLDR (Common Locale Data Repository), providing
617access to various locale display names, localized number and date formatting,
618etc. ")
619 (license bsd-3)))
89114f39
AE
620
621(define-public python2-babel
11bb85a1 622 (package-with-python2 python-babel))
73adf220 623
ed377cc6
RW
624(define-public python2-backport-ssl-match-hostname
625 (package
626 (name "python2-backport-ssl-match-hostname")
627 (version "3.4.0.2")
628 (source
629 (origin
630 (method url-fetch)
631 (uri (string-append
632 "https://pypi.python.org/packages/source/b/"
633 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
634 version ".tar.gz"))
635 (sha256
636 (base32
637 "1bnn47ipvhy49n0m50v27lp4xj6sqdkdw676ypd7pawsn1zhwh87"))))
638 (build-system python-build-system)
639 (arguments `(#:python ,python-2))
640 (inputs
641 `(("python2-setuptools" ,python2-setuptools)))
642 (home-page "https://pypi.python.org/pypi/backports.ssl_match_hostname")
643 (synopsis "Backport of ssl.match_hostname() function from Python 3.4")
644 (description
645 "This backport brings the ssl.match_hostname() function to users of
646earlier versions of Python. The function checks the hostname in the
647certificate returned by the server to which a connection has been established,
648and verifies that it matches the intended target hostname.")
649 (license psfl)))
650
ef5cbf9b
RW
651(define-public python-h5py
652 (package
653 (name "python-h5py")
654 (version "2.4.0")
655 (source
656 (origin
657 (method url-fetch)
658 (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-"
659 version ".tar.gz"))
660 (sha256
661 (base32
662 "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps"))))
663 (build-system python-build-system)
797e1401
RW
664 (arguments
665 `(#:tests? #f ; no test target
666 #:phases
667 (modify-phases %standard-phases
668 (add-after 'unpack 'fix-hdf5-paths
669 (lambda* (#:key inputs #:allow-other-keys)
670 (let ((prefix (assoc-ref inputs "hdf5")))
671 (substitute* "setup_build.py"
672 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
673 (string-append "['" prefix "/lib" "']"))
674 (("'/opt/local/include', '/usr/local/include'")
675 (string-append "'" prefix "/include" "'")))
676 (substitute* "setup_configure.py"
677 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
678 (string-append "['" prefix "/lib" "']")))
679 #t))))))
3c4010b1
RW
680 (propagated-inputs
681 `(("python-numpy" ,python-numpy)))
ef5cbf9b 682 (inputs
3c4010b1 683 `(("hdf5" ,hdf5)))
ef5cbf9b 684 (native-inputs
3c4010b1 685 `(("python-cython" ,python-cython)))
ef5cbf9b
RW
686 (home-page "http://www.h5py.org/")
687 (synopsis "Read and write HDF5 files from Python")
688 (description
689 "The h5py package provides both a high- and low-level interface to the
690HDF5 library from Python. The low-level interface is intended to be a
691complete wrapping of the HDF5 API, while the high-level component supports
692access to HDF5 files, datasets and groups using established Python and NumPy
693concepts.")
694 (license bsd-3)))
695
696(define-public python2-h5py
697 (let ((h5py (package-with-python2 python-h5py)))
698 (package (inherit h5py)
3c4010b1 699 (propagated-inputs
ef5cbf9b
RW
700 `(("python2-numpy" ,python2-numpy)
701 ,@(alist-delete
702 "python-numpy"
3c4010b1 703 (package-propagated-inputs h5py)))))))
ef5cbf9b 704
c1448c69
EB
705(define-public python-lockfile
706 (package
707 (name "python-lockfile")
708 (version "0.9.1")
709 (source
710 (origin
711 (method url-fetch)
712 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
713 "lockfile-" version ".tar.gz"))
714 (sha256
715 (base32
716 "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
717 (build-system python-build-system)
718 (arguments '(#:test-target "check"))
719 (home-page "http://code.google.com/p/pylockfile/")
720 (synopsis "Platform-independent file locking module")
721 (description
722 "The lockfile package exports a LockFile class which provides a simple
723API for locking files.")
bd3fa666 724 (license license:expat)))
c1448c69
EB
725
726(define-public python2-lockfile
727 (package-with-python2 python-lockfile))
728
5a1a4bf6
EB
729(define-public python-mock
730 (package
731 (name "python-mock")
732 (version "1.0.1")
733 (source
734 (origin
735 (method url-fetch)
736 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
737 "mock-" version ".tar.gz"))
738 (sha256
739 (base32
740 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
741 (build-system python-build-system)
742 (arguments '(#:test-target "check"))
07af3e5e 743 (home-page "http://code.google.com/p/mock/")
9e771e3b 744 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
745 (description
746 "Mock is a library for testing in Python. It allows you to replace parts
747of your system under test with mock objects and make assertions about how they
748have been used.")
bd3fa666 749 (license license:expat)))
5a1a4bf6
EB
750
751(define-public python2-mock
752 (package-with-python2 python-mock))
753
fc50e9c6 754
73adf220
AE
755(define-public python-setuptools
756 (package
757 (name "python-setuptools")
62a9a23b 758 (version "18.3.1")
73adf220
AE
759 (source
760 (origin
761 (method url-fetch)
762 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
763 version ".tar.gz"))
764 (sha256
765 (base32
62a9a23b 766 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 767 (build-system python-build-system)
d3d656c5
AE
768 ;; FIXME: Tests require pytest, which itself relies on setuptools.
769 ;; One could bootstrap with an internal untested setuptools.
73adf220 770 (arguments
824af8ca 771 `(#:tests? #f))
73adf220
AE
772 (home-page "https://pypi.python.org/pypi/setuptools")
773 (synopsis
774 "Library designed to facilitate packaging Python projects")
775 (description
776 "Setuptools is a fully-featured, stable library designed to facilitate
777packaging Python projects, where packaging includes:
778Python package and module definitions,
779distribution package metadata,
780test hooks,
781project installation,
782platform-specific details,
783Python 3 support.")
784 (license psfl)))
785
786(define-public python2-setuptools
787 (package-with-python2 python-setuptools))
fc50e9c6
AE
788
789
cafc3f5a
EB
790(define-public python-pycrypto
791 (package
792 (name "python-pycrypto")
793 (version "2.6.1")
794 (source
795 (origin
796 (method url-fetch)
797 (uri (string-append "https://pypi.python.org/packages/source/p/"
798 "pycrypto/pycrypto-" version ".tar.gz"))
799 (sha256
800 (base32
801 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
802 (build-system python-build-system)
803 (native-inputs
804 `(("python-setuptools" ,python-setuptools)))
805 (inputs
806 `(("python" ,python)
807 ("gmp" ,gmp)))
808 (arguments
809 `(#:phases
810 (alist-cons-before
811 'build 'set-build-env
812 ;; pycrypto runs an autoconf configure script behind the scenes
813 (lambda _
814 (setenv "CONFIG_SHELL" (which "bash")))
815 %standard-phases)))
816 (home-page "http://www.pycrypto.org/")
817 (synopsis "Cryptographic modules for Python")
818 (description
819 "Pycrypto is a collection of both secure hash functions (such as SHA256
820and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 821etc.). The package is structured to make adding new modules easy.")
cafc3f5a
EB
822 (license public-domain)))
823
345f0611 824(define-public python2-pycrypto
1c0059da
EF
825 (let ((pycrypto (package-with-python2 python-pycrypto)))
826 (package (inherit pycrypto)
827 (inputs
828 `(("python" ,python-2)
829 ,@(alist-delete
830 "python"
831 (package-inputs pycrypto)))))))
345f0611 832
cafc3f5a
EB
833(define-public python-keyring
834 (package
835 (name "python-keyring")
664e6c3a 836 (version "5.7.1")
cafc3f5a
EB
837 (source
838 (origin
839 (method url-fetch)
664e6c3a 840 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
841 (sha256
842 (base32
664e6c3a 843 "1h7a1r9ick7wdd0xb5p63413nvjadna2xawrsvmklsl5ddhm5wrx"))))
cafc3f5a
EB
844 (build-system python-build-system)
845 (native-inputs
664e6c3a
EF
846 `(("python-setuptools" ,python-setuptools)
847 ("python-setuptools-scm" ,python-setuptools-scm)
cafc3f5a
EB
848 ("python-mock" ,python-mock)))
849 (inputs
850 `(("python-pycrypto" ,python-pycrypto)))
851 (arguments
664e6c3a 852 `(#:tests? #f)) ;TODO: tests require pytest
cafc3f5a
EB
853 (home-page "http://bitbucket.org/kang/python-keyring-lib")
854 (synopsis "Store and access your passwords safely")
855 (description
856 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 857service from python. It can be used in any application that needs safe
cafc3f5a
EB
858password storage.")
859 ;; "MIT" and PSF dual license
860 (license x11)))
861
d7af1069 862(define-public python2-keyring
44e30a76
EF
863 (let ((keyring (package-with-python2 python-keyring)))
864 (package (inherit keyring)
865 (inputs
866 `(("python2-pycrypto" ,python2-pycrypto))))))
d7af1069 867
a480bc41
EB
868(define-public python-six
869 (package
870 (name "python-six")
b6ab89ef 871 (version "1.10.0")
a480bc41
EB
872 (source
873 (origin
874 (method url-fetch)
b6ab89ef 875 (uri (pypi-uri "six" version))
a480bc41
EB
876 (sha256
877 (base32
b6ab89ef 878 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
879 (build-system python-build-system)
880 (inputs
881 `(("python-setuptools" ,python-setuptools)))
882 (home-page "http://pypi.python.org/pypi/six/")
883 (synopsis "Python 2 and 3 compatibility utilities")
884 (description
35b9e423 885 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
886functions for smoothing over the differences between the Python versions with
887the goal of writing Python code that is compatible on both Python versions.
35b9e423 888Six supports every Python version since 2.5. It is contained in only one
a480bc41
EB
889Python file, so it can be easily copied into your project.")
890 (license x11)))
891
0c20025c
AE
892(define-public python2-six
893 (package-with-python2 python-six))
894
cafc3f5a
EB
895(define-public python-dateutil-2
896 (package
897 (name "python-dateutil")
c2a9c1c0 898 (version "2.4.2")
cafc3f5a
EB
899 (source
900 (origin
901 (method url-fetch)
902 (uri (string-append "https://pypi.python.org/packages/source/p/"
903 name "/" name "-" version ".tar.gz"))
904 (sha256
905 (base32
c2a9c1c0 906 "0ggbm2z72p0nwjqgvpw8s5bqzwayqiqv2iws0x2a605m3mf4959y"))))
cafc3f5a
EB
907 (build-system python-build-system)
908 (inputs
909 `(("python-setuptools" ,python-setuptools)
910 ("python-six" ,python-six)))
911 (home-page "http://labix.org/python-dateutil")
912 (synopsis "Extensions to the standard datetime module")
913 (description
914 "The dateutil module provides powerful extensions to the standard
915datetime module, available in Python 2.3+.")
916 (license bsd-3)))
917
918(define-public python2-dateutil-2
919 (package-with-python2 python-dateutil-2))
920
fc50e9c6
AE
921(define-public python-dateutil
922 (package
923 (name "python-dateutil")
924 (version "1.5") ; last version for python < 3
925 (source
926 (origin
927 (method url-fetch)
cafc3f5a
EB
928 (uri (string-append "http://labix.org/download/python-dateutil/"
929 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
930 (sha256
931 (base32
932 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
933 (build-system python-build-system)
934 (inputs
935 `(("python-setuptools" ,python-setuptools)))
936 (home-page "http://labix.org/python-dateutil")
cafc3f5a 937 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
938 (description
939 "The dateutil module provides powerful extensions to the standard
940datetime module, available in Python 2.3+.")
941 (license psfl)))
942
943(define-public python2-dateutil
944 (package-with-python2 python-dateutil))
1d08c01f 945
cafc3f5a
EB
946(define-public python-parsedatetime
947 (package
948 (name "python-parsedatetime")
4df1e30d 949 (version "1.5")
cafc3f5a
EB
950 (source
951 (origin
952 (method url-fetch)
953 (uri (string-append "https://pypi.python.org/packages/source/p/"
954 "parsedatetime/parsedatetime-" version ".tar.gz"))
955 (sha256
956 (base32
4df1e30d 957 "1as0mm4ql3z0324nc9bys2s1ngh507i317p16b79rx86wlmvx9ix"))))
cafc3f5a
EB
958 (build-system python-build-system)
959 (native-inputs
960 `(("python-setuptools" ,python-setuptools)))
cafc3f5a
EB
961 (home-page "http://github.com/bear/parsedatetime/")
962 (synopsis
963 "Parse human-readable date/time text")
964 (description
e881752c 965 "Parse human-readable date/time text.")
cafc3f5a
EB
966 (license asl2.0)))
967
38b8f9b2
LF
968(define-public python2-parsedatetime
969 (package-with-python2 python-parsedatetime))
970
d072efcb
RW
971(define-public python-pandas
972 (package
973 (name "python-pandas")
974 (version "0.16.0")
975 (source
976 (origin
977 (method url-fetch)
978 (uri (string-append "https://pypi.python.org/packages/source/p/"
979 "pandas/pandas-" version ".tar.gz"))
980 (sha256
981 (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0"))))
982 (build-system python-build-system)
983 (arguments
984 `(;; Three tests fail:
985 ;; - test_read_google
986 ;; - test_read_yahoo
987 ;; - test_month_range_union_tz_dateutil
988 #:tests? #f))
989 (propagated-inputs
990 `(("python-numpy" ,python-numpy)
991 ("python-pytz" ,python-pytz)
992 ("python-dateutil" ,python-dateutil-2)))
993 (native-inputs
994 `(("python-nose" ,python-nose)
995 ("python-setuptools" ,python-setuptools)))
996 (home-page "http://pandas.pydata.org")
997 (synopsis "Data structures for data analysis, time series, and statistics")
998 (description
999 "Pandas is a Python package providing fast, flexible, and expressive data
1000structures designed to make working with structured (tabular,
1001multidimensional, potentially heterogeneous) and time series data both easy
1002and intuitive. It aims to be the fundamental high-level building block for
1003doing practical, real world data analysis in Python.")
1004 (license bsd-3)))
1005
1006(define-public python2-pandas
3cbe7d5e
FB
1007 (let ((pandas (package-with-python2 python-pandas)))
1008 (package (inherit pandas)
1009 (propagated-inputs
1010 `(("python2-numpy" ,python2-numpy)
1011 ,@(alist-delete "python-numpy"
1012 (package-propagated-inputs pandas)))))))
d072efcb 1013
cafc3f5a
EB
1014(define-public python-tzlocal
1015 (package
1016 (name "python-tzlocal")
1017 (version "1.1.1")
1018 (source
1019 (origin
1020 (method url-fetch)
1021 (uri (string-append "https://pypi.python.org/packages/source/t/"
1022 "tzlocal/tzlocal-" version ".zip"))
1023 (sha256
1024 (base32
1025 "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9"))))
1026 (build-system python-build-system)
1027 (native-inputs
1028 `(("unzip" ,unzip)
1029 ("python-setuptools" ,python-setuptools)))
1030 (inputs `(("python-pytz" ,python-pytz)))
1031 (arguments
1032 `(#:phases
1033 (alist-replace
1034 'unpack
1035 (lambda _
1036 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
1037 "/bin/unzip"))
1038 (source (assoc-ref %build-inputs "source")))
1039 (and (zero? (system* unzip source))
1040 (chdir (string-append "tzlocal-" ,version)))))
1041 %standard-phases)))
1042 (home-page "https://github.com/regebro/tzlocal")
1043 (synopsis
35b9e423 1044 "Local timezone information for Python")
cafc3f5a
EB
1045 (description
1046 "Tzlocal returns a tzinfo object with the local timezone information.
1047This module attempts to fix a glaring hole in pytz, that there is no way to
1048get the local timezone information, unless you know the zoneinfo name, and
1049under several distributions that's hard or impossible to figure out.")
1050 (license cc0)))
1051
be7134bf
RW
1052(define-public python-pysam
1053 (package
1054 (name "python-pysam")
1055 (version "0.8.1")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-"
1060 version ".tar.gz"))
1061 (sha256
1062 (base32
1063 "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459"))))
1064 (build-system python-build-system)
1065 (arguments
1066 `(#:tests? #f ; tests are excluded in the manifest
1067 #:phases
1068 (alist-cons-before
1069 'build 'set-flags
1070 (lambda _
1071 (setenv "LDFLAGS" "-lncurses")
1072 (setenv "CFLAGS" "-D_CURSES_LIB=1"))
1073 %standard-phases)))
1074 (inputs
1075 `(("python-cython" ,python-cython)
1076 ("python-setuptools" ,python-setuptools)
1077 ("ncurses" ,ncurses)
1078 ("zlib" ,zlib)))
1079 (home-page "https://github.com/pysam-developers/pysam")
1080 (synopsis "Python bindings to the SAMtools C API")
1081 (description
1082 "Pysam is a Python module for reading and manipulating files in the
1083SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It
1084also includes an interface for tabix.")
bd3fa666 1085 (license license:expat)))
be7134bf
RW
1086
1087(define-public python2-pysam
1088 (package-with-python2 python-pysam))
1d08c01f
AE
1089
1090(define-public python2-pysqlite
1091 (package
1092 (name "python2-pysqlite")
7a03af70 1093 (version "2.6.3a") ; see below
1d08c01f
AE
1094 (source
1095 (origin
1096 (method url-fetch)
7a03af70
LC
1097 ;; During the switch from code.google.com to pypi.python.org, the 2.6.3
1098 ;; tarball was modified, but the version number was kept:
1099 ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>.
1100 ;; Here we want to refer to the pypi-hosted 2.6.3 tarball.
1101 (uri (string-append
1102 "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-"
1103 "2.6.3" ".tar.gz"))
1d08c01f
AE
1104 (sha256
1105 (base32
7a03af70 1106 "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y"))))
1d08c01f
AE
1107 (build-system python-build-system)
1108 (inputs
1109 `(("sqlite" ,sqlite)))
1110 (arguments
1111 `(#:python ,python-2 ; incompatible with Python 3
1112 #:tests? #f)) ; no test target
7a03af70
LC
1113 (home-page "https://pypi.python.org/pypi/pysqlite")
1114 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1115 (description
1116 "Pysqlite provides SQLite bindings for Python that comply to the
1117Database API 2.0T.")
ed0cdf83 1118 (license license:zlib)))
1d08c01f 1119
2875caf5
AE
1120
1121(define-public python2-mechanize
1122 (package
1123 (name "python2-mechanize")
1124 (version "0.2.5")
1125 (source
1126 (origin
1127 (method url-fetch)
1128 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1129 version ".tar.gz"))
1130 (sha256
1131 (base32
1132 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1133 (build-system python-build-system)
1134 (inputs
1135 `(("python2-setuptools" ,python2-setuptools)))
1136 (arguments
1137 `(#:python ,python-2 ; apparently incompatible with Python 3
1138 #:tests? #f))
1139 ;; test fails with message
1140 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1141 ;; (python-3.3.2) or
1142 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1143 ;; (python-2.7.5).
1144 ;; The source code is from March 2011 and probably not up-to-date
1145 ;; with respect to python unit tests.
1146 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1147 (synopsis
1148 "Stateful programmatic web browsing in Python")
1149 (description
1150 "Mechanize implements stateful programmatic web browsing in Python,
1151after Andy Lester’s Perl module WWW::Mechanize.")
166191b3 1152 (license (non-copyleft "file://COPYING"
e881752c 1153 "See COPYING in the distribution."))))
2875caf5 1154
0352532e
AE
1155
1156(define-public python-simplejson
1157 (package
1158 (name "python-simplejson")
1159 (version "3.3.0")
1160 (source
1161 (origin
1162 (method url-fetch)
1163 (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-"
1164 version ".tar.gz"))
1165 (sha256
1166 (base32
1167 "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks"))))
1168 (build-system python-build-system)
1169 (home-page "http://simplejson.readthedocs.org/en/latest/")
1170 (synopsis
1171 "Json library for Python")
1172 (description
e881752c
AK
1173 "JSON (JavaScript Object Notation) is a subset of JavaScript
1174syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1175format.
0352532e
AE
1176
1177Simplejson exposes an API familiar to users of the standard library marshal
1178and pickle modules. It is the externally maintained version of the json
1179library contained in Python 2.6, but maintains compatibility with Python 2.5
1180and (currently) has significant performance advantages, even without using
1181the optional C extension for speedups. Simplejson is also supported on
1182Python 3.3+.")
1183 (license x11)))
1184
1185(define-public python2-simplejson
1186 (package-with-python2 python-simplejson))
421a80a2
AE
1187
1188
1189(define-public python2-pyicu
1190 (package
1191 (name "python2-pyicu")
569ac046 1192 (version "1.8")
421a80a2
AE
1193 (source
1194 (origin
1195 (method url-fetch)
1196 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1197 version ".tar.gz"))
1198 (sha256
1199 (base32
569ac046 1200 "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw"))))
421a80a2
AE
1201 (build-system python-build-system)
1202 (inputs
1203 `(("icu4c" ,icu4c)))
1204 (arguments
1205 `(#:python ,python-2 ; Python 3 works also, but needs special care for
1206 ; linking with libpython3.3m
1207 #:tests? #f)) ; no check target
1208 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1209 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1210 (description
1211 "PyICU is a python extension wrapping the ICU C++ API.")
1212 (license x11)))
cc20a22a
LC
1213
1214(define-public python2-dogtail
1215 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1216 ;; spaces in indentation" with Python 3.
1217 (package
1218 (name "python2-dogtail")
1219 (version "0.8.2")
1220 (source (origin
1221 (method url-fetch)
1222 (uri (string-append
1223 "https://fedorahosted.org/released/dogtail/dogtail-"
1224 version ".tar.gz"))
1225 (sha256
1226 (base32
1227 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1228 (build-system python-build-system)
1229 (arguments `(#:python ,python-2
1230 #:tests? #f)) ; invalid command "test"
1231 (home-page "https://fedorahosted.org/dogtail/")
1232 (synopsis "GUI test tool and automation framework written in ​Python")
1233 (description
35b9e423 1234 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1235It uses Accessibility (a11y) technologies to communicate with desktop
1236applications. dogtail scripts are written in Python and executed like any
1237other Python program.")
1238 (license gpl2+)))
515e6878 1239
011b18c3
LC
1240(define-public python2-empy
1241 (package
1242 (name "python2-empy")
1243 (version "3.3")
1244 (source (origin
1245 (method url-fetch)
1246 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1247 version ".tar.gz"))
1248 (sha256
1249 (base32
1250 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1251 (build-system python-build-system)
1252 (arguments
1253 `(#:python ,python-2
1254 #:phases (alist-replace
1255 'check
1256 (lambda _
1257 (zero? (system* "./test.sh")))
1258 %standard-phases)))
1259 (home-page "http://www.alcyone.com/software/empy/")
1260 (synopsis "Templating system for Python")
1261 (description
1262 "EmPy is a system for embedding Python expressions and statements in
1263template text; it takes an EmPy source file, processes it, and produces
1264output. This is accomplished via expansions, which are special signals to the
1cd4027c 1265EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1266EmPy can expand arbitrary Python expressions and statements in this way, as
1267well as a variety of special forms. Textual data not explicitly delimited in
1268this way is sent unaffected to the output, allowing Python to be used in
1269effect as a markup language. Also supported are callbacks via hooks,
1270recording and playback via diversions, and dynamic, chainable filters. The
1271system is highly configurable via command line options and embedded
1272commands.")
1273 (license lgpl2.1+)))
1274
8deeda0c
LC
1275(define-public python2-element-tree
1276 (package
1277 (name "python2-element-tree")
1278 (version "1.2.6")
1279 (source (origin
1280 (method url-fetch)
1281 (uri (string-append
1282 "http://effbot.org/media/downloads/elementtree-"
1283 version "-20050316.tar.gz"))
1284 (sha256
1285 (base32
1286 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1287 (build-system python-build-system)
1288 (arguments
1289 `(#:python ,python-2 ; seems to be part of Python 3
1290 #:tests? #f)) ; no 'test' sub-command
1291 (synopsis "Toolkit for XML processing in Python")
1292 (description
1293 "ElementTree is a Python library supporting lightweight XML processing.")
1294 (home-page "http://effbot.org/zone/element-index.htm")
1295 (license (x11-style "http://docs.python.org/2/license.html"
1296 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
12970.9.0 THROUGH 1.2\"."))))
1298
1299(define-public python2-pybugz
1300 (package
1301 (name "python2-pybugz")
1302 (version "0.6.11")
1303 (source (origin
1304 (method url-fetch)
1305 (uri (string-append
1306 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1307 version ".tar.gz"))
1308 (sha256
1309 (base32
6f194a1e
LC
1310 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1311 (patches (map search-patch
1312 (list "pybugz-stty.patch"
1313 "pybugz-encode-error.patch")))))
8deeda0c
LC
1314 (build-system python-build-system)
1315 (arguments
1316 `(#:python ,python-2 ; SyntaxError with Python 3
1317 #:tests? #f)) ; no 'test' sub-command
1318 (inputs `(("element-tree" ,python2-element-tree)))
1319 (synopsis "Python and command-line interface to Bugzilla")
1320 (description
1321 "PyBugz is a Python library and command-line tool to query the Bugzilla
1322bug tracking system. It is meant as an aid to speed up interaction with the
1323bug tracker.")
1324 (home-page "http://www.liquidx.net/pybugz/")
1325 (license gpl2)))
1326
a480bc41
EB
1327(define-public python-enum34
1328 (package
1329 (name "python-enum34")
1330 (version "1.0")
1331 (source
1332 (origin
1333 (method url-fetch)
1334 (uri (string-append "https://pypi.python.org/packages/source/e/"
1335 "enum34/enum34-" version ".tar.gz"))
1336 (sha256
1337 (base32
1338 "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq"))))
1339 (build-system python-build-system)
1340 (inputs
1341 `(("python-setuptools" ,python-setuptools)))
1342 (arguments
1343 `(#:phases
1344 (alist-replace
1345 'check
1346 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1347 %standard-phases)))
1348 (home-page "https://pypi.python.org/pypi/enum34")
1349 (synopsis "Backported Python 3.4 Enum")
1350 (description
1351 "Enum34 is the new Python stdlib enum module available in Python 3.4
1352backported for previous versions of Python from 2.4 to 3.3.")
1353 (license bsd-3)))
1354
1355(define-public python-parse-type
1356 (package
1357 (name "python-parse-type")
1358 (version "0.3.4")
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (string-append "https://pypi.python.org/packages/source/p/"
1363 "parse_type/parse_type-" version ".tar.gz"))
1364 (sha256
1365 (base32
1366 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1367 (build-system python-build-system)
1368 (inputs
1369 `(("python-setuptools" ,python-setuptools)
1370 ("python-six" ,python-six)
1371 ("python-parse" ,python-parse)
1372 ("python-enum34" ,python-enum34))) ;required for python<3.4
1373 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1374 (home-page "https://github.com/jenisys/parse_type")
1375 (synopsis "Extended parse module")
1376 (description
1377 "Parse_type extends the python parse module.")
1378 (license bsd-3)))
1379
1380(define-public python-parse
1381 (package
1382 (name "python-parse")
1383 (version "1.6.4")
1384 (source
1385 (origin
1386 (method url-fetch)
1387 (uri (string-append "https://pypi.python.org/packages/source/p/"
1388 "parse/parse-" version ".tar.gz"))
1389 (sha256
1390 (base32
1391 "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57"))))
1392 (build-system python-build-system)
1393 (arguments
1394 `(#:phases
1395 (alist-replace
1396 'check
1397 (lambda _ (zero? (system* "python" "test_parse.py")))
1398 %standard-phases)))
1399 (home-page "https://github.com/r1chardj0n3s/parse")
1400 (synopsis "Parse strings")
1401 (description
1402 "Parse strings using a specification based on the Python format()
1403syntax.")
1404 (license x11)))
1405
1406
515e6878
LC
1407(define-public scons
1408 (package
1409 (name "scons")
a3f61425 1410 (version "2.3.4")
515e6878
LC
1411 (source (origin
1412 (method url-fetch)
1413 (uri (string-append "mirror://sourceforge/scons/scons-"
1414 version ".tar.gz"))
1415 (sha256
1416 (base32
a3f61425 1417 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1418 (build-system python-build-system)
1419 (arguments
1420 ;; With Python 3.x, fails to build with a syntax error.
1421 `(#:python ,python-2
1422 #:tests? #f)) ; no 'python setup.py test' command
1423 (home-page "http://scons.org/")
1424 (synopsis "Software construction tool written in Python")
1425 (description
1426 "SCons is a software construction tool. Think of SCons as an improved,
1427cross-platform substitute for the classic Make utility with integrated
1428functionality similar to autoconf/automake and compiler caches such as ccache.
1429In short, SCons is an easier, more reliable and faster way to build
1430software.")
1431 (license x11)))
011b18c3 1432
c15a5c0e
DT
1433(define-public python-extras
1434 (package
1435 (name "python-extras")
1436 (version "0.0.3")
1437 (source
1438 (origin
1439 (method url-fetch)
1440 (uri (string-append
1441 "https://pypi.python.org/packages/source/e/extras/extras-"
1442 version ".tar.gz"))
1443 (sha256
1444 (base32
1445 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1446 (build-system python-build-system)
1447 (inputs
1448 `(("python-setuptools" ,python-setuptools)))
1449 (arguments
1450 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1451 '(#:tests? #f))
1452 (home-page "https://github.com/testing-cabal/extras")
1453 (synopsis "Useful extensions to the Python standard library")
1454 (description
1455 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1456 (license license:expat)))
c15a5c0e
DT
1457
1458(define-public python2-extras
1459 (package-with-python2 python-extras))
1460
56ea0efd
DT
1461(define-public python-mimeparse
1462 (package
1463 (name "python-mimeparse")
1464 (version "0.1.4")
1465 (source
1466 (origin
1467 (method url-fetch)
1468 (uri (string-append
1469 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1470 version ".tar.gz"))
1471 (sha256
1472 (base32
1473 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1474 (build-system python-build-system)
1475 (inputs
1476 `(("python-setuptools" ,python-setuptools)))
1477 (arguments
1478 '(#:tests? #f)) ; no setup.py test command
1479 (home-page
1480 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1481 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1482 (description
1483 "Mimeparse provides basic functions for parsing MIME type names and
1484matching them against a list of media-ranges.")
bd3fa666 1485 (license license:expat)))
56ea0efd
DT
1486
1487(define-public python2-mimeparse
1488 (package-with-python2 python-mimeparse))
1489
4435427e
DT
1490(define-public python-nose
1491 (package
1492 (name "python-nose")
f7cb9841 1493 (version "1.3.7")
4435427e
DT
1494 (source
1495 (origin
1496 (method url-fetch)
f7cb9841 1497 (uri (pypi-uri "nose" version))
4435427e
DT
1498 (sha256
1499 (base32
f7cb9841 1500 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1501 (build-system python-build-system)
1502 (inputs
1503 `(("python-setuptools" ,python-setuptools)))
1504 (arguments
1505 '(#:tests? #f)) ; FIXME: test suite fails
1506 (home-page "http://readthedocs.org/docs/nose/")
1507 (synopsis "Python testing library")
1508 (description
1509 "Nose extends the unittest library to make testing easier.")
1510 (license lgpl2.0+)))
1511
1512(define-public python2-nose
1513 (package-with-python2 python-nose))
1514
6cd9c356
DT
1515(define-public python-unittest2
1516 (package
1517 (name "python-unittest2")
1518 (version "0.5.1")
1519 (source
1520 (origin
1521 (method url-fetch)
1522 (uri (string-append
1523 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1524 version ".tar.gz"))
1525 (sha256
1526 (base32
1527 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1528 (build-system python-build-system)
1529 (inputs
1530 `(("python-setuptools" ,python-setuptools)))
1531 (home-page "http://pypi.python.org/pypi/unittest2")
1532 (synopsis "Python unit testing library")
1533 (description
1534 "Unittest2 is a replacement for the unittest module in the Python
1535standard library.")
1536 (license psfl)))
1537
1538(define-public python2-unittest2
1539 (package (inherit python-unittest2)
1540 (name "python2-unittest2")
1541 (version "0.5.1")
1542 (source
1543 (origin
1544 (method url-fetch)
1545 (uri (string-append
1546 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1547 version ".tar.gz"))
1548 (sha256
1549 (base32
1550 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1551 (inputs
7957fe6c 1552 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1553 (arguments
1554 `(#:python ,python-2
1555 #:tests? #f)))) ; no setup.py test command
1556
542ad60f
DT
1557(define-public python-py
1558 (package
1559 (name "python-py")
71c8a804 1560 (version "1.4.31")
542ad60f
DT
1561 (source
1562 (origin
1563 (method url-fetch)
71c8a804 1564 (uri (pypi-uri "py" version))
542ad60f
DT
1565 (sha256
1566 (base32
71c8a804 1567 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1568 (build-system python-build-system)
1569 (inputs
1570 `(("python-setuptools" ,python-setuptools)))
1571 (home-page "http://pylib.readthedocs.org/")
1572 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1573 (description
1574 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1575code introspection, and logging.")
bd3fa666 1576 (license license:expat)))
542ad60f
DT
1577
1578(define-public python2-py
1579 (package-with-python2 python-py))
1580
855d4761
DT
1581(define-public python-pytest
1582 (package
1583 (name "python-pytest")
1584 (version "2.6.1")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (string-append
1589 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1590 version ".tar.gz"))
1591 (sha256
1592 (base32
1593 "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
1594 (modules '((guix build utils)))
1595 (snippet
1596 ;; One of the tests involves the /usr directory, so it fails.
1597 '(substitute* "testing/test_argcomplete.py"
1598 (("def test_remove_dir_prefix\\(self\\):")
1599 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1600 (build-system python-build-system)
1601 (inputs
1602 `(("python-setuptools" ,python-setuptools)
1603 ("python-py" ,python-py)
1604 ("python-nose" ,python-nose)
1605 ("python-mock" ,python-mock)))
1606 (home-page "http://pytest.org")
1607 (synopsis "Python testing library")
1608 (description
1609 "Pytest is a testing tool that provides auto-discovery of test modules
1610and functions, detailed info on failing assert statements, modular fixtures,
1611and many external plugins.")
bd3fa666 1612 (license license:expat)))
855d4761
DT
1613
1614(define-public python2-pytest
1615 (package-with-python2 python-pytest))
1616
358c3d61
EF
1617(define-public python-pytest-cov
1618 (package
1619 (name "python-pytest-cov")
1620 (version "2.2.0")
1621 (source
1622 (origin
1623 (method url-fetch)
1624 (uri (pypi-uri "pytest-cov" version))
1625 (sha256
1626 (base32
1627 "1lf9jsmhqk5nc4w3kzwglmdzjvmi7ajvrsnwv826j3bn0wzx8c92"))))
1628 (build-system python-build-system)
1629 (propagated-inputs
1630 `(("python-coverage" ,python-coverage)
1631 ("python-pytest" ,python-pytest)))
1632 (native-inputs
1633 `(("python-setuptools" ,python-setuptools)))
1634 (home-page "https://github.com/pytest-dev/pytest-cov")
1635 (synopsis "Pytest plugin for measuring coverage")
1636 (description
1637 "Pytest-cov produces coverage reports. It supports centralised testing and
1638distributed testing in both load and each modes. It also supports coverage
1639of subprocesses.")
1640 (license license:expat)))
1641
1642(define-public python2-pytest-cov
1643 (package-with-python2 python-pytest-cov))
1644
6784f2e3
RW
1645(define-public python-pytest-runner
1646 (package
1647 (name "python-pytest-runner")
1648 (version "2.6.2")
1649 (source
1650 (origin
1651 (method url-fetch)
1652 (uri (string-append "https://pypi.python.org/packages/source/p/"
1653 "pytest-runner/pytest-runner-"
1654 version ".tar.gz"))
1655 (sha256
1656 (base32
1657 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1658 (build-system python-build-system)
1659 (arguments
1660 `(#:phases
1661 (modify-phases %standard-phases
1662 ;; The fancy way of setting the version with setuptools_scm does not
1663 ;; seem to work here.
1664 (add-after 'unpack 'set-version
1665 (lambda _
1666 (substitute* "docs/conf.py"
1667 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1668 (string-append "version = \"" ,version "\"")))
1669 #t)))))
1670 (native-inputs
1671 `(("python-pytest" ,python-pytest)
d50d097d 1672 ("python-setuptools" ,python-setuptools)
6784f2e3
RW
1673 ("python-setuptools-scm" ,python-setuptools-scm)))
1674 (home-page "https://bitbucket.org/pytest-dev/pytest-runner")
1675 (synopsis "Invoke py.test as a distutils command")
1676 (description
1677 "This package provides a @command{pytest-runner} command that
1678@file{setup.py} files can use to run tests.")
1679 (license license:expat)))
1680
1681(define-public python2-pytest-runner
1682 (package-with-python2 python-pytest-runner))
1683
84d24017
DT
1684(define-public python-scripttest
1685 (package
1686 (name "python-scripttest")
1687 (version "1.3")
1688 (source
1689 (origin
1690 (method url-fetch)
1691 (uri (string-append
1692 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1693 version ".tar.gz"))
1694 (sha256
1695 (base32
1696 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1697 (build-system python-build-system)
1698 (inputs
1699 `(("python-setuptools" ,python-setuptools)
1700 ("python-pytest" ,python-pytest)))
1701 (home-page "http://pythonpaste.org/scripttest/")
1702 (synopsis "Python library to test command-line scripts")
1703 (description "Scripttest is a Python helper library for testing
1704interactive command-line applications. With it you can run a script in a
1705subprocess and see the output as well as any file modifications.")
bd3fa666 1706 (license license:expat)))
84d24017
DT
1707
1708(define-public python2-scripttest
1709 (package-with-python2 python-scripttest))
1710
d8fa80e1
DT
1711(define-public python-testtools
1712 (package
1713 (name "python-testtools")
1714 (version "1.0.0")
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (string-append
1719 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1720 version ".tar.gz"))
1721 (sha256
1722 (base32
1723 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1724 (build-system python-build-system)
0e88cbf8
CR
1725 (propagated-inputs
1726 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1727 (inputs
1728 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1729 ("python-extras" ,python-extras)))
1730 (home-page "https://github.com/testing-cabal/testtools")
1731 (synopsis
1732 "Extensions to the Python standard library unit testing framework")
1733 (description
1734 "Testtools extends the Python standard library unit testing framework to
1735provide matchers, more debugging information, and cross-Python
1736compatibility.")
1737 (license psfl)))
1738
1739(define-public python2-testtools
1740 (package-with-python2 python-testtools))
1741
5bf3afea
DT
1742(define-public python-testscenarios
1743 (package
1744 (name "python-testscenarios")
1745 (version "0.4")
1746 (source
1747 (origin
1748 (method url-fetch)
1749 (uri (string-append
1750 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1751 version ".tar.gz"))
1752 (sha256
1753 (base32
1754 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1755 (build-system python-build-system)
1756 (inputs
1757 `(("python-setuptools" ,python-setuptools)
1758 ("python-testtools" ,python-testtools)
1759 ("python-mimeparse" ,python-mimeparse)))
1760 (home-page "https://launchpad.net/testscenarios")
1761 (synopsis "Pyunit extension for dependency injection")
1762 (description
1763 "Testscenarios provides clean dependency injection for Python unittest
1764style tests.")
1765 (license (list bsd-3 asl2.0)))) ; at the user's option
1766
1767(define-public python2-testscenarios
1768 (package-with-python2 python-testscenarios))
1769
dac79ecc
DT
1770(define-public python-testresources
1771 (package
1772 (name "python-testresources")
1773 (version "0.2.7")
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (string-append
1778 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1779 version ".tar.gz"))
1780 (sha256
1781 (base32
1782 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1783 (build-system python-build-system)
1784 (inputs
1785 `(("python-setuptools" ,python-setuptools)))
1786 (home-page "https://launchpad.net/testresources")
1787 (synopsis
1788 "Pyunit extension for managing test resources")
1789 (description
1790 "Testresources is an extension to Python's unittest to allow declarative
1791use of resources by test cases.")
1792 (license (list bsd-3 asl2.0)))) ; at the user's option
1793
1794(define-public python2-testresources
1795 (package-with-python2 python-testresources))
1796
070ab058
DT
1797(define-public python-subunit
1798 (package
1799 (name "python-subunit")
1800 (version "0.0.21")
1801 (source
1802 (origin
1803 (method url-fetch)
1804 (uri (string-append
1805 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1806 version ".tar.gz"))
1807 (sha256
1808 (base32
1809 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1810 (build-system python-build-system)
1811 (inputs
1812 `(("python-setuptools" ,python-setuptools)
1813 ("python-testtools" ,python-testtools)
1814 ("python-mimeparse" ,python-mimeparse)
1815 ("python-testscenarios" ,python-testscenarios)))
1816 (home-page "http://launchpad.net/subunit")
1817 (synopsis "Python implementation of the subunit protocol")
1818 (description
1819 "Python-subunit is a Python implementation of the subunit test streaming
1820protocol.")
1821 (license (list bsd-3 asl2.0)))) ; at the user's option
1822
1823(define-public python2-subunit
1824 (package-with-python2 python-subunit))
1825
7787ef76
CR
1826;; Recent versions of python-fixtures need a recent version of python-pbr,
1827;; which needs a recent version of python-fixtures. To fix this circular
1828;; dependency, we keep old versions of python-fixtures and python-pbr to
1829;; bootstrap the whole thing:
1830;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1831;; - python-pbr-0.11 is used to build python-fixtures
1832;; - python-fixtures is used to build python-pbr
1833(define-public python-fixtures-0.3.16
cd49454b
DT
1834 (package
1835 (name "python-fixtures")
1836 (version "0.3.16")
1837 (source
1838 (origin
1839 (method url-fetch)
1840 (uri (string-append
1841 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1842 version ".tar.gz"))
1843 (sha256
1844 (base32
1845 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1846 (build-system python-build-system)
1847 (inputs
1848 `(("python-setuptools" ,python-setuptools)))
1849 (arguments
1850 '(#:tests? #f)) ; no setup.py test command
1851 (home-page "https://launchpad.net/python-fixtures")
1852 (synopsis "Python test fixture library")
1853 (description
1854 "Fixtures provides a way to create reusable state, useful when writing
1855Python tests.")
1856 (license (list bsd-3 asl2.0)))) ; at user's option
1857
7787ef76
CR
1858(define-public python2-fixtures-0.3.16
1859 (package-with-python2 python-fixtures-0.3.16))
1860
1861(define-public python-pbr-0.11
1862 (package
1863 (name "python-pbr")
1864 (version "0.11.0")
1865 (source
1866 (origin
1867 (method url-fetch)
1868 (uri (string-append
1869 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1870 version ".tar.gz"))
1871 (sha256
1872 (base32
1873 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1874 (build-system python-build-system)
1875 (arguments
1876 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1877 (inputs
1878 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1879 ("python-pip" ,python-pip)
1880 ("python-setuptools" ,python-setuptools)))
1881 (home-page "https://launchpad.net/pbr")
1882 (synopsis "Change the default behavior of Python’s setuptools")
1883 (description
1884 "Python Build Reasonableness (PBR) is a library that injects some useful
1885and sensible default behaviors into your setuptools run.")
1886 (license asl2.0)))
1887
1888(define-public python2-pbr-0.11
1889 (package-with-python2 python-pbr-0.11))
1890
1891(define-public python-fixtures
1892 (package
1893 (name "python-fixtures")
13fcc6df 1894 (version "1.4.0")
7787ef76
CR
1895 (source
1896 (origin
1897 (method url-fetch)
13fcc6df 1898 (uri (pypi-uri "fixtures" version))
7787ef76
CR
1899 (sha256
1900 (base32
13fcc6df 1901 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
1902 (build-system python-build-system)
1903 (propagated-inputs
1904 `(("python-six" ,python-six)
1905 ("python-pbr-0.11" ,python-pbr-0.11)))
1906 (inputs
1907 `(("python-pip" ,python-pip)
1908 ("python-setuptools" ,python-setuptools)
1909 ;; Tests
1910 ("python-testtools" ,python-testtools)))
1911 (arguments
1912 '(#:tests? #f)) ; no setup.py test command
1913 (home-page "https://launchpad.net/python-fixtures")
1914 (synopsis "Python test fixture library")
1915 (description
1916 "Fixtures provides a way to create reusable state, useful when writing
1917Python tests.")
1918 (license (list bsd-3 asl2.0)))) ; at user's option
1919
cd49454b
DT
1920(define-public python2-fixtures
1921 (package-with-python2 python-fixtures))
1922
b24a0c00
DT
1923(define-public python-testrepository
1924 (package
1925 (name "python-testrepository")
1926 (version "0.0.20")
1927 (source
1928 (origin
1929 (method url-fetch)
1930 (uri (string-append
1931 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1932 version ".tar.gz"))
1933 (sha256
1934 (base32
1935 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1936 (build-system python-build-system)
05de40c5 1937 (propagated-inputs
7787ef76 1938 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 1939 ("python-testtools" ,python-testtools)))
b24a0c00
DT
1940 (inputs
1941 `(("python-setuptools" ,python-setuptools)
b24a0c00 1942 ("python-subunit" ,python-subunit)
b24a0c00
DT
1943 ("python-mimeparse" ,python-mimeparse)))
1944 (home-page "https://launchpad.net/testrepository")
1945 (synopsis "Database for Python test results")
1946 (description "Testrepository provides a database of test results which can
1947be used as part of a developer's workflow to check things such as what tests
1948have failed since the last commit or what tests are currently failing.")
1949 (license (list bsd-3 asl2.0)))) ; at user's option
1950
1951(define-public python2-testrepository
1952 (package-with-python2 python-testrepository))
1953
243a009a
DT
1954(define-public python-coverage
1955 (package
1956 (name "python-coverage")
82a3c582 1957 (version "4.0.3")
243a009a
DT
1958 (source
1959 (origin
1960 (method url-fetch)
82a3c582 1961 (uri (pypi-uri "coverage" version))
243a009a
DT
1962 (sha256
1963 (base32
82a3c582 1964 "0qjlja8ny4gcfp8abqfwdrvr8qw9kr69lkja0b4cqqbsdmdjgcc5"))))
243a009a
DT
1965 (build-system python-build-system)
1966 (inputs
1967 `(("python-setuptools" ,python-setuptools)))
1968 (home-page "http://nedbatchelder.com/code/coverage")
1969 (synopsis "Code coverage measurement for Python")
1970 (description
1971 "Coverage measures code coverage, typically during test execution. It
1972uses the code analysis tools and tracing hooks provided in the Python standard
1973library to determine which lines are executable, and which have been
1974executed.")
1975 (license bsd-3)))
1976
1977(define-public python2-coverage
1978 (package-with-python2 python-coverage))
1979
041358fb
DT
1980(define-public python-discover
1981 (package
1982 (name "python-discover")
1983 (version "0.4.0")
1984 (source
1985 (origin
1986 (method url-fetch)
1987 (uri (string-append
1988 "https://pypi.python.org/packages/source/d/discover/discover-"
1989 version ".tar.gz"))
1990 (sha256
1991 (base32
1992 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1993 (build-system python-build-system)
1994 (inputs
1995 `(("python-setuptools" ,python-setuptools)))
1996 (home-page "http://pypi.python.org/pypi/discover/")
1997 (synopsis
1998 "Python test discovery for unittest")
1999 (description
2000 "Discover provides test discovery for unittest, a feature that has been
e881752c 2001backported from Python 2.7 for Python 2.4+.")
041358fb
DT
2002 (license bsd-3)))
2003
2004(define-public python2-discover
2005 (package-with-python2 python-discover))
2006
a480bc41
EB
2007(define-public behave
2008 (package
2009 (name "behave")
2010 (version "1.2.4")
2011 (source (origin
2012 (method url-fetch)
2013 (uri (string-append "https://pypi.python.org/packages/source/b/"
2014 name "/" name "-" version ".tar.gz"))
2015 (sha256
2016 (base32
2017 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
2018 (build-system python-build-system)
2019 (inputs
2020 `(("python-setuptools" ,python-setuptools)
2021 ("python-six" ,python-six)
2022 ("python-enum43" ,python-enum34)
2023 ("python-parse" ,python-parse)
2024 ("python-parse-type" ,python-parse-type)))
2025 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2026 ;PyHamcrest>=1.8
2027 (home-page "http://github.com/behave/behave")
2028 (synopsis "Python behavior-driven development")
2029 (description
2030 "Behave is a tool for behavior-driven development in python.
2031Behavior-driven development (or BDD) is an agile software development
2032technique that encourages collaboration between developers, QA and
2033non-technical or business participants in a software project. Behave uses
2034tests written in a natural language style, backed up by Python code.")
2035 (license x11)))
c7303d3c
DT
2036
2037(define-public python-exif-read
2038 (package
2039 (name "python-exif-read")
2a2d0981 2040 (version "2.1.2")
c7303d3c
DT
2041 (source (origin
2042 (method url-fetch)
2a2d0981 2043 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2044 (sha256
2045 (base32
2a2d0981 2046 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2047 (build-system python-build-system)
2048 (inputs
2049 `(("python-setuptools" ,python-setuptools)))
2050 (arguments `(#:tests? #f)) ; no tests
2051 (home-page "https://github.com/ianare/exif-py")
2052 (synopsis "Python library to extract EXIF data from image files")
2053 (description
2054 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2055files.")
2056 (license bsd-3)))
2057
2058(define-public python2-exif-read
2059 (package-with-python2 python-exif-read))
d5f89b22
DT
2060
2061(define-public python-pyld
2062 (package
2063 (name "python-pyld")
af1ab773 2064 (version "0.6.8")
d5f89b22
DT
2065 (source (origin
2066 (method url-fetch)
af1ab773 2067 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2068 (sha256
2069 (base32
af1ab773 2070 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22
DT
2071 (build-system python-build-system)
2072 (inputs
2073 `(("python-setuptools" ,python-setuptools)))
2074 (arguments `(#:tests? #f)) ; no tests
2075 (home-page "http://github.com/digitalbazaar/pyld")
2076 (synopsis "Python implementation of the JSON-LD specification")
2077 (description
2078 "PyLD is an implementation of the JSON-LD specification.")
2079 (license bsd-3)))
2080
2081(define-public python2-pyld
2082 (package-with-python2 python-pyld))
3a1f9a68
DT
2083
2084(define-public python-certifi
2085 (package
2086 (name "python-certifi")
9a41f443 2087 (version "2015.11.20.1")
3a1f9a68
DT
2088 (source (origin
2089 (method url-fetch)
9a41f443 2090 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2091 (sha256
2092 (base32
9a41f443 2093 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
3a1f9a68
DT
2094 (build-system python-build-system)
2095 (inputs
2096 `(("python-setuptools" ,python-setuptools)))
2097 (arguments `(#:tests? #f)) ; no tests
2098 (home-page "http://python-requests.org/")
2099 (synopsis "Python CA certificate bundle")
2100 (description
2101 "Certifi is a Python library that contains a CA certificate bundle, which
2102is used by the Requests library to verify HTTPS requests.")
2103 (license asl2.0)))
2104
2105(define-public python2-certifi
2106 (package-with-python2 python-certifi))
e6cfbd36 2107
12c270dd
RW
2108(define-public python-click
2109 (package
2110 (name "python-click")
5bd88cf1 2111 (version "6.2")
12c270dd
RW
2112 (source
2113 (origin
2114 (method url-fetch)
5bd88cf1 2115 (uri (pypi-uri "click" version))
12c270dd 2116 (sha256
5bd88cf1 2117 (base32 "10kavbisnk9m93jl2wi34pw7ryr2qbxshh2cysxwxd7bymqgz87v"))))
12c270dd
RW
2118 (build-system python-build-system)
2119 (native-inputs
2120 `(("python-setuptools" ,python-setuptools)))
2121 (home-page "http://click.pocoo.org")
2122 (synopsis "Command line library for Python")
2123 (description
2124 "Click is a Python package for creating command line interfaces in a
2125composable way with as little code as necessary. Its name stands for
2126\"Command Line Interface Creation Kit\". It's highly configurable but comes
2127with sensible defaults out of the box.")
2128 (license bsd-3)))
2129
2130(define-public python2-click
2131 (package-with-python2 python-click))
2132
addc808d
EF
2133(define-public python-wheel
2134 (package
2135 (name "python-wheel")
2136 (version "0.26.0")
2137 (source
2138 (origin
2139 (method url-fetch)
2140 (uri (pypi-uri "wheel" version))
2141 (sha256
2142 (base32
2143 "032k1ajijbqnv0z0k88bhf75mdimi18fcmm28mss90610lw3bbga"))))
2144 (build-system python-build-system)
2145 (native-inputs
2146 `(("python-setuptools" ,python-setuptools)
2147 ("python-jsonschema" ,python-jsonschema)
2148 ("python-pytest-cov" ,python-pytest-cov)))
2149 (home-page "https://bitbucket.org/pypa/wheel/")
2150 (synopsis "Built-package format for Python")
2151 (description
2152 "A wheel is a ZIP-format archive with a specially formatted filename and the
2153.whl extension. It is designed to contain all the files for a PEP 376
2154compatible install in a way that is very close to the on-disk format.")
2155 (license license:expat)))
2156
2157(define-public python2-wheel
2158 (package-with-python2 python-wheel))
2159
ae641128 2160(define-public python-requests
e6cfbd36 2161 (package
ae641128 2162 (name "python-requests")
5d691657 2163 (version "2.8.1")
e6cfbd36
DT
2164 (source (origin
2165 (method url-fetch)
5d691657 2166 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2167 (sha256
2168 (base32
5d691657 2169 "0ny2nr1sqr4hcn3903ghmh7w2yni8shlfv240a8c9p6wyidqvzl4"))))
e6cfbd36 2170 (build-system python-build-system)
5d691657
EF
2171 (native-inputs
2172 `(("python-setuptools" ,python-setuptools)))
2173 (propagated-inputs
2174 `(("python-py" ,python-py)
2175 ("python-pytest" ,python-pytest)
2176 ("python-pytest-cov" ,python-pytest-cov)
2177 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2178 (home-page "http://python-requests.org/")
2179 (synopsis "Python HTTP library")
2180 (description
2181 "Requests is a Python HTTP client library. It aims to be easier to use
2182than Python’s urllib2 library.")
2183 (license asl2.0)))
864b5211 2184
e9005180
DT
2185;; Some software requires an older version of Requests, notably Docker
2186;; Compose.
2187(define-public python-requests-2.7
2188 (package (inherit python-requests)
2189 (version "2.7.0")
2190 (source (origin
2191 (method url-fetch)
2192 (uri (pypi-uri "requests" version))
2193 (sha256
2194 (base32
2195 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2196
ae641128
DT
2197(define-public python2-requests
2198 (package-with-python2 python-requests))
2199
ea521b42
DT
2200(define-public python-vcversioner
2201 (package
2202 (name "python-vcversioner")
2203 (version "2.14.0.0")
2204 (source
2205 (origin
2206 (method url-fetch)
2207 (uri (pypi-uri "vcversioner" version))
2208 (sha256
2209 (base32
2210 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2211 (build-system python-build-system)
2212 (inputs
2213 `(("python-setuptools" ,python-setuptools)))
2214 (synopsis "Python library for version number discovery")
2215 (description "Vcversioner is a Python library that inspects tagging
2216information in a variety of version control systems in order to discover
2217version numbers.")
2218 (home-page "https://github.com/habnabit/vcversioner")
2219 (license isc)))
2220
2221(define-public python2-vcversioner
2222 (package-with-python2 python-vcversioner))
2223
864b5211
DT
2224(define-public python-jsonschema
2225 (package
2226 (name "python-jsonschema")
b3667afb 2227 (version "2.5.1")
864b5211
DT
2228 (source (origin
2229 (method url-fetch)
2230 (uri
2231 (string-append
2232 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2233 version ".tar.gz"))
2234 (sha256
2235 (base32
b3667afb 2236 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211
DT
2237 (build-system python-build-system)
2238 (inputs
b3667afb
DT
2239 `(("python-setuptools" ,python-setuptools)
2240 ("python-vcversioner" ,python-vcversioner)))
864b5211
DT
2241 (home-page "http://github.com/Julian/jsonschema")
2242 (synopsis "Implementation of JSON Schema for Python")
2243 (description
2244 "Jsonschema is an implementation of JSON Schema for Python.")
bd3fa666 2245 (license license:expat)))
864b5211
DT
2246
2247(define-public python2-jsonschema
2248 (package-with-python2 python-jsonschema))
850189b8
DT
2249
2250(define-public python-unidecode
2251 (package
2252 (name "python-unidecode")
8925d4f3 2253 (version "0.04.18")
850189b8
DT
2254 (source (origin
2255 (method url-fetch)
8925d4f3 2256 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2257 (sha256
2258 (base32
8925d4f3 2259 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2260 (build-system python-build-system)
2261 (inputs
2262 `(("python-setuptools" ,python-setuptools)))
2263 (home-page "https://pypi.python.org/pypi/Unidecode")
2264 (synopsis "ASCII transliterations of Unicode text")
2265 (description
2266 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2267useful when integrating with legacy code that doesn't support Unicode, or for
2268ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2269machine identifiers from human-readable Unicode strings that should still be
2270somewhat intelligeble.")
2271 (license gpl2+)))
2272
2273(define-public python2-unidecode
2274 (package-with-python2 python-unidecode))
6d45fef4
DT
2275
2276(define-public python-pyjwt
2277 (package
2278 (name "python-pyjwt")
eb31d4b4 2279 (version "1.4.0")
6d45fef4
DT
2280 (source
2281 (origin
2282 (method url-fetch)
eb31d4b4 2283 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2284 (sha256
2285 (base32
eb31d4b4 2286 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2287 (build-system python-build-system)
eb31d4b4
EF
2288 (native-inputs
2289 `(("python-setuptools" ,python-setuptools)
2290 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2291 (arguments
2292 '(#:tests? #f)) ; test suite doesn't work
2293 (home-page "http://github.com/progrium/pyjwt")
2294 (synopsis "JSON Web Token implementation in Python")
2295 (description
2296 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2297 (license license:expat)))
6d45fef4
DT
2298
2299(define-public python2-pyjwt
2300 (package-with-python2 python-pyjwt))
2301
2cec1f6f
DT
2302(define-public python-oauthlib
2303 (package
2304 (name "python-oauthlib")
bde2171d 2305 (version "1.0.3")
2cec1f6f
DT
2306 (source (origin
2307 (method url-fetch)
bde2171d 2308 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2309 (sha256
2310 (base32
bde2171d 2311 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2312 (build-system python-build-system)
bde2171d 2313 (native-inputs
2cec1f6f 2314 `(("python-setuptools" ,python-setuptools)
bde2171d 2315 ("python-coverage", python-coverage)
2cec1f6f
DT
2316 ("python-nose" ,python-nose)
2317 ("python-mock" ,python-mock)))
bde2171d
EF
2318 (inputs
2319 `(("python-blinker" ,python-blinker)
2320 ("python-cryptography" ,python-cryptography)
2321 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2322 (home-page "https://github.com/idan/oauthlib")
2323 (synopsis "OAuth implementation for Python")
2324 (description
2325 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2326OAuth request-signing logic.")
2327 (license bsd-3)))
2328
2329(define-public python2-oauthlib
2330 (let ((base (package-with-python2 python-oauthlib)))
2331 (package
2332 (inherit base)
2cec1f6f 2333 (inputs
0066de6f
EF
2334 `(("python2-unittest2" ,python2-unittest2)
2335 ("python2-cryptography" ,python2-cryptography)
2336 ,@(alist-delete "python-cryptography"
2337 (package-inputs base)))))))
ec5dbb5c
DT
2338
2339(define-public python-itsdangerous
2340 (package
2341 (name "python-itsdangerous")
2342 (version "0.24")
2343 (source
2344 (origin
2345 (method url-fetch)
2346 (uri (string-append
2347 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2348 version ".tar.gz"))
2349 (sha256
2350 (base32
2351 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2352 (build-system python-build-system)
2353 (inputs
2354 `(("python-setuptools" ,python-setuptools)))
2355 (home-page "http://github.com/mitsuhiko/itsdangerous")
2356 (synopsis "Python library for passing data to/from untrusted environments")
2357 (description
2358 "Itsdangerous provides various helpers to pass trusted data to untrusted
2359environments and back.")
2360 (license bsd-3)))
2361
2362(define-public python2-itsdangerous
2363 (package-with-python2 python-itsdangerous))
5731cae3 2364
8d12be1e
RW
2365(define-public python-pyyaml
2366 (package
2367 (name "python-pyyaml")
2368 (version "3.11")
2369 (source
2370 (origin
2371 (method url-fetch)
2372 (uri (string-append
2373 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2374 version ".tar.gz"))
2375 (sha256
2376 (base32
2377 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2378 (build-system python-build-system)
2379 (inputs
2380 `(("libyaml" ,libyaml)))
2381 (native-inputs
2382 `(("python-setuptools" ,python-setuptools)))
2383 (home-page "http://pyyaml.org/wiki/PyYAML")
2384 (synopsis "YAML parser and emitter for Python")
2385 (description
2386 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2387complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2388API, and sensible error messages. PyYAML supports standard YAML tags and
2389provides Python-specific tags that allow to represent an arbitrary Python
2390object.")
2391 (license license:expat)))
2392
2393(define-public python2-pyyaml
2394 (package-with-python2 python-pyyaml))
2395
5731cae3
DT
2396(define-public python-virtualenv
2397 (package
2398 (name "python-virtualenv")
17804240 2399 (version "13.1.2")
5731cae3
DT
2400 (source
2401 (origin
2402 (method url-fetch)
17804240 2403 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2404 (sha256
2405 (base32
17804240 2406 "1p732accxwqfjbdna39k8w8lp9gyw91vr4kzkhm8mgfxikqqxg5a"))))
5731cae3 2407 (build-system python-build-system)
17804240
EF
2408 (arguments
2409 `(#:phases
2410 (modify-phases %standard-phases
2411 (replace 'check
2412 (lambda _ (zero? (system* "py.test")))))))
5731cae3
DT
2413 (inputs
2414 `(("python-setuptools" ,python-setuptools)
2415 ("python-mock" ,python-mock)
17804240 2416 ("python-pytest" ,python-pytest)))
5731cae3
DT
2417 (home-page "https://virtualenv.pypa.io/")
2418 (synopsis "Virtual Python environment builder")
2419 (description
2420 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2421 (license license:expat)))
5731cae3
DT
2422
2423(define-public python2-virtualenv
2424 (package-with-python2 python-virtualenv))
8176d4d5
DT
2425
2426(define-public python-markupsafe
2427 (package
2428 (name "python-markupsafe")
2429 (version "0.23")
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (string-append
2434 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2435 version ".tar.gz"))
2436 (sha256
2437 (base32
2438 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2439 (build-system python-build-system)
2440 (inputs
2441 `(("python-setuptools" ,python-setuptools)))
2442 (home-page "http://github.com/mitsuhiko/markupsafe")
2443 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2444 (description
2445 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2446for Python.")
2447 (license bsd-3)))
2448
2449(define-public python2-markupsafe
2450 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2451
2452(define-public python-jinja2
2453 (package
2454 (name "python-jinja2")
e98149b3 2455 (version "2.8")
fe34f0d1
DT
2456 (source
2457 (origin
2458 (method url-fetch)
e98149b3 2459 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2460 (sha256
2461 (base32
e98149b3 2462 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2463 (build-system python-build-system)
2464 (inputs
2465 `(("python-setuptools" ,python-setuptools)
2466 ("python-markupsafe" ,python-markupsafe)))
2467 (home-page "http://jinja.pocoo.org/")
2468 (synopsis "Python template engine")
2469 (description
2470 "Jinja2 is a small but fast and easy to use stand-alone template engine
2471written in pure Python.")
2472 (license bsd-3)))
2473
2474(define-public python2-jinja2
2475 (package-with-python2 python-jinja2))
3580ab8b 2476
f7d17ac7
EE
2477(define-public python-pystache
2478 (package
2479 (name "python-pystache")
2480 (version "0.5.4")
2481 (source (origin
2482 (method url-fetch)
2483 (uri (pypi-uri "pystache" version))
2484 (sha256
2485 (base32
2486 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2487 (build-system python-build-system)
2488 (native-inputs
2489 `(("python-setuptools" ,python-setuptools)))
2490 (home-page "http://defunkt.io/pystache/")
2491 (synopsis "Python logic-less template engine")
2492 (description
2493 "Pystache is a Python implementation of the framework agnostic,
2494logic-free templating system Mustache.")
2495 (license license:expat)))
2496
2497(define-public python2-pystache
2498 (package-with-python2 python-pystache))
2499
1285119b
RW
2500(define-public python-joblib
2501 (package
2502 (name "python-joblib")
2503 (version "0.9.0b4")
2504 (source (origin
2505 (method url-fetch)
2506 (uri (string-append "https://pypi.python.org/packages/source/"
2507 "j/joblib/joblib-" version ".tar.gz"))
2508 (sha256
2509 (base32
2510 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2511 (build-system python-build-system)
2512 (native-inputs
2513 `(("python-setuptools" ,python-setuptools)
2514 ("python-nose" ,python-nose)))
2515 (home-page "http://pythonhosted.org/joblib/")
2516 (synopsis "Using Python functions as pipeline jobs")
2517 (description
2518 "Joblib is a set of tools to provide lightweight pipelining in Python.
2519In particular, joblib offers: transparent disk-caching of the output values
2520and lazy re-evaluation (memoize pattern), easy simple parallel computing
2521logging and tracing of the execution.")
2522 (license bsd-3)))
2523
2524(define-public python2-joblib
2525 (package-with-python2 python-joblib))
2526
3580ab8b
DT
2527(define-public python-docutils
2528 (package
2529 (name "python-docutils")
2530 (version "0.12")
2531 (source
2532 (origin
2533 (method url-fetch)
2534 (uri (string-append
2535 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2536 version ".tar.gz"))
2537 (sha256
2538 (base32
2539 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2540 (build-system python-build-system)
2541 (inputs
2542 `(("python-setuptools" ,python-setuptools)))
2543 (arguments
2544 '(#:tests? #f)) ; no setup.py test command
2545 (home-page "http://docutils.sourceforge.net/")
2546 (synopsis "Python Documentation Utilities")
2547 (description
2548 "Docutils is a modular system for processing documentation into useful
2549formats, such as HTML, XML, and LaTeX. For input Docutils supports
2550reStructuredText.")
2551 ;; Most of the source code is public domain, but some source files are
2552 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2553 (license (list public-domain psfl bsd-2 gpl3+))))
2554
2555(define-public python2-docutils
2556 (package-with-python2 python-docutils))
fb35b7c0
DT
2557
2558(define-public python-pygments
2559 (package
2560 (name "python-pygments")
9f442285 2561 (version "2.0.2")
fb35b7c0
DT
2562 (source
2563 (origin
2564 (method url-fetch)
9f442285 2565 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2566 (sha256
2567 (base32
9f442285 2568 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2569 (build-system python-build-system)
2570 (inputs
2571 `(("python-setuptools" ,python-setuptools)))
2572 (home-page "http://pygments.org/")
2573 (synopsis "Syntax highlighting")
2574 (description
2575 "Pygments is a syntax highlighting package written in Python.")
2576 (license bsd-2)))
2577
2578(define-public python2-pygments
2579 (package-with-python2 python-pygments))
9dd6078d
DT
2580
2581(define-public python-sphinx
2582 (package
2583 (name "python-sphinx")
2584 (version "1.2.3")
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (string-append
2589 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2590 version ".tar.gz"))
2591 (sha256
2592 (base32
2593 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2594 (build-system python-build-system)
2595 (inputs
2596 `(("python-setuptools" ,python-setuptools)
2597 ("python-jinja2" ,python-jinja2)
2598 ("python-docutils" ,python-docutils)
2599 ("python-pygments" ,python-pygments)))
2600 (home-page "http://sphinx-doc.org/")
2601 (synopsis "Python documentation generator")
2602 (description "Sphinx is a tool that makes it easy to create documentation
2603for Python projects or other documents consisting of multiple reStructuredText
2604sources.")
2605 (license bsd-3)))
2606
2607(define-public python2-sphinx
2608 (package-with-python2 python-sphinx))
6888830b 2609
ad320b20
RW
2610(define-public python-sphinx-rtd-theme
2611 (package
2612 (name "python-sphinx-rtd-theme")
2613 (version "0.1.6")
2614 (source
2615 (origin
2616 (method url-fetch)
2617 (uri (string-append "https://pypi.python.org/packages/source/s/"
2618 "sphinx_rtd_theme/sphinx_rtd_theme-"
2619 version ".tar.gz"))
2620 (sha256
2621 (base32
2622 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2623 (build-system python-build-system)
2624 (arguments
2625 `(;; With standard flags, the install phase attempts to create a zip'd
2626 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2627 ;; before 1980'
2628 #:configure-flags '("--single-version-externally-managed"
2629 "--record=sphinx-rtd-theme.txt")))
2630 (native-inputs
2631 `(("python-setuptools" ,python-setuptools)))
2632 (inputs
2633 `(("python-docutils" ,python-docutils)
2634 ("python-sphinx" ,python-sphinx)))
2635 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2636 (synopsis "ReadTheDocs.org theme for Sphinx")
2637 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2638 (license license:expat)))
ad320b20
RW
2639
2640(define-public python2-sphinx-rtd-theme
2641 (package-with-python2 python-sphinx-rtd-theme))
2642
f4de5b3b
CAW
2643(define-public python-feedgenerator
2644 (package
2645 (name "python-feedgenerator")
2646 (version "20150710.97185b7")
2647 (source
2648 ;; Using the git checkout for now because license file not added till
2649 ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
2650 (origin
2651 (method git-fetch)
2652 (uri (git-reference
2653 (url "https://github.com/dmdm/feedgenerator-py3k.git")
2654 (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
2655 (sha256
2656 (base32
2657 "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
2658 (arguments
2659 `(;; With standard flags, the install phase attempts to create a zip'd
2660 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2661 ;; before 1980'
2662 #:configure-flags '("--single-version-externally-managed"
2663 "--record=feedgenerator.txt")))
2664 (build-system python-build-system)
2665 (inputs
2666 `(("python-setuptools" ,python-setuptools)
2667 ("python-pytz" ,python-pytz)
2668 ("python-six" ,python-six)))
2669 (home-page
2670 "https://github.com/dmdm/feedgenerator-py3k.git")
2671 (synopsis
2672 "Standalone version of Django's Atom/RSS feed generator")
2673 (description
2674 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2675which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2676 (license bsd-3)))
2677
2678(define-public python2-feedgenerator
2679 (package-with-python2 python-feedgenerator))
2680
59ad30e3
CAW
2681(define-public python-blinker
2682 (package
2683 (name "python-blinker")
7fb9ff4d 2684 (version "1.4")
59ad30e3
CAW
2685 (source
2686 (origin
2687 (method url-fetch)
7fb9ff4d 2688 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2689 (sha256
2690 (base32
7fb9ff4d 2691 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
2692 (build-system python-build-system)
2693 (native-inputs
2694 `(("python-setuptools" ,python-setuptools)))
2695 ;; No "test" command supplied to setuptools, so unless there's another way
2696 ;; to run tests, we're skipping them!
2697 (arguments '(#:tests? #f))
2698 (home-page "http://pythonhosted.org/blinker/")
2699 (synopsis "Fast, simple object-to-object and broadcast signaling")
2700 (description
2701 "Blinker provides a fast dispatching system that allows any number of
2702interested parties to subscribe to events, or \"signals\".")
2703 (license license:expat)))
2704
2705(define-public python2-blinker
2706 (package-with-python2 python-blinker))
2707
b8050e71
CAW
2708(define-public pelican
2709 (package
2710 (name "pelican")
11f97c27 2711 (version "3.6.3")
b8050e71
CAW
2712 (source
2713 (origin
2714 (method url-fetch)
11f97c27 2715 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2716 (sha256
2717 (base32
11f97c27 2718 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71
CAW
2719 (build-system python-build-system)
2720 (native-inputs
2721 `(("python-setuptools" ,python-setuptools)))
2722 (propagated-inputs
2723 `(("python-feedgenerator" ,python-feedgenerator)
2724 ("python-jinja2" ,python-jinja2)
2725 ("python-pygments" ,python-pygments)
2726 ("python-docutils" ,python-docutils)
2727 ("python-pytz" ,python-pytz)
2728 ("python-blinker" ,python-blinker)
2729 ("python-unidecode" ,python-unidecode)
2730 ("python-six" ,python-six)
2731 ("python-dateutil-2" ,python-dateutil-2)))
2732 (home-page "http://getpelican.com/")
2733 (arguments
2734 `(;; XXX Requires a lot more packages to do unit tests :P
2735 #:tests? #f
2736 #:phases (modify-phases %standard-phases
2737 (add-before
2738 'install 'adjust-requires
2739 ;; Since feedgenerator is installed from git, it doesn't
2740 ;; conform to the version requirements.
2741 ;;
2742 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2743 ;; version requirement so setuptools doesn't get confused.
2744 (lambda _
2745 (substitute* "setup.py"
2746 (("['\"]feedgenerator.*?['\"]")
2747 "'feedgenerator'")))))))
2748 (synopsis "Python-based static site publishing system")
2749 (description
2750 "Pelican is a tool to generate a static blog from reStructuredText,
2751Markdown input files, and more. Pelican uses Jinja2 for templating
2752and is very extensible.")
2753 (license agpl3+)))
2754
240ca4aa
RW
2755(define-public python-scikit-learn
2756 (package
2757 (name "python-scikit-learn")
be0a4c26 2758 (version "0.16.1")
240ca4aa
RW
2759 (source
2760 (origin
2761 (method url-fetch)
2762 (uri (string-append
2763 "https://github.com/scikit-learn/scikit-learn/archive/"
2764 version ".tar.gz"))
2765 (sha256
2766 (base32
be0a4c26 2767 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2768 (build-system python-build-system)
2769 (arguments
2770 `(#:phases
2771 (alist-cons-before
2f6b3d2e
RW
2772 'check 'set-HOME
2773 ;; some tests require access to "$HOME"
2774 (lambda _ (setenv "HOME" "/tmp"))
2775 ;; Tests can only be run after the library has been installed and not
2776 ;; within the source directory.
2777 (alist-cons-after
2778 'install 'check
2779 (lambda _
2780 (with-directory-excursion "/tmp"
2781 ;; With Python 3 one test of 3334 fails
2782 ;; (sklearn.tests.test_common.test_transformers); see
2783 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2784 (system* "nosetests" "-v" "sklearn")))
2785 (alist-delete 'check %standard-phases)))))
240ca4aa 2786 (inputs
2f6b3d2e 2787 `(("openblas" ,openblas)
240ca4aa
RW
2788 ("python-nose" ,python-nose)))
2789 (propagated-inputs
2790 `(("python-numpy" ,python-numpy)
2791 ("python-scipy" ,python-scipy)))
2792 (home-page "http://scikit-learn.org/")
2793 (synopsis "Machine Learning in Python")
2794 (description
2795 "Scikit-learn provides simple and efficient tools for data
2796mining and data analysis.")
2797 (license bsd-3)))
2798
2799(define-public python2-scikit-learn
2800 (let ((scikit (package-with-python2 python-scikit-learn)))
2801 (package (inherit scikit)
2802 (propagated-inputs
2803 `(("python2-numpy" ,python2-numpy)
2804 ("python2-scipy" ,python2-scipy)
2805 ,@(alist-delete
2806 "python-numpy"
2807 (alist-delete
2808 "python-scipy" (package-propagated-inputs scikit))))))))
2809
12f8f9bb
RW
2810(define-public python-scikit-image
2811 (package
2812 (name "python-scikit-image")
2813 (version "0.11.3")
2814 (source
2815 (origin
2816 (method url-fetch)
2817 (uri (string-append
2818 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2819 version ".tar.gz"))
2820 (sha256
2821 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2822 (build-system python-build-system)
2823 (propagated-inputs
2824 `(("python-matplotlib" ,python-matplotlib)
2825 ("python-networkx" ,python-networkx)
2826 ("python-numpy" ,python-numpy)
2827 ("python-scipy" ,python-scipy)
2828 ("python-six" ,python-six)
2829 ("python-pillow" ,python-pillow)))
2830 (native-inputs
2831 `(("python-cython" ,python-cython)
2832 ("python-setuptools" ,python-setuptools)))
2833 (home-page "http://scikit-image.org/")
2834 (synopsis "Image processing in Python")
2835 (description
e881752c 2836 "Scikit-image is a collection of algorithms for image processing.")
12f8f9bb
RW
2837 (license bsd-3)))
2838
2839(define-public python2-scikit-image
2840 (let ((scikit-image (package-with-python2 python-scikit-image)))
2841 (package (inherit scikit-image)
2842 (native-inputs
2843 `(("python2-mock" ,python2-mock)
2844 ,@(package-native-inputs scikit-image)))
2845 (propagated-inputs
2846 `(("python2-pytz" ,python2-pytz)
d9bc0bf8
FB
2847 ("python2-matplotlib" ,python2-matplotlib)
2848 ("python2-numpy" ,python2-numpy)
2849 ("python2-scipy" ,python2-scipy)
2850 ,@(fold alist-delete (package-propagated-inputs scikit-image)
2851 '("python-matplotlib" "python-numpy" "python-scipy")))))))
12f8f9bb 2852
5394a6a6
RW
2853(define-public python-redis
2854 (package
2855 (name "python-redis")
2856 (version "2.10.3")
2857 (source
2858 (origin
2859 (method url-fetch)
2860 (uri (string-append
2861 "https://pypi.python.org/packages/source/r/redis/redis-"
2862 version ".tar.gz"))
2863 (sha256
2864 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2865 (build-system python-build-system)
2866 ;; Tests require a running Redis server
2867 (arguments '(#:tests? #f))
2868 (native-inputs
2869 `(("python-setuptools" ,python-setuptools)
2870 ("python-pytest" ,python-pytest)))
2871 (home-page "https://github.com/andymccurdy/redis-py")
2872 (synopsis "Redis Python client")
2873 (description
2874 "This package provides a Python interface to the Redis key-value store.")
2875 (license license:expat)))
2876
2877(define-public python2-redis
2878 (package-with-python2 python-redis))
2879
748cef5b
RW
2880(define-public python-rq
2881 (package
2882 (name "python-rq")
2883 (version "0.5.2")
2884 (source
2885 (origin
2886 (method url-fetch)
2887 (uri (string-append
2888 "https://pypi.python.org/packages/source/r/rq/rq-"
2889 version ".tar.gz"))
2890 (sha256
2891 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2892 (build-system python-build-system)
2893 (propagated-inputs
2894 `(("python-click" ,python-click)
2895 ("python-redis" ,python-redis)))
2896 (native-inputs
2897 `(("python-setuptools" ,python-setuptools)))
2898 (home-page "http://python-rq.org/")
2899 (synopsis "Simple job queues for Python")
2900 (description
2901 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2902processing them in the background with workers. It is backed by Redis and it
2903is designed to have a low barrier to entry.")
2904 (license bsd-2)))
2905
2906(define-public python2-rq
2907 (package-with-python2 python-rq))
2908
6888830b
FB
2909(define-public python-cython
2910 (package
2911 (name "python-cython")
56918e26 2912 (version "0.23.4")
6888830b
FB
2913 (source
2914 (origin
2915 (method url-fetch)
56918e26 2916 (uri (pypi-uri "Cython" version))
6888830b
FB
2917 (sha256
2918 (base32
56918e26 2919 "13hdffhd37mx3gjby018xl179jaj957fy7kzi01crmimxvn2zi7y"))))
6888830b
FB
2920 (build-system python-build-system)
2921 ;; we need the full python package and not just the python-wrapper
2922 ;; because we need libpython3.3m.so
2923 (inputs
2924 `(("python" ,python)))
2925 (arguments
2926 `(#:phases
2927 (alist-cons-before
2928 'check 'set-HOME
2929 ;; some tests require access to "$HOME/.cython"
2930 (lambda* _ (setenv "HOME" "/tmp"))
2931 (alist-replace
2932 'check
2933 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2934 %standard-phases))))
2935 (home-page "http://cython.org/")
2936 (synopsis "C extensions for Python")
2937 (description "Cython is an optimising static compiler for both the Python
2938programming language and the extended Cython programming language. It makes
2939writing C extensions for Python as easy as Python itself.")
2940 (license asl2.0)))
2941
2942(define-public python2-cython
2943 (package (inherit (package-with-python2 python-cython))
2944 (name "python2-cython")
2945 (inputs
2946 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
2947
2948;; This version of numpy is missing the documentation and is only used to
2949;; build matplotlib which is required to build numpy's documentation.
2950(define python-numpy-bootstrap
2951 (package
2952 (name "python-numpy-bootstrap")
2953 (version "1.9.1")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (string-append "mirror://sourceforge/numpy"
2958 "/numpy-" version ".tar.gz"))
2959 (sha256
2960 (base32
2961 "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80"))))
2962 (build-system python-build-system)
2963 (inputs
2964 `(("python-nose" ,python-nose)
cba256f8
RW
2965 ("openblas" ,openblas)
2966 ("lapack" ,lapack)))
0da98533 2967 (native-inputs
19afbea1 2968 `(("gfortran" ,gfortran)))
0da98533
FB
2969 (arguments
2970 `(#:phases
2971 (alist-cons-before
2972 'build 'set-environment-variables
2973 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
2974 (call-with-output-file "site.cfg"
2975 (lambda (port)
cba256f8
RW
2976 (format port
2977 "[openblas]
dbdfe515
RW
2978libraries = openblas
2979library_dirs = ~a/lib
2980include_dirs = ~a/include
cba256f8
RW
2981
2982[lapack]
2983lapack_libs = lapack
2984library_dirs = ~a/lib
2985include_dirs = ~a/include
2986"
2987 (assoc-ref inputs "openblas")
2988 (assoc-ref inputs "openblas")
2989 (assoc-ref inputs "lapack")
2990 (assoc-ref inputs "lapack"))))
dbdfe515
RW
2991 ;; Use "gcc" executable, not "cc".
2992 (substitute* "numpy/distutils/system_info.py"
2993 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2994 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2995 #t)
6a843168
FB
2996 ;; Tests can only be run after the library has been installed and not
2997 ;; within the source directory.
2998 (alist-cons-after
2999 'install 'check
89b5c60e 3000 (lambda _
6a843168 3001 (with-directory-excursion "/tmp"
89b5c60e 3002 (zero? (system* "python" "-c"
6a843168 3003 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3004 (alist-delete
3005 'check
6a843168 3006 %standard-phases)))))
0da98533
FB
3007 (home-page "http://www.numpy.org/")
3008 (synopsis "Fundamental package for scientific computing with Python")
3009 (description "NumPy is the fundamental package for scientific computing
e881752c 3010with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3011object, sophisticated (broadcasting) functions, tools for integrating C/C++
3012and Fortran code, useful linear algebra, Fourier transform, and random number
3013capabilities.")
3014 (license bsd-3)))
3015
3016(define python2-numpy-bootstrap
3017 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3018
3a1bfe18
RW
3019(define-public python2-fastlmm
3020 (package
3021 (name "python2-fastlmm")
3022 (version "0.2.14")
3023 (source
3024 (origin
3025 (method url-fetch)
3026 (uri (string-append
3027 "https://pypi.python.org/packages/source/f/fastlmm"
3028 "/fastlmm-" version ".zip"))
3029 (sha256
3030 (base32
3031 "023sydkrc3yxad2bycar02jfswwlh4199kafzhf2bssyx2c3xa0l"))))
3032 (build-system python-build-system)
3033 (arguments
3034 `(#:python ,python-2)) ; only Python 2.7 is supported
3035 (propagated-inputs
3036 `(("python2-numpy" ,python2-numpy)
3037 ("python2-scipy" ,python2-scipy)
3038 ("python2-matplotlib" ,python2-matplotlib)
3039 ("python2-pandas" ,python2-pandas)
3040 ("python2-scikit-learn" ,python2-scikit-learn)
3041 ("python2-cython" ,python2-cython)
3042 ("python2-pysnptools" ,python2-pysnptools)))
3043 (native-inputs
3044 `(("unzip" ,unzip)
3045 ("python2-mock" ,python2-mock)
3046 ("python2-setuptools" ,python2-setuptools)))
3047 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3048 (synopsis "Perform genome-wide association studies on large data sets")
3049 (description
3050 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3051Models, is a program for performing both single-SNP and SNP-set genome-wide
3052association studies (GWAS) on extremely large data sets.")
3053 (license asl2.0)))
3054
2ee8869a
FB
3055(define-public python-numpy
3056 (package (inherit python-numpy-bootstrap)
3057 (name "python-numpy")
3058 (outputs '("out" "doc"))
89b5c60e 3059 (inputs
2ee8869a
FB
3060 `(("which" ,which)
3061 ("python-setuptools" ,python-setuptools)
3062 ("python-matplotlib" ,python-matplotlib)
3063 ("python-sphinx" ,python-sphinx)
3064 ("python-pyparsing" ,python-pyparsing)
3065 ("python-numpydoc" ,python-numpydoc)
3066 ,@(package-inputs python-numpy-bootstrap)))
3067 (native-inputs
3068 `(("pkg-config" ,pkg-config)
3069 ("texlive" ,texlive)
3070 ("texinfo" ,texinfo)
3071 ("perl" ,perl)
3072 ,@(package-native-inputs python-numpy-bootstrap)))
3073 (arguments
89b5c60e 3074 `(,@(substitute-keyword-arguments
2ee8869a
FB
3075 (package-arguments python-numpy-bootstrap)
3076 ((#:phases phases)
3077 `(alist-cons-after
3078 'install 'install-doc
3079 (lambda* (#:key outputs #:allow-other-keys)
3080 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3081 (doc (string-append
3082 data "/doc/" ,name "-"
2ee8869a
FB
3083 ,(package-version python-numpy-bootstrap)))
3084 (info (string-append data "/info"))
3085 (html (string-append doc "/html"))
3086 (pyver ,(string-append "PYVER=")))
3087 (with-directory-excursion "doc"
3088 (mkdir-p html)
3089 (system* "make" "html" pyver)
3090 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3091 (system* "make" "-C" "build/latex"
2ee8869a
FB
3092 "all-pdf" "PAPER=a4" pyver)
3093 ;; FIXME: Generation of the info file fails.
3094 ;; (system* "make" "info" pyver)
3095 ;; (mkdir-p info)
3096 ;; (copy-file "build/texinfo/numpy.info"
3097 ;; (string-append info "/numpy.info"))
3098 (for-each (lambda (file)
3099 (copy-file (string-append "build/latex" file)
3100 (string-append doc file)))
3101 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3102 (with-directory-excursion "build/html"
3103 (for-each (lambda (file)
3104 (let* ((dir (dirname file))
3105 (tgt-dir (string-append html "/" dir)))
3106 (unless (equal? "." dir)
3107 (mkdir-p tgt-dir))
96c46210 3108 (install-file file html)))
2ee8869a
FB
3109 (find-files "." ".*"))))))
3110 ,phases)))))))
3111
764c077b
LC
3112(define-public python2-numpy
3113 (let ((numpy (package-with-python2 python-numpy)))
3114 (package (inherit numpy)
88c26834
AE
3115 ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
3116 ;; Python 2.
3117 (inputs `(("python2-matplotlib" ,python2-matplotlib)
3118 ,@(alist-delete "python-matplotlib"
3119 (package-inputs numpy)))))))
2ee8869a 3120
15bfe6d6
FB
3121(define-public python-pyparsing
3122 (package
3123 (name "python-pyparsing")
e0669289 3124 (version "2.0.3")
15bfe6d6
FB
3125 (source
3126 (origin
3127 (method url-fetch)
3128 (uri (string-append "mirror://sourceforge/pyparsing"
3129 "/pyparsing-" version ".tar.gz"))
3130 (sha256
3131 (base32
e0669289 3132 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3133 (build-system python-build-system)
3134 (outputs '("out" "doc"))
3135 (arguments
3136 `(#:tests? #f ; no test target
3137 #:modules ((guix build python-build-system)
3138 (guix build utils))
3139 #:phases
3140 (alist-cons-after
3141 'install 'install-doc
3142 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3143 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3144 "/share/doc/" ,name "-" ,version))
3145 (html-doc (string-append doc "/html"))
3146 (examples (string-append doc "/examples")))
3147 (mkdir-p html-doc)
3148 (mkdir-p examples)
89b5c60e 3149 (for-each
15bfe6d6 3150 (lambda (dir tgt)
89b5c60e 3151 (map (lambda (file)
96c46210 3152 (install-file file tgt))
15bfe6d6
FB
3153 (find-files dir ".*")))
3154 (list "docs" "htmldoc" "examples")
3155 (list doc html-doc examples))))
3156 %standard-phases)))
3157 (home-page "http://pyparsing.wikispaces.com")
3158 (synopsis "Python parsing class library")
3159 (description
3160 "The pyparsing module is an alternative approach to creating and
3161executing simple grammars, vs. the traditional lex/yacc approach, or the use
3162of regular expressions. The pyparsing module provides a library of classes
3163that client code uses to construct the grammar directly in Python code.")
bd3fa666 3164 (license license:expat)))
15bfe6d6
FB
3165
3166(define-public python2-pyparsing
3167 (package-with-python2 python-pyparsing))
3168
ec00de35
FB
3169(define-public python-numpydoc
3170 (package
3171 (name "python-numpydoc")
3172 (version "0.5")
3173 (source
3174 (origin
3175 (method url-fetch)
89b5c60e 3176 (uri (string-append
ec00de35
FB
3177 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3178 version ".tar.gz"))
3179 (sha256
3180 (base32
5e4d8f67
AE
3181 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3182 (modules '((guix build utils)))
3183 (snippet
3184 '(begin
3185 ;; Drop a test requiring matplotlib, which we cannot add as an
3186 ;; input since it would create a circular dependency: Extend the
3187 ;; test for Python 3, where it is already dropped, to Python 2.
3188 (substitute* "numpydoc/tests/test_plot_directive.py"
3189 (("3") "2"))))))
ec00de35
FB
3190 (build-system python-build-system)
3191 (inputs
3192 `(("python-setuptools" ,python-setuptools)
3193 ("python-docutils" ,python-docutils)
3194 ("python-sphinx" ,python-sphinx)
3195 ("python-nose" ,python-nose)))
3196 (home-page "https://pypi.python.org/pypi/numpydoc")
3197 (synopsis
3198 "Numpy's Sphinx extensions")
3199 (description
3200 "Sphinx extension to support docstrings in Numpy format.")
3201 (license bsd-2)))
3202
3203(define-public python2-numpydoc
5e4d8f67 3204 (package-with-python2 python-numpydoc))
1c65314c 3205
1e656049
RW
3206(define-public python-numexpr
3207 (package
3208 (name "python-numexpr")
3209 (version "2.4.4")
3210 (source
3211 (origin
3212 (method url-fetch)
3213 (uri (string-append "https://pypi.python.org/packages/source/"
3214 "n/numexpr/numexpr-" version ".tar.gz"))
3215 (sha256
3216 (base32
3217 "0nsnff5312fm38w6dm34bw7ghfqqy8vl9gig0al963h4mz8zm8nz"))))
3218 (build-system python-build-system)
3219 (arguments `(#:tests? #f)) ; no tests included
3220 (propagated-inputs
3221 `(("python-numpy" ,python-numpy)))
3222 (home-page "https://github.com/pydata/numexpr")
3223 (synopsis "Fast numerical expression evaluator for NumPy")
3224 (description
3225 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3226expressions that operate on arrays are accelerated and use less memory than
3227doing the same calculation in Python. In addition, its multi-threaded
3228capabilities can make use of all your cores, which may accelerate
3229computations, most specially if they are not memory-bounded (e.g. those using
3230transcendental functions).")
3231 (license license:expat)))
3232
3233(define-public python2-numexpr
3234 (let ((numexpr (package-with-python2 python-numexpr)))
3235 (package (inherit numexpr)
3236 ;; Make sure to use special packages for Python 2 instead
3237 ;; of those automatically rewritten by package-with-python2.
3238 (propagated-inputs
3239 `(("python2-numpy" ,python2-numpy)
3240 ,@(alist-delete "python-numpy"
3241 (package-propagated-inputs numexpr)))))))
3242
1c65314c
FB
3243(define-public python-matplotlib
3244 (package
3245 (name "python-matplotlib")
1bbc659f 3246 (version "1.4.3")
1c65314c
FB
3247 (source
3248 (origin
3249 (method url-fetch)
3250 (uri (string-append "mirror://sourceforge/matplotlib"
3251 "/matplotlib-" version ".tar.gz"))
3252 (sha256
3253 (base32
1bbc659f
FB
3254 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3255 (patches (list (search-patch "matplotlib-setupext-tk.patch")))))
1c65314c
FB
3256 (build-system python-build-system)
3257 (outputs '("out" "doc"))
25f9a068
FB
3258 (propagated-inputs ; the following packages are all needed at run time
3259 `(("python-pyparsing" ,python-pyparsing)
3260 ("python-pygobject" ,python-pygobject)
3261 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3262 ("python-tkinter" ,python "tk")
25f9a068
FB
3263 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3264 ;; from 'gtk+') provides the required 'typelib' files used by
3265 ;; 'gobject-introspection'. The location of these files is set with the
3266 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3267 ;; is done automatically by a 'native-search-path' procedure. However,
3268 ;; at run-time the user must set this variable as follows:
3269 ;;
3270 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3271 ("gtk+" ,gtk+)
3272 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3273 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3274 ;; object. For this reason we need to import both libraries.
3275 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3276 ("python-pycairo" ,python-pycairo)
3277 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3278 (inputs
3279 `(("python-setuptools" ,python-setuptools)
3280 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3281 ("python-six" ,python-six)
3282 ("python-pytz" ,python-pytz)
3283 ("python-numpy" ,python-numpy-bootstrap)
3284 ("python-sphinx" ,python-sphinx)
3285 ("python-numpydoc" ,python-numpydoc)
3286 ("python-nose" ,python-nose)
3287 ("python-mock" ,python-mock)
3288 ("libpng" ,libpng)
3289 ("imagemagick" ,imagemagick)
3290 ("freetype" ,freetype)
25f9a068
FB
3291 ("cairo" ,cairo)
3292 ("glib" ,glib)
4e7a137a 3293 ("python-pillow" ,python-pillow)
1c65314c 3294 ;; FIXME: Add backends when available.
1c65314c
FB
3295 ;("python-wxpython" ,python-wxpython)
3296 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3297 ("tcl" ,tcl)
3298 ("tk" ,tk)))
1c65314c
FB
3299 (native-inputs
3300 `(("pkg-config" ,pkg-config)
3301 ("texlive" ,texlive)
3302 ("texinfo" ,texinfo)))
3303 (arguments
3304 `(#:phases
25f9a068
FB
3305 (alist-cons-before
3306 'build 'configure-environment
3307 (lambda* (#:key outputs inputs #:allow-other-keys)
3308 (let ((cairo (assoc-ref inputs "cairo"))
3309 (gtk+ (assoc-ref inputs "gtk+")))
3310 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3311 ;; has not effect.
25f9a068
FB
3312 (setenv "LD_LIBRARY_PATH"
3313 (string-append cairo "/lib:" gtk+ "/lib"))
3314 (setenv "HOME" (getcwd))
3315 (call-with-output-file "setup.cfg"
3316 (lambda (port)
1bbc659f
FB
3317 (format port "[directories]~%
3318basedirlist = ~a,~a~%
3319[rc_options]~%
3320backend = TkAgg~%"
3321 (assoc-ref inputs "tcl")
3322 (assoc-ref inputs "tk"))))))
25f9a068
FB
3323 (alist-cons-after
3324 'install 'install-doc
3325 (lambda* (#:key outputs #:allow-other-keys)
3326 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3327 (doc (string-append data "/doc/" ,name "-" ,version))
3328 (info (string-append data "/info"))
3329 (html (string-append doc "/html")))
3330 (with-directory-excursion "doc"
25f9a068
FB
3331 ;; Produce pdf in 'A4' format.
3332 (substitute* (find-files "." "conf\\.py")
3333 (("latex_paper_size = 'letter'")
3334 "latex_paper_size = 'a4'"))
3335 (mkdir-p html)
3336 (mkdir-p info)
3337 ;; The doc recommends to run the 'html' target twice.
3338 (system* "python" "make.py" "html")
3339 (system* "python" "make.py" "html")
18b31516 3340 (copy-recursively "build/html" html)
25f9a068
FB
3341 (system* "python" "make.py" "latex")
3342 (system* "python" "make.py" "texinfo")
18b31516
FB
3343 (symlink (string-append html "/_images")
3344 (string-append info "/matplotlib-figures"))
3345 (with-directory-excursion "build/texinfo"
3346 (substitute* "matplotlib.texi"
3347 (("@image\\{([^,]*)" all file)
3348 (string-append "@image{matplotlib-figures/" file)))
3349 (symlink (string-append html "/_images")
3350 "./matplotlib-figures")
3351 (system* "makeinfo" "--no-split"
3352 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3353 (copy-file "build/texinfo/matplotlib.info"
3354 (string-append info "/matplotlib.info"))
3355 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3356 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3357 %standard-phases))))
1c65314c
FB
3358 (home-page "http://matplotlib.org")
3359 (synopsis "2D plotting library for Python")
3360 (description
3361 "Matplotlib is a Python 2D plotting library which produces publication
3362quality figures in a variety of hardcopy formats and interactive environments
3363across platforms. Matplotlib can be used in Python scripts, the python and
3364ipython shell, web application servers, and six graphical user interface
3365toolkits.")
3366 (license psfl)))
3367
764c077b
LC
3368(define-public python2-matplotlib
3369 (let ((matplotlib (package-with-python2 python-matplotlib)))
3370 (package (inherit matplotlib)
88c26834
AE
3371 ;; Make sure to use special packages for Python 2 instead
3372 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3373 (propagated-inputs
7ca0dbc3 3374 `(("python2-pycairo" ,python2-pycairo)
764c077b 3375 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3376 ("python2-tkinter" ,python-2 "tk")
3377 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3378 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3379
0dde6232
RW
3380(define-public python2-pysnptools
3381 (package
3382 (name "python2-pysnptools")
3383 (version "0.2.13")
3384 (source
3385 (origin
3386 (method url-fetch)
3387 (uri (string-append
3388 "https://pypi.python.org/packages/source/p/pysnptools"
3389 "/pysnptools-" version ".zip"))
3390 (sha256
3391 (base32
3392 "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib"))))
3393 (build-system python-build-system)
3394 (arguments
3395 `(#:python ,python-2)) ; only Python 2.7 is supported
3396 (propagated-inputs
3397 `(("python2-numpy" ,python2-numpy)
3398 ("python2-scipy" ,python2-scipy)
3399 ("python2-pandas" ,python2-pandas)
3400 ("python2-cython" ,python2-cython)))
3401 (native-inputs
3402 `(("unzip" ,unzip)
3403 ("python2-setuptools" ,python2-setuptools)))
3404 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3405 (synopsis "Library for reading and manipulating genetic data")
3406 (description
3407 "PySnpTools is a library for reading and manipulating genetic data. It
3408can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3409those files. It can also efficiently manipulate ranges of integers using set
3410operators such as union, intersection, and difference.")
3411 (license asl2.0)))
3412
c9b1b4f9
RW
3413(define-public python-rpy2
3414 (package
3415 (name "python-rpy2")
ec3bcbc7 3416 (version "2.7.6")
c9b1b4f9
RW
3417 (source
3418 (origin
3419 (method url-fetch)
ec3bcbc7 3420 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3421 (sha256
3422 (base32
ec3bcbc7 3423 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3424 (build-system python-build-system)
3425 (inputs
3426 `(("python-six" ,python-six)
3427 ("readline" ,readline)
3428 ("icu4c" ,icu4c)
3429 ("pcre" ,pcre)
3430 ("r" ,r)))
3431 (native-inputs
5ff6575b
RW
3432 `(("python-setuptools" ,python-setuptools)
3433 ("zlib" ,zlib)))
c9b1b4f9
RW
3434 (home-page "http://rpy.sourceforge.net/")
3435 (synopsis "Python interface to the R language")
3436 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3437low-level interface to R from Python, a proposed high-level interface,
3438including wrappers to graphical libraries, as well as R-like structures and
3439functions.")
3440 (license gpl3+)))
3441
3442(define-public python2-rpy2
3443 (let ((rpy2 (package-with-python2 python-rpy2)))
3444 (package (inherit rpy2)
3445 (native-inputs
3446 `(("python2-singledispatch" ,python2-singledispatch)
3447 ,@(package-native-inputs rpy2))))))
3448
bb986599
FB
3449(define-public python-scipy
3450 (package
3451 (name "python-scipy")
ba8a0824 3452 (version "0.16.0")
bb986599
FB
3453 (source
3454 (origin
3455 (method url-fetch)
3456 (uri (string-append "mirror://sourceforge/scipy"
da6ce3f1 3457 "/scipy-" version ".tar.xz"))
bb986599
FB
3458 (sha256
3459 (base32
ba8a0824 3460 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3461 (build-system python-build-system)
dd86c0d1 3462 (propagated-inputs
bb986599
FB
3463 `(("python-numpy" ,python-numpy)
3464 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3465 ("python-pyparsing" ,python-pyparsing)))
3466 (inputs
3467 `(("lapack" ,lapack)
719b01c1 3468 ("openblas" ,openblas)))
bb986599 3469 (native-inputs
dd86c0d1
RW
3470 `(("python-nose" ,python-nose)
3471 ("python-sphinx" ,python-sphinx)
5248d49e 3472 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3473 ("gfortran" ,gfortran)
bb986599
FB
3474 ("texlive" ,texlive)
3475 ("perl" ,perl)))
3476 (outputs '("out" "doc"))
3477 (arguments
3478 `(#:phases
3479 (alist-cons-before
719b01c1 3480 'build 'configure-openblas
bb986599 3481 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3482 (call-with-output-file "site.cfg"
3483 (lambda (port)
3484 (format port
3485 "[blas]
3486libraries = openblas
3487library_dirs = ~a/lib
3488include_dirs = ~a/include
3489[atlas]
3490library_dirs = ~a/lib
3491atlas_libs = openblas
3492"
3493 (assoc-ref inputs "openblas")
3494 (assoc-ref inputs "openblas")
3495 (assoc-ref inputs "openblas"))))
3496 #t)
bb986599
FB
3497 (alist-cons-after
3498 'install 'install-doc
3499 (lambda* (#:key outputs #:allow-other-keys)
3500 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3501 (doc (string-append data "/doc/" ,name "-" ,version))
3502 (html (string-append doc "/html"))
3503 (pyver ,(string-append "PYVER=")))
3504 (with-directory-excursion "doc"
bb986599
FB
3505 ;; Fix generation of images for mathematical expressions.
3506 (substitute* (find-files "source" "conf\\.py")
3507 (("pngmath_use_preview = True")
3508 "pngmath_use_preview = False"))
3509 (mkdir-p html)
3510 (system* "make" "html" pyver)
3511 (system* "make" "latex" "PAPER=a4" pyver)
3512 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3513 (copy-file "build/latex/scipy-ref.pdf"
3514 (string-append doc "/scipy-ref.pdf"))
3515 (with-directory-excursion "build/html"
3516 (for-each (lambda (file)
3517 (let* ((dir (dirname file))
3518 (tgt-dir (string-append html "/" dir)))
96c46210 3519 (install-file file html)))
bb986599
FB
3520 (find-files "." ".*"))))))
3521 ;; Tests can only be run after the library has been installed and not
3522 ;; within the source directory.
3523 (alist-cons-after
3524 'install 'check
89b5c60e 3525 (lambda _
bb986599
FB
3526 (with-directory-excursion "/tmp"
3527 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3528 (alist-delete
3529 'check
4f9ff21e
RW
3530 (alist-cons-after
3531 'unpack 'fix-tests
3532 (lambda _
3533 (substitute* "scipy/integrate/tests/test_quadpack.py"
3534 (("libm.so") "libm.so.6"))
3535 #t)
3536 %standard-phases)))))))
bb986599
FB
3537 (home-page "http://www.scipy.org/")
3538 (synopsis "The Scipy library provides efficient numerical routines")
3539 (description "The SciPy library is one of the core packages that make up
3540the SciPy stack. It provides many user-friendly and efficient numerical
3541routines such as routines for numerical integration and optimization.")
3542 (license bsd-3)))
3543
764c077b
LC
3544(define-public python2-scipy
3545 (let ((scipy (package-with-python2 python-scipy)))
3546 (package (inherit scipy)
3547 ;; Use packages customized for python-2.
dd86c0d1
RW
3548 (propagated-inputs
3549 `(("python2-matplotlib" ,python2-matplotlib)
3550 ("python2-numpy" ,python2-numpy)
3551 ,@(alist-delete "python-matplotlib"
3552 (alist-delete "python-numpy"
3553 (package-propagated-inputs scipy))))))))
bb986599 3554
94914805
EB
3555(define-public python-sqlalchemy
3556 (package
3557 (name "python-sqlalchemy")
3558 (version "0.9.7")
3559 (source
3560 (origin
3561 (method url-fetch)
3562 (uri (string-append "https://pypi.python.org/packages/source/S/"
3563 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3564 (sha256
3565 (base32
3566 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
3567 (build-system python-build-system)
3568 (native-inputs
3569 `(("python-cython" ,python-cython) ;for c extensions
3570 ("python-pytest" ,python-pytest)
3571 ("python-mock" ,python-mock))) ;for tests
3572 (arguments
3573 `(#:phases (alist-replace
3574 'check
3575 (lambda _ (zero? (system* "py.test")))
3576 %standard-phases)))
3577 (home-page "http://www.sqlalchemy.org")
3578 (synopsis "Database abstraction library")
3579 (description
3580 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3581gives application developers the full power and flexibility of SQL. It
3582provides a full suite of well known enterprise-level persistence patterns,
3583designed for efficient and high-performing database access, adapted into a
3584simple and Pythonic domain language.")
3585 (license x11)))
3586
3587(define-public python2-sqlalchemy
3588 (package-with-python2 python-sqlalchemy))
c937562e 3589
1671c07c
EB
3590(define-public python-distutils-extra
3591 (package
3592 (name "python-distutils-extra")
3593 (version "2.38")
3594 (source
3595 (origin
3596 (method url-fetch)
3597 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3598 version "/+download/python-distutils-extra-"
3599 version ".tar.gz"))
3600 (sha256
3601 (base32
3602 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3603 (build-system python-build-system)
3604 (native-inputs
3605 `(("python-setuptools" ,python-setuptools)))
3606 (home-page "https://launchpad.net/python-distutils-extra/")
3607 (synopsis "Enhancements to Python's distutils")
3608 (description
3609 "The python-distutils-extra module enables you to easily integrate
3610gettext support, themed icons, and scrollkeeper-based documentation into
3611Python's distutils.")
3612 (license gpl2)))
3613
3614(define-public python2-distutils-extra
3615 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3616
3617(define-public python2-elib.intl
3618 (package
3619 (name "python2-elib.intl")
3620 (version "0.0.3")
3621 (source
3622 (origin
3623 ;; This project doesn't tag releases or publish tarballs, so we take
3624 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3625 (method git-fetch)
3626 (uri (git-reference
3627 (url "https://github.com/dieterv/elib.intl.git")
3628 (commit "d09997cfef")))
3629 (sha256
3630 (base32
3631 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3632 (build-system python-build-system)
3633 (native-inputs
3634 `(("python2-setuptools" ,python2-setuptools)))
3635 (arguments
3636 ;; incompatible with Python 3 (exception syntax)
3637 `(#:python ,python-2
3638 #:tests? #f
3639 ;; With standard flags, the install phase attempts to create a zip'd
3640 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3641 ;; before 1980'
3642 #:configure-flags '("--single-version-externally-managed"
3643 "--record=elib.txt")))
3644 (home-page "https://github.com/dieterv/elib.intl")
3645 (synopsis "Enhanced internationalization for Python")
3646 (description
3647 "The elib.intl module provides enhanced internationalization (I18N)
3648services for your Python modules and applications.")
3649 (license lgpl3+)))
3650
c937562e
EB
3651(define-public python-pillow
3652 (package
3653 (name "python-pillow")
7fbee931 3654 (version "3.0.0")
c937562e
EB
3655 (source
3656 (origin
3657 (method url-fetch)
3658 (uri (string-append "https://pypi.python.org/packages/source/P/"
3659 "Pillow/Pillow-" version ".tar.gz"))
3660 (sha256
3661 (base32
7fbee931 3662 "1fsl6sywd4f4axvbpy5h5h26l6w8592j0f1wcnj1hmgy83svwl5d"))))
c937562e
EB
3663 (build-system python-build-system)
3664 (native-inputs
3665 `(("python-setuptools" ,python-setuptools)
3666 ("python-nose" ,python-nose)))
3667 (inputs
5ff408d9
SB
3668 `(("freetype" ,freetype)
3669 ("lcms" ,lcms)
c937562e
EB
3670 ("zlib" ,zlib)
3671 ("libjpeg" ,libjpeg)
3672 ("openjpeg" ,openjpeg)
5ff408d9
SB
3673 ("libtiff" ,libtiff)
3674 ("libwebp" ,libwebp)))
c937562e
EB
3675 (propagated-inputs
3676 `(;; Used at runtime for pkg_resources
3677 ("python-setuptools" ,python-setuptools)))
3678 (arguments
e5358a6b
LC
3679 `(#:phases (modify-phases %standard-phases
3680 (add-before
3681 'install 'disable-egg-compression
3682 (lambda _
3683 ;; Leave the .egg uncompressed since compressing it would
3684 ;; prevent the GC from identifying run-time dependencies.
3685 ;; See <http://bugs.gnu.org/20765>.
3686 (let ((port (open-file "setup.cfg" "a")))
3687 (display "\n[easy_install]\nzip_ok = 0\n"
3688 port)
3689 (close-port port)
3690 #t)))
3691 (add-after
3692 'install 'check-installed
3693 (lambda _
3694 (begin
3695 (setenv "HOME" (getcwd))
3696 (and (zero? (system* "python" "selftest.py"
3697 "--installed"))
3698 (zero? (system* "python" "test-installed.py"))))))
3699 (delete 'check))))
c937562e
EB
3700 (home-page "https://pypi.python.org/pypi/Pillow")
3701 (synopsis "Fork of the Python Imaging Library")
3702 (description
3703 "The Python Imaging Library adds image processing capabilities to your
3704Python interpreter. This library provides extensive file format support, an
3705efficient internal representation, and fairly powerful image processing
3706capabilities. The core image library is designed for fast access to data
3707stored in a few basic pixel formats. It should provide a solid foundation for
3708a general image processing tool.")
3709 (license (x11-style
3710 "http://www.pythonware.com/products/pil/license.htm"
3711 "The PIL Software License"))))
3712
3713(define-public python2-pillow
3714 (package-with-python2 python-pillow))
bb986599 3715
a415f036
FB
3716(define-public python-pycparser
3717 (package
3718 (name "python-pycparser")
38eb6919 3719 (version "2.14")
a415f036
FB
3720 (source
3721 (origin
3722 (method url-fetch)
38eb6919 3723 (uri (pypi-uri "pycparser" version))
a415f036
FB
3724 (sha256
3725 (base32
38eb6919 3726 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
3727 (outputs '("out" "doc"))
3728 (build-system python-build-system)
3729 (native-inputs
3730 `(("pkg-config" ,pkg-config)
3731 ("python-setuptools" ,python-setuptools)))
3732 (arguments
89b5c60e 3733 `(#:phases
a415f036
FB
3734 (alist-replace
3735 'check
3736 (lambda _
3737 (with-directory-excursion "tests"
3738 (zero? (system* "python" "all_tests.py"))))
3739 (alist-cons-after
3740 'install 'install-doc
3741 (lambda* (#:key outputs #:allow-other-keys)
3742 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3743 (doc (string-append data "/doc/" ,name "-" ,version))
3744 (examples (string-append doc "/examples")))
3745 (mkdir-p examples)
3746 (for-each (lambda (file)
3747 (copy-file (string-append "." file)
3748 (string-append doc file)))
3749 '("/README.rst" "/CHANGES" "/LICENSE"))
3750 (copy-recursively "examples" examples)))
3751 %standard-phases))))
3752 (home-page "https://github.com/eliben/pycparser")
3753 (synopsis "C parser in Python")
3754 (description
3755 "Pycparser is a complete parser of the C language, written in pure Python
3756using the PLY parsing library. It parses C code into an AST and can serve as
3757a front-end for C compilers or analysis tools.")
3758 (license bsd-3)))
3759
3760(define-public python2-pycparser
3761 (package-with-python2 python-pycparser))
57c3f716
FB
3762
3763(define-public python-cffi
3764 (package
3765 (name "python-cffi")
2d3a437c 3766 (version "1.4.2")
57c3f716
FB
3767 (source
3768 (origin
3769 (method url-fetch)
2d3a437c 3770 (uri (pypi-uri "cffi" version))
89b5c60e 3771 (sha256
2d3a437c 3772 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
3773 (build-system python-build-system)
3774 (outputs '("out" "doc"))
3775 (inputs
3776 `(("libffi" ,libffi)))
3777 (propagated-inputs ; required at run-time
3778 `(("python-pycparser" ,python-pycparser)))
3779 (native-inputs
3780 `(("pkg-config" ,pkg-config)
3781 ("python-sphinx" ,python-sphinx)
4179f952 3782 ("python-pytest" ,python-pytest)
57c3f716
FB
3783 ("python-setuptools" ,python-setuptools)))
3784 (arguments
4179f952 3785 `(#:phases
57c3f716
FB
3786 (alist-cons-after
3787 'install 'install-doc
3788 (lambda* (#:key outputs #:allow-other-keys)
3789 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3790 (doc (string-append data "/doc/" ,name "-" ,version))
3791 (html (string-append doc "/html")))
3792 (with-directory-excursion "doc"
3793 (system* "make" "html")
3794 (mkdir-p html)
3795 (copy-recursively "build/html" html))
3796 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3797 %standard-phases)))
3798 (home-page "http://cffi.readthedocs.org")
3799 (synopsis "Foreign function interface for Python")
3800 (description
3801 "Foreign Function Interface for Python calling C code.")
bd3fa666 3802 (license license:expat)))
57c3f716
FB
3803
3804(define-public python2-cffi
3805 (package-with-python2 python-cffi))
6fa14469
FB
3806
3807(define-public python-xcffib
3808 (package
3809 (name "python-xcffib")
3810 (version "0.1.9")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (string-append "https://pypi.python.org/packages/source/x/"
3815 "xcffib/xcffib-" version ".tar.gz"))
3816 (sha256
3817 (base32
3818 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3819 (build-system python-build-system)
3820 (inputs
3821 `(("libxcb" ,libxcb)
3822 ("python-six" ,python-six)))
3823 (native-inputs
3824 `(("python-setuptools" ,python-setuptools)))
3825 (propagated-inputs
3826 `(("python-cffi" ,python-cffi))) ; used at run time
3827 (arguments
89b5c60e 3828 `(#:phases
6fa14469
FB
3829 (alist-cons-after
3830 'install 'install-doc
3831 (lambda* (#:key outputs #:allow-other-keys)
3832 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3833 "/doc/" ,name "-" ,version)))
3834 (mkdir-p doc)
3835 (copy-file "README.md"
3836 (string-append doc "/README.md"))))
3837 %standard-phases)))
3838 (home-page "https://github.com/tych0/xcffib")
3839 (synopsis "XCB Python bindings")
3840 (description
3841 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3842support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 3843 (license license:expat)))
6fa14469
FB
3844
3845(define-public python2-xcffib
3846 (package-with-python2 python-xcffib))
3847
9e099723
FB
3848(define-public python-cairocffi
3849 (package
3850 (name "python-cairocffi")
3851 (version "0.6")
3852 (source
3853 (origin
3854 (method url-fetch)
3855 ;; The archive on pypi is missing the 'utils' directory!
3856 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3857 version ".tar.gz"))
f586c877 3858 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
3859 (sha256
3860 (base32
3861 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3862 (build-system python-build-system)
3863 (outputs '("out" "doc"))
3864 (inputs
3865 `(("gdk-pixbuf" ,gdk-pixbuf)
3866 ("cairo" ,cairo)))
3867 (native-inputs
3868 `(("pkg-config" ,pkg-config)
3869 ("python-sphinx" ,python-sphinx)
3870 ("python-docutils" ,python-docutils)
3871 ("python-setuptools" ,python-setuptools)))
3872 (propagated-inputs
3873 `(("python-xcffib" ,python-xcffib))) ; used at run time
3874 (arguments
89b5c60e 3875 `(#:phases
9e099723
FB
3876 (alist-cons-after
3877 'install 'install-doc
3878 (lambda* (#:key inputs outputs #:allow-other-keys)
3879 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3880 (doc (string-append data "/doc/" ,name "-" ,version))
3881 (html (string-append doc "/html")))
89b5c60e 3882 (setenv "LD_LIBRARY_PATH"
9e099723
FB
3883 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3884 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3885 (setenv "LANG" "en_US.UTF-8")
3886 (mkdir-p html)
3887 (for-each (lambda (file)
3888 (copy-file (string-append "." file)
3889 (string-append doc file)))
3890 '("/README.rst" "/CHANGES" "/LICENSE"))
3891 (system* "python" "setup.py" "build_sphinx")
3892 (copy-recursively "docs/_build/html" html)))
3893 %standard-phases)))
3894 (home-page "https://github.com/SimonSapin/cairocffi")
3895 (synopsis "Python bindings and object-oriented API for Cairo")
3896 (description
3897 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3898Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3899graphics library with support for multiple backends including image buffers,
3900PNG, PostScript, PDF, and SVG file output.")
3901 (license bsd-3)))
3902
3903(define-public python2-cairocffi
3904 (package-with-python2 python-cairocffi))
3905
3cff95cb
RW
3906(define-public python-decorator
3907 (package
3908 (name "python-decorator")
e21338be 3909 (version "4.0.6")
3cff95cb
RW
3910 (source
3911 (origin
3912 (method url-fetch)
e21338be 3913 (uri (pypi-uri "decorator" version))
3cff95cb 3914 (sha256
e21338be 3915 (base32 "1710cwsbwr8fkiq59w2min7rwgdz7ly51yz8l8yh1zbpfxcm8qhw"))))
3cff95cb
RW
3916 (build-system python-build-system)
3917 (arguments '(#:tests? #f)) ; no test target
3918 (native-inputs
3919 `(("python-setuptools" ,python-setuptools)))
3920 (home-page "http://pypi.python.org/pypi/decorator/")
3921 (synopsis "Python module to simplify usage of decorators")
3922 (description
3923 "The aim of the decorator module is to simplify the usage of decorators
3924for the average programmer, and to popularize decorators usage giving examples
3925of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3926etc. The core of this module is a decorator factory.")
3927 (license license:expat)))
3928
3929(define-public python2-decorator
3930 (package-with-python2 python-decorator))
3931
2c0499ad
RW
3932(define-public python-drmaa
3933 (package
3934 (name "python-drmaa")
3935 (version "0.7.6")
3936 (source
3937 (origin
3938 (method url-fetch)
3939 (uri (string-append
3940 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3941 version ".tar.gz"))
3942 (sha256
3943 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3944 (build-system python-build-system)
3945 ;; The test suite requires libdrmaa which is provided by the cluster
3946 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3947 ;; should be set to the path of the libdrmaa library.
3948 (arguments '(#:tests? #f))
3949 (native-inputs
3950 `(("python-nose" ,python-nose)
3951 ("python-setuptools" ,python-setuptools)))
3952 (home-page "https://pypi.python.org/pypi/drmaa")
3953 (synopsis "Python bindings for the DRMAA library")
3954 (description
3955 "A Python package for Distributed Resource Management (DRM) job
3956submission and control. This package is an implementation of the DRMAA 1.0
3957Python language binding specification.")
3958 (license bsd-3)))
3959
3960(define-public python2-drmaa
3961 (package-with-python2 python-drmaa))
3962
d05c6da0
RW
3963(define-public python-gridmap
3964 (package
3965 (name "python-gridmap")
3966 (version "0.13.0")
3967 (source
3968 (origin
3969 (method url-fetch)
3970 (uri (string-append
3971 "https://github.com/pygridtools/gridmap/archive/v"
3972 version ".tar.gz"))
3973 (file-name (string-append name "-" version ".tar.gz"))
3974 (sha256
3975 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
3976 (build-system python-build-system)
3977 (inputs
3978 `(("python-psutil" ,python-psutil)
3979 ("python-drmaa" ,python-drmaa)
3980 ("python-pyzmq" ,python-pyzmq)))
3981 (native-inputs
3982 `(("python-setuptools" ,python-setuptools)))
3983 (home-page "https://github.com/pygridtools/gridmap")
3984 (synopsis "Create jobs on a cluster directly from Python")
3985 (description
3986 "Gridmap is a Python package to allow you to easily create jobs on the
3987cluster directly from Python. You can directly map Python functions onto the
3988cluster without needing to write any wrapper code yourself.")
3989 (license gpl3+)))
3990
3991(define-public python2-gridmap
3992 (package-with-python2 python-gridmap))
3993
cb6d5c54
RW
3994(define-public python-pexpect
3995 (package
3996 (name "python-pexpect")
3997 (version "3.3")
3998 (source
3999 (origin
4000 (method url-fetch)
4001 (uri (string-append "https://pypi.python.org/packages/source/p/"
4002 "pexpect/pexpect-" version ".tar.gz"))
4003 (sha256
4004 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4005 (build-system python-build-system)
4006 (arguments
4007 `(#:phases
4008 (modify-phases %standard-phases
4009 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4010 (native-inputs
4011 `(("python-nose" ,python-nose)))
4012 (home-page "http://pexpect.readthedocs.org/")
4013 (synopsis "Controlling interactive console applications")
4014 (description
4015 "Pexpect is a pure Python module for spawning child applications;
4016controlling them; and responding to expected patterns in their output.
4017Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4018child application and control it as if a human were typing commands.")
4019 (license isc)))
4020
4021(define-public python2-pexpect
4022 (package-with-python2 python-pexpect))
4023
229ad120
RW
4024(define-public python-setuptools-scm
4025 (package
4026 (name "python-setuptools-scm")
383af6b0 4027 (version "1.9.0")
229ad120
RW
4028 (source (origin
4029 (method url-fetch)
383af6b0 4030 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4031 (sha256
4032 (base32
383af6b0 4033 "0y24bl893zk6nrklbvdrlmpkalf214zjn6k1xrglljd29rrn4wxi"))))
229ad120 4034 (build-system python-build-system)
383af6b0 4035 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4036 (home-page "https://github.com/pypa/setuptools_scm/")
4037 (synopsis "Manage Python package versions in SCM metadata")
4038 (description
383af6b0 4039 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4040@dfn{software configuration management} (SCM) metadata instead of declaring
4041them as the version argument or in a SCM managed file.")
4042 (license license:expat)))
4043
4044(define-public python2-setuptools-scm
4045 (package-with-python2 python-setuptools-scm))
4046
b74270ee
RW
4047(define-public python-pathpy
4048 (package
4049 (name "python-pathpy")
4050 (version "8.1.1")
4051 (source
4052 (origin
4053 (method url-fetch)
4054 (uri (string-append "https://pypi.python.org/packages/source/p/"
4055 "path.py/path.py-" version ".tar.gz"))
4056 (sha256
4057 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4058 (build-system python-build-system)
4059 (propagated-inputs
4060 `(("python-appdirs" ,python-appdirs)))
4061 (native-inputs
553b709b
EF
4062 `(("python-setuptools" ,python-setuptools)
4063 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4064 ("python-pytest" ,python-pytest)
4065 ("python-pytest-runner" ,python-pytest-runner)))
4066 (home-page "http://github.com/jaraco/path.py")
4067 (synopsis "Python module wrapper for built-in os.path")
4068 (description
4069 "@code{path.py} implements path objects as first-class entities, allowing
4070common operations on files to be invoked on those path objects directly.")
4071 (license license:expat)))
4072
4073(define-public python2-pathpy
4074 (package-with-python2 python-pathpy))
4075
0d34e01b
RW
4076(define-public python-pickleshare
4077 (package
4078 (name "python-pickleshare")
4079 (version "0.5")
4080 (source
4081 (origin
4082 (method url-fetch)
4083 (uri (string-append "https://pypi.python.org/packages/source/p/"
4084 "pickleshare/pickleshare-" version ".tar.gz"))
4085 (sha256
4086 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4087 (build-system python-build-system)
4088 (propagated-inputs
4089 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4090 (native-inputs
4091 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4092 (home-page "https://github.com/vivainio/pickleshare")
4093 (synopsis "Tiny key value database with concurrency support")
4094 (description
4095 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4096Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4097shelve, many processes can access the database simultaneously. Changing a
4098value in database is immediately visible to other processes accessing the same
4099database. Concurrency is possible because the values are stored in separate
4100files. Hence the “database” is a directory where all files are governed by
4101PickleShare.")
4102 (license license:expat)))
4103
4104(define-public python2-pickleshare
4105 (package-with-python2 python-pickleshare))
4106
cd6e5189
RW
4107(define-public python-simplegeneric
4108 (package
4109 (name "python-simplegeneric")
4110 (version "0.8.1")
4111 (source
4112 (origin
4113 (method url-fetch)
4114 (uri (string-append "https://pypi.python.org/packages/source/s/"
4115 "simplegeneric/simplegeneric-" version ".zip"))
4116 (sha256
4117 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4118 (build-system python-build-system)
4119 (native-inputs
69b96e5e
RW
4120 `(("python-setuptools" ,python-setuptools)
4121 ("unzip" ,unzip)))
cd6e5189
RW
4122 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4123 (synopsis "Python module for simple generic functions")
4124 (description
4125 "The simplegeneric module lets you define simple single-dispatch generic
4126functions, akin to Python’s built-in generic functions like @code{len()},
4127@code{iter()} and so on. However, instead of using specially-named methods,
4128these generic functions use simple lookup tables, akin to those used by
4129e.g. @code{pickle.dump()} and other generic functions found in the Python
4130standard library.")
4131 (license zpl2.1)))
4132
4133(define-public python2-simplegeneric
4134 (package-with-python2 python-simplegeneric))
4135
ddc7d8ed
RW
4136(define-public python-ipython-genutils
4137 (package
4138 (name "python-ipython-genutils")
4139 (version "0.1.0")
4140 (source
4141 (origin
4142 (method url-fetch)
4143 (uri (string-append "https://pypi.python.org/packages/source/i/"
4144 "ipython_genutils/ipython_genutils-"
4145 version ".tar.gz"))
4146 (sha256
4147 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4148 (build-system python-build-system)
4149 (arguments `(#:tests? #f)) ; no tests
4150 (home-page "http://ipython.org")
4151 (synopsis "Vestigial utilities from IPython")
4152 (description
4153 "This package provides retired utilities from IPython.")
4154 (license bsd-3)))
4155
4156(define-public python2-ipython-genutils
4157 (package-with-python2 python-ipython-genutils))
4158
2b10eb48
RW
4159(define-public python-traitlets
4160 (package
4161 (name "python-traitlets")
4162 (version "4.0.0")
4163 (source
4164 (origin
4165 (method url-fetch)
4166 (uri (string-append "https://pypi.python.org/packages/source/t/"
4167 "traitlets/traitlets-" version ".tar.gz"))
4168 (sha256
4169 (base32
4170 "0fr3w2xwb46c591dp7zw02bgf4d21mjy9g6rhwc9bwd4ji50n50b"))))
4171 (build-system python-build-system)
4172 (arguments
4173 `(#:phases
4174 (modify-phases %standard-phases
4175 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4176 (propagated-inputs
4177 `(("python-ipython-genutils" ,python-ipython-genutils)
4178 ("python-decorator" ,python-decorator)))
4179 (native-inputs
4180 `(("python-nose" ,python-nose)))
4181 (home-page "http://ipython.org")
4182 (synopsis "Configuration system for Python applications")
4183 (description
4184 "Traitlets is a framework that lets Python classes have attributes with
4185type checking, dynamically calculated default values, and ‘on change’
4186callbacks. The package also includes a mechanism to use traitlets for
4187configuration, loading values from files or from command line arguments. This
4188is a distinct layer on top of traitlets, so you can use traitlets in your code
4189without using the configuration machinery.")
4190 (license bsd-3)))
4191
4192(define-public python2-traitlets
4193 (package-with-python2 python-traitlets))
4194
ae1ab9fe
FB
4195(define-public python-ipython
4196 (package
4197 (name "python-ipython")
3a0b1b9a 4198 (version "3.2.1")
ae1ab9fe
FB
4199 (source
4200 (origin
fceac880
FB
4201 (method url-fetch)
4202 (patches (list (search-patch "python-ipython-inputhook-ctype.patch")))
4203 (uri (string-append "https://pypi.python.org/packages/source/i/"
4204 "ipython/ipython-" version ".tar.gz"))
4205 (sha256
4206 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4207 (build-system python-build-system)
4208 (outputs '("out" "doc"))
3a0b1b9a
FB
4209 (propagated-inputs
4210 `(("python-pyzmq" ,python-pyzmq)
4211 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4212 (inputs
4213 `(("readline" ,readline)
3a0b1b9a 4214 ("which" ,which)
ae1ab9fe 4215 ("python-matplotlib" ,python-matplotlib)
5d26e542 4216 ("python-numpy" ,python-numpy)
ae1ab9fe 4217 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4218 ("python-jinja2" ,python-jinja2)
4219 ("python-mistune" ,python-mistune)
4220 ("python-jsonschema" ,python-jsonschema)
4221 ("python-pygments" ,python-pygments)
4222 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4223 ("python-nose" ,python-nose)))
4224 (native-inputs
4225 `(("pkg-config" ,pkg-config)
4226 ("python-sphinx" ,python-sphinx)
4227 ("texlive" ,texlive)
4228 ("texinfo" ,texinfo)
4229 ("python-setuptools" ,python-setuptools)))
4230 (arguments
89b5c60e 4231 `(#:phases
3a0b1b9a
FB
4232 (modify-phases %standard-phases
4233 (add-after
4234 'install 'install-doc
4235 (lambda* (#:key inputs outputs #:allow-other-keys)
4236 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4237 (doc (string-append data "/doc/" ,name "-" ,version))
4238 (html (string-append doc "/html"))
4239 (man1 (string-append data "/man/man1"))
4240 (info (string-append data "/info"))
4241 (examples (string-append doc "/examples")))
afd3d931 4242 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4243 (with-directory-excursion "docs"
4244 ;; FIXME: html and pdf fail to build
4245 ;; (system* "make" "html")
4246 ;; (system* "make" "pdf" "PAPER=a4")
4247 (system* "make" "info"))
4248 (copy-recursively "docs/man" man1)
4249 (copy-recursively "examples" examples)
4250 ;; (copy-recursively "docs/build/html" html)
4251 ;; (copy-file "docs/build/latex/ipython.pdf"
4252 ;; (string-append doc "/ipython.pdf"))
4253 (mkdir-p info)
4254 (copy-file "docs/build/texinfo/ipython.info"
4255 (string-append info "/ipython.info"))
4256 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4257 ;; Tests can only be run after the library has been installed and not
4258 ;; within the source directory.
4259 (delete 'check)
4260 (add-after
4261 'install 'check
4262 (lambda* (#:key outputs tests? #:allow-other-keys)
4263 (if tests?
4264 (with-directory-excursion "/tmp"
4265 (setenv "HOME" "/tmp/") ;; required by a test
4266 (zero? (system* (string-append (assoc-ref outputs "out")
4267 "/bin/iptest"))))
4268 #t)))
4269 (add-before
4270 'install 'fix-tests
4271 (lambda* (#:key inputs #:allow-other-keys)
4272 (substitute* "./IPython/utils/_process_posix.py"
4273 (("/usr/bin/env', 'which") (which "which")))
4274 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4275 (("#!/usr/bin/env python")
4276 (string-append "#!" (which "python"))))
4277 ;; Disable 1 failing test
4278 (substitute* "./IPython/core/tests/test_magic.py"
4279 (("def test_dirops\\(\\):" all)
4280 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4281 (home-page "http://ipython.org")
4282 (synopsis "IPython is a tool for interactive computing in Python")
4283 (description
4284 "IPython provides a rich architecture for interactive computing with:
4285Powerful interactive shells, a browser-based notebook, support for interactive
4286data visualization, embeddable interpreters and tools for parallel
4287computing.")
4288 (license bsd-3)))
4289
4290(define-public python2-ipython
4291 (let ((ipython (package-with-python2 python-ipython)))
3a0b1b9a
FB
4292 (package
4293 (inherit ipython)
4294 ;; FIXME: some tests are failing
4295 (arguments
4296 `(#:tests? #f ,@(package-arguments ipython)))
ae1ab9fe 4297 ;; Make sure we use custom python2-NAME packages.
3a0b1b9a 4298 ;; FIXME: add pyreadline once available.
667d90df
RW
4299 (propagated-inputs
4300 `(("python2-terminado" ,python2-terminado)
4301 ,@(alist-delete "python-terminado"
4302 (package-propagated-inputs ipython))))
89b5c60e 4303 (inputs
3a0b1b9a
FB
4304 `(("python2-mock" ,python2-mock)
4305 ("python2-matplotlib" ,python2-matplotlib)
5587253a
FB
4306 ("python2-numpy" ,python2-numpy)
4307 ,@(fold alist-delete (package-inputs ipython)
4308 '("python-matplotlib" "python-numpy")))))))
03411993
AE
4309
4310(define-public python-isodate
4311 (package
4312 (name "python-isodate")
4313 (version "0.5.1")
4314 (source
4315 (origin
4316 (method url-fetch)
4317 (uri (string-append
4318 "https://pypi.python.org/packages/source/i/isodate/isodate-"
4319 version
4320 ".tar.gz"))
4321 (sha256
4322 (base32
4323 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
4324 (build-system python-build-system)
4325 (inputs
4326 `(("python-setuptools" ,python-setuptools)))
4327 (home-page
4328 "http://cheeseshop.python.org/pypi/isodate")
4329 (synopsis
4330 "Python date parser and formatter")
4331 (description
4332 "Python-isodate is a python module for parsing and formatting
4333ISO 8601 dates, time and duration.")
4334 (license bsd-3)))
4335
4336(define-public python2-isodate
4337 (package-with-python2 python-isodate))
673ab897
AE
4338
4339(define-public python-html5lib
4340 (package
4341 (name "python-html5lib")
4342 (version "1.0b3")
4343 (source
4344 (origin
4345 (method url-fetch)
4346 (uri (string-append
4347 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
4348 version
4349 ".tar.gz"))
4350 (sha256
4351 (base32
4352 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
4353 (build-system python-build-system)
3dd75476
AE
4354 (propagated-inputs
4355 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4356 (inputs
4357 `(("python-setuptools" ,python-setuptools)))
4358 (arguments
4359 `(#:test-target "check"))
4360 (home-page
4361 "https://github.com/html5lib/html5lib-python")
4362 (synopsis
4363 "Python HTML parser based on the WHATWG HTML specifcation")
4364 (description
4365 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4366and written in Python.")
bd3fa666 4367 (license license:expat)))
673ab897
AE
4368
4369(define-public python2-html5lib
4370 (package-with-python2 python-html5lib))
e99f4211
MW
4371
4372(define-public python-urwid
4373 (package
4374 (name "python-urwid")
4375 (version "1.3.0")
4376 (source
4377 (origin
4378 (method url-fetch)
be1f44bb
MW
4379 (uri (string-append
4380 "https://pypi.python.org/packages/source/u/urwid/urwid-"
4381 version ".tar.gz"))
e99f4211
MW
4382 (sha256
4383 (base32
4384 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
4385 (build-system python-build-system)
4386 (native-inputs `(("python-setuptools" ,python-setuptools)))
4387 (home-page "http://urwid.org")
4388 (synopsis "Console user interface library for Python")
4389 (description
4390 "Urwid is a curses-based UI/widget library for Python. It includes many
4391features useful for text console applications.")
4392 (license lgpl2.1+)))
4393
4394(define-public python2-urwid
4395 (package-with-python2 python-urwid))
d95a56c6
PAR
4396
4397(define-public python-dbus
4398 (package
4399 (name "python-dbus")
4400 (version "1.2.0")
4401 (source
4402 (origin
4403 (method url-fetch)
4404 (uri (string-append
4405 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4406 version ".tar.gz"))
4407 (sha256
4408 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4409 (build-system gnu-build-system)
6717c879
SB
4410 (arguments
4411 '(#:phases
4412 (modify-phases %standard-phases
4413 (add-before
4414 'check 'pre-check
4415 (lambda _
4416 ;; XXX: For the missing '/etc/machine-id'.
4417 (substitute* "test/run-test.sh"
4418 (("DBUS_FATAL_WARNINGS=1")
4419 "DBUS_FATAL_WARNINGS=0"))
4420 #t)))))
d95a56c6
PAR
4421 (native-inputs
4422 `(("pkg-config" ,pkg-config)))
4423 (inputs
4424 `(("python" ,python)
2e88d113 4425 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4426 (synopsis "Python bindings for D-bus")
4427 (description "python-dbus provides bindings for libdbus, the reference
4428implementation of D-Bus.")
4429 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4430 (license license:expat)))
b52af02b
MW
4431
4432(define-public python2-dbus
4433 (package (inherit python-dbus)
4434 (name "python2-dbus")
4435 (inputs `(("python" ,python-2)
4436 ,@(alist-delete "python"
4437 (package-inputs python-dbus)
4438 equal?)))
4439 ;; FIXME: on Python 2, the test_utf8 fails with:
4440 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4441 (arguments `(#:tests? #f))))
a6ac8332
AE
4442
4443(define-public python-apsw
4444 (package
4445 (name "python-apsw")
4446 (version "3.8.7.3-r1")
4447 (source
4448 (origin
4449 (method url-fetch)
4450 (uri (string-append
4451 "https://pypi.python.org/packages/source/a/apsw/apsw-"
4452 version
4453 ".tar.gz"))
4454 (sha256
4455 (base32
4456 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
4457 (build-system python-build-system)
4458 (inputs
4459 `(("python-setuptools" ,python-setuptools)
4460 ("sqlite" ,sqlite)))
4461 (arguments
4462 `(#:phases
4463 ;; swap check and install phases
4464 (alist-cons-after
4465 'install 'check
4466 (assoc-ref %standard-phases 'check)
4467 (alist-delete
4468 'check
4469 %standard-phases))))
4470 (home-page "https://github.com/rogerbinns/apsw/")
4471 (synopsis "Another Python SQLite Wrapper")
4472 (description "APSW is a Python wrapper for the SQLite
4473embedded relational database engine. In contrast to other wrappers such as
4474pysqlite it focuses on being a minimal layer over SQLite attempting just to
4475translate the complete SQLite API into Python.")
abde5f37 4476 (license license:zlib)))
a6ac8332
AE
4477
4478(define-public python2-apsw
4479 (package-with-python2 python-apsw))
26b307e2
AE
4480
4481(define-public python-lxml
4482 (package
4483 (name "python-lxml")
4484 (version "3.4.2")
4485 (source
4486 (origin
4487 (method url-fetch)
4488 (uri (string-append
4489 "https://pypi.python.org/packages/source/l/lxml/lxml-"
4490 version
4491 ".tar.gz"))
4492 (sha256
4493 (base32
4494 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
4495 (build-system python-build-system)
4496 (inputs
4497 `(("libxml2" ,libxml2)
4498 ("libxslt" ,libxslt)
4499 ("python-setuptools" ,python-setuptools)))
4500 (home-page "http://lxml.de/")
4501 (synopsis
4502 "Python XML processing library")
4503 (description
4504 "The lxml XML toolkit is a Pythonic binding for the C libraries
4505libxml2 and libxslt.")
4506 (license bsd-3))) ; and a few more, see LICENSES.txt
4507
4508(define-public python2-lxml
4509 (package-with-python2 python-lxml))
4ed20663 4510
bec07a7c
AE
4511(define-public python2-pil
4512 (package
4513 (name "python2-pil")
4514 (version "1.1.7")
4515 (source
4516 (origin
4517 (method url-fetch)
4518 (uri (string-append
4519 "http://effbot.org/downloads/Imaging-"
4520 version ".tar.gz"))
4521 (sha256
4522 (base32
516277cb
AE
4523 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
4524 (modules '((guix build utils)))
4525 (snippet
4526 ;; Adapt to newer freetype. As the package is unmaintained upstream,
4527 ;; there is no use in creating a patch and reporting it.
4528 '(substitute* "_imagingft.c"
4529 (("freetype/")
4530 "freetype2/")))))
bec07a7c
AE
4531 (build-system python-build-system)
4532 (inputs
4533 `(("freetype" ,freetype)
4534 ("libjpeg" ,libjpeg)
4535 ("libtiff" ,libtiff)
4536 ("python-setuptools" ,python-setuptools)
4537 ("zlib" ,zlib)))
4538 (arguments
4539 ;; Only the fork python-pillow works with Python 3.
4540 `(#:python ,python-2
4541 #:tests? #f ; no check target
4542 #:phases
4543 (alist-cons-before
4544 'build 'configure
4545 ;; According to README and setup.py, manual configuration is
4546 ;; the preferred way of "searching" for inputs.
4547 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
4548 (lambda* (#:key inputs #:allow-other-keys)
4549 (let ((jpeg (assoc-ref inputs "libjpeg"))
4550 (zlib (assoc-ref inputs "zlib"))
4551 (tiff (assoc-ref inputs "libtiff"))
4552 (freetype (assoc-ref inputs "freetype")))
4553 (substitute* "setup.py"
4554 (("JPEG_ROOT = None")
4555 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
4556 (("ZLIB_ROOT = None")
4557 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
4558 (("TIFF_ROOT = None")
4559 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
4560 (("FREETYPE_ROOT = None")
4561 (string-append "FREETYPE_ROOT = libinclude(\""
4562 freetype "\")")))))
4563 %standard-phases)))
4564 (home-page "http://www.pythonware.com/products/pil/")
4565 (synopsis "Python Imaging Library")
4566 (description "The Python Imaging Library (PIL) adds image processing
4567capabilities to the Python interpreter.")
4568 (license (x11-style
4569 "file://README"
4570 "See 'README' in the distribution."))))
092e86f5
AE
4571
4572(define-public python2-cssutils
4573 (package
4574 (name "python2-cssutils")
4575 (version "1.0")
4576 (source
4577 (origin
4578 (method url-fetch)
4579 (uri (string-append
4580 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
4581 version
4582 ".zip"))
4583 (sha256
4584 (base32
4585 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
4586 (build-system python-build-system)
4587 (native-inputs
4588 `(("python2-mock" ,python2-mock) ; for the tests
4589 ("unzip" ,unzip))) ; for unpacking the source
4590 (inputs
4591 `(("python2-setuptools" ,python2-setuptools)))
4592 (arguments
4593 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4594 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4595 ))
092e86f5
AE
4596 (home-page "http://cthedot.de/cssutils/")
4597 (synopsis
4598 "CSS Cascading Style Sheets library for Python")
4599 (description
4600 "Cssutils is a Python package for parsing and building CSS
4601Cascading Style Sheets. Currently it provides a DOM only and no rendering
4602options.")
4603 (license lgpl3+)))
880ff77c
AE
4604
4605(define-public python-cssselect
4606 (package
4607 (name "python-cssselect")
4608 (version "0.9.1")
4609 (source
4610 (origin
4611 (method url-fetch)
4612 (uri (string-append
4613 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
4614 version
4615 ".tar.gz"))
4616 (sha256
4617 (base32
4618 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
4619 (build-system python-build-system)
4620 (inputs
4621 `(("python-setuptools" ,python-setuptools)))
4622 (arguments
4623 ;; tests fail with message
4624 ;; AttributeError: 'module' object has no attribute 'tests'
4625 `(#:tests? #f))
4626 (home-page
4627 "https://pythonhosted.org/cssselect/")
4628 (synopsis
4629 "CSS3 selector parser and translator to XPath 1.0")
4630 (description
4631 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4632them to XPath 1.0 expressions. Such expressions can be used in lxml or
4633another XPath engine to find the matching elements in an XML or HTML document.")
4634 (license bsd-3)))
4635
4636(define-public python2-cssselect
4637 (package-with-python2 python-cssselect))
60357f99
AE
4638
4639(define-public python-netifaces
4640 (package
4641 (name "python-netifaces")
4642 (version "0.10.4")
4643 (source
4644 (origin
4645 (method url-fetch)
4646 (uri (string-append
4647 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4648 version
4649 ".tar.gz"))
4650 (sha256
4651 (base32
4652 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4653 (build-system python-build-system)
4654 (inputs
4655 `(("python-setuptools" ,python-setuptools)))
4656 (home-page
4657 "https://bitbucket.org/al45tair/netifaces")
4658 (synopsis
4659 "Python module for portable network interface information")
4660 (description
4661 "Netifaces is a Python module providing information on network
4662interfaces in an easy and portable manner.")
4663 (license license:expat)))
4664
4665(define-public python2-netifaces
4666 (package-with-python2 python-netifaces))
92cb152b 4667
32f77c04
RW
4668(define-public python-networkx
4669 (package
4670 (name "python-networkx")
4671 (version "1.9.1")
4672 (source
4673 (origin
4674 (method url-fetch)
4675 (uri (string-append
4676 "https://pypi.python.org/packages/source/n/networkx/networkx-"
4677 version ".tar.gz"))
4678 (sha256
4679 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
4680 (build-system python-build-system)
4681 ;; python-decorator is needed at runtime
4682 (propagated-inputs
4683 `(("python-decorator" ,python-decorator)))
4684 (native-inputs
4685 `(("python-setuptools" ,python-setuptools)
4686 ("python-nose" ,python-nose)))
4687 (home-page "http://networkx.github.io/")
4688 (synopsis "Python module for creating and manipulating graphs and networks")
4689 (description
4690 "NetworkX is a Python package for the creation, manipulation, and study
4691of the structure, dynamics, and functions of complex networks.")
4692 (license bsd-3)))
4693
4694(define-public python2-networkx
4695 (package-with-python2 python-networkx))
4696
92cb152b
RW
4697(define-public snakemake
4698 (package
4699 (name "snakemake")
4700 (version "3.2.1")
4701 (source
4702 (origin
4703 (method url-fetch)
4704 (uri (string-append
4705 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4706 version ".tar.gz"))
4707 (sha256
4708 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4709 (build-system python-build-system)
4710 (inputs `(("python-setuptools" ,python-setuptools)))
4711 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4712 (synopsis "Python-based execution environment for make-like workflows")
4713 (description
4714 "Snakemake aims to reduce the complexity of creating workflows by
4715providing a clean and modern domain specific specification language (DSL) in
4716Python style, together with a fast and comfortable execution environment.")
4717 (license license:expat)))
a1920bc9 4718
35de1fbd
RW
4719(define-public python-seaborn
4720 (package
4721 (name "python-seaborn")
4722 (version "0.5.1")
4723 (source
4724 (origin
4725 (method url-fetch)
4726 (uri (string-append
4727 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
4728 version ".tar.gz"))
4729 (sha256
4730 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
4731 (build-system python-build-system)
4732 (propagated-inputs
4733 `(("python-pandas" ,python-pandas)
4734 ("python-matplotlib" ,python-matplotlib)
4735 ("python-scipy" ,python-scipy)))
4736 (native-inputs
4737 `(("python-setuptools" ,python-setuptools)))
4738 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4739 (synopsis "Statistical data visualization")
4740 (description
4741 "Seaborn is a library for making attractive and informative statistical
4742graphics in Python. It is built on top of matplotlib and tightly integrated
4743with the PyData stack, including support for numpy and pandas data structures
4744and statistical routines from scipy and statsmodels.")
4745 (license bsd-3)))
4746
4747(define-public python2-seaborn
4748 (let ((seaborn (package-with-python2 python-seaborn)))
4749 (package (inherit seaborn)
4750 (propagated-inputs
4751 `(("python2-pytz" ,python2-pytz)
dab8ebd9
FB
4752 ("python2-pandas" ,python2-pandas)
4753 ("python2-matplotlib" ,python2-matplotlib)
4754 ("python2-scipy" ,python2-scipy))))))
35de1fbd 4755
90fc547f
RW
4756(define-public python-sympy
4757 (package
4758 (name "python-sympy")
4759 (version "0.7.6")
4760 (source
4761 (origin
4762 (method url-fetch)
4763 (uri (string-append
4764 "https://github.com/sympy/sympy/releases/download/sympy-"
4765 version "/sympy-" version ".tar.gz"))
4766 (sha256
4767 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4768 (build-system python-build-system)
4769 (native-inputs
4770 `(("python-setuptools" ,python-setuptools)))
4771 (home-page "http://www.sympy.org/")
4772 (synopsis "Python library for symbolic mathematics")
4773 (description
4774 "SymPy is a Python library for symbolic mathematics. It aims to become a
4775full-featured computer algebra system (CAS) while keeping the code as simple
4776as possible in order to be comprehensible and easily extensible.")
4777 (license bsd-3)))
4778
4779(define-public python2-sympy
4780 (package-with-python2 python-sympy))
4781
a1920bc9
FB
4782(define-public python-testlib
4783 (package
4784 (name "python-testlib")
4785 (version "0.6.5")
4786 (source
4787 (origin
4788 (method url-fetch)
4789 (uri (string-append
4790 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4791 version ".zip"))
4792 (sha256
4793 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4794 (build-system python-build-system)
4795 (inputs
4796 `(("python-setuptools" ,python-setuptools)))
4797 (native-inputs
4798 `(("unzip" ,unzip)))
4799 (arguments
4800 `(#:phases
4801 (alist-replace
4802 'unpack
4803 (lambda* (#:key inputs outputs #:allow-other-keys)
4804 (let ((unzip (string-append (assoc-ref inputs "unzip")
4805 "/bin/unzip"))
4806 (source (assoc-ref inputs "source")))
4807 (and (zero? (system* unzip source))
4808 (chdir (string-append "testlib-" ,version)))))
4809 %standard-phases)))
4810 (synopsis "Python micro test suite harness")
4811 (description "A micro unittest suite harness for Python.")
4812 (home-page "https://github.com/trentm/testlib")
1cb9c006 4813 (license license:expat)))
a1920bc9
FB
4814
4815(define-public python2-testlib
4816 (package-with-python2 python-testlib))
db62afa5
LC
4817
4818(define-public python2-xlib
4819 (package
4820 (name "python2-xlib")
4821 (version "0.14")
4822 (source (origin
4823 (method url-fetch)
4824 (uri (string-append "mirror://sourceforge/python-xlib/"
4825 "python-xlib-" version ".tar.gz"))
4826 (sha256
4827 (base32
4828 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4829 (build-system python-build-system)
4830 (arguments
4831 `(#:python ,python-2 ;Python 2 only
4832 #:tests? #f)) ;no tests
4833 (inputs
4834 `(("python-setuptools" ,python-setuptools)))
4835 (home-page "http://python-xlib.sourceforge.net/")
4836 (synopsis "Python X11 client library")
4837 (description
4838 "The Python X Library is intended to be a fully functional X client
4839library for Python programs. It is useful to implement low-level X clients.
4840It is written entirely in Python.")
4841 (license gpl2+)))
0234ca06
DT
4842
4843(define-public python-singledispatch
4844 (package
4845 (name "python-singledispatch")
4846 (version "3.4.0.3")
4847 (source
4848 (origin
4849 (method url-fetch)
4850 (uri (string-append
4851 "https://pypi.python.org/packages/source/s/singledispatch/"
4852 "singledispatch-" version ".tar.gz"))
4853 (sha256
4854 (base32
4855 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4856 (build-system python-build-system)
4857 (native-inputs
4858 `(("python-setuptools" ,python-setuptools)))
4859 (propagated-inputs
4860 `(("python-six" ,python-six)))
4861 (home-page
4862 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4863 (synopsis "Backport of singledispatch feature from Python 3.4")
4864 (description
4865 "This library brings functools.singledispatch from Python 3.4 to Python
48662.6-3.3.")
4867 (license license:expat)))
4868
4869(define-public python2-singledispatch
4870 (package-with-python2 python-singledispatch))
feaae484 4871
310d218f
RW
4872(define-public python-tornado
4873 (package
4874 (name "python-tornado")
4875 (version "4.1")
4876 (source
4877 (origin
4878 (method url-fetch)
4879 (uri (string-append
4880 "https://pypi.python.org/packages/source/t/tornado/"
4881 "tornado-" version ".tar.gz"))
4882 (sha256
4883 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
4884 (build-system python-build-system)
4885 (inputs
4886 `(("python-certifi" ,python-certifi)))
4887 (native-inputs
4888 `(("python-setuptools" ,python-setuptools)))
f4a4a718 4889 (home-page "http://www.tornadoweb.org/")
310d218f
RW
4890 (synopsis "Python web framework and asynchronous networking library")
4891 (description
4892 "Tornado is a Python web framework and asynchronous networking library,
4893originally developed at FriendFeed. By using non-blocking network I/O,
4894Tornado can scale to tens of thousands of open connections, making it ideal
4895for long polling, WebSockets, and other applications that require a long-lived
4896connection to each user.")
4897 (license asl2.0)))
4898
4899(define-public python2-tornado
4900 (let ((tornado (package-with-python2 python-tornado)))
4901 (package (inherit tornado)
4902 (inputs
4903 `(("python2-backport-ssl-match-hostname"
4904 ,python2-backport-ssl-match-hostname)
4905 ,@(package-inputs tornado))))))
4906
feaae484
SB
4907(define-public python-waf
4908 (package
4909 (name "python-waf")
4910 (version "1.8.8")
4911 (source (origin
4912 (method url-fetch)
4913 (uri (string-append "https://waf.io/"
4914 "waf-" version ".tar.bz2"))
4915 (sha256
4916 (base32
4917 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4918 (build-system python-build-system)
4919 (arguments
4920 '(#:phases
4921 (modify-phases %standard-phases
4922 (replace 'build
4923 (lambda _
4924 (zero? (begin
4925 (system* "python" "waf-light" "configure")
4926 (system* "python" "waf-light" "build")))))
4927 (replace 'check
4928 (lambda _
4929 (zero? (system* "python" "waf" "--version"))))
4930 (replace 'install
4931 (lambda _
4932 (copy-file "waf" %output))))))
4933 (home-page "https://waf.io/")
4934 (synopsis "Python-based build system")
4935 (description
4936 "Waf is a Python-based framework for configuring, compiling and installing
4937applications.")
4938 (license bsd-3)))
4939
4940(define-public python2-waf
4941 (package-with-python2 python-waf))
45203542
RW
4942
4943(define-public python-pyzmq
4944 (package
4945 (name "python-pyzmq")
3655ee76 4946 (version "15.1.0")
45203542
RW
4947 (source
4948 (origin
4949 (method url-fetch)
3655ee76 4950 (uri (pypi-uri "pyzmq" version))
45203542 4951 (sha256
3655ee76 4952 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
4953 (build-system python-build-system)
4954 (arguments
4955 `(#:configure-flags
4956 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
4957 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
4958 ;; --inplace' for 'python setup.py test' to work.
4959 #:tests? #f))
4960 (inputs
4961 `(("zeromq" ,zeromq)))
4962 (native-inputs
4963 `(("pkg-config" ,pkg-config)
4964 ("python-nose" ,python-nose)
4965 ("python-setuptools" ,python-setuptools)))
4966 (home-page "http://github.com/zeromq/pyzmq")
4967 (synopsis "Python bindings for 0MQ")
4968 (description
4969 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
4970 (license bsd-4)))
4971
4972(define-public python2-pyzmq
4973 (package-with-python2 python-pyzmq))
d889e6c4
CR
4974
4975(define-public python-pep8
4976 (package
4977 (name "python-pep8")
4978 (version "1.6.2")
4979 (source
4980 (origin
4981 (method url-fetch)
4982 (uri (string-append
4983 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4984 version
4985 ".tar.gz"))
4986 (sha256
4987 (base32
4988 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
4989 (build-system python-build-system)
4990 (inputs
4991 `(("python-setuptools" ,python-setuptools)))
4992 (home-page "http://pep8.readthedocs.org/")
4993 (synopsis "Python style guide checker")
4994 (description
4995 "This tools checks Python code against some of the style conventions in
4996PEP 8.")
4997 (license license:expat)))
4998
4999(define-public python2-pep8
5000 (package-with-python2 python-pep8))
e31d7f44
CR
5001
5002(define-public python-pyflakes
5003 (package
5004 (name "python-pyflakes")
2abc3972 5005 (version "1.0.0")
e31d7f44
CR
5006 (source
5007 (origin
5008 (method url-fetch)
2abc3972 5009 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5010 (sha256
5011 (base32
2abc3972 5012 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5013 (build-system python-build-system)
5014 (inputs
5015 `(("python-setuptools" ,python-setuptools)))
5016 (home-page
5017 "https://github.com/pyflakes/pyflakes")
5018 (synopsis "Passive checker of Python programs")
5019 (description
5020 "Pyflakes statically checks Python source code for common errors.")
5021 (license license:expat)))
a59e017c 5022
7261d9eb
CR
5023(define-public python2-pyflakes
5024 (package-with-python2 python-pyflakes))
5025
a59e017c
CR
5026(define-public python-mccabe
5027 (package
5028 (name "python-mccabe")
5029 (version "0.3.1")
5030 (source
5031 (origin
5032 (method url-fetch)
5033 (uri (string-append
5034 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
5035 version
5036 ".tar.gz"))
5037 (sha256
5038 (base32
5039 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
5040 (build-system python-build-system)
5041 (inputs
5042 `(("python-setuptools" ,python-setuptools)))
5043 (home-page "https://github.com/flintwork/mccabe")
5044 (synopsis "McCabe checker, plugin for flake8")
5045 (description
5046 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5047complexity of Python source code.")
7362371d 5048 (license license:expat)))
a59e017c
CR
5049
5050(define-public python2-mccabe
5051 (package-with-python2 python-mccabe))
e8df8f47 5052
7477fbb1
CR
5053(define-public python-mccabe-0.2.1
5054 (package (inherit python-mccabe)
5055 (version "0.2.1")
5056 (source
5057 (origin
5058 (method url-fetch)
5059 (uri (pypi-uri "mccabe" version))
5060 (sha256
5061 (base32
5062 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5063
5064(define-public python2-mccabe-0.2.1
5065 (package-with-python2 python-mccabe-0.2.1))
5066
e8df8f47
CR
5067;; Flake8 2.4.1 requires an older version of pep8.
5068;; This should be removed ASAP.
5069(define-public python-pep8-1.5.7
5070 (package (inherit python-pep8)
5071 (version "1.5.7")
5072 (source
5073 (origin
5074 (method url-fetch)
5075 (uri (string-append
5076 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5077 version
5078 ".tar.gz"))
5079 (sha256
5080 (base32
5081 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5082
5083(define-public python2-pep8-1.5.7
5084 (package-with-python2 python-pep8-1.5.7))
5085
5086;; Flake8 2.4.1 requires an older version of pyflakes.
5087;; This should be removed ASAP.
5088(define-public python-pyflakes-0.8.1
5089 (package (inherit python-pyflakes)
5090 (version "0.8.1")
5091 (source
5092 (origin
5093 (method url-fetch)
5094 (uri (string-append
5095 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5096 version
5097 ".tar.gz"))
5098 (sha256
5099 (base32
5100 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5101
5102(define-public python2-pyflakes-0.8.1
7261d9eb 5103 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5104
5105(define-public python-flake8
5106 (package
5107 (name "python-flake8")
1b995533 5108 (version "2.5.1")
e8df8f47
CR
5109 (source
5110 (origin
5111 (method url-fetch)
1b995533 5112 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5113 (sha256
5114 (base32
1b995533 5115 "00sn2g5ydriv5anbipcrprpv797kh4q8rfa75w3fc7v7n14fv2j4"))))
e8df8f47
CR
5116 (build-system python-build-system)
5117 (inputs
5118 `(("python-setuptools" ,python-setuptools)
5119 ("python-pep8" ,python-pep8-1.5.7)
5120 ("python-pyflakes" ,python-pyflakes-0.8.1)
5121 ("python-mccabe" ,python-mccabe)
5122 ("python-mock" ,python-mock)
5123 ("python-nose" ,python-nose)))
5124 (home-page "https://gitlab.com/pycqa/flake8")
5125 (synopsis
5126 "The modular source code checker: pep8, pyflakes and co")
5127 (description
5128 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5129 (license license:expat)))
5130
5131(define-public python2-flake8
5132 (package-with-python2 python-flake8))
61b9ac53 5133
abf21efc
CR
5134;; This will only be needed by the python-hacking package and will not be
5135;; necessary once python-hacking > 0.10.2 is released.
5136(define-public python-flake8-2.2.4
5137 (package (inherit python-flake8)
5138 (inputs
5139 `(("python-setuptools" ,python-setuptools)
5140 ("python-pep8" ,python-pep8-1.5.7)
5141 ("python-pyflakes" ,python-pyflakes-0.8.1)
5142 ("python-mccabe" ,python-mccabe-0.2.1)
5143 ("python-mock" ,python-mock)
5144 ("python-nose" ,python-nose)))
5145 (version "2.2.4")
5146 (source
5147 (origin
5148 (method url-fetch)
5149 (uri (pypi-uri "flake8" version))
5150 (sha256
5151 (base32
5152 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5153
5154(define-public python2-flake8-2.2.4
5155 (package-with-python2 python-flake8-2.2.4))
5156
61b9ac53
FB
5157(define-public python-mistune
5158 (package
5159 (name "python-mistune")
5160 (version "0.7")
5161 (source
5162 (origin
5163 (method url-fetch)
5164 (uri (string-append
5165 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5166 version
5167 ".tar.gz"))
5168 (sha256
5169 (base32
5170 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5171 (build-system python-build-system)
5172 (inputs
5173 `(("python-setuptools" ,python-setuptools)
5174 ("python-nose" ,python-nose)
5175 ("python-cython" ,python-cython)))
5176 (home-page "https://github.com/lepture/mistune")
5177 (synopsis "Markdown parser in pure Python")
5178 (description "This package provides a fast markdown parser in pure
5179Python.")
5180 (license bsd-3)))
5181
5182(define-public python2-mistune
5183 (package-with-python2 python-mistune))
6d992d07 5184
b9893908
EE
5185(define-public python-markdown
5186 (package
5187 (name "python-markdown")
5188 (version "2.6.5")
5189 (source
5190 (origin
5191 (method url-fetch)
5192 (uri (pypi-uri "Markdown" version))
5193 (sha256
5194 (base32
5195 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5196 (build-system python-build-system)
5197 (arguments
5198 `(#:phases
5199 (modify-phases %standard-phases
5200 (replace 'check
5201 (lambda _
5202 (zero? (system* "python" "run-tests.py")))))))
5203 (native-inputs
5204 `(("python-nose" ,python-nose)
5205 ("python-pyyaml" ,python-pyyaml)))
5206 (home-page "https://pythonhosted.org/Markdown/")
5207 (synopsis "Python implementation of Markdown")
5208 (description
5209 "This package provides a Python implementation of John Gruber's
5210Markdown. The library features international input, various Markdown
5211extensions, and several HTML output formats. A command line wrapper
5212markdown_py is also provided to convert Markdown files to HTML.")
5213 (license bsd-3)))
5214
5215(define-public python2-markdown
5216 (package-with-python2 python-markdown))
5217
6d992d07
FB
5218(define-public python-ptyprocess
5219 (package
5220 (name "python-ptyprocess")
5221 (version "0.5")
5222 (source
5223 (origin
5224 (method url-fetch)
5225 (uri (string-append
5226 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5227 version ".tar.gz"))
5228 (sha256
5229 (base32
5230 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5231 (build-system python-build-system)
5232 (inputs
5233 `(("python-setuptools" ,python-setuptools)
5234 ("python-nose" ,python-nose)))
5235 (arguments
5236 `(#:phases
5237 (modify-phases %standard-phases
5238 (replace 'check
5239 (lambda _
5240 (zero? (system* "nosetests")))))))
5241 (home-page "https://github.com/pexpect/ptyprocess")
5242 (synopsis "Run a subprocess in a pseudo terminal")
5243 (description
5244 "This package provides a Python library used to launch a subprocess in a
5245pseudo terminal (pty), and interact with both the process and its pty.")
5246 (license isc)))
5247
5248(define-public python2-ptyprocess
5249 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5250
5251(define-public python-terminado
5252 (package
5253 (name "python-terminado")
5254 (version "0.5")
5255 (source
5256 (origin
5257 (method url-fetch)
5258 (uri (string-append
5259 "https://pypi.python.org/packages/source/t/terminado/terminado-"
5260 version ".tar.gz"))
5261 (sha256
5262 (base32
5263 "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33"))))
5264 (build-system python-build-system)
5265 (propagated-inputs
5266 `(("python-tornado" ,python-tornado)
5267 ("python-ptyprocess" ,python-ptyprocess)))
5268 (inputs
5269 `(("python-setuptools" ,python-setuptools)
5270 ("python-nose" ,python-nose)))
5271 (arguments
5272 `(#:phases
5273 (modify-phases %standard-phases
5274 (replace 'check
5275 (lambda _
5276 (zero? (system* "nosetests")))))))
5277 (home-page "https://github.com/takluyver/terminado")
5278 (synopsis "Terminals served to term.js using Tornado websockets")
5279 (description "This package provides a Tornado websocket backend for the
5280term.js Javascript terminal emulator library.")
5281 (license bsd-2)))
5282
5283(define-public python2-terminado
5284 (let ((terminado (package-with-python2 python-terminado)))
5285 (package (inherit terminado)
5286 (propagated-inputs
5287 `(("python2-tornado" ,python2-tornado)
5288 ("python2-backport-ssl-match-hostname"
5289 ,python2-backport-ssl-match-hostname)
5290 ,@(alist-delete "python-tornado"
5291 (package-propagated-inputs terminado)))))))
5faa5ce4 5292
d582eaac
SB
5293(define-public python-fonttools
5294 (package
5295 (name "python-fonttools")
5296 (version "2.5")
5297 (source (origin
5298 (method url-fetch)
5299 (uri (string-append
5300 "https://pypi.python.org/packages/source/F/FontTools/"
5301 "fonttools-" version ".tar.gz"))
5302 (sha256
5303 (base32
5304 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5305 (build-system python-build-system)
5306 (arguments '(#:test-target "check"))
5307 (propagated-inputs
5308 ;; XXX: module not found if setuptools is not available.
5309 `(("python-setuptools" ,python-setuptools)))
5310 (home-page "http://github.com/behdad/fonttools")
5311 (synopsis "Tools to manipulate font files")
5312 (description
5313 "FontTools/TTX is a library to manipulate font files from Python. It
5314supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5315of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5316also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5317from an XML-based format.")
5318 (license (non-copyleft "file://LICENSE.txt"
5319 "See LICENSE.txt in the distribution."))))
5320
5321(define-public python2-fonttools
5322 (package-with-python2 python-fonttools))
75710da6 5323
5faa5ce4
RW
5324(define-public python-ly
5325 (package
5326 (name "python-ly")
5327 (version "0.9.2")
5328 (source
5329 (origin
5330 (method url-fetch)
5331 (uri (string-append
5332 "https://pypi.python.org/packages/source/p/python-ly/python-ly-"
5333 version ".tar.gz"))
5334 (sha256
5335 (base32
5336 "1bsjg4q9ihr8bfdclrcmb8yjcg8xm9dznh58f3zsyrkrjzwbhcd2"))))
5337 (build-system python-build-system)
5338 (native-inputs
5339 `(("python-setuptools" ,python-setuptools)))
5340 (synopsis "Tool and library for manipulating LilyPond files")
5341 (description "This package provides a Python library to parse, manipulate
5342or create documents in LilyPond format. A command line program ly is also
5343provided that can be used to do various manipulations with LilyPond files.")
5344 (home-page "https://pypi.python.org/pypi/python-ly")
5345 (license gpl2+)))
7e7b27d9
CR
5346
5347(define-public python-appdirs
5348 (package
5349 (name "python-appdirs")
5350 (version "1.4.0")
5351 (source
5352 (origin
5353 (method url-fetch)
5354 (uri (string-append
5355 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5356 version
5357 ".tar.gz"))
5358 (sha256
5359 (base32
5360 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5361 (build-system python-build-system)
5362 (inputs
5363 `(("python-setuptools" ,python-setuptools)))
5364 (home-page "http://github.com/ActiveState/appdirs")
5365 (synopsis
5366 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5367 (description
5368 "This module provides a portable way of finding out where user data
5369should be stored on various operating systems.")
5370 (license license:expat)))
5371
5372(define-public python2-appdirs
5373 (package-with-python2 python-appdirs))
89b2e0b0
LF
5374
5375(define-public python-llfuse
5376 (package
5377 (name "python-llfuse")
5378 (version "0.41")
5379 (source (origin
5380 (method url-fetch)
5381 (uri (string-append
5382 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5383 "llfuse-" version ".tar.bz2"))
5384 (sha256
5385 (base32
5386 "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
5387 (build-system python-build-system)
5388 (inputs
5389 `(("fuse" ,fuse)
5390 ("attr" ,attr)))
5391 (native-inputs
5392 `(("pkg-config" ,pkg-config)
5393 ("python-setuptools" ,python-setuptools)))
5394 (synopsis "Python bindings for FUSE")
5395 (description
5396 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5397 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5398 ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
5399 ;; The rest of the package is licensed under LGPL2.0 or later.
5400 (license (list license:expat lgpl2.0+))))
5401
5402(define-public python2-llfuse
5403 (package-with-python2 python-llfuse))
641c9871
LF
5404
5405(define-public python-msgpack
5406 (package
5407 (name "python-msgpack")
5408 (version "0.4.6")
5409 (source (origin
5410 (method url-fetch)
5411 (uri (string-append
5412 "https://pypi.python.org/packages/source/m/"
5413 "msgpack-python/msgpack-python-" version ".tar.gz"))
5414 (sha256
5415 (base32
5416 "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
5417 (build-system python-build-system)
5418 (native-inputs
5419 `(("python-setuptools" ,python-setuptools)))
5420 (synopsis "MessagePack (de)serializer")
5421 (description "MessagePack is a fast, compact binary serialization format,
5422suitable for similar data to JSON. This package provides CPython bindings for
5423reading and writing MessagePack data.")
5424 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5425 (license asl2.0)))
5426
5427(define-public python2-msgpack
5428 (package-with-python2 python-msgpack))
6e5e39f4
CR
5429
5430(define-public python-netaddr
5431 (package
5432 (name "python-netaddr")
5433 (version "0.7.18")
5434 (source
5435 (origin
5436 (method url-fetch)
5437 (uri (string-append
5438 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5439 version
5440 ".tar.gz"))
5441 (sha256
5442 (base32
5443 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5444 (build-system python-build-system)
5445 (arguments `(#:tests? #f)) ;; No tests.
5446 (inputs
5447 `(("python-setuptools" ,python-setuptools)))
5448 (home-page "https://github.com/drkjam/netaddr/")
5449 (synopsis "Pythonic manipulation of network addresses")
5450 (description
5451 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5452and MAC network addresses.")
5453 (license bsd-3)))
5454
5455(define-public python2-netaddr
5456 (package-with-python2 python-netaddr))
8c692a52
CR
5457
5458(define-public python-wrapt
5459 (package
5460 (name "python-wrapt")
5461 (version "1.10.5")
5462 (source
5463 (origin
5464 (method url-fetch)
5465 (uri (string-append
5466 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5467 version
5468 ".tar.gz"))
5469 (sha256
5470 (base32
5471 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5472 (build-system python-build-system)
5473 (arguments
5474 ;; Tests are not included in the tarball, they are only available in the
5475 ;; git repository.
5476 `(#:tests? #f))
5477 (inputs
5478 `(("python-setuptools" ,python-setuptools)))
5479 (home-page "https://github.com/GrahamDumpleton/wrapt")
5480 (synopsis "Module for decorators, wrappers and monkey patching")
5481 (description
5482 "The aim of the wrapt module is to provide a transparent object proxy for
5483 Python, which can be used as the basis for the construction of function
5484 wrappers and decorator functions.")
5485 (license bsd-2)))
5486
5487(define-public python2-wrapt
5488 (package-with-python2 python-wrapt))
b85c85be
CR
5489
5490(define-public python-iso8601
5491 (package
5492 (name "python-iso8601")
5493 (version "0.1.10")
5494 (source
5495 (origin
5496 (method url-fetch)
5497 (uri (string-append
5498 "https://pypi.python.org/packages/source/i/iso8601/iso8601-"
5499 version
5500 ".tar.gz"))
5501 (sha256
5502 (base32
5503 "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7"))))
5504 (build-system python-build-system)
5505 (inputs
5506 `(("python-setuptools" ,python-setuptools)))
5507 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5508 (synopsis "Module to parse ISO 8601 dates")
5509 (description
5510 "This module parses the most common forms of ISO 8601 date strings (e.g.
5511@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5512 (license license:expat)))
5513
5514(define-public python2-iso8601
5515 (package-with-python2 python-iso8601))
5e412b63
CR
5516
5517(define-public python-monotonic
5518 (package
5519 (name "python-monotonic")
5520 (version "0.3")
5521 (source
5522 (origin
5523 (method url-fetch)
5524 (uri (string-append
5525 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5526 version
5527 ".tar.gz"))
5528 (sha256
5529 (base32
5530 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5531 (build-system python-build-system)
5532 (inputs
5533 `(("python-setuptools" ,python-setuptools)))
5534 (home-page "https://github.com/atdt/monotonic")
5535 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5536 (description
5537 "This module provides a monotonic() function which returns the value (in
5538fractional seconds) of a clock which never goes backwards.")
5539 (license asl2.0)))
5540
5541(define-public python2-monotonic
5542 (package-with-python2 python-monotonic))
de34afac
CR
5543
5544(define-public python-webob
5545 (package
5546 (name "python-webob")
b8834c21 5547 (version "1.5.1")
de34afac
CR
5548 (source
5549 (origin
5550 (method url-fetch)
b8834c21 5551 (uri (pypi-uri "WebOb" version))
de34afac
CR
5552 (sha256
5553 (base32
b8834c21 5554 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
5555 (build-system python-build-system)
5556 (inputs
5557 `(("python-nose" ,python-nose)
5558 ("python-setuptools" ,python-setuptools)))
5559 (home-page "http://webob.org/")
5560 (synopsis "WSGI request and response object")
5561 (description
5562 "WebOb provides wrappers around the WSGI request environment, and an
5563object to help create WSGI responses.")
5564 (license license:expat)))
5565
5566(define-public python2-webob
5567 (package-with-python2 python-webob))
350ba0a3 5568
02a8a187
BW
5569(define-public python-xlrd
5570 (package
5571 (name "python-xlrd")
5572 (version "0.9.4")
5573 (source (origin
5574 (method url-fetch)
5575 (uri (string-append "https://pypi.python.org/packages/source/x/"
5576 "xlrd/xlrd-" version ".tar.gz"))
5577 (sha256
5578 (base32
5579 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5580 (build-system python-build-system)
5581 (arguments
5582 `(#:phases
5583 (modify-phases %standard-phases
5584 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5585 ;; run tests instead for now.
5586 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5587 (native-inputs `(("python-nose" ,python-nose)
5588 ("python-setuptools" ,python-setuptools)))
5589 (home-page "http://www.python-excel.org/")
5590 (synopsis "Library for extracting data from Excel files")
5591 (description "This packages provides a library to extract data from
5592spreadsheets using Microsoft Excel® proprietary file formats @samp{.xls} and
5593@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5594Unicode-aware. It is not intended as an end-user tool.")
5595 (license bsd-3)))
5596
5597(define-public python2-xlrd
5598 (package-with-python2 python-xlrd))
5599
350ba0a3
CR
5600(define-public python-prettytable
5601 (package
5602 (name "python-prettytable")
5603 (version "0.7.2")
5604 (source
5605 (origin
5606 (method url-fetch)
5607 (uri (string-append
5608 "https://pypi.python.org/packages/source/P/PrettyTable/"
5609 "prettytable-" version ".tar.bz2"))
5610 (sha256
5611 (base32
5612 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5613 (build-system python-build-system)
5614 (inputs
5615 `(("python-setuptools" ,python-setuptools)))
5616 (home-page "http://code.google.com/p/prettytable/")
5617 (synopsis "Display tabular data in an ASCII table format")
5618 (description
5619 "A library designed to represent tabular data in visually appealing ASCII
5620tables. PrettyTable allows for selection of which columns are to be printed,
5621independent alignment of columns (left or right justified or centred) and
5622printing of sub-tables by specifying a row range.")
5623 (license bsd-3)))
5624
5625(define-public python2-prettytable
5626 (package-with-python2 python-prettytable))
7a8ac75a
RW
5627
5628(define-public python-pyasn1
5629 (package
5630 (name "python-pyasn1")
5631 (version "0.1.8")
5632 (source
5633 (origin
5634 (method url-fetch)
5635 (uri (string-append "https://pypi.python.org/packages/source/p/"
5636 "pyasn1/pyasn1-" version ".tar.gz"))
5637 (sha256
5638 (base32
5639 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5640 (build-system python-build-system)
5641 (home-page "http://pyasn1.sourceforge.net/")
5642 (synopsis "ASN.1 types and codecs")
5643 (description
5644 "This is an implementation of ASN.1 types and codecs in Python. It is
5645suitable for a wide range of protocols based on the ASN.1 specification.")
5646 (license bsd-2)))
5647
5648(define-public python2-pyasn1
5649 (package-with-python2 python-pyasn1))
9a49a535
RW
5650
5651(define-public python2-ipaddress
5652 (package
5653 (name "python2-ipaddress")
5654 (version "1.0.14")
5655 (source
5656 (origin
5657 (method url-fetch)
5658 (uri (string-append "https://pypi.python.org/packages/source/i/"
5659 "ipaddress/ipaddress-" version ".tar.gz"))
5660 (sha256
5661 (base32
5662 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5663 (build-system python-build-system)
5664 (arguments
5665 `(#:tests? #f ; no tests
5666 #:python ,python-2))
5667 (home-page "https://github.com/phihag/ipaddress")
5668 (synopsis "IP address manipulation library")
5669 (description
5670 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5671in Python. This library is used to create, poke at, and manipulate IPv4 and
5672IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5673module to older versions of Python.")
5674 (license psfl)))
3f00e078
RW
5675
5676(define-public python-idna
5677 (package
5678 (name "python-idna")
5679 (version "2.0")
5680 (source
5681 (origin
5682 (method url-fetch)
5683 (uri (string-append "https://pypi.python.org/packages/source/i/"
5684 "idna/idna-" version ".tar.gz"))
5685 (sha256
5686 (base32
5687 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5688 (build-system python-build-system)
5689 (native-inputs
5690 `(("python-setuptools" ,python-setuptools)))
5691 (home-page "https://github.com/kjd/idna")
5692 (synopsis "Internationalized domain names in applications")
5693 (description
5694 "This is a library to support the Internationalised Domain Names in
5695Applications (IDNA) protocol as specified in RFC 5891. This version of the
5696protocol is often referred to as “IDNA2008” and can produce different results
5697from the earlier standard from 2003. The library is also intended to act as a
5698suitable drop-in replacement for the “encodings.idna” module that comes with
5699the Python standard library but currently only supports the older 2003
5700specification.")
5701 (license bsd-4)))
5702
5703(define-public python2-idna
5704 (package-with-python2 python-idna))
36ebf972
RW
5705
5706(define-public python-pretend
5707 (package
5708 (name "python-pretend")
5709 (version "1.0.8")
5710 (source
5711 (origin
5712 (method url-fetch)
5713 (uri (string-append "https://pypi.python.org/packages/source/p/"
5714 "pretend/pretend-" version ".tar.gz"))
5715 (sha256
5716 (base32
5717 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5718 (build-system python-build-system)
5719 (native-inputs
5720 `(("python-setuptools" ,python-setuptools)))
5721 (home-page "https://github.com/alex/pretend")
5722 (synopsis "Library for stubbing in Python")
5723 (description
5724 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5725technique for writing tests. You may hear the term mixed up with mocks,
5726fakes, or doubles. Basically, a stub is an object that returns pre-canned
5727responses, rather than doing any computation.")
5728 (license bsd-3)))
5729
5730(define-public python2-pretend
5731 (package-with-python2 python-pretend))
aa759a51
RW
5732
5733(define-public python-cryptography-vectors
5734 (package
5735 (name "python-cryptography-vectors")
3698a775 5736 (version "1.0.2")
aa759a51
RW
5737 (source
5738 (origin
5739 (method url-fetch)
5740 (uri (string-append "https://pypi.python.org/packages/source/c/"
5741 "cryptography-vectors/cryptography_vectors-"
5742 version ".tar.gz"))
5743 (sha256
5744 (base32
3698a775 5745 "0dx98kcypmarwwhi6rjwy30ridys2ja6mc6mjf0svd4nllkaljdq"))))
aa759a51
RW
5746 (build-system python-build-system)
5747 (native-inputs
5748 `(("python-setuptools" ,python-setuptools)))
5749 (home-page "https://github.com/pyca/cryptography")
5750 (synopsis "Test vectors for the cryptography package.")
5751 (description
5752 "This package contains test vectors for the cryptography package.")
5753 ;; Distributed under either BSD-3 or ASL2.0
5754 (license (list bsd-3 asl2.0))))
5755
5756(define-public python2-cryptography-vectors
5757 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
5758
5759(define-public python-cryptography
5760 (package
5761 (name "python-cryptography")
7f51b663 5762 (version "1.0.2")
88b47cb0
RW
5763 (source
5764 (origin
5765 (method url-fetch)
5766 (uri (string-append "https://pypi.python.org/packages/source/c/"
5767 "cryptography/cryptography-" version ".tar.gz"))
5768 (sha256
5769 (base32
7f51b663 5770 "1jmcidddbbgdavvnvjjc0pda4b9a5i9idsivchn69pqxx68x8k6n"))))
88b47cb0
RW
5771 (build-system python-build-system)
5772 (inputs
5773 `(("openssl" ,openssl)))
5774 (propagated-inputs
5775 `(("python-cffi" ,python-cffi)
5776 ("python-six" ,python-six)
5777 ("python-pyasn1" ,python-pyasn1)
5778 ("python-enum34" ,python-enum34)
5779 ("python-idna" ,python-idna)
5780 ("python-iso8601" ,python-iso8601)))
5781 (native-inputs
5782 `(("python-cryptography-vectors" ,python-cryptography-vectors)
5783 ("python-setuptools" ,python-setuptools)
5784 ("python-pretend" ,python-pretend)
5785 ("python-pytest" ,python-pytest)))
5786 (home-page "https://github.com/pyca/cryptography")
5787 (synopsis "Cryptographic recipes and primitives for Python")
5788 (description
5789 "cryptography is a package which provides cryptographic recipes and
5790primitives to Python developers. It aims to be the “cryptographic standard
5791library” for Python. The package includes both high level recipes, and low
5792level interfaces to common cryptographic algorithms such as symmetric ciphers,
5793message digests and key derivation functions.")
5794 ;; Distributed under either BSD-3 or ASL2.0
5795 (license (list bsd-3 asl2.0))))
5796
5797(define-public python2-cryptography
5798 (let ((crypto (package-with-python2 python-cryptography)))
5799 (package (inherit crypto)
5800 (propagated-inputs
5801 `(("python2-ipaddress" ,python2-ipaddress)
5802 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
5803
5804(define-public python-pyopenssl
5805 (package
5806 (name "python-pyopenssl")
5807 (version "0.15.1")
5808 (source
5809 (origin
5810 (method url-fetch)
5811 (uri (string-append "https://pypi.python.org/packages/source/p/"
5812 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
5813 (sha256
5814 (base32
5815 "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
5816 (build-system python-build-system)
5817 (arguments
5818 `(#:phases
5819 (modify-phases %standard-phases
5820 (add-after 'unpack 'fix-tests
5821 (lambda* (#:key inputs #:allow-other-keys)
5822 (substitute* "OpenSSL/test/test_ssl.py"
5823 (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
5824 "return True")
5825 ;; FIXME: disable broken test
5826 (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
5827 (substitute* "OpenSSL/test/test_crypto.py"
5828 (("command = b\"openssl \"")
5829 (string-append "command = b\""
5830 (assoc-ref inputs "openssl")
5831 "/bin/openssl" " \""))
5832 ;; FIXME: disable four broken tests
5833 (("test_der") "disabled__der")
5834 (("test_digest") "disabled__digest")
5835 (("test_get_extension") "disabled__get_extension")
5836 (("test_extension_count") "disabled__extension_count"))
5837 #t)))))
5838 (propagated-inputs
5839 `(("python-cryptography" ,python-cryptography)
5840 ("python-six" ,python-six)))
5841 (inputs
5842 `(("openssl" ,openssl)))
5843 (native-inputs
5844 `(("python-setuptools" ,python-setuptools)))
5845 (home-page "https://github.com/pyca/pyopenssl")
5846 (synopsis "Python wrapper module around the OpenSSL library")
5847 (description
5848 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
5849library.")
5850 (license asl2.0)))
5851
5852(define-public python2-pyopenssl
5853 (let ((pyopenssl (package-with-python2 python-pyopenssl)))
5854 (package (inherit pyopenssl)
5855 (propagated-inputs
5856 `(("python2-cryptography" ,python2-cryptography)
5857 ,@(alist-delete "python-cryptography"
5858 (package-propagated-inputs pyopenssl)))))))
643725a1
CR
5859
5860(define-public python-pip
5861 (package
5862 (name "python-pip")
5863 (version "7.1.2")
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (string-append
5868 "https://pypi.python.org/packages/source/p/pip/pip-"
5869 version ".tar.gz"))
5870 (sha256
5871 (base32
5872 "0xx4aypfgchxdknxq7gyqghd8wb221zrzyqlbabzm32jy237j16a"))))
5873 (build-system python-build-system)
5874 (inputs
5875 `(("python-setuptools" ,python-setuptools)
5876 ("python-virtualenv" ,python-virtualenv)
5877 ;; Tests
5878 ("python-mock" ,python-mock)
5879 ("python-pytest" ,python-pytest)
5880 ("python-scripttest" ,python-scripttest)))
5881 (home-page "https://pip.pypa.io/")
5882 (synopsis
5883 "Package manager for Python software")
5884 (description
5885 "Pip is a package manager for Python software, that finds packages on the
5886Python Package Index (PyPI).")
5887 (license license:expat)))
5888
5889(define-public python2-pip
5890 (package-with-python2 python-pip))
d8c4998f
LC
5891
5892(define-public python-tlsh
5893 (package
5894 (name "python-tlsh")
99b00dc7 5895 (version "3.4.4")
d8c4998f
LC
5896 (home-page "https://github.com/trendmicro/tlsh")
5897 (source (origin
99b00dc7
EF
5898 (method url-fetch)
5899 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
5900 version ".tar.gz"))
d8c4998f
LC
5901 (sha256
5902 (base32
99b00dc7
EF
5903 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
5904 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
5905 (build-system cmake-build-system)
5906 (arguments
5907 '(#:out-of-source? #f
5908 #:phases (modify-phases %standard-phases
5909 (replace
5910 'install
5911 (lambda* (#:key outputs #:allow-other-keys)
5912 ;; Build and install the Python bindings. The underlying
5913 ;; C++ library is apparently not meant to be installed.
5914 (let ((out (assoc-ref outputs "out")))
5915 (with-directory-excursion "py_ext"
5916 (and (system* "python" "setup.py" "build")
5917 (system* "python" "setup.py" "install"
5918 (string-append "--prefix=" out))))))))))
5919 (inputs `(("python" ,python-wrapper))) ;for the bindings
5920 (synopsis "Fuzzy matching library for Python")
5921 (description
5922 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
5923Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
5924value which can be used for similarity comparisons. Similar objects have
5925similar hash values, which allows for the detection of similar objects by
5926comparing their hash values. The byte stream should have a sufficient amount
5927of complexity; for example, a byte stream of identical bytes will not generate
5928a hash value.")
5929 (license asl2.0)))
5930
5931(define-public python2-tlsh
5932 (package
5933 (inherit python-tlsh)
5934 (name "python2-tlsh")
5935 (inputs `(("python" ,python-2)))))
d96034ed
LC
5936
5937(define-public python-libarchive-c
5938 (package
5939 (name "python-libarchive-c")
03fd001c 5940 (version "2.2")
d96034ed
LC
5941 (source (origin
5942 (method url-fetch)
03fd001c 5943 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
5944 (sha256
5945 (base32
03fd001c 5946 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
5947 (build-system python-build-system)
5948 (arguments
5949 '(#:phases (modify-phases %standard-phases
5950 (add-before
5951 'build 'reference-libarchive
5952 (lambda* (#:key inputs #:allow-other-keys)
5953 ;; Retain the absolute file name of libarchive.so.
5954 (let ((libarchive (assoc-ref inputs "libarchive")))
5955 (substitute* "libarchive/ffi.py"
5956 (("find_library\\('archive'\\)")
5957 (string-append "'" libarchive
5958 "/lib/libarchive.so'"))))
5959
5960 ;; Do not make a compressed egg (see
5961 ;; <http://bugs.gnu.org/20765>).
5962 (let ((port (open-file "setup.cfg" "a")))
5963 (display "\n[easy_install]\nzip_ok = 0\n"
5964 port)
5965 (close-port port)
5966 #t))))))
5967 (inputs
5968 `(("python-setuptools" ,python-setuptools)
5969 ("libarchive" ,libarchive)))
5970 (home-page "https://github.com/Changaco/python-libarchive-c")
5971 (synopsis "Python interface to libarchive")
5972 (description
5973 "This package provides Python bindings to libarchive, a C library to
5974access possibly compressed archives in many different formats. It uses
5975Python's @code{ctypes} foreign function interface (FFI).")
5976 (license lgpl2.0+)))
5977
5978(define-public python2-libarchive-c
5979 (package-with-python2 python-libarchive-c))
5e1c9367
LC
5980
5981(define-public python-file
5982 (package
5983 (inherit file)
5984 (name "python-file")
5985 (build-system python-build-system)
5986 (arguments
5987 '(#:tests? #f ;no tests
5988 #:phases (modify-phases %standard-phases
5989 (add-before 'build 'change-directory
5990 (lambda _
5991 (chdir "python")
5992 #t))
5993 (add-before 'build 'set-library-file-name
5994 (lambda* (#:key inputs #:allow-other-keys)
5995 (let ((file (assoc-ref inputs "file")))
5996 (substitute* "magic.py"
5997 (("find_library\\('magic'\\)")
5998 (string-append "'" file "/lib/libmagic.so'")))
5999 #t))))))
6000 (inputs `(("file" ,file)))
6001 (self-native-input? #f)
6002 (synopsis "Python bindings to the libmagic file type guesser")))
6003
6004(define-public python2-file
6005 (package-with-python2 python-file))
85d4aeac
LC
6006
6007(define-public python-debian
6008 (package
6009 (name "python-debian")
6010 (version "0.1.23")
6011 (source
6012 (origin
6013 (method url-fetch)
6014 (uri (string-append
6015 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6016 version ".tar.gz"))
6017 (sha256
6018 (base32
6019 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6020 (build-system python-build-system)
6021 (inputs
6022 `(("python-six" ,python-six)))
6023 (native-inputs
6024 `(("python-setuptools" ,python-setuptools)))
6025 (home-page "http://packages.debian.org/sid/python-debian")
6026 (synopsis "Debian package related modules")
6027 (description
5c7bdc9a
LC
6028 ;; XXX: Use @enumerate instead of @itemize to work around
6029 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6030 "This package provides Python modules that abstract many formats of
6031Debian-related files, such as:
6032
5c7bdc9a 6033@enumerate
85d4aeac
LC
6034@item Debtags information;
6035@item @file{debian/changelog} files;
6036@item packages files, pdiffs;
6037@item control files of single or multiple RFC822-style paragraphs---e.g.
6038 @file{debian/control}, @file{.changes}, @file{.dsc};
6039@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6040 contained files and meta-information.
5c7bdc9a 6041@end enumerate\n")
85d4aeac
LC
6042
6043 ;; Modules are either GPLv2+ or GPLv3+.
6044 (license gpl3+)))
6045
6046(define-public python2-debian
6047 (package-with-python2 python-debian))
816a6538
LC
6048
6049(define-public python-chardet
6050 (package
6051 (name "python-chardet")
6052 (version "2.3.0")
6053 (source
6054 (origin
6055 (method url-fetch)
6056 (uri (string-append
6057 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6058 version
6059 ".tar.gz"))
6060 (sha256
6061 (base32
6062 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6063 (build-system python-build-system)
6064 (native-inputs
6065 `(("python-setuptools" ,python-setuptools)))
6066 (home-page "https://github.com/chardet/chardet")
6067 (synopsis "Universal encoding detector for Python 2 and 3")
6068 (description
6069 "This package provides @code{chardet}, a Python module that can
6070automatically detect a wide range of file encodings.")
6071 (license lgpl2.1+)))
6072
6073(define-public python2-chardet
6074 (package-with-python2 python-chardet))
2fc5f186 6075
1872f1bb
KM
6076(define-public python-docopt
6077 (package
6078 (name "python-docopt")
6079 (version "0.6.2")
6080 (source
6081 (origin
6082 (method url-fetch)
6083 ;; The release on PyPI does not include tests.
6084 (uri (string-append
6085 "https://github.com/docopt/docopt/archive/"
6086 version ".tar.gz"))
6087 (file-name (string-append name "-" version ".tar.gz"))
6088 (sha256
6089 (base32
6090 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6091 (build-system python-build-system)
6092 (native-inputs
6093 `(("python-pytest" ,python-pytest)
6094 ("python-setuptools" ,python-setuptools)))
6095 (arguments
6096 `(#:phases (alist-replace
6097 'check
6098 (lambda _ (zero? (system* "py.test")))
6099 %standard-phases)))
6100 (home-page "http://docopt.org")
6101 (synopsis "Command-line interface description language for Python")
6102 (description "This library allows the user to define a command-line
6103interface from a program's help message rather than specifying it
6104programatically with command-line parsers like @code{getopt} and
6105@code{argparse}.")
6106 (license license:expat)))
6107
6108(define-public python2-docopt
6109 (package-with-python2 python-docopt))
6110
2fc5f186
LF
6111(define-public python-zope-event
6112 (package
6113 (name "python-zope-event")
6114 (version "4.1.0")
6115 (source
6116 (origin
6117 (method url-fetch)
6118 (uri (string-append "https://pypi.python.org/packages/source/z"
6119 "/zope.event/zope.event-" version ".tar.gz"))
6120 (sha256
6121 (base32
6122 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6123 (build-system python-build-system)
6124 (inputs
6125 `(("python-setuptools" ,python-setuptools)))
6126 (home-page "http://pypi.python.org/pypi/zope.event")
6127 (synopsis "Event publishing system for Python")
6128 (description "Zope.event provides an event publishing API, intended for
6129use by applications which are unaware of any subscribers to their events. It
6130is a simple event-dispatching system on which more sophisticated event
6131dispatching systems can be built.")
6132 (license zpl2.1)))
6133
6134(define-public python2-zope-event
6135 (package-with-python2 python-zope-event))
97abe268
LF
6136
6137(define-public python-zope-interface
6138 (package
6139 (name "python-zope-interface")
6140 (version "4.1.3")
6141 (source
6142 (origin
6143 (method url-fetch)
6144 (uri (string-append "https://pypi.python.org/packages/source/z"
6145 "/zope.interface/zope.interface-" version ".tar.gz"))
6146 (sha256
6147 (base32
6148 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6149 (build-system python-build-system)
6150 (propagated-inputs
6151 `(("python-zope-event" ,python-zope-event)))
6152 (home-page "https://github.com/zopefoundation/zope.interface")
6153 (synopsis "Python implementation of the \"design by contract\"
6154methodology")
6155 (description "Zope.interface provides an implementation of \"object
6156interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6157conforming to a given API or contract.")
6158 (license zpl2.1)))
6159
6160(define-public python2-zope-interface
6161 (package-with-python2 python-zope-interface))
81f2373c
LF
6162
6163(define-public python-zope-exceptions
6164 (package
6165 (name "python-zope-exceptions")
6166 (version "4.0.8")
6167 (source
6168 (origin
6169 (method url-fetch)
6170 (uri (string-append "https://pypi.python.org/packages/source/z"
6171 "/zope.exceptions/zope.exceptions-"
6172 version ".tar.gz"))
6173 (sha256
6174 (base32
6175 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6176 (build-system python-build-system)
6177 (arguments
6178 '(#:tests? #f)) ; circular dependency with zope.testrunner
6179 (propagated-inputs
6180 `(("python-zope-interface" ,python-zope-interface)))
6181 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6182 (synopsis "Zope exceptions")
6183 (description "Zope.exceptions provides general-purpose exception types
6184that have uses outside of the Zope framework.")
6185 (license zpl2.1)))
6186
6187(define-public python2-zope-exceptions
6188 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6189
6190(define-public python-zope-testing
6191 (package
6192 (name "python-zope-testing")
6193 (version "4.5.0")
6194 (source
6195 (origin
6196 (method url-fetch)
6197 (uri (string-append "https://pypi.python.org/packages/source/z"
6198 "/zope.testing/zope.testing-" version ".tar.gz"))
6199 (sha256
6200 (base32
6201 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6202 (build-system python-build-system)
6203 (native-inputs
6204 `(("python-zope-exceptions" ,python-zope-exceptions)))
6205 (propagated-inputs
6206 `(("python-zope-interface" ,python-zope-interface)))
6207 (home-page "http://pypi.python.org/pypi/zope.testing")
6208 (synopsis "Zope testing helpers")
6209 (description "Zope.testing provides a number of testing utilities for HTML
6210forms, HTTP servers, regular expressions, and more.")
6211 (license zpl2.1)))
6212
6213(define-public python2-zope-testing
6214 (package-with-python2 python-zope-testing))
01614c4f
LF
6215
6216(define-public python-zope-testrunner
6217 (package
6218 (name "python-zope-testrunner")
6219 (version "4.4.9")
6220 (source
6221 (origin
6222 (method url-fetch)
6223 (uri (string-append "https://pypi.python.org/packages/source/z"
6224 "/zope.testrunner/zope.testrunner-"
6225 version ".zip"))
6226 (sha256
6227 (base32
6228 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6229 (build-system python-build-system)
6230 (native-inputs
6231 `(("python-six" ,python-six)
6232 ("python-zope-exceptions" ,python-zope-exceptions)
6233 ("python-zope-testing" ,python-zope-testing)
6234 ("unzip" ,unzip)))
6235 (propagated-inputs
6236 `(("python-zope-interface" ,python-zope-interface)))
6237 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6238 (synopsis "Zope testrunner script")
6239 (description "Zope.testrunner provides a script for running Python
6240tests.")
6241 (license zpl2.1)))
6242
6243(define-public python2-zope-testrunner
6244 (let ((base (package-with-python2 python-zope-testrunner)))
6245 (package
6246 (inherit base)
6247 (native-inputs
6248 (append (package-native-inputs base)
6249 `(("python2-subunit" ,python2-subunit)
6250 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6251
6252(define-public python-zope-i18nmessageid
6253 (package
6254 (name "python-zope-i18nmessageid")
6255 (version "4.0.3")
6256 (source
6257 (origin
6258 (method url-fetch)
6259 (uri (string-append
6260 "https://pypi.python.org/packages/source/z"
6261 "/zope.i18nmessageid/zope.i18nmessageid-"
6262 version ".tar.gz"))
6263 (sha256
6264 (base32
6265 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6266 (build-system python-build-system)
6267 (inputs
6268 `(("python-setuptools" ,python-setuptools)))
6269 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6270 (synopsis "Message identifiers for internationalization")
6271 (description "Zope.i18nmessageid provides facilities for declaring
6272internationalized messages within program source text.")
6273 (license zpl2.1)))
6274
6275(define-public python2-zope-i18nmessageid
6276 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6277
6278(define-public python-zope-schema
6279 (package
6280 (name "python-zope-schema")
6281 (version "4.4.2")
6282 (source
6283 (origin
6284 (method url-fetch)
6285 (uri (string-append "https://pypi.python.org/packages/source/z"
6286 "/zope.schema/zope.schema-" version ".tar.gz"))
6287 (sha256
6288 (base32
6289 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6290 (build-system python-build-system)
6291 (propagated-inputs
6292 `(("python-zope-event" ,python-zope-event)
6293 ("python-zope-interface" ,python-zope-interface)))
6294 (native-inputs
6295 `(("python-zope-testing" ,python-zope-testing)))
6296 (home-page "http://pypi.python.org/pypi/zope.schema")
6297 (synopsis "Zope data schemas")
6298 (description "Zope.scheme provides extensions to zope.interface for
6299defining data schemas.")
6300 (license zpl2.1)))
6301
6302(define-public python2-zope-schema
6303 (package-with-python2 python-zope-schema))
fbac9b17
LF
6304
6305(define-public python-zope-configuration
6306 (package
6307 (name "python-zope-configuration")
6308 (version "4.0.3")
6309 (source (origin
6310 (method url-fetch)
6311 (uri (string-append "https://pypi.python.org/packages/source/z"
6312 "/zope.configuration/zope.configuration-"
6313 version ".tar.gz"))
6314 (sha256
6315 (base32
6316 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6317 (build-system python-build-system)
6318 (propagated-inputs
6319 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6320 ("python-zope-schema" ,python-zope-schema)))
6321 (home-page "http://pypi.python.org/pypi/zope.configuration")
6322 (synopsis "Zope Configuration Markup Language")
6323 (description "Zope.configuration implements ZCML, the Zope Configuration
6324Markup Language.")
6325 (license zpl2.1)))
6326
6327(define-public python2-zope-configuration
6328 (package-with-python2 python-zope-configuration))
2ad52086
LF
6329
6330(define-public python-zope-proxy
6331 (package
6332 (name "python-zope-proxy")
6333 (version "4.1.6")
6334 (source
6335 (origin
6336 (method url-fetch)
6337 (uri (string-append "https://pypi.python.org/packages/source/z"
6338 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6339 (sha256
6340 (base32
6341 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6342 (build-system python-build-system)
6343 (propagated-inputs
6344 `(("python-zope-interface" ,python-zope-interface)))
6345 (home-page "http://pypi.python.org/pypi/zope.proxy")
6346 (synopsis "Generic, transparent proxies")
6347 (description "Zope.proxy provides generic, transparent proxies for Python.
6348Proxies are special objects which serve as mostly-transparent wrappers around
6349another object, intervening in the apparent behavior of the wrapped object
6350only when necessary to apply the policy (e.g., access checking, location
6351brokering, etc.) for which the proxy is responsible.")
6352 (license zpl2.1)))
6353
6354(define-public python2-zope-proxy
6355 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6356
6357(define-public python-zope-location
6358 (package
6359 (name "python-zope-location")
6360 (version "4.0.3")
6361 (source
6362 (origin
6363 (method url-fetch)
6364 (uri (string-append "https://pypi.python.org/packages/source/z"
6365 "/zope.location/zope.location-" version ".tar.gz"))
6366 (sha256
6367 (base32
6368 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6369 (build-system python-build-system)
6370 (native-inputs
6371 `(("python-zope-proxy" ,python-zope-proxy)
6372 ("python-zope-schema" ,python-zope-schema)))
6373 (home-page "http://pypi.python.org/pypi/zope.location/")
6374 (synopsis "Zope location library")
6375 (description "Zope.location implements the concept of \"locations\" in
6376Zope3, which are are special objects that have a structural location.")
6377 (license zpl2.1)))
6378
6379(define-public python2-zope-location
6380 (package-with-python2 python-zope-location))
d4b77f36
LF
6381
6382(define-public python-zope-security
6383 (package
6384 (name "python-zope-security")
6385 (version "4.0.3")
6386 (source
6387 (origin
6388 (method url-fetch)
6389 (uri (string-append "https://pypi.python.org/packages/source/z"
6390 "/zope.security/zope.security-" version ".tar.gz"))
6391 (sha256
6392 (base32
6393 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6394 (build-system python-build-system)
6395 (propagated-inputs
6396 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6397 ("python-zope-component" ,python-zope-component)
6398 ("python-zope-location" ,python-zope-location)
6399 ("python-zope-proxy" ,python-zope-proxy)
6400 ("python-zope-schema" ,python-zope-schema)
6401 ("python-zope-testrunner" ,python-zope-testrunner)
6402 ("python-zope-testing" ,python-zope-testing)))
6403 (home-page "http://pypi.python.org/pypi/zope.security")
6404 (synopsis "Zope security framework")
6405 (description "Zope.security provides a generic mechanism to implement
6406security policies on Python objects.")
6407 (license zpl2.1)))
6408
6409(define-public python2-zope-security
04417662
EF
6410 (let ((zope-security (package-with-python2 python-zope-security)))
6411 (package (inherit zope-security)
6412 (propagated-inputs
6413 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6414 ,@(alist-delete
6415 "python-zope-testrunner"
6416 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6417
6418(define-public python-zope-component
6419 (package
6420 (name "python-zope-component")
6421 (version "4.2.2")
6422 (source
6423 (origin
6424 (method url-fetch)
6425 (uri (string-append "https://pypi.python.org/packages/source/z"
6426 "/zope.component/zope.component-" version ".tar.gz"))
6427 (sha256
6428 (base32
6429 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6430 (build-system python-build-system)
6431 (arguments
6432 ;; Skip tests due to circular dependency with python-zope-security.
6433 '(#:tests? #f))
6434 (native-inputs
6435 `(("python-zope-testing" ,python-zope-testing)))
6436 (propagated-inputs
6437 `(("python-zope-event" ,python-zope-event)
6438 ("python-zope-interface" ,python-zope-interface)
6439 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6440 ("python-zope-configuration" ,python-zope-configuration)))
6441 (home-page "https://github.com/zopefoundation/zope.component")
6442 (synopsis "Zope Component Architecture")
6443 (description "Zope.component represents the core of the Zope Component
6444Architecture. Together with the zope.interface package, it provides
6445facilities for defining, registering and looking up components.")
6446 (license zpl2.1)))
6447
6448(define-public python2-zope-component
6449 (package-with-python2 python-zope-component))
3859ac12 6450
b5f218be
LF
6451(define-public python2-pythondialog
6452 (package
6453 (name "python2-pythondialog")
6454 (version "3.3.0")
6455 (source
6456 (origin
6457 (method url-fetch)
6458 (uri (string-append "https://pypi.python.org/packages/source/p/"
6459 "python2-pythondialog/python2-pythondialog-"
6460 version ".tar.gz"))
6461 (sha256
6462 (base32
6463 "1yhkagsh99bfi592ymczf8rnw8rk6n9hdqy3dd98m3yrx8zmjvry"))))
6464 (build-system python-build-system)
6465 (arguments
6466 `(#:phases
6467 (modify-phases %standard-phases
6468 (add-after 'unpack 'patch-path
6469 (lambda* (#:key inputs #:allow-other-keys)
6470 (let* ((dialog (assoc-ref inputs "dialog")))
6471 ;; Since this library really wants to grovel the search path, we
6472 ;; must hardcode dialog's store path into it.
6473 (substitute* "dialog.py"
6474 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6475 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6476 #t))))
6477 #:python ,python-2
6478 #:tests? #f)) ; no test suite
6479 (propagated-inputs
6480 `(("dialog" ,dialog)))
6481 (home-page "http://pythondialog.sourceforge.net/")
6482 (synopsis "Python interface to the UNIX dialog utility")
6483 (description "A Python wrapper for the dialog utility. Its purpose is to
6484provide an easy to use, pythonic and comprehensive Python interface to dialog.
6485This allows one to make simple text-mode user interfaces on Unix-like systems")
6486 (license lgpl2.1)))
6487
3859ac12
LF
6488(define-public python-pyrfc3339
6489 (package
6490 (name "python-pyrfc3339")
d9aa097b 6491 (version "1.0")
3859ac12
LF
6492 (source
6493 (origin
6494 (method url-fetch)
d9aa097b 6495 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
6496 (sha256
6497 (base32
d9aa097b 6498 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
6499 (build-system python-build-system)
6500 (propagated-inputs
6501 `(("python-pytz" ,python-pytz)))
6502 (native-inputs
6503 `(("python-nose" ,python-nose)
6504 ("python-setuptools" ,python-setuptools)))
6505 (home-page "https://github.com/kurtraschke/pyRFC3339")
6506 (synopsis "Python timestamp library")
6507 (description "Python library for generating and parsing RFC 3339-compliant
6508timestamps.")
6509 (license license:expat)))
6510
6511(define-public python2-pyrfc3339
6512 (package-with-python2 python-pyrfc3339))
5eea2005
LF
6513
6514(define-public python-werkzeug
6515 (package
6516 (name "python-werkzeug")
6517 (version "0.11.2")
6518 (source
6519 (origin
6520 (method url-fetch)
6521 (uri (string-append "https://pypi.python.org/packages/source/W/Werkzeug"
6522 "/Werkzeug-" version ".tar.gz"))
6523 (file-name (string-append name "-" version ".tar.gz"))
6524 (sha256
6525 (base32
6526 "1gzwn1lkl90f3l1nzzxr7vjhm21qk8f837i8rvny5a209fcrhkzb"))))
6527 (build-system python-build-system)
6528 (native-inputs
6529 `(("python-pytest" ,python-pytest)))
6530 (home-page "http://werkzeug.pocoo.org/")
6531 (synopsis "Utilities for WSGI applications")
6532 (description "One of the most advanced WSGI utility modules. It includes a
6533powerful debugger, full-featured request and response objects, HTTP utilities to
6534handle entity tags, cache control headers, HTTP dates, cookie handling, file
6535uploads, a powerful URL routing system and a bunch of community-contributed
6536addon modules.")
6537 (license x11)))
6538
6539(define-public python2-werkzeug
6540 (package-with-python2 python-werkzeug))
99fffa8a
LF
6541
6542(define-public python-configobj
6543 (package
6544 (name "python-configobj")
6545 (version "5.0.6")
6546 (source (origin
6547 (method url-fetch)
6548 (uri (string-append
6549 "https://pypi.python.org/packages/source/c/configobj/"
6550 "configobj-" version ".tar.gz"))
6551 (sha256
6552 (base32
6553 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6554 ;; Patch setup.py so it looks for python-setuptools, which is
6555 ;; required to parse the keyword 'install_requires' in setup.py.
6556 (patches (list (search-patch "python-configobj-setuptools.patch")))))
6557 (build-system python-build-system)
6558 (native-inputs
6559 `(("python-setuptools" ,python-setuptools)
6560 ("python-six" ,python-six)))
6561 (synopsis "Config file reading, writing and validation")
6562 (description "ConfigObj is a simple but powerful config file reader and
6563writer: an ini file round tripper. Its main feature is that it is very easy to
6564use, with a straightforward programmer’s interface and a simple syntax for
6565config files.")
6566 (home-page "https://github.com/DiffSK/configobj")
6567 (license bsd-3)))
6568
6569(define-public python2-configobj
6570 (package-with-python2 python-configobj))
79e8a291
LF
6571
6572(define-public python-configargparse
6573 (package
6574 (name "python-configargparse")
6575 (version "0.10.0")
6576 (source (origin
6577 (method url-fetch)
6578 (uri (string-append
6579 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6580 "ConfigArgParse-" version ".tar.gz"))
6581 (sha256
6582 (base32
6583 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6584 (build-system python-build-system)
6585 (arguments
6586 ;; FIXME: Bug in test suite filed upstream:
6587 ;; https://github.com/bw2/ConfigArgParse/issues/32
6588 '(#:tests? #f))
6589 (synopsis "Replacement for argparse")
6590 (description "A drop-in replacement for argparse that allows options to also
6591be set via config files and/or environment variables.")
6592 (home-page "https://github.com/bw2/ConfigArgParse")
6593 (license license:expat)))
6594
6595(define-public python2-configargparse
6596 (package-with-python2 python-configargparse))
ab41f979
LF
6597
6598(define-public python-ndg-httpsclient
6599 (package
6600 (name "python-ndg-httpsclient")
6601 (version "0.4.0")
6602 (source (origin
6603 (method url-fetch)
6604 (uri (string-append
6605 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6606 "ndg_httpsclient-" version ".tar.gz"))
6607 (sha256
6608 (base32
6609 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6610 (build-system python-build-system)
6611 (propagated-inputs
6612 `(("python-pyopenssl" ,python-pyopenssl)))
6613 (synopsis "HTTPS support for Python's httplib and urllib2")
6614 (description "This is a HTTPS client implementation for httplib and urllib2
6615based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6616over the default provided with Python and importantly enables full verification
6617of the SSL peer.")
6618 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6619 (license bsd-3)))
6620
6621;; python2-openssl requires special care, so package-with-python2 is
6622;; insufficient.
6623(define-public python2-ndg-httpsclient
6624 (package (inherit python-ndg-httpsclient)
6625 (name "python2-ndg-httpsclient")
6626 (arguments `(#:python ,python-2))
6627 (propagated-inputs
6628 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
6629
6630(define-public python-contextlib2
6631 (package
6632 (name "python-contextlib2")
6633 (version "0.4.0")
6634 (source
6635 (origin
6636 (method url-fetch)
6637 (uri (pypi-uri "contextlib2" version))
6638 (sha256
6639 (base32
6640 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6641 (build-system python-build-system)
6642 (arguments
6643 `(#:phases
6644 (modify-phases %standard-phases
6645 (replace 'check
6646 (lambda _ (zero?
6647 (system*
6648 "python" "test_contextlib2.py", "-v")))))))
6649 (home-page "http://contextlib2.readthedocs.org/")
6650 (synopsis "Tools for decorators and context managers")
6651 (description "This module is primarily a backport of the Python
66523.2 contextlib to earlier Python versions. Like contextlib, it
6653provides utilities for common tasks involving decorators and context
6654managers. It also contains additional features that are not part of
6655the standard library.")
6656 (license psfl)))
6657
6658(define-public python2-contextlib2
6659 (package-with-python2 python-contextlib2))
210bf497
DT
6660
6661(define-public python-texttable
6662 (package
6663 (name "python-texttable")
6664 (version "0.8.4")
6665 (source
6666 (origin
6667 (method url-fetch)
6668 (uri (pypi-uri "texttable" version))
6669 (sha256
6670 (base32
6671 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
6672 (build-system python-build-system)
6673 (arguments '(#:tests? #f)) ; no tests
6674 (home-page "https://github.com/foutaise/texttable/")
6675 (synopsis "Python module for creating simple ASCII tables")
6676 (description "Texttable is a Python module for creating simple ASCII
6677tables.")
6678 (license lgpl2.1+)))
6679
6680(define-public python2-texttable
6681 (package-with-python2 python-texttable))
67c52bb3
DT
6682
6683(define-public python-websocket-client
6684 (package
6685 (name "python-websocket-client")
6686 (version "0.34.0")
6687 (source
6688 (origin
6689 (method url-fetch)
6690 (uri (string-append "https://pypi.python.org/packages/source/w"
6691 "/websocket-client/websocket_client-"
6692 version ".tar.gz"))
6693 (sha256
6694 (base32
6695 "1prdx6d49f1cff17kzj15bnz09palfdgc1m5dkq9jd4mr90n4ak8"))))
6696 (build-system python-build-system)
6697 (native-inputs
6698 `(("python-six" ,python-six))) ; for tests
6699 (inputs
6700 `(("python-setuptools" ,python-setuptools)))
6701 (home-page "https://github.com/liris/websocket-client")
6702 (synopsis "WebSocket client for Python")
6703 (description "The Websocket-client module provides the low level APIs for
6704WebSocket usage in Python programs.")
6705 (license lgpl2.1+)))
6706
6707(define-public python2-websocket-client
6708 (package-with-python2 python-websocket-client))
5c6eea2a
LF
6709
6710(define-public python-atomicwrites
6711 (package
6712 (name "python-atomicwrites")
6713 (version "0.1.8")
6714 (source (origin
6715 (method url-fetch)
6716 (uri (pypi-uri "atomicwrites" version))
6717 (sha256
6718 (base32
6719 "13nwk0gw0yb61pnf5vxs3fvhav6q3zrf08x9ggc93bnk5fsssx1j"))))
6720 (build-system python-build-system)
6721 (synopsis "Atomic file writes in Python")
6722 (description "Library for atomic file writes using platform dependent tools
6723for atomic filesystem operations.")
6724 (home-page "https://github.com/untitaker/python-atomicwrites")
6725 (license license:expat)))
561bb3cb
LF
6726
6727(define-public python-requests-toolbelt
6728 (package
6729 (name "python-requests-toolbelt")
6730 (version "0.5.0")
6731 (source (origin
6732 (method url-fetch)
6733 (uri (pypi-uri "requests-toolbelt" version))
6734 (sha256
6735 (base32
6736 "1kbms1s52dhb98vbpaprr15b0ijdbqp500lpfsyjccpd8cjkyngk"))))
6737 (build-system python-build-system)
6738 (propagated-inputs
6739 `(("python-requests" ,python-requests)))
6740 (synopsis "Extensions to python-requests")
6741 (description "This is a toolbelt of useful classes and functions to be used
6742with python-requests.")
6743 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
6744 (license asl2.0)))