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