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