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