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