gnu: python-requests: Update to 2.8.1.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
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
35 (define-module (gnu packages python)
36 #:use-module ((guix licenses)
37 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
38 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
39 isc psfl public-domain x11-style zpl2.1))
40 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages attr)
43 #:use-module (gnu packages backup)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages databases)
46 #:use-module (gnu packages file)
47 #:use-module (gnu packages fontutils)
48 #:use-module (gnu packages gcc)
49 #:use-module (gnu packages ghostscript)
50 #:use-module (gnu packages glib)
51 #:use-module (gnu packages gtk)
52 #:use-module (gnu packages icu4c)
53 #:use-module (gnu packages image)
54 #:use-module (gnu packages imagemagick)
55 #:use-module (gnu packages libffi)
56 #:use-module (gnu packages linux)
57 #:use-module (gnu packages maths)
58 #:use-module (gnu packages multiprecision)
59 #:use-module (gnu packages networking)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages pcre)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages readline)
65 #:use-module (gnu packages statistics)
66 #:use-module (gnu packages texlive)
67 #:use-module (gnu packages texinfo)
68 #:use-module (gnu packages tls)
69 #:use-module (gnu packages web)
70 #:use-module (gnu packages base)
71 #:use-module (gnu packages xml)
72 #:use-module (gnu packages xorg)
73 #:use-module (gnu packages zip)
74 #:use-module (gnu packages tcl)
75 #:use-module (guix packages)
76 #:use-module (guix download)
77 #:use-module (guix git-download)
78 #:use-module (guix utils)
79 #:use-module (guix build-system gnu)
80 #:use-module (guix build-system cmake)
81 #:use-module (guix build-system python)
82 #:use-module (guix build-system trivial)
83 #:use-module (srfi srfi-1))
84
85 (define-public python-2
86 (package
87 (name "python")
88 (version "2.7.10")
89 (source
90 (origin
91 (method url-fetch)
92 (uri (string-append "https://www.python.org/ftp/python/"
93 version "/Python-" version ".tar.xz"))
94 (sha256
95 (base32
96 "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw"))
97 (patches (map search-patch
98 '("python-2.7-search-paths.patch"
99 "python-2-deterministic-build-info.patch"
100 "python-2.7-source-date-epoch.patch")))))
101 (outputs '("out"
102 "tk")) ;tkinter; adds 50 MiB to the closure
103 (build-system gnu-build-system)
104 (arguments
105 `(#:tests? #f
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
146 #:test-target "test"
147 #:configure-flags
148 (list "--enable-shared" ;allow embedding
149 "--with-system-ffi" ;build ctypes
150 (string-append "LDFLAGS=-Wl,-rpath="
151 (assoc-ref %outputs "out") "/lib"))
152
153 #:modules ((ice-9 ftw) (ice-9 match)
154 (guix build utils) (guix build gnu-build-system))
155 #:phases
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")))
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.
172 (setenv "SOURCE_DATE_EPOCH" "1")
173 #t))
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))
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))
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))))))
229 (inputs
230 `(("bzip2" ,bzip2)
231 ("gdbm" ,gdbm)
232 ("libffi" ,libffi) ; for ctypes
233 ("sqlite" ,sqlite) ; for sqlite extension
234 ("openssl" ,openssl)
235 ("readline" ,readline)
236 ("zlib" ,zlib)
237 ("tcl" ,tcl)
238 ("tk" ,tk))) ; for tkinter
239 (native-inputs
240 `(("pkg-config" ,pkg-config)))
241 (native-search-paths
242 (list (search-path-specification
243 (variable "PYTHONPATH")
244 (files '("lib/python2.7/site-packages")))))
245 (home-page "http://python.org")
246 (synopsis "High-level, dynamically-typed programming language")
247 (description
248 "Python is a remarkably powerful dynamic programming language that
249 is used in a wide variety of application domains. Some of its key
250 distinguishing features include: clear, readable syntax; strong
251 introspection capabilities; intuitive object orientation; natural
252 expression of procedural code; full modularity, supporting hierarchical
253 packages; exception-based error handling; and very high level dynamic
254 data types.")
255 (license psfl)))
256
257 (define-public python
258 (package (inherit python-2)
259 (version "3.4.3")
260 (source (origin
261 (method url-fetch)
262 (uri (string-append "https://www.python.org/ftp/python/"
263 version "/Python-" version ".tar.xz"))
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"
268 "python-3-deterministic-build-info.patch"
269 "python-3-search-paths.patch")))
270 (patch-flags '("-p0"))
271 (sha256
272 (base32
273 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
274 (arguments (substitute-keyword-arguments (package-arguments python-2)
275 ((#:tests? _) #t)))
276 (native-search-paths
277 (list (search-path-specification
278 (variable "PYTHONPATH")
279 (files (list (string-append "lib/python"
280 (version-major+minor version)
281 "/site-packages"))))))))
282
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")
289 (outputs '("out"))
290 (arguments
291 (substitute-keyword-arguments (package-arguments python-2)
292 ((#:configure-flags cf)
293 `(append ,cf '("--without-system-ffi")))))
294 (inputs '()))) ;none of the optional dependencies
295
296 (define-public python-minimal
297 (package (inherit python)
298 (name "python-minimal")
299 (outputs '("out"))
300 (arguments
301 (substitute-keyword-arguments (package-arguments python)
302 ((#:configure-flags cf)
303 `(append ,cf '("--without-system-ffi")))))
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"))
311 (package (inherit python)
312 (name name)
313 (source #f)
314 (build-system trivial-build-system)
315 (outputs '("out"))
316 (propagated-inputs `(("python" ,python)))
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"))))))
331 (synopsis "Wrapper for the Python 3 commands")
332 (description
333 "This package provides wrappers for the commands of Python@tie{}3.x such
334 that they can be invoked under their usual name---e.g., @command{python}
335 instead of @command{python3}.")))
336
337 (define-public python-wrapper (wrap-python3 python))
338 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
339
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
360 information on running processes and system utilization (CPU, memory, disks,
361 network) in Python. It is useful mainly for system monitoring, profiling and
362 limiting process resources and management of running processes. It implements
363 many functionalities offered by command line tools such as: ps, top, lsof,
364 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
365 pidof, tty, taskset, pmap.")
366 (license bsd-3)))
367
368 (define-public python2-psutil
369 (package-with-python2 python-psutil))
370
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
403 cross-platform implementations of over 30 password hashing algorithms, as well
404 as a framework for managing existing password hashes. It's designed to be
405 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
406 to 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
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
434 system hashes passwords using a version of Bruce Schneier's Blowfish block
435 cipher with modifications designed to raise the cost of off-line password
436 cracking and frustrate fast hardware implementation. The computation cost of
437 the algorithm is parametised, so it can be increased as computers get faster.
438 The intent is to make a compromise of a password database less likely to
439 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
440 John 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
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)))
467 (propagated-inputs
468 `(("python-pycrypto" ,python-pycrypto)))
469 (inputs
470 `(("python-ecdsa" ,python-ecdsa)))
471 (home-page "http://www.paramiko.org/")
472 (synopsis "SSHv2 protocol library")
473 (description "Paramiko is a python implementation of the SSHv2 protocol,
474 providing both client and server functionality. While it leverages a Python C
475 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
476 Python interface around SSH networking concepts.")
477 (license lgpl2.1+)))
478
479 (define-public python2-paramiko
480 (package-with-python2 python-paramiko))
481
482
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
505 other HTTP libraries.")
506 (license license:expat)))
507
508 (define-public python2-httplib2
509 (package-with-python2 python-httplib2))
510
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
536 Curve Digital Signature Algorithm), implemented purely in Python. With this
537 library, you can quickly create keypairs (signing key and verifying key), sign
538 messages, and verify the signatures. The keys and signatures are very short,
539 making 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
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
568 Cassandra cluster on localhost.")
569 (license asl2.0)))
570
571 (define-public python2-ccm
572 (package-with-python2 python-ccm))
573
574 (define-public python-pytz
575 (package
576 (name "python-pytz")
577 (version "2015.7")
578 (source
579 (origin
580 (method url-fetch)
581 (uri (pypi-uri "pytz" version))
582 (sha256
583 (base32
584 "1spgdfp1ssya7v3kww7zp71xpj437skpqazcvqr3kr1p1brnw9lr"))))
585 (build-system python-build-system)
586 (arguments `(#:tests? #f)) ; no test target
587 (home-page "http://pythonhosted.org/pytz")
588 (synopsis "Python timezone library")
589 (description
590 "This library allows accurate and cross platform timezone calculations
591 using Python 2.4 or higher and provides access to the Olson timezone database.")
592 (license license:expat)))
593
594 (define-public python2-pytz
595 (package-with-python2 python-pytz))
596
597
598 (define-public python-babel
599 (package
600 (name "python-babel")
601 (version "2.1.1")
602 (source
603 (origin
604 (method url-fetch)
605 (uri (pypi-uri "Babel" version))
606 (sha256
607 (base32
608 "0j2jgfzj1a2m39pm2qc36fzr7a6p5ybwndi0xdzhi2p8zw7dbdkz"))))
609 (build-system python-build-system)
610 (inputs
611 `(("python-pytz" ,python-pytz)
612 ("python-setuptools" ,python-setuptools)))
613 (arguments `(#:tests? #f)) ; no test target
614 (home-page "http://babel.pocoo.org/")
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
621 access to various locale display names, localized number and date formatting,
622 etc. ")
623 (license bsd-3)))
624
625 (define-public python2-babel
626 (package-with-python2 python-babel))
627
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
650 earlier versions of Python. The function checks the hostname in the
651 certificate returned by the server to which a connection has been established,
652 and verifies that it matches the intended target hostname.")
653 (license psfl)))
654
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)
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))))))
684 (propagated-inputs
685 `(("python-numpy" ,python-numpy)))
686 (inputs
687 `(("hdf5" ,hdf5)))
688 (native-inputs
689 `(("python-cython" ,python-cython)))
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
694 HDF5 library from Python. The low-level interface is intended to be a
695 complete wrapping of the HDF5 API, while the high-level component supports
696 access to HDF5 files, datasets and groups using established Python and NumPy
697 concepts.")
698 (license bsd-3)))
699
700 (define-public python2-h5py
701 (let ((h5py (package-with-python2 python-h5py)))
702 (package (inherit h5py)
703 (propagated-inputs
704 `(("python2-numpy" ,python2-numpy)
705 ,@(alist-delete
706 "python-numpy"
707 (package-propagated-inputs h5py)))))))
708
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
727 API for locking files.")
728 (license license:expat)))
729
730 (define-public python2-lockfile
731 (package-with-python2 python-lockfile))
732
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"))
747 (home-page "http://code.google.com/p/mock/")
748 (synopsis "Python mocking and patching library for testing")
749 (description
750 "Mock is a library for testing in Python. It allows you to replace parts
751 of your system under test with mock objects and make assertions about how they
752 have been used.")
753 (license license:expat)))
754
755 (define-public python2-mock
756 (package-with-python2 python-mock))
757
758
759 (define-public python-setuptools
760 (package
761 (name "python-setuptools")
762 (version "18.3.1")
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
770 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
771 (build-system python-build-system)
772 ;; FIXME: Tests require pytest, which itself relies on setuptools.
773 ;; One could bootstrap with an internal untested setuptools.
774 (arguments
775 `(#:tests? #f))
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
781 packaging Python projects, where packaging includes:
782 Python package and module definitions,
783 distribution package metadata,
784 test hooks,
785 project installation,
786 platform-specific details,
787 Python 3 support.")
788 (license psfl)))
789
790 (define-public python2-setuptools
791 (package-with-python2 python-setuptools))
792
793
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
824 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
825 etc.). The package is structured to make adding new modules easy.")
826 (license public-domain)))
827
828 (define-public python2-pycrypto
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)))))))
836
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
872 service from python. It can be used in any application that needs safe
873 password storage.")
874 ;; "MIT" and PSF dual license
875 (license x11)))
876
877 (define-public python2-keyring
878 (let ((keyring (package-with-python2 python-keyring)))
879 (package (inherit keyring)
880 (inputs
881 `(("python2-pycrypto" ,python2-pycrypto))))))
882
883 (define-public python-six
884 (package
885 (name "python-six")
886 (version "1.10.0")
887 (source
888 (origin
889 (method url-fetch)
890 (uri (pypi-uri "six" version))
891 (sha256
892 (base32
893 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
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
900 "Six is a Python 2 and 3 compatibility library. It provides utility
901 functions for smoothing over the differences between the Python versions with
902 the goal of writing Python code that is compatible on both Python versions.
903 Six supports every Python version since 2.5. It is contained in only one
904 Python file, so it can be easily copied into your project.")
905 (license x11)))
906
907 (define-public python2-six
908 (package-with-python2 python-six))
909
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
930 datetime 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
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)
943 (uri (string-append "http://labix.org/download/python-dateutil/"
944 "python-dateutil-" version ".tar.gz"))
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")
952 (synopsis "Extensions to the standard datetime module")
953 (description
954 "The dateutil module provides powerful extensions to the standard
955 datetime module, available in Python 2.3+.")
956 (license psfl)))
957
958 (define-public python2-dateutil
959 (package-with-python2 python-dateutil))
960
961 (define-public python-parsedatetime
962 (package
963 (name "python-parsedatetime")
964 (version "1.5")
965 (source
966 (origin
967 (method url-fetch)
968 (uri (string-append "https://pypi.python.org/packages/source/p/"
969 "parsedatetime/parsedatetime-" version ".tar.gz"))
970 (sha256
971 (base32
972 "1as0mm4ql3z0324nc9bys2s1ngh507i317p16b79rx86wlmvx9ix"))))
973 (build-system python-build-system)
974 (native-inputs
975 `(("python-setuptools" ,python-setuptools)))
976 (home-page "http://github.com/bear/parsedatetime/")
977 (synopsis
978 "Parse human-readable date/time text")
979 (description
980 "Parse human-readable date/time text.")
981 (license asl2.0)))
982
983 (define-public python2-parsedatetime
984 (package-with-python2 python-parsedatetime))
985
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
1015 structures designed to make working with structured (tabular,
1016 multidimensional, potentially heterogeneous) and time series data both easy
1017 and intuitive. It aims to be the fundamental high-level building block for
1018 doing practical, real world data analysis in Python.")
1019 (license bsd-3)))
1020
1021 (define-public python2-pandas
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)))))))
1028
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
1059 "Local timezone information for Python")
1060 (description
1061 "Tzlocal returns a tzinfo object with the local timezone information.
1062 This module attempts to fix a glaring hole in pytz, that there is no way to
1063 get the local timezone information, unless you know the zoneinfo name, and
1064 under several distributions that's hard or impossible to figure out.")
1065 (license cc0)))
1066
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
1098 SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It
1099 also includes an interface for tabix.")
1100 (license license:expat)))
1101
1102 (define-public python2-pysam
1103 (package-with-python2 python-pysam))
1104
1105 (define-public python2-pysqlite
1106 (package
1107 (name "python2-pysqlite")
1108 (version "2.6.3a") ; see below
1109 (source
1110 (origin
1111 (method url-fetch)
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"))
1119 (sha256
1120 (base32
1121 "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y"))))
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
1128 (home-page "https://pypi.python.org/pypi/pysqlite")
1129 (synopsis "SQLite bindings for Python")
1130 (description
1131 "Pysqlite provides SQLite bindings for Python that comply to the
1132 Database API 2.0T.")
1133 (license license:zlib)))
1134
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,
1166 after Andy Lester’s Perl module WWW::Mechanize.")
1167 (license (non-copyleft "file://COPYING"
1168 "See COPYING in the distribution."))))
1169
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
1188 "JSON (JavaScript Object Notation) is a subset of JavaScript
1189 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1190 format.
1191
1192 Simplejson exposes an API familiar to users of the standard library marshal
1193 and pickle modules. It is the externally maintained version of the json
1194 library contained in Python 2.6, but maintains compatibility with Python 2.5
1195 and (currently) has significant performance advantages, even without using
1196 the optional C extension for speedups. Simplejson is also supported on
1197 Python 3.3+.")
1198 (license x11)))
1199
1200 (define-public python2-simplejson
1201 (package-with-python2 python-simplejson))
1202
1203
1204 (define-public python2-pyicu
1205 (package
1206 (name "python2-pyicu")
1207 (version "1.8")
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
1215 "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw"))))
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/")
1224 (synopsis "Python extension wrapping the ICU C++ API")
1225 (description
1226 "PyICU is a python extension wrapping the ICU C++ API.")
1227 (license x11)))
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
1249 "Dogtail is a GUI test tool and automation framework written in Python.
1250 It uses Accessibility (a11y) technologies to communicate with desktop
1251 applications. dogtail scripts are written in Python and executed like any
1252 other Python program.")
1253 (license gpl2+)))
1254
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
1278 template text; it takes an EmPy source file, processes it, and produces
1279 output. This is accomplished via expansions, which are special signals to the
1280 EmPy system and are set off by a special prefix (by default the at sign, @@).
1281 EmPy can expand arbitrary Python expressions and statements in this way, as
1282 well as a variety of special forms. Textual data not explicitly delimited in
1283 this way is sent unaffected to the output, allowing Python to be used in
1284 effect as a markup language. Also supported are callbacks via hooks,
1285 recording and playback via diversions, and dynamic, chainable filters. The
1286 system is highly configurable via command line options and embedded
1287 commands.")
1288 (license lgpl2.1+)))
1289
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 \
1312 0.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
1325 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1326 (patches (map search-patch
1327 (list "pybugz-stty.patch"
1328 "pybugz-encode-error.patch")))))
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
1337 bug tracking system. It is meant as an aid to speed up interaction with the
1338 bug tracker.")
1339 (home-page "http://www.liquidx.net/pybugz/")
1340 (license gpl2)))
1341
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
1367 backported 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()
1418 syntax.")
1419 (license x11)))
1420
1421
1422 (define-public scons
1423 (package
1424 (name "scons")
1425 (version "2.3.4")
1426 (source (origin
1427 (method url-fetch)
1428 (uri (string-append "mirror://sourceforge/scons/scons-"
1429 version ".tar.gz"))
1430 (sha256
1431 (base32
1432 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
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,
1442 cross-platform substitute for the classic Make utility with integrated
1443 functionality similar to autoconf/automake and compiler caches such as ccache.
1444 In short, SCons is an easier, more reliable and faster way to build
1445 software.")
1446 (license x11)))
1447
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.")
1471 (license license:expat)))
1472
1473 (define-public python2-extras
1474 (package-with-python2 python-extras))
1475
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")
1496 (synopsis "Python library for parsing MIME types")
1497 (description
1498 "Mimeparse provides basic functions for parsing MIME type names and
1499 matching them against a list of media-ranges.")
1500 (license license:expat)))
1501
1502 (define-public python2-mimeparse
1503 (package-with-python2 python-mimeparse))
1504
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
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
1552 standard 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
1569 `(("python2-setuptools" ,python2-setuptools)))
1570 (arguments
1571 `(#:python ,python-2
1572 #:tests? #f)))) ; no setup.py test command
1573
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,
1594 code introspection, and logging.")
1595 (license license:expat)))
1596
1597 (define-public python2-py
1598 (package-with-python2 python-py))
1599
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
1629 and functions, detailed info on failing assert statements, modular fixtures,
1630 and many external plugins.")
1631 (license license:expat)))
1632
1633 (define-public python2-pytest
1634 (package-with-python2 python-pytest))
1635
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
1657 distributed testing in both load and each modes. It also supports coverage
1658 of subprocesses.")
1659 (license license:expat)))
1660
1661 (define-public python2-pytest-cov
1662 (package-with-python2 python-pytest-cov))
1663
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)
1691 ("python-setuptools" ,python-setuptools)
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
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
1723 interactive command-line applications. With it you can run a script in a
1724 subprocess and see the output as well as any file modifications.")
1725 (license license:expat)))
1726
1727 (define-public python2-scripttest
1728 (package-with-python2 python-scripttest))
1729
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)
1744 (propagated-inputs
1745 `(("python-mimeparse" ,python-mimeparse)))
1746 (inputs
1747 `(("python-setuptools" ,python-setuptools)
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
1754 provide matchers, more debugging information, and cross-Python
1755 compatibility.")
1756 (license psfl)))
1757
1758 (define-public python2-testtools
1759 (package-with-python2 python-testtools))
1760
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
1783 style 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
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
1810 use 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
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
1839 protocol.")
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
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
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
1874 Python tests.")
1875 (license (list bsd-3 asl2.0)))) ; at user's option
1876
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
1904 and 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
1938 Python tests.")
1939 (license (list bsd-3 asl2.0)))) ; at user's option
1940
1941 (define-public python2-fixtures
1942 (package-with-python2 python-fixtures))
1943
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)
1958 (propagated-inputs
1959 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1960 ("python-testtools" ,python-testtools)))
1961 (inputs
1962 `(("python-setuptools" ,python-setuptools)
1963 ("python-subunit" ,python-subunit)
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
1968 be used as part of a developer's workflow to check things such as what tests
1969 have 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
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
1995 uses the code analysis tools and tracing hooks provided in the Python standard
1996 library to determine which lines are executable, and which have been
1997 executed.")
1998 (license bsd-3)))
1999
2000 (define-public python2-coverage
2001 (package-with-python2 python-coverage))
2002
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
2024 backported from Python 2.7 for Python 2.4+.")
2025 (license bsd-3)))
2026
2027 (define-public python2-discover
2028 (package-with-python2 python-discover))
2029
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.
2054 Behavior-driven development (or BDD) is an agile software development
2055 technique that encourages collaboration between developers, QA and
2056 non-technical or business participants in a software project. Behave uses
2057 tests written in a natural language style, backed up by Python code.")
2058 (license x11)))
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
2081 files.")
2082 (license bsd-3)))
2083
2084 (define-public python2-exif-read
2085 (package-with-python2 python-exif-read))
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))
2112
2113 (define-public python-certifi
2114 (package
2115 (name "python-certifi")
2116 (version "14.05.14")
2117 (source (origin
2118 (method url-fetch)
2119 (uri
2120 (string-append
2121 "https://pypi.python.org/packages/source/c/certifi/certifi-"
2122 version ".tar.gz"))
2123 (sha256
2124 (base32
2125 "0s8vxzfz6s4m6fvxc7z25k9j35w0rh6jkw3wwcd1az1mssncn6qy"))))
2126 (build-system python-build-system)
2127 (inputs
2128 `(("python-setuptools" ,python-setuptools)))
2129 (arguments `(#:tests? #f)) ; no tests
2130 (home-page "http://python-requests.org/")
2131 (synopsis "Python CA certificate bundle")
2132 (description
2133 "Certifi is a Python library that contains a CA certificate bundle, which
2134 is used by the Requests library to verify HTTPS requests.")
2135 (license asl2.0)))
2136
2137 (define-public python2-certifi
2138 (package-with-python2 python-certifi))
2139
2140 (define-public python-click
2141 (package
2142 (name "python-click")
2143 (version "4.0")
2144 (source
2145 (origin
2146 (method url-fetch)
2147 (uri (string-append
2148 "https://pypi.python.org/packages/source/c/click/click-"
2149 version ".tar.gz"))
2150 (sha256
2151 (base32 "0294x9g28w6zgswl0rsygkwi0wf6n480gf7fiiw5f9az3xhh77pl"))))
2152 (build-system python-build-system)
2153 (native-inputs
2154 `(("python-setuptools" ,python-setuptools)))
2155 (home-page "http://click.pocoo.org")
2156 (synopsis "Command line library for Python")
2157 (description
2158 "Click is a Python package for creating command line interfaces in a
2159 composable way with as little code as necessary. Its name stands for
2160 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2161 with sensible defaults out of the box.")
2162 (license bsd-3)))
2163
2164 (define-public python2-click
2165 (package-with-python2 python-click))
2166
2167 (define-public python-wheel
2168 (package
2169 (name "python-wheel")
2170 (version "0.26.0")
2171 (source
2172 (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "wheel" version))
2175 (sha256
2176 (base32
2177 "032k1ajijbqnv0z0k88bhf75mdimi18fcmm28mss90610lw3bbga"))))
2178 (build-system python-build-system)
2179 (native-inputs
2180 `(("python-setuptools" ,python-setuptools)
2181 ("python-jsonschema" ,python-jsonschema)
2182 ("python-pytest-cov" ,python-pytest-cov)))
2183 (home-page "https://bitbucket.org/pypa/wheel/")
2184 (synopsis "Built-package format for Python")
2185 (description
2186 "A wheel is a ZIP-format archive with a specially formatted filename and the
2187 .whl extension. It is designed to contain all the files for a PEP 376
2188 compatible install in a way that is very close to the on-disk format.")
2189 (license license:expat)))
2190
2191 (define-public python2-wheel
2192 (package-with-python2 python-wheel))
2193
2194 (define-public python-requests
2195 (package
2196 (name "python-requests")
2197 (version "2.8.1")
2198 (source (origin
2199 (method url-fetch)
2200 (uri (pypi-uri "requests" version))
2201 (sha256
2202 (base32
2203 "0ny2nr1sqr4hcn3903ghmh7w2yni8shlfv240a8c9p6wyidqvzl4"))))
2204 (build-system python-build-system)
2205 (native-inputs
2206 `(("python-setuptools" ,python-setuptools)))
2207 (propagated-inputs
2208 `(("python-py" ,python-py)
2209 ("python-pytest" ,python-pytest)
2210 ("python-pytest-cov" ,python-pytest-cov)
2211 ("python-wheel" ,python-wheel)))
2212 (home-page "http://python-requests.org/")
2213 (synopsis "Python HTTP library")
2214 (description
2215 "Requests is a Python HTTP client library. It aims to be easier to use
2216 than Python’s urllib2 library.")
2217 (license asl2.0)))
2218
2219 (define-public python2-requests
2220 (package-with-python2 python-requests))
2221
2222 (define-public python-jsonschema
2223 (package
2224 (name "python-jsonschema")
2225 (version "2.4.0")
2226 (source (origin
2227 (method url-fetch)
2228 (uri
2229 (string-append
2230 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2231 version ".tar.gz"))
2232 (sha256
2233 (base32
2234 "1yik3031ziygvq66rj3mzfqdgxj29sg1bkfc46wsgi7lnbqs560j"))))
2235 (build-system python-build-system)
2236 (inputs
2237 `(("python-setuptools" ,python-setuptools)))
2238 (home-page "http://github.com/Julian/jsonschema")
2239 (synopsis "Implementation of JSON Schema for Python")
2240 (description
2241 "Jsonschema is an implementation of JSON Schema for Python.")
2242 (license license:expat)))
2243
2244 (define-public python2-jsonschema
2245 (package-with-python2 python-jsonschema))
2246
2247 (define-public python-unidecode
2248 (package
2249 (name "python-unidecode")
2250 (version "0.04.16")
2251 (source (origin
2252 (method url-fetch)
2253 (uri
2254 (string-append
2255 "https://pypi.python.org/packages/source/U/Unidecode/Unidecode-"
2256 version ".tar.gz"))
2257 (sha256
2258 (base32
2259 "0yv56vc49rvippyxgxvcyz7jklc07ky38rcspax7p00sgmriiljc"))))
2260 (build-system python-build-system)
2261 (inputs
2262 `(("python-setuptools" ,python-setuptools)))
2263 (home-page "https://pypi.python.org/pypi/Unidecode")
2264 (synopsis "ASCII transliterations of Unicode text")
2265 (description
2266 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2267 useful when integrating with legacy code that doesn't support Unicode, or for
2268 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2269 machine identifiers from human-readable Unicode strings that should still be
2270 somewhat intelligeble.")
2271 (license gpl2+)))
2272
2273 (define-public python2-unidecode
2274 (package-with-python2 python-unidecode))
2275
2276 (define-public python-pyjwt
2277 (package
2278 (name "python-pyjwt")
2279 (version "1.4.0")
2280 (source
2281 (origin
2282 (method url-fetch)
2283 (uri (pypi-uri "PyJWT" version))
2284 (sha256
2285 (base32
2286 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2287 (build-system python-build-system)
2288 (native-inputs
2289 `(("python-setuptools" ,python-setuptools)
2290 ("python-pytest-runner" ,python-pytest-runner)))
2291 (arguments
2292 '(#:tests? #f)) ; test suite doesn't work
2293 (home-page "http://github.com/progrium/pyjwt")
2294 (synopsis "JSON Web Token implementation in Python")
2295 (description
2296 "PyJWT is a JSON Web Token implementation written in Python.")
2297 (license license:expat)))
2298
2299 (define-public python2-pyjwt
2300 (package-with-python2 python-pyjwt))
2301
2302 (define-public python-oauthlib
2303 (package
2304 (name "python-oauthlib")
2305 (version "1.0.3")
2306 (source (origin
2307 (method url-fetch)
2308 (uri (pypi-uri "oauthlib" version))
2309 (sha256
2310 (base32
2311 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2312 (build-system python-build-system)
2313 (native-inputs
2314 `(("python-setuptools" ,python-setuptools)
2315 ("python-coverage", python-coverage)
2316 ("python-nose" ,python-nose)
2317 ("python-mock" ,python-mock)))
2318 (inputs
2319 `(("python-blinker" ,python-blinker)
2320 ("python-cryptography" ,python-cryptography)
2321 ("python-pyjwt" ,python-pyjwt)))
2322 (home-page "https://github.com/idan/oauthlib")
2323 (synopsis "OAuth implementation for Python")
2324 (description
2325 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2326 OAuth request-signing logic.")
2327 (license bsd-3)))
2328
2329 (define-public python2-oauthlib
2330 (let ((base (package-with-python2 python-oauthlib)))
2331 (package
2332 (inherit base)
2333 (inputs
2334 `(("python2-unittest2" ,python2-unittest2)
2335 ("python2-cryptography" ,python2-cryptography)
2336 ,@(alist-delete "python-cryptography"
2337 (package-inputs base)))))))
2338
2339 (define-public python-itsdangerous
2340 (package
2341 (name "python-itsdangerous")
2342 (version "0.24")
2343 (source
2344 (origin
2345 (method url-fetch)
2346 (uri (string-append
2347 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2348 version ".tar.gz"))
2349 (sha256
2350 (base32
2351 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2352 (build-system python-build-system)
2353 (inputs
2354 `(("python-setuptools" ,python-setuptools)))
2355 (home-page "http://github.com/mitsuhiko/itsdangerous")
2356 (synopsis "Python library for passing data to/from untrusted environments")
2357 (description
2358 "Itsdangerous provides various helpers to pass trusted data to untrusted
2359 environments and back.")
2360 (license bsd-3)))
2361
2362 (define-public python2-itsdangerous
2363 (package-with-python2 python-itsdangerous))
2364
2365 (define-public python-pyyaml
2366 (package
2367 (name "python-pyyaml")
2368 (version "3.11")
2369 (source
2370 (origin
2371 (method url-fetch)
2372 (uri (string-append
2373 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2374 version ".tar.gz"))
2375 (sha256
2376 (base32
2377 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2378 (build-system python-build-system)
2379 (inputs
2380 `(("libyaml" ,libyaml)))
2381 (native-inputs
2382 `(("python-setuptools" ,python-setuptools)))
2383 (home-page "http://pyyaml.org/wiki/PyYAML")
2384 (synopsis "YAML parser and emitter for Python")
2385 (description
2386 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2387 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2388 API, and sensible error messages. PyYAML supports standard YAML tags and
2389 provides Python-specific tags that allow to represent an arbitrary Python
2390 object.")
2391 (license license:expat)))
2392
2393 (define-public python2-pyyaml
2394 (package-with-python2 python-pyyaml))
2395
2396 (define-public python-virtualenv
2397 (package
2398 (name "python-virtualenv")
2399 (version "1.11.6")
2400 (source
2401 (origin
2402 (method url-fetch)
2403 (uri (string-append
2404 "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-"
2405 version ".tar.gz"))
2406 (sha256
2407 (base32
2408 "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy"))))
2409 (build-system python-build-system)
2410 (inputs
2411 `(("python-setuptools" ,python-setuptools)
2412 ("python-mock" ,python-mock)
2413 ("python-nose" ,python-nose)))
2414 (home-page "https://virtualenv.pypa.io/")
2415 (synopsis "Virtual Python environment builder")
2416 (description
2417 "Virtualenv is a tool to create isolated Python environments.")
2418 (license license:expat)))
2419
2420 (define-public python2-virtualenv
2421 (package-with-python2 python-virtualenv))
2422
2423 (define-public python-markupsafe
2424 (package
2425 (name "python-markupsafe")
2426 (version "0.23")
2427 (source
2428 (origin
2429 (method url-fetch)
2430 (uri (string-append
2431 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2432 version ".tar.gz"))
2433 (sha256
2434 (base32
2435 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2436 (build-system python-build-system)
2437 (inputs
2438 `(("python-setuptools" ,python-setuptools)))
2439 (home-page "http://github.com/mitsuhiko/markupsafe")
2440 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2441 (description
2442 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2443 for Python.")
2444 (license bsd-3)))
2445
2446 (define-public python2-markupsafe
2447 (package-with-python2 python-markupsafe))
2448
2449 (define-public python-jinja2
2450 (package
2451 (name "python-jinja2")
2452 (version "2.7.3")
2453 (source
2454 (origin
2455 (method url-fetch)
2456 (uri (string-append
2457 "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-"
2458 version ".tar.gz"))
2459 (sha256
2460 (base32
2461 "1nwg9yfqgy421lncnm63k1zf9xkd1klc0jm0fr4p3dad01fsq91f"))))
2462 (build-system python-build-system)
2463 (inputs
2464 `(("python-setuptools" ,python-setuptools)
2465 ("python-markupsafe" ,python-markupsafe)))
2466 (home-page "http://jinja.pocoo.org/")
2467 (synopsis "Python template engine")
2468 (description
2469 "Jinja2 is a small but fast and easy to use stand-alone template engine
2470 written in pure Python.")
2471 (license bsd-3)))
2472
2473 (define-public python2-jinja2
2474 (package-with-python2 python-jinja2))
2475
2476 (define-public python-pystache
2477 (package
2478 (name "python-pystache")
2479 (version "0.5.4")
2480 (source (origin
2481 (method url-fetch)
2482 (uri (pypi-uri "pystache" version))
2483 (sha256
2484 (base32
2485 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2486 (build-system python-build-system)
2487 (native-inputs
2488 `(("python-setuptools" ,python-setuptools)))
2489 (home-page "http://defunkt.io/pystache/")
2490 (synopsis "Python logic-less template engine")
2491 (description
2492 "Pystache is a Python implementation of the framework agnostic,
2493 logic-free templating system Mustache.")
2494 (license license:expat)))
2495
2496 (define-public python2-pystache
2497 (package-with-python2 python-pystache))
2498
2499 (define-public python-joblib
2500 (package
2501 (name "python-joblib")
2502 (version "0.9.0b4")
2503 (source (origin
2504 (method url-fetch)
2505 (uri (string-append "https://pypi.python.org/packages/source/"
2506 "j/joblib/joblib-" version ".tar.gz"))
2507 (sha256
2508 (base32
2509 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2510 (build-system python-build-system)
2511 (native-inputs
2512 `(("python-setuptools" ,python-setuptools)
2513 ("python-nose" ,python-nose)))
2514 (home-page "http://pythonhosted.org/joblib/")
2515 (synopsis "Using Python functions as pipeline jobs")
2516 (description
2517 "Joblib is a set of tools to provide lightweight pipelining in Python.
2518 In particular, joblib offers: transparent disk-caching of the output values
2519 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2520 logging and tracing of the execution.")
2521 (license bsd-3)))
2522
2523 (define-public python2-joblib
2524 (package-with-python2 python-joblib))
2525
2526 (define-public python-docutils
2527 (package
2528 (name "python-docutils")
2529 (version "0.12")
2530 (source
2531 (origin
2532 (method url-fetch)
2533 (uri (string-append
2534 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2535 version ".tar.gz"))
2536 (sha256
2537 (base32
2538 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2539 (build-system python-build-system)
2540 (inputs
2541 `(("python-setuptools" ,python-setuptools)))
2542 (arguments
2543 '(#:tests? #f)) ; no setup.py test command
2544 (home-page "http://docutils.sourceforge.net/")
2545 (synopsis "Python Documentation Utilities")
2546 (description
2547 "Docutils is a modular system for processing documentation into useful
2548 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2549 reStructuredText.")
2550 ;; Most of the source code is public domain, but some source files are
2551 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2552 (license (list public-domain psfl bsd-2 gpl3+))))
2553
2554 (define-public python2-docutils
2555 (package-with-python2 python-docutils))
2556
2557 (define-public python-pygments
2558 (package
2559 (name "python-pygments")
2560 (version "1.6")
2561 (source
2562 (origin
2563 (method url-fetch)
2564 (uri (string-append
2565 "https://pypi.python.org/packages/source/P/Pygments/Pygments-"
2566 version ".tar.gz"))
2567 (sha256
2568 (base32
2569 "1h11r6ss8waih51vcksfvzghfxiav2f8svc0812fa5kmyz5d97kr"))))
2570 (build-system python-build-system)
2571 (inputs
2572 `(("python-setuptools" ,python-setuptools)))
2573 (home-page "http://pygments.org/")
2574 (synopsis "Syntax highlighting")
2575 (description
2576 "Pygments is a syntax highlighting package written in Python.")
2577 (license bsd-2)))
2578
2579 (define-public python2-pygments
2580 (package-with-python2 python-pygments))
2581
2582 (define-public python-sphinx
2583 (package
2584 (name "python-sphinx")
2585 (version "1.2.3")
2586 (source
2587 (origin
2588 (method url-fetch)
2589 (uri (string-append
2590 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2591 version ".tar.gz"))
2592 (sha256
2593 (base32
2594 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2595 (build-system python-build-system)
2596 (inputs
2597 `(("python-setuptools" ,python-setuptools)
2598 ("python-jinja2" ,python-jinja2)
2599 ("python-docutils" ,python-docutils)
2600 ("python-pygments" ,python-pygments)))
2601 (home-page "http://sphinx-doc.org/")
2602 (synopsis "Python documentation generator")
2603 (description "Sphinx is a tool that makes it easy to create documentation
2604 for Python projects or other documents consisting of multiple reStructuredText
2605 sources.")
2606 (license bsd-3)))
2607
2608 (define-public python2-sphinx
2609 (package-with-python2 python-sphinx))
2610
2611 (define-public python-sphinx-rtd-theme
2612 (package
2613 (name "python-sphinx-rtd-theme")
2614 (version "0.1.6")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (string-append "https://pypi.python.org/packages/source/s/"
2619 "sphinx_rtd_theme/sphinx_rtd_theme-"
2620 version ".tar.gz"))
2621 (sha256
2622 (base32
2623 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2624 (build-system python-build-system)
2625 (arguments
2626 `(;; With standard flags, the install phase attempts to create a zip'd
2627 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2628 ;; before 1980'
2629 #:configure-flags '("--single-version-externally-managed"
2630 "--record=sphinx-rtd-theme.txt")))
2631 (native-inputs
2632 `(("python-setuptools" ,python-setuptools)))
2633 (inputs
2634 `(("python-docutils" ,python-docutils)
2635 ("python-sphinx" ,python-sphinx)))
2636 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2637 (synopsis "ReadTheDocs.org theme for Sphinx")
2638 (description "A theme for Sphinx used by ReadTheDocs.org.")
2639 (license license:expat)))
2640
2641 (define-public python2-sphinx-rtd-theme
2642 (package-with-python2 python-sphinx-rtd-theme))
2643
2644 (define-public python-feedgenerator
2645 (package
2646 (name "python-feedgenerator")
2647 (version "20150710.97185b7")
2648 (source
2649 ;; Using the git checkout for now because license file not added till
2650 ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
2651 (origin
2652 (method git-fetch)
2653 (uri (git-reference
2654 (url "https://github.com/dmdm/feedgenerator-py3k.git")
2655 (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
2656 (sha256
2657 (base32
2658 "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
2659 (arguments
2660 `(;; With standard flags, the install phase attempts to create a zip'd
2661 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2662 ;; before 1980'
2663 #:configure-flags '("--single-version-externally-managed"
2664 "--record=feedgenerator.txt")))
2665 (build-system python-build-system)
2666 (inputs
2667 `(("python-setuptools" ,python-setuptools)
2668 ("python-pytz" ,python-pytz)
2669 ("python-six" ,python-six)))
2670 (home-page
2671 "https://github.com/dmdm/feedgenerator-py3k.git")
2672 (synopsis
2673 "Standalone version of Django's Atom/RSS feed generator")
2674 (description
2675 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2676 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2677 (license bsd-3)))
2678
2679 (define-public python2-feedgenerator
2680 (package-with-python2 python-feedgenerator))
2681
2682 (define-public python-blinker
2683 (package
2684 (name "python-blinker")
2685 (version "1.3")
2686 (source
2687 (origin
2688 (method url-fetch)
2689 (uri (string-append
2690 "https://pypi.python.org/packages/source/b/blinker/blinker-"
2691 version ".tar.gz"))
2692 (sha256
2693 (base32
2694 "0bvfxkmjx6bpa302pv7v2vw5rwr3dlzjzfdp3bj628i6144024b8"))))
2695 (build-system python-build-system)
2696 (native-inputs
2697 `(("python-setuptools" ,python-setuptools)))
2698 ;; No "test" command supplied to setuptools, so unless there's another way
2699 ;; to run tests, we're skipping them!
2700 (arguments '(#:tests? #f))
2701 (home-page "http://pythonhosted.org/blinker/")
2702 (synopsis "Fast, simple object-to-object and broadcast signaling")
2703 (description
2704 "Blinker provides a fast dispatching system that allows any number of
2705 interested parties to subscribe to events, or \"signals\".")
2706 (license license:expat)))
2707
2708 (define-public python2-blinker
2709 (package-with-python2 python-blinker))
2710
2711 (define-public pelican
2712 (package
2713 (name "pelican")
2714 (version "3.6.0")
2715 (source
2716 (origin
2717 (method url-fetch)
2718 (uri (string-append
2719 "https://pypi.python.org/packages/source/p/pelican/pelican-"
2720 version ".tar.gz"))
2721 (sha256
2722 (base32
2723 "0lbkk902mqxpp452pp76n6qcjv6f99lq2zl204xmqyzcan9zr3ps"))))
2724 (build-system python-build-system)
2725 (native-inputs
2726 `(("python-setuptools" ,python-setuptools)))
2727 (propagated-inputs
2728 `(("python-feedgenerator" ,python-feedgenerator)
2729 ("python-jinja2" ,python-jinja2)
2730 ("python-pygments" ,python-pygments)
2731 ("python-docutils" ,python-docutils)
2732 ("python-pytz" ,python-pytz)
2733 ("python-blinker" ,python-blinker)
2734 ("python-unidecode" ,python-unidecode)
2735 ("python-six" ,python-six)
2736 ("python-dateutil-2" ,python-dateutil-2)))
2737 (home-page "http://getpelican.com/")
2738 (arguments
2739 `(;; XXX Requires a lot more packages to do unit tests :P
2740 #:tests? #f
2741 #:phases (modify-phases %standard-phases
2742 (add-before
2743 'install 'adjust-requires
2744 ;; Since feedgenerator is installed from git, it doesn't
2745 ;; conform to the version requirements.
2746 ;;
2747 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2748 ;; version requirement so setuptools doesn't get confused.
2749 (lambda _
2750 (substitute* "setup.py"
2751 (("['\"]feedgenerator.*?['\"]")
2752 "'feedgenerator'")))))))
2753 (synopsis "Python-based static site publishing system")
2754 (description
2755 "Pelican is a tool to generate a static blog from reStructuredText,
2756 Markdown input files, and more. Pelican uses Jinja2 for templating
2757 and is very extensible.")
2758 (license agpl3+)))
2759
2760 (define-public python-scikit-learn
2761 (package
2762 (name "python-scikit-learn")
2763 (version "0.16.1")
2764 (source
2765 (origin
2766 (method url-fetch)
2767 (uri (string-append
2768 "https://github.com/scikit-learn/scikit-learn/archive/"
2769 version ".tar.gz"))
2770 (sha256
2771 (base32
2772 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2773 (build-system python-build-system)
2774 (arguments
2775 `(#:phases
2776 (alist-cons-before
2777 'check 'set-HOME
2778 ;; some tests require access to "$HOME"
2779 (lambda _ (setenv "HOME" "/tmp"))
2780 ;; Tests can only be run after the library has been installed and not
2781 ;; within the source directory.
2782 (alist-cons-after
2783 'install 'check
2784 (lambda _
2785 (with-directory-excursion "/tmp"
2786 ;; With Python 3 one test of 3334 fails
2787 ;; (sklearn.tests.test_common.test_transformers); see
2788 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2789 (system* "nosetests" "-v" "sklearn")))
2790 (alist-delete 'check %standard-phases)))))
2791 (inputs
2792 `(("openblas" ,openblas)
2793 ("python-nose" ,python-nose)))
2794 (propagated-inputs
2795 `(("python-numpy" ,python-numpy)
2796 ("python-scipy" ,python-scipy)))
2797 (home-page "http://scikit-learn.org/")
2798 (synopsis "Machine Learning in Python")
2799 (description
2800 "Scikit-learn provides simple and efficient tools for data
2801 mining and data analysis.")
2802 (license bsd-3)))
2803
2804 (define-public python2-scikit-learn
2805 (let ((scikit (package-with-python2 python-scikit-learn)))
2806 (package (inherit scikit)
2807 (propagated-inputs
2808 `(("python2-numpy" ,python2-numpy)
2809 ("python2-scipy" ,python2-scipy)
2810 ,@(alist-delete
2811 "python-numpy"
2812 (alist-delete
2813 "python-scipy" (package-propagated-inputs scikit))))))))
2814
2815 (define-public python-scikit-image
2816 (package
2817 (name "python-scikit-image")
2818 (version "0.11.3")
2819 (source
2820 (origin
2821 (method url-fetch)
2822 (uri (string-append
2823 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2824 version ".tar.gz"))
2825 (sha256
2826 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2827 (build-system python-build-system)
2828 (propagated-inputs
2829 `(("python-matplotlib" ,python-matplotlib)
2830 ("python-networkx" ,python-networkx)
2831 ("python-numpy" ,python-numpy)
2832 ("python-scipy" ,python-scipy)
2833 ("python-six" ,python-six)
2834 ("python-pillow" ,python-pillow)))
2835 (native-inputs
2836 `(("python-cython" ,python-cython)
2837 ("python-setuptools" ,python-setuptools)))
2838 (home-page "http://scikit-image.org/")
2839 (synopsis "Image processing in Python")
2840 (description
2841 "Scikit-image is a collection of algorithms for image processing.")
2842 (license bsd-3)))
2843
2844 (define-public python2-scikit-image
2845 (let ((scikit-image (package-with-python2 python-scikit-image)))
2846 (package (inherit scikit-image)
2847 (native-inputs
2848 `(("python2-mock" ,python2-mock)
2849 ,@(package-native-inputs scikit-image)))
2850 (propagated-inputs
2851 `(("python2-pytz" ,python2-pytz)
2852 ("python2-matplotlib" ,python2-matplotlib)
2853 ("python2-numpy" ,python2-numpy)
2854 ("python2-scipy" ,python2-scipy)
2855 ,@(fold alist-delete (package-propagated-inputs scikit-image)
2856 '("python-matplotlib" "python-numpy" "python-scipy")))))))
2857
2858 (define-public python-redis
2859 (package
2860 (name "python-redis")
2861 (version "2.10.3")
2862 (source
2863 (origin
2864 (method url-fetch)
2865 (uri (string-append
2866 "https://pypi.python.org/packages/source/r/redis/redis-"
2867 version ".tar.gz"))
2868 (sha256
2869 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2870 (build-system python-build-system)
2871 ;; Tests require a running Redis server
2872 (arguments '(#:tests? #f))
2873 (native-inputs
2874 `(("python-setuptools" ,python-setuptools)
2875 ("python-pytest" ,python-pytest)))
2876 (home-page "https://github.com/andymccurdy/redis-py")
2877 (synopsis "Redis Python client")
2878 (description
2879 "This package provides a Python interface to the Redis key-value store.")
2880 (license license:expat)))
2881
2882 (define-public python2-redis
2883 (package-with-python2 python-redis))
2884
2885 (define-public python-rq
2886 (package
2887 (name "python-rq")
2888 (version "0.5.2")
2889 (source
2890 (origin
2891 (method url-fetch)
2892 (uri (string-append
2893 "https://pypi.python.org/packages/source/r/rq/rq-"
2894 version ".tar.gz"))
2895 (sha256
2896 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2897 (build-system python-build-system)
2898 (propagated-inputs
2899 `(("python-click" ,python-click)
2900 ("python-redis" ,python-redis)))
2901 (native-inputs
2902 `(("python-setuptools" ,python-setuptools)))
2903 (home-page "http://python-rq.org/")
2904 (synopsis "Simple job queues for Python")
2905 (description
2906 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2907 processing them in the background with workers. It is backed by Redis and it
2908 is designed to have a low barrier to entry.")
2909 (license bsd-2)))
2910
2911 (define-public python2-rq
2912 (package-with-python2 python-rq))
2913
2914 (define-public python-cython
2915 (package
2916 (name "python-cython")
2917 (version "0.21.1")
2918 (source
2919 (origin
2920 (method url-fetch)
2921 (uri (string-append "http://cython.org/release/Cython-"
2922 version ".tar.gz"))
2923 (sha256
2924 (base32
2925 "0ddz2l2dvcy5hdkxx4xlfiwpccvwia7ixgcy4h0pdv46a4i4vxj3"))))
2926 (build-system python-build-system)
2927 ;; we need the full python package and not just the python-wrapper
2928 ;; because we need libpython3.3m.so
2929 (inputs
2930 `(("python" ,python)))
2931 (arguments
2932 `(#:phases
2933 (alist-cons-before
2934 'check 'set-HOME
2935 ;; some tests require access to "$HOME/.cython"
2936 (lambda* _ (setenv "HOME" "/tmp"))
2937 (alist-replace
2938 'check
2939 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2940 %standard-phases))))
2941 (home-page "http://cython.org/")
2942 (synopsis "C extensions for Python")
2943 (description "Cython is an optimising static compiler for both the Python
2944 programming language and the extended Cython programming language. It makes
2945 writing C extensions for Python as easy as Python itself.")
2946 (license asl2.0)))
2947
2948 (define-public python2-cython
2949 (package (inherit (package-with-python2 python-cython))
2950 (name "python2-cython")
2951 (inputs
2952 `(("python-2" ,python-2))))) ; this is not automatically changed
2953
2954 ;; This version of numpy is missing the documentation and is only used to
2955 ;; build matplotlib which is required to build numpy's documentation.
2956 (define python-numpy-bootstrap
2957 (package
2958 (name "python-numpy-bootstrap")
2959 (version "1.9.1")
2960 (source
2961 (origin
2962 (method url-fetch)
2963 (uri (string-append "mirror://sourceforge/numpy"
2964 "/numpy-" version ".tar.gz"))
2965 (sha256
2966 (base32
2967 "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80"))))
2968 (build-system python-build-system)
2969 (inputs
2970 `(("python-nose" ,python-nose)
2971 ("openblas" ,openblas)
2972 ("lapack" ,lapack)))
2973 (native-inputs
2974 `(("gfortran" ,gfortran)))
2975 (arguments
2976 `(#:phases
2977 (alist-cons-before
2978 'build 'set-environment-variables
2979 (lambda* (#:key inputs #:allow-other-keys)
2980 (call-with-output-file "site.cfg"
2981 (lambda (port)
2982 (format port
2983 "[openblas]
2984 libraries = openblas
2985 library_dirs = ~a/lib
2986 include_dirs = ~a/include
2987
2988 [lapack]
2989 lapack_libs = lapack
2990 library_dirs = ~a/lib
2991 include_dirs = ~a/include
2992 "
2993 (assoc-ref inputs "openblas")
2994 (assoc-ref inputs "openblas")
2995 (assoc-ref inputs "lapack")
2996 (assoc-ref inputs "lapack"))))
2997 ;; Use "gcc" executable, not "cc".
2998 (substitute* "numpy/distutils/system_info.py"
2999 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3000 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3001 #t)
3002 ;; Tests can only be run after the library has been installed and not
3003 ;; within the source directory.
3004 (alist-cons-after
3005 'install 'check
3006 (lambda _
3007 (with-directory-excursion "/tmp"
3008 (zero? (system* "python" "-c"
3009 "import numpy; numpy.test(verbose=2)"))))
3010 (alist-delete
3011 'check
3012 %standard-phases)))))
3013 (home-page "http://www.numpy.org/")
3014 (synopsis "Fundamental package for scientific computing with Python")
3015 (description "NumPy is the fundamental package for scientific computing
3016 with Python. It contains among other things: a powerful N-dimensional array
3017 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3018 and Fortran code, useful linear algebra, Fourier transform, and random number
3019 capabilities.")
3020 (license bsd-3)))
3021
3022 (define python2-numpy-bootstrap
3023 (package-with-python2 python-numpy-bootstrap))
3024
3025 (define-public python2-fastlmm
3026 (package
3027 (name "python2-fastlmm")
3028 (version "0.2.14")
3029 (source
3030 (origin
3031 (method url-fetch)
3032 (uri (string-append
3033 "https://pypi.python.org/packages/source/f/fastlmm"
3034 "/fastlmm-" version ".zip"))
3035 (sha256
3036 (base32
3037 "023sydkrc3yxad2bycar02jfswwlh4199kafzhf2bssyx2c3xa0l"))))
3038 (build-system python-build-system)
3039 (arguments
3040 `(#:python ,python-2)) ; only Python 2.7 is supported
3041 (propagated-inputs
3042 `(("python2-numpy" ,python2-numpy)
3043 ("python2-scipy" ,python2-scipy)
3044 ("python2-matplotlib" ,python2-matplotlib)
3045 ("python2-pandas" ,python2-pandas)
3046 ("python2-scikit-learn" ,python2-scikit-learn)
3047 ("python2-cython" ,python2-cython)
3048 ("python2-pysnptools" ,python2-pysnptools)))
3049 (native-inputs
3050 `(("unzip" ,unzip)
3051 ("python2-mock" ,python2-mock)
3052 ("python2-setuptools" ,python2-setuptools)))
3053 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3054 (synopsis "Perform genome-wide association studies on large data sets")
3055 (description
3056 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3057 Models, is a program for performing both single-SNP and SNP-set genome-wide
3058 association studies (GWAS) on extremely large data sets.")
3059 (license asl2.0)))
3060
3061 (define-public python-numpy
3062 (package (inherit python-numpy-bootstrap)
3063 (name "python-numpy")
3064 (outputs '("out" "doc"))
3065 (inputs
3066 `(("which" ,which)
3067 ("python-setuptools" ,python-setuptools)
3068 ("python-matplotlib" ,python-matplotlib)
3069 ("python-sphinx" ,python-sphinx)
3070 ("python-pyparsing" ,python-pyparsing)
3071 ("python-numpydoc" ,python-numpydoc)
3072 ,@(package-inputs python-numpy-bootstrap)))
3073 (native-inputs
3074 `(("pkg-config" ,pkg-config)
3075 ("texlive" ,texlive)
3076 ("texinfo" ,texinfo)
3077 ("perl" ,perl)
3078 ,@(package-native-inputs python-numpy-bootstrap)))
3079 (arguments
3080 `(,@(substitute-keyword-arguments
3081 (package-arguments python-numpy-bootstrap)
3082 ((#:phases phases)
3083 `(alist-cons-after
3084 'install 'install-doc
3085 (lambda* (#:key outputs #:allow-other-keys)
3086 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3087 (doc (string-append
3088 data "/doc/" ,name "-"
3089 ,(package-version python-numpy-bootstrap)))
3090 (info (string-append data "/info"))
3091 (html (string-append doc "/html"))
3092 (pyver ,(string-append "PYVER=")))
3093 (with-directory-excursion "doc"
3094 (mkdir-p html)
3095 (system* "make" "html" pyver)
3096 (system* "make" "latex" "PAPER=a4" pyver)
3097 (system* "make" "-C" "build/latex"
3098 "all-pdf" "PAPER=a4" pyver)
3099 ;; FIXME: Generation of the info file fails.
3100 ;; (system* "make" "info" pyver)
3101 ;; (mkdir-p info)
3102 ;; (copy-file "build/texinfo/numpy.info"
3103 ;; (string-append info "/numpy.info"))
3104 (for-each (lambda (file)
3105 (copy-file (string-append "build/latex" file)
3106 (string-append doc file)))
3107 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3108 (with-directory-excursion "build/html"
3109 (for-each (lambda (file)
3110 (let* ((dir (dirname file))
3111 (tgt-dir (string-append html "/" dir)))
3112 (unless (equal? "." dir)
3113 (mkdir-p tgt-dir))
3114 (install-file file html)))
3115 (find-files "." ".*"))))))
3116 ,phases)))))))
3117
3118 (define-public python2-numpy
3119 (let ((numpy (package-with-python2 python-numpy)))
3120 (package (inherit numpy)
3121 ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
3122 ;; Python 2.
3123 (inputs `(("python2-matplotlib" ,python2-matplotlib)
3124 ,@(alist-delete "python-matplotlib"
3125 (package-inputs numpy)))))))
3126
3127 (define-public python-pyparsing
3128 (package
3129 (name "python-pyparsing")
3130 (version "2.0.3")
3131 (source
3132 (origin
3133 (method url-fetch)
3134 (uri (string-append "mirror://sourceforge/pyparsing"
3135 "/pyparsing-" version ".tar.gz"))
3136 (sha256
3137 (base32
3138 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3139 (build-system python-build-system)
3140 (outputs '("out" "doc"))
3141 (arguments
3142 `(#:tests? #f ; no test target
3143 #:modules ((guix build python-build-system)
3144 (guix build utils))
3145 #:phases
3146 (alist-cons-after
3147 'install 'install-doc
3148 (lambda* (#:key outputs #:allow-other-keys)
3149 (let* ((doc (string-append (assoc-ref outputs "doc")
3150 "/share/doc/" ,name "-" ,version))
3151 (html-doc (string-append doc "/html"))
3152 (examples (string-append doc "/examples")))
3153 (mkdir-p html-doc)
3154 (mkdir-p examples)
3155 (for-each
3156 (lambda (dir tgt)
3157 (map (lambda (file)
3158 (install-file file tgt))
3159 (find-files dir ".*")))
3160 (list "docs" "htmldoc" "examples")
3161 (list doc html-doc examples))))
3162 %standard-phases)))
3163 (home-page "http://pyparsing.wikispaces.com")
3164 (synopsis "Python parsing class library")
3165 (description
3166 "The pyparsing module is an alternative approach to creating and
3167 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3168 of regular expressions. The pyparsing module provides a library of classes
3169 that client code uses to construct the grammar directly in Python code.")
3170 (license license:expat)))
3171
3172 (define-public python2-pyparsing
3173 (package-with-python2 python-pyparsing))
3174
3175 (define-public python-numpydoc
3176 (package
3177 (name "python-numpydoc")
3178 (version "0.5")
3179 (source
3180 (origin
3181 (method url-fetch)
3182 (uri (string-append
3183 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3184 version ".tar.gz"))
3185 (sha256
3186 (base32
3187 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3188 (modules '((guix build utils)))
3189 (snippet
3190 '(begin
3191 ;; Drop a test requiring matplotlib, which we cannot add as an
3192 ;; input since it would create a circular dependency: Extend the
3193 ;; test for Python 3, where it is already dropped, to Python 2.
3194 (substitute* "numpydoc/tests/test_plot_directive.py"
3195 (("3") "2"))))))
3196 (build-system python-build-system)
3197 (inputs
3198 `(("python-setuptools" ,python-setuptools)
3199 ("python-docutils" ,python-docutils)
3200 ("python-sphinx" ,python-sphinx)
3201 ("python-nose" ,python-nose)))
3202 (home-page "https://pypi.python.org/pypi/numpydoc")
3203 (synopsis
3204 "Numpy's Sphinx extensions")
3205 (description
3206 "Sphinx extension to support docstrings in Numpy format.")
3207 (license bsd-2)))
3208
3209 (define-public python2-numpydoc
3210 (package-with-python2 python-numpydoc))
3211
3212 (define-public python-numexpr
3213 (package
3214 (name "python-numexpr")
3215 (version "2.4.4")
3216 (source
3217 (origin
3218 (method url-fetch)
3219 (uri (string-append "https://pypi.python.org/packages/source/"
3220 "n/numexpr/numexpr-" version ".tar.gz"))
3221 (sha256
3222 (base32
3223 "0nsnff5312fm38w6dm34bw7ghfqqy8vl9gig0al963h4mz8zm8nz"))))
3224 (build-system python-build-system)
3225 (arguments `(#:tests? #f)) ; no tests included
3226 (propagated-inputs
3227 `(("python-numpy" ,python-numpy)))
3228 (home-page "https://github.com/pydata/numexpr")
3229 (synopsis "Fast numerical expression evaluator for NumPy")
3230 (description
3231 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3232 expressions that operate on arrays are accelerated and use less memory than
3233 doing the same calculation in Python. In addition, its multi-threaded
3234 capabilities can make use of all your cores, which may accelerate
3235 computations, most specially if they are not memory-bounded (e.g. those using
3236 transcendental functions).")
3237 (license license:expat)))
3238
3239 (define-public python2-numexpr
3240 (let ((numexpr (package-with-python2 python-numexpr)))
3241 (package (inherit numexpr)
3242 ;; Make sure to use special packages for Python 2 instead
3243 ;; of those automatically rewritten by package-with-python2.
3244 (propagated-inputs
3245 `(("python2-numpy" ,python2-numpy)
3246 ,@(alist-delete "python-numpy"
3247 (package-propagated-inputs numexpr)))))))
3248
3249 (define-public python-matplotlib
3250 (package
3251 (name "python-matplotlib")
3252 (version "1.4.3")
3253 (source
3254 (origin
3255 (method url-fetch)
3256 (uri (string-append "mirror://sourceforge/matplotlib"
3257 "/matplotlib-" version ".tar.gz"))
3258 (sha256
3259 (base32
3260 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3261 (patches (list (search-patch "matplotlib-setupext-tk.patch")))))
3262 (build-system python-build-system)
3263 (outputs '("out" "doc"))
3264 (propagated-inputs ; the following packages are all needed at run time
3265 `(("python-pyparsing" ,python-pyparsing)
3266 ("python-pygobject" ,python-pygobject)
3267 ("gobject-introspection" ,gobject-introspection)
3268 ("python-tkinter" ,python "tk")
3269 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3270 ;; from 'gtk+') provides the required 'typelib' files used by
3271 ;; 'gobject-introspection'. The location of these files is set with the
3272 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3273 ;; is done automatically by a 'native-search-path' procedure. However,
3274 ;; at run-time the user must set this variable as follows:
3275 ;;
3276 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3277 ("gtk+" ,gtk+)
3278 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3279 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3280 ;; object. For this reason we need to import both libraries.
3281 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3282 ("python-pycairo" ,python-pycairo)
3283 ("python-cairocffi" ,python-cairocffi)))
3284 (inputs
3285 `(("python-setuptools" ,python-setuptools)
3286 ("python-dateutil" ,python-dateutil-2)
3287 ("python-six" ,python-six)
3288 ("python-pytz" ,python-pytz)
3289 ("python-numpy" ,python-numpy-bootstrap)
3290 ("python-sphinx" ,python-sphinx)
3291 ("python-numpydoc" ,python-numpydoc)
3292 ("python-nose" ,python-nose)
3293 ("python-mock" ,python-mock)
3294 ("libpng" ,libpng)
3295 ("imagemagick" ,imagemagick)
3296 ("freetype" ,freetype)
3297 ("cairo" ,cairo)
3298 ("glib" ,glib)
3299 ("python-pillow" ,python-pillow)
3300 ;; FIXME: Add backends when available.
3301 ;("python-wxpython" ,python-wxpython)
3302 ;("python-pyqt" ,python-pyqt)
3303 ("tcl" ,tcl)
3304 ("tk" ,tk)))
3305 (native-inputs
3306 `(("pkg-config" ,pkg-config)
3307 ("texlive" ,texlive)
3308 ("texinfo" ,texinfo)))
3309 (arguments
3310 `(#:phases
3311 (alist-cons-before
3312 'build 'configure-environment
3313 (lambda* (#:key outputs inputs #:allow-other-keys)
3314 (let ((cairo (assoc-ref inputs "cairo"))
3315 (gtk+ (assoc-ref inputs "gtk+")))
3316 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3317 ;; has not effect.
3318 (setenv "LD_LIBRARY_PATH"
3319 (string-append cairo "/lib:" gtk+ "/lib"))
3320 (setenv "HOME" (getcwd))
3321 (call-with-output-file "setup.cfg"
3322 (lambda (port)
3323 (format port "[directories]~%
3324 basedirlist = ~a,~a~%
3325 [rc_options]~%
3326 backend = TkAgg~%"
3327 (assoc-ref inputs "tcl")
3328 (assoc-ref inputs "tk"))))))
3329 (alist-cons-after
3330 'install 'install-doc
3331 (lambda* (#:key outputs #:allow-other-keys)
3332 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3333 (doc (string-append data "/doc/" ,name "-" ,version))
3334 (info (string-append data "/info"))
3335 (html (string-append doc "/html")))
3336 (with-directory-excursion "doc"
3337 ;; Produce pdf in 'A4' format.
3338 (substitute* (find-files "." "conf\\.py")
3339 (("latex_paper_size = 'letter'")
3340 "latex_paper_size = 'a4'"))
3341 (mkdir-p html)
3342 (mkdir-p info)
3343 ;; The doc recommends to run the 'html' target twice.
3344 (system* "python" "make.py" "html")
3345 (system* "python" "make.py" "html")
3346 (copy-recursively "build/html" html)
3347 (system* "python" "make.py" "latex")
3348 (system* "python" "make.py" "texinfo")
3349 (symlink (string-append html "/_images")
3350 (string-append info "/matplotlib-figures"))
3351 (with-directory-excursion "build/texinfo"
3352 (substitute* "matplotlib.texi"
3353 (("@image\\{([^,]*)" all file)
3354 (string-append "@image{matplotlib-figures/" file)))
3355 (symlink (string-append html "/_images")
3356 "./matplotlib-figures")
3357 (system* "makeinfo" "--no-split"
3358 "-o" "matplotlib.info" "matplotlib.texi"))
3359 (copy-file "build/texinfo/matplotlib.info"
3360 (string-append info "/matplotlib.info"))
3361 (copy-file "build/latex/Matplotlib.pdf"
3362 (string-append doc "/Matplotlib.pdf")))))
3363 %standard-phases))))
3364 (home-page "http://matplotlib.org")
3365 (synopsis "2D plotting library for Python")
3366 (description
3367 "Matplotlib is a Python 2D plotting library which produces publication
3368 quality figures in a variety of hardcopy formats and interactive environments
3369 across platforms. Matplotlib can be used in Python scripts, the python and
3370 ipython shell, web application servers, and six graphical user interface
3371 toolkits.")
3372 (license psfl)))
3373
3374 (define-public python2-matplotlib
3375 (let ((matplotlib (package-with-python2 python-matplotlib)))
3376 (package (inherit matplotlib)
3377 ;; Make sure to use special packages for Python 2 instead
3378 ;; of those automatically rewritten by package-with-python2.
3379 (propagated-inputs
3380 `(("python2-pycairo" ,python2-pycairo)
3381 ("python2-pygobject-2" ,python2-pygobject-2)
3382 ("python2-tkinter" ,python-2 "tk")
3383 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3384 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3385
3386 (define-public python2-pysnptools
3387 (package
3388 (name "python2-pysnptools")
3389 (version "0.2.13")
3390 (source
3391 (origin
3392 (method url-fetch)
3393 (uri (string-append
3394 "https://pypi.python.org/packages/source/p/pysnptools"
3395 "/pysnptools-" version ".zip"))
3396 (sha256
3397 (base32
3398 "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib"))))
3399 (build-system python-build-system)
3400 (arguments
3401 `(#:python ,python-2)) ; only Python 2.7 is supported
3402 (propagated-inputs
3403 `(("python2-numpy" ,python2-numpy)
3404 ("python2-scipy" ,python2-scipy)
3405 ("python2-pandas" ,python2-pandas)
3406 ("python2-cython" ,python2-cython)))
3407 (native-inputs
3408 `(("unzip" ,unzip)
3409 ("python2-setuptools" ,python2-setuptools)))
3410 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3411 (synopsis "Library for reading and manipulating genetic data")
3412 (description
3413 "PySnpTools is a library for reading and manipulating genetic data. It
3414 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3415 those files. It can also efficiently manipulate ranges of integers using set
3416 operators such as union, intersection, and difference.")
3417 (license asl2.0)))
3418
3419 (define-public python-rpy2
3420 (package
3421 (name "python-rpy2")
3422 (version "2.6.0")
3423 (source
3424 (origin
3425 (method url-fetch)
3426 (uri (string-append "https://pypi.python.org/packages/source/r/rpy2"
3427 "/rpy2-" version ".tar.gz"))
3428 (sha256
3429 (base32
3430 "1dp4l8hpv0jpf4crz4wis6in3lvwk86cr5zvpw410y4a07rrbqjk"))))
3431 (build-system python-build-system)
3432 (inputs
3433 `(("python-six" ,python-six)
3434 ("readline" ,readline)
3435 ("icu4c" ,icu4c)
3436 ("pcre" ,pcre)
3437 ("r" ,r)))
3438 (native-inputs
3439 `(("python-setuptools" ,python-setuptools)
3440 ("zlib" ,zlib)))
3441 (home-page "http://rpy.sourceforge.net/")
3442 (synopsis "Python interface to the R language")
3443 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3444 low-level interface to R from Python, a proposed high-level interface,
3445 including wrappers to graphical libraries, as well as R-like structures and
3446 functions.")
3447 (license gpl3+)))
3448
3449 (define-public python2-rpy2
3450 (let ((rpy2 (package-with-python2 python-rpy2)))
3451 (package (inherit rpy2)
3452 (native-inputs
3453 `(("python2-singledispatch" ,python2-singledispatch)
3454 ,@(package-native-inputs rpy2))))))
3455
3456 (define-public python-scipy
3457 (package
3458 (name "python-scipy")
3459 (version "0.16.0")
3460 (source
3461 (origin
3462 (method url-fetch)
3463 (uri (string-append "mirror://sourceforge/scipy"
3464 "/scipy-" version ".tar.xz"))
3465 (sha256
3466 (base32
3467 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3468 (build-system python-build-system)
3469 (propagated-inputs
3470 `(("python-numpy" ,python-numpy)
3471 ("python-matplotlib" ,python-matplotlib)
3472 ("python-pyparsing" ,python-pyparsing)))
3473 (inputs
3474 `(("lapack" ,lapack)
3475 ("openblas" ,openblas)))
3476 (native-inputs
3477 `(("python-nose" ,python-nose)
3478 ("python-sphinx" ,python-sphinx)
3479 ("python-numpydoc" ,python-numpydoc)
3480 ("gfortran" ,gfortran)
3481 ("texlive" ,texlive)
3482 ("perl" ,perl)))
3483 (outputs '("out" "doc"))
3484 (arguments
3485 `(#:phases
3486 (alist-cons-before
3487 'build 'configure-openblas
3488 (lambda* (#:key inputs #:allow-other-keys)
3489 (call-with-output-file "site.cfg"
3490 (lambda (port)
3491 (format port
3492 "[blas]
3493 libraries = openblas
3494 library_dirs = ~a/lib
3495 include_dirs = ~a/include
3496 [atlas]
3497 library_dirs = ~a/lib
3498 atlas_libs = openblas
3499 "
3500 (assoc-ref inputs "openblas")
3501 (assoc-ref inputs "openblas")
3502 (assoc-ref inputs "openblas"))))
3503 #t)
3504 (alist-cons-after
3505 'install 'install-doc
3506 (lambda* (#:key outputs #:allow-other-keys)
3507 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3508 (doc (string-append data "/doc/" ,name "-" ,version))
3509 (html (string-append doc "/html"))
3510 (pyver ,(string-append "PYVER=")))
3511 (with-directory-excursion "doc"
3512 ;; Fix generation of images for mathematical expressions.
3513 (substitute* (find-files "source" "conf\\.py")
3514 (("pngmath_use_preview = True")
3515 "pngmath_use_preview = False"))
3516 (mkdir-p html)
3517 (system* "make" "html" pyver)
3518 (system* "make" "latex" "PAPER=a4" pyver)
3519 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3520 (copy-file "build/latex/scipy-ref.pdf"
3521 (string-append doc "/scipy-ref.pdf"))
3522 (with-directory-excursion "build/html"
3523 (for-each (lambda (file)
3524 (let* ((dir (dirname file))
3525 (tgt-dir (string-append html "/" dir)))
3526 (install-file file html)))
3527 (find-files "." ".*"))))))
3528 ;; Tests can only be run after the library has been installed and not
3529 ;; within the source directory.
3530 (alist-cons-after
3531 'install 'check
3532 (lambda _
3533 (with-directory-excursion "/tmp"
3534 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3535 (alist-delete
3536 'check
3537 (alist-cons-after
3538 'unpack 'fix-tests
3539 (lambda _
3540 (substitute* "scipy/integrate/tests/test_quadpack.py"
3541 (("libm.so") "libm.so.6"))
3542 #t)
3543 %standard-phases)))))))
3544 (home-page "http://www.scipy.org/")
3545 (synopsis "The Scipy library provides efficient numerical routines")
3546 (description "The SciPy library is one of the core packages that make up
3547 the SciPy stack. It provides many user-friendly and efficient numerical
3548 routines such as routines for numerical integration and optimization.")
3549 (license bsd-3)))
3550
3551 (define-public python2-scipy
3552 (let ((scipy (package-with-python2 python-scipy)))
3553 (package (inherit scipy)
3554 ;; Use packages customized for python-2.
3555 (propagated-inputs
3556 `(("python2-matplotlib" ,python2-matplotlib)
3557 ("python2-numpy" ,python2-numpy)
3558 ,@(alist-delete "python-matplotlib"
3559 (alist-delete "python-numpy"
3560 (package-propagated-inputs scipy))))))))
3561
3562 (define-public python-sqlalchemy
3563 (package
3564 (name "python-sqlalchemy")
3565 (version "0.9.7")
3566 (source
3567 (origin
3568 (method url-fetch)
3569 (uri (string-append "https://pypi.python.org/packages/source/S/"
3570 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3571 (sha256
3572 (base32
3573 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
3574 (build-system python-build-system)
3575 (native-inputs
3576 `(("python-cython" ,python-cython) ;for c extensions
3577 ("python-pytest" ,python-pytest)
3578 ("python-mock" ,python-mock))) ;for tests
3579 (arguments
3580 `(#:phases (alist-replace
3581 'check
3582 (lambda _ (zero? (system* "py.test")))
3583 %standard-phases)))
3584 (home-page "http://www.sqlalchemy.org")
3585 (synopsis "Database abstraction library")
3586 (description
3587 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3588 gives application developers the full power and flexibility of SQL. It
3589 provides a full suite of well known enterprise-level persistence patterns,
3590 designed for efficient and high-performing database access, adapted into a
3591 simple and Pythonic domain language.")
3592 (license x11)))
3593
3594 (define-public python2-sqlalchemy
3595 (package-with-python2 python-sqlalchemy))
3596
3597 (define-public python-distutils-extra
3598 (package
3599 (name "python-distutils-extra")
3600 (version "2.38")
3601 (source
3602 (origin
3603 (method url-fetch)
3604 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3605 version "/+download/python-distutils-extra-"
3606 version ".tar.gz"))
3607 (sha256
3608 (base32
3609 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3610 (build-system python-build-system)
3611 (native-inputs
3612 `(("python-setuptools" ,python-setuptools)))
3613 (home-page "https://launchpad.net/python-distutils-extra/")
3614 (synopsis "Enhancements to Python's distutils")
3615 (description
3616 "The python-distutils-extra module enables you to easily integrate
3617 gettext support, themed icons, and scrollkeeper-based documentation into
3618 Python's distutils.")
3619 (license gpl2)))
3620
3621 (define-public python2-distutils-extra
3622 (package-with-python2 python-distutils-extra))
3623
3624 (define-public python2-elib.intl
3625 (package
3626 (name "python2-elib.intl")
3627 (version "0.0.3")
3628 (source
3629 (origin
3630 ;; This project doesn't tag releases or publish tarballs, so we take
3631 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3632 (method git-fetch)
3633 (uri (git-reference
3634 (url "https://github.com/dieterv/elib.intl.git")
3635 (commit "d09997cfef")))
3636 (sha256
3637 (base32
3638 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3639 (build-system python-build-system)
3640 (native-inputs
3641 `(("python2-setuptools" ,python2-setuptools)))
3642 (arguments
3643 ;; incompatible with Python 3 (exception syntax)
3644 `(#:python ,python-2
3645 #:tests? #f
3646 ;; With standard flags, the install phase attempts to create a zip'd
3647 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3648 ;; before 1980'
3649 #:configure-flags '("--single-version-externally-managed"
3650 "--record=elib.txt")))
3651 (home-page "https://github.com/dieterv/elib.intl")
3652 (synopsis "Enhanced internationalization for Python")
3653 (description
3654 "The elib.intl module provides enhanced internationalization (I18N)
3655 services for your Python modules and applications.")
3656 (license lgpl3+)))
3657
3658 (define-public python-pillow
3659 (package
3660 (name "python-pillow")
3661 (version "3.0.0")
3662 (source
3663 (origin
3664 (method url-fetch)
3665 (uri (string-append "https://pypi.python.org/packages/source/P/"
3666 "Pillow/Pillow-" version ".tar.gz"))
3667 (sha256
3668 (base32
3669 "1fsl6sywd4f4axvbpy5h5h26l6w8592j0f1wcnj1hmgy83svwl5d"))))
3670 (build-system python-build-system)
3671 (native-inputs
3672 `(("python-setuptools" ,python-setuptools)
3673 ("python-nose" ,python-nose)))
3674 (inputs
3675 `(("freetype" ,freetype)
3676 ("lcms" ,lcms)
3677 ("zlib" ,zlib)
3678 ("libjpeg" ,libjpeg)
3679 ("openjpeg" ,openjpeg)
3680 ("libtiff" ,libtiff)
3681 ("libwebp" ,libwebp)))
3682 (propagated-inputs
3683 `(;; Used at runtime for pkg_resources
3684 ("python-setuptools" ,python-setuptools)))
3685 (arguments
3686 `(#:phases (modify-phases %standard-phases
3687 (add-before
3688 'install 'disable-egg-compression
3689 (lambda _
3690 ;; Leave the .egg uncompressed since compressing it would
3691 ;; prevent the GC from identifying run-time dependencies.
3692 ;; See <http://bugs.gnu.org/20765>.
3693 (let ((port (open-file "setup.cfg" "a")))
3694 (display "\n[easy_install]\nzip_ok = 0\n"
3695 port)
3696 (close-port port)
3697 #t)))
3698 (add-after
3699 'install 'check-installed
3700 (lambda _
3701 (begin
3702 (setenv "HOME" (getcwd))
3703 (and (zero? (system* "python" "selftest.py"
3704 "--installed"))
3705 (zero? (system* "python" "test-installed.py"))))))
3706 (delete 'check))))
3707 (home-page "https://pypi.python.org/pypi/Pillow")
3708 (synopsis "Fork of the Python Imaging Library")
3709 (description
3710 "The Python Imaging Library adds image processing capabilities to your
3711 Python interpreter. This library provides extensive file format support, an
3712 efficient internal representation, and fairly powerful image processing
3713 capabilities. The core image library is designed for fast access to data
3714 stored in a few basic pixel formats. It should provide a solid foundation for
3715 a general image processing tool.")
3716 (license (x11-style
3717 "http://www.pythonware.com/products/pil/license.htm"
3718 "The PIL Software License"))))
3719
3720 (define-public python2-pillow
3721 (package-with-python2 python-pillow))
3722
3723 (define-public python-pycparser
3724 (package
3725 (name "python-pycparser")
3726 (version "2.10")
3727 (source
3728 (origin
3729 (method url-fetch)
3730 (uri (string-append "https://pypi.python.org/packages/source/p/"
3731 "pycparser/pycparser-" version ".tar.gz"))
3732 (sha256
3733 (base32
3734 "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm"))))
3735 (outputs '("out" "doc"))
3736 (build-system python-build-system)
3737 (native-inputs
3738 `(("pkg-config" ,pkg-config)
3739 ("python-setuptools" ,python-setuptools)))
3740 (arguments
3741 `(#:phases
3742 (alist-replace
3743 'check
3744 (lambda _
3745 (with-directory-excursion "tests"
3746 (zero? (system* "python" "all_tests.py"))))
3747 (alist-cons-after
3748 'install 'install-doc
3749 (lambda* (#:key outputs #:allow-other-keys)
3750 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3751 (doc (string-append data "/doc/" ,name "-" ,version))
3752 (examples (string-append doc "/examples")))
3753 (mkdir-p examples)
3754 (for-each (lambda (file)
3755 (copy-file (string-append "." file)
3756 (string-append doc file)))
3757 '("/README.rst" "/CHANGES" "/LICENSE"))
3758 (copy-recursively "examples" examples)))
3759 %standard-phases))))
3760 (home-page "https://github.com/eliben/pycparser")
3761 (synopsis "C parser in Python")
3762 (description
3763 "Pycparser is a complete parser of the C language, written in pure Python
3764 using the PLY parsing library. It parses C code into an AST and can serve as
3765 a front-end for C compilers or analysis tools.")
3766 (license bsd-3)))
3767
3768 (define-public python2-pycparser
3769 (package-with-python2 python-pycparser))
3770
3771 (define-public python-cffi
3772 (package
3773 (name "python-cffi")
3774 (version "1.2.1")
3775 (source
3776 (origin
3777 (method url-fetch)
3778 (uri (string-append "https://pypi.python.org/packages/source/c/"
3779 "cffi/cffi-" version ".tar.gz"))
3780 (sha256
3781 (base32 "0g8yfzinry1vsj6d1jlnd19338bh92lhhk207ksy4lm1n3g73dga"))))
3782 (build-system python-build-system)
3783 (outputs '("out" "doc"))
3784 (inputs
3785 `(("libffi" ,libffi)))
3786 (propagated-inputs ; required at run-time
3787 `(("python-pycparser" ,python-pycparser)))
3788 (native-inputs
3789 `(("pkg-config" ,pkg-config)
3790 ("python-sphinx" ,python-sphinx)
3791 ("python-pytest" ,python-pytest)
3792 ("python-setuptools" ,python-setuptools)))
3793 (arguments
3794 `(#:phases
3795 (alist-cons-after
3796 'install 'install-doc
3797 (lambda* (#:key outputs #:allow-other-keys)
3798 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3799 (doc (string-append data "/doc/" ,name "-" ,version))
3800 (html (string-append doc "/html")))
3801 (with-directory-excursion "doc"
3802 (system* "make" "html")
3803 (mkdir-p html)
3804 (copy-recursively "build/html" html))
3805 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3806 %standard-phases)))
3807 (home-page "http://cffi.readthedocs.org")
3808 (synopsis "Foreign function interface for Python")
3809 (description
3810 "Foreign Function Interface for Python calling C code.")
3811 (license license:expat)))
3812
3813 (define-public python2-cffi
3814 (package-with-python2 python-cffi))
3815
3816 (define-public python-xcffib
3817 (package
3818 (name "python-xcffib")
3819 (version "0.1.9")
3820 (source
3821 (origin
3822 (method url-fetch)
3823 (uri (string-append "https://pypi.python.org/packages/source/x/"
3824 "xcffib/xcffib-" version ".tar.gz"))
3825 (sha256
3826 (base32
3827 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3828 (build-system python-build-system)
3829 (inputs
3830 `(("libxcb" ,libxcb)
3831 ("python-six" ,python-six)))
3832 (native-inputs
3833 `(("python-setuptools" ,python-setuptools)))
3834 (propagated-inputs
3835 `(("python-cffi" ,python-cffi))) ; used at run time
3836 (arguments
3837 `(#:phases
3838 (alist-cons-after
3839 'install 'install-doc
3840 (lambda* (#:key outputs #:allow-other-keys)
3841 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3842 "/doc/" ,name "-" ,version)))
3843 (mkdir-p doc)
3844 (copy-file "README.md"
3845 (string-append doc "/README.md"))))
3846 %standard-phases)))
3847 (home-page "https://github.com/tych0/xcffib")
3848 (synopsis "XCB Python bindings")
3849 (description
3850 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3851 support for Python 3 and PyPy. It is based on cffi.")
3852 (license license:expat)))
3853
3854 (define-public python2-xcffib
3855 (package-with-python2 python-xcffib))
3856
3857 (define-public python-cairocffi
3858 (package
3859 (name "python-cairocffi")
3860 (version "0.6")
3861 (source
3862 (origin
3863 (method url-fetch)
3864 ;; The archive on pypi is missing the 'utils' directory!
3865 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3866 version ".tar.gz"))
3867 (file-name (string-append name "-" version ".tar.gz"))
3868 (sha256
3869 (base32
3870 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3871 (build-system python-build-system)
3872 (outputs '("out" "doc"))
3873 (inputs
3874 `(("gdk-pixbuf" ,gdk-pixbuf)
3875 ("cairo" ,cairo)))
3876 (native-inputs
3877 `(("pkg-config" ,pkg-config)
3878 ("python-sphinx" ,python-sphinx)
3879 ("python-docutils" ,python-docutils)
3880 ("python-setuptools" ,python-setuptools)))
3881 (propagated-inputs
3882 `(("python-xcffib" ,python-xcffib))) ; used at run time
3883 (arguments
3884 `(#:phases
3885 (alist-cons-after
3886 'install 'install-doc
3887 (lambda* (#:key inputs outputs #:allow-other-keys)
3888 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3889 (doc (string-append data "/doc/" ,name "-" ,version))
3890 (html (string-append doc "/html")))
3891 (setenv "LD_LIBRARY_PATH"
3892 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3893 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3894 (setenv "LANG" "en_US.UTF-8")
3895 (mkdir-p html)
3896 (for-each (lambda (file)
3897 (copy-file (string-append "." file)
3898 (string-append doc file)))
3899 '("/README.rst" "/CHANGES" "/LICENSE"))
3900 (system* "python" "setup.py" "build_sphinx")
3901 (copy-recursively "docs/_build/html" html)))
3902 %standard-phases)))
3903 (home-page "https://github.com/SimonSapin/cairocffi")
3904 (synopsis "Python bindings and object-oriented API for Cairo")
3905 (description
3906 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3907 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3908 graphics library with support for multiple backends including image buffers,
3909 PNG, PostScript, PDF, and SVG file output.")
3910 (license bsd-3)))
3911
3912 (define-public python2-cairocffi
3913 (package-with-python2 python-cairocffi))
3914
3915 (define-public python-decorator
3916 (package
3917 (name "python-decorator")
3918 (version "3.4.2")
3919 (source
3920 (origin
3921 (method url-fetch)
3922 (uri (string-append
3923 "https://pypi.python.org/packages/source/d/decorator/decorator-"
3924 version ".tar.gz"))
3925 (sha256
3926 (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k"))))
3927 (build-system python-build-system)
3928 (arguments '(#:tests? #f)) ; no test target
3929 (native-inputs
3930 `(("python-setuptools" ,python-setuptools)))
3931 (home-page "http://pypi.python.org/pypi/decorator/")
3932 (synopsis "Python module to simplify usage of decorators")
3933 (description
3934 "The aim of the decorator module is to simplify the usage of decorators
3935 for the average programmer, and to popularize decorators usage giving examples
3936 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3937 etc. The core of this module is a decorator factory.")
3938 (license license:expat)))
3939
3940 (define-public python2-decorator
3941 (package-with-python2 python-decorator))
3942
3943 (define-public python-drmaa
3944 (package
3945 (name "python-drmaa")
3946 (version "0.7.6")
3947 (source
3948 (origin
3949 (method url-fetch)
3950 (uri (string-append
3951 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3952 version ".tar.gz"))
3953 (sha256
3954 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3955 (build-system python-build-system)
3956 ;; The test suite requires libdrmaa which is provided by the cluster
3957 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3958 ;; should be set to the path of the libdrmaa library.
3959 (arguments '(#:tests? #f))
3960 (native-inputs
3961 `(("python-nose" ,python-nose)
3962 ("python-setuptools" ,python-setuptools)))
3963 (home-page "https://pypi.python.org/pypi/drmaa")
3964 (synopsis "Python bindings for the DRMAA library")
3965 (description
3966 "A Python package for Distributed Resource Management (DRM) job
3967 submission and control. This package is an implementation of the DRMAA 1.0
3968 Python language binding specification.")
3969 (license bsd-3)))
3970
3971 (define-public python2-drmaa
3972 (package-with-python2 python-drmaa))
3973
3974 (define-public python-gridmap
3975 (package
3976 (name "python-gridmap")
3977 (version "0.13.0")
3978 (source
3979 (origin
3980 (method url-fetch)
3981 (uri (string-append
3982 "https://github.com/pygridtools/gridmap/archive/v"
3983 version ".tar.gz"))
3984 (file-name (string-append name "-" version ".tar.gz"))
3985 (sha256
3986 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
3987 (build-system python-build-system)
3988 (inputs
3989 `(("python-psutil" ,python-psutil)
3990 ("python-drmaa" ,python-drmaa)
3991 ("python-pyzmq" ,python-pyzmq)))
3992 (native-inputs
3993 `(("python-setuptools" ,python-setuptools)))
3994 (home-page "https://github.com/pygridtools/gridmap")
3995 (synopsis "Create jobs on a cluster directly from Python")
3996 (description
3997 "Gridmap is a Python package to allow you to easily create jobs on the
3998 cluster directly from Python. You can directly map Python functions onto the
3999 cluster without needing to write any wrapper code yourself.")
4000 (license gpl3+)))
4001
4002 (define-public python2-gridmap
4003 (package-with-python2 python-gridmap))
4004
4005 (define-public python-pexpect
4006 (package
4007 (name "python-pexpect")
4008 (version "3.3")
4009 (source
4010 (origin
4011 (method url-fetch)
4012 (uri (string-append "https://pypi.python.org/packages/source/p/"
4013 "pexpect/pexpect-" version ".tar.gz"))
4014 (sha256
4015 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4016 (build-system python-build-system)
4017 (arguments
4018 `(#:phases
4019 (modify-phases %standard-phases
4020 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4021 (native-inputs
4022 `(("python-nose" ,python-nose)))
4023 (home-page "http://pexpect.readthedocs.org/")
4024 (synopsis "Controlling interactive console applications")
4025 (description
4026 "Pexpect is a pure Python module for spawning child applications;
4027 controlling them; and responding to expected patterns in their output.
4028 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4029 child application and control it as if a human were typing commands.")
4030 (license isc)))
4031
4032 (define-public python2-pexpect
4033 (package-with-python2 python-pexpect))
4034
4035 (define-public python-setuptools-scm
4036 (package
4037 (name "python-setuptools-scm")
4038 (version "1.9.0")
4039 (source (origin
4040 (method url-fetch)
4041 (uri (pypi-uri "setuptools_scm" version))
4042 (sha256
4043 (base32
4044 "0y24bl893zk6nrklbvdrlmpkalf214zjn6k1xrglljd29rrn4wxi"))))
4045 (build-system python-build-system)
4046 (native-inputs `(("python-setuptools" ,python-setuptools)))
4047 (home-page "https://github.com/pypa/setuptools_scm/")
4048 (synopsis "Manage Python package versions in SCM metadata")
4049 (description
4050 "Setuptools_scm handles managing your Python package versions in
4051 @dfn{software configuration management} (SCM) metadata instead of declaring
4052 them as the version argument or in a SCM managed file.")
4053 (license license:expat)))
4054
4055 (define-public python2-setuptools-scm
4056 (package-with-python2 python-setuptools-scm))
4057
4058 (define-public python-pathpy
4059 (package
4060 (name "python-pathpy")
4061 (version "8.1.1")
4062 (source
4063 (origin
4064 (method url-fetch)
4065 (uri (string-append "https://pypi.python.org/packages/source/p/"
4066 "path.py/path.py-" version ".tar.gz"))
4067 (sha256
4068 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4069 (build-system python-build-system)
4070 (propagated-inputs
4071 `(("python-appdirs" ,python-appdirs)))
4072 (native-inputs
4073 `(("python-setuptools" ,python-setuptools)
4074 ("python-setuptools-scm" ,python-setuptools-scm)
4075 ("python-pytest" ,python-pytest)
4076 ("python-pytest-runner" ,python-pytest-runner)))
4077 (home-page "http://github.com/jaraco/path.py")
4078 (synopsis "Python module wrapper for built-in os.path")
4079 (description
4080 "@code{path.py} implements path objects as first-class entities, allowing
4081 common operations on files to be invoked on those path objects directly.")
4082 (license license:expat)))
4083
4084 (define-public python2-pathpy
4085 (package-with-python2 python-pathpy))
4086
4087 (define-public python-pickleshare
4088 (package
4089 (name "python-pickleshare")
4090 (version "0.5")
4091 (source
4092 (origin
4093 (method url-fetch)
4094 (uri (string-append "https://pypi.python.org/packages/source/p/"
4095 "pickleshare/pickleshare-" version ".tar.gz"))
4096 (sha256
4097 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4098 (build-system python-build-system)
4099 (propagated-inputs
4100 `(("python-pathpy" ,python-pathpy)))
4101 (native-inputs
4102 `(("python-setuptools" ,python-setuptools)))
4103 (home-page "https://github.com/vivainio/pickleshare")
4104 (synopsis "Tiny key value database with concurrency support")
4105 (description
4106 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4107 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4108 shelve, many processes can access the database simultaneously. Changing a
4109 value in database is immediately visible to other processes accessing the same
4110 database. Concurrency is possible because the values are stored in separate
4111 files. Hence the “database” is a directory where all files are governed by
4112 PickleShare.")
4113 (license license:expat)))
4114
4115 (define-public python2-pickleshare
4116 (package-with-python2 python-pickleshare))
4117
4118 (define-public python-simplegeneric
4119 (package
4120 (name "python-simplegeneric")
4121 (version "0.8.1")
4122 (source
4123 (origin
4124 (method url-fetch)
4125 (uri (string-append "https://pypi.python.org/packages/source/s/"
4126 "simplegeneric/simplegeneric-" version ".zip"))
4127 (sha256
4128 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4129 (build-system python-build-system)
4130 (native-inputs
4131 `(("python-setuptools" ,python-setuptools)
4132 ("unzip" ,unzip)))
4133 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4134 (synopsis "Python module for simple generic functions")
4135 (description
4136 "The simplegeneric module lets you define simple single-dispatch generic
4137 functions, akin to Python’s built-in generic functions like @code{len()},
4138 @code{iter()} and so on. However, instead of using specially-named methods,
4139 these generic functions use simple lookup tables, akin to those used by
4140 e.g. @code{pickle.dump()} and other generic functions found in the Python
4141 standard library.")
4142 (license zpl2.1)))
4143
4144 (define-public python2-simplegeneric
4145 (package-with-python2 python-simplegeneric))
4146
4147 (define-public python-ipython-genutils
4148 (package
4149 (name "python-ipython-genutils")
4150 (version "0.1.0")
4151 (source
4152 (origin
4153 (method url-fetch)
4154 (uri (string-append "https://pypi.python.org/packages/source/i/"
4155 "ipython_genutils/ipython_genutils-"
4156 version ".tar.gz"))
4157 (sha256
4158 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4159 (build-system python-build-system)
4160 (arguments `(#:tests? #f)) ; no tests
4161 (home-page "http://ipython.org")
4162 (synopsis "Vestigial utilities from IPython")
4163 (description
4164 "This package provides retired utilities from IPython.")
4165 (license bsd-3)))
4166
4167 (define-public python2-ipython-genutils
4168 (package-with-python2 python-ipython-genutils))
4169
4170 (define-public python-traitlets
4171 (package
4172 (name "python-traitlets")
4173 (version "4.0.0")
4174 (source
4175 (origin
4176 (method url-fetch)
4177 (uri (string-append "https://pypi.python.org/packages/source/t/"
4178 "traitlets/traitlets-" version ".tar.gz"))
4179 (sha256
4180 (base32
4181 "0fr3w2xwb46c591dp7zw02bgf4d21mjy9g6rhwc9bwd4ji50n50b"))))
4182 (build-system python-build-system)
4183 (arguments
4184 `(#:phases
4185 (modify-phases %standard-phases
4186 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4187 (propagated-inputs
4188 `(("python-ipython-genutils" ,python-ipython-genutils)
4189 ("python-decorator" ,python-decorator)))
4190 (native-inputs
4191 `(("python-nose" ,python-nose)))
4192 (home-page "http://ipython.org")
4193 (synopsis "Configuration system for Python applications")
4194 (description
4195 "Traitlets is a framework that lets Python classes have attributes with
4196 type checking, dynamically calculated default values, and ‘on change’
4197 callbacks. The package also includes a mechanism to use traitlets for
4198 configuration, loading values from files or from command line arguments. This
4199 is a distinct layer on top of traitlets, so you can use traitlets in your code
4200 without using the configuration machinery.")
4201 (license bsd-3)))
4202
4203 (define-public python2-traitlets
4204 (package-with-python2 python-traitlets))
4205
4206 (define-public python-ipython
4207 (package
4208 (name "python-ipython")
4209 (version "3.2.1")
4210 (source
4211 (origin
4212 (method url-fetch)
4213 (uri (string-append "https://pypi.python.org/packages/source/i/"
4214 "ipython/ipython-" version ".tar.gz"))
4215 (sha256
4216 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
4217 (build-system python-build-system)
4218 (outputs '("out" "doc"))
4219 (propagated-inputs
4220 `(("python-pyzmq" ,python-pyzmq)
4221 ("python-terminado" ,python-terminado)))
4222 (inputs
4223 `(("readline" ,readline)
4224 ("which" ,which)
4225 ("python-matplotlib" ,python-matplotlib)
4226 ("python-numpy" ,python-numpy)
4227 ("python-numpydoc" ,python-numpydoc)
4228 ("python-jinja2" ,python-jinja2)
4229 ("python-mistune" ,python-mistune)
4230 ("python-jsonschema" ,python-jsonschema)
4231 ("python-pygments" ,python-pygments)
4232 ("python-requests" ,python-requests) ;; for tests
4233 ("python-nose" ,python-nose)))
4234 (native-inputs
4235 `(("pkg-config" ,pkg-config)
4236 ("python-sphinx" ,python-sphinx)
4237 ("texlive" ,texlive)
4238 ("texinfo" ,texinfo)
4239 ("python-setuptools" ,python-setuptools)))
4240 (arguments
4241 `(#:phases
4242 (modify-phases %standard-phases
4243 (add-after
4244 'install 'install-doc
4245 (lambda* (#:key inputs outputs #:allow-other-keys)
4246 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4247 (doc (string-append data "/doc/" ,name "-" ,version))
4248 (html (string-append doc "/html"))
4249 (man1 (string-append data "/man/man1"))
4250 (info (string-append data "/info"))
4251 (examples (string-append doc "/examples")))
4252 (setenv "LANG" "en_US.utf8")
4253 (with-directory-excursion "docs"
4254 ;; FIXME: html and pdf fail to build
4255 ;; (system* "make" "html")
4256 ;; (system* "make" "pdf" "PAPER=a4")
4257 (system* "make" "info"))
4258 (copy-recursively "docs/man" man1)
4259 (copy-recursively "examples" examples)
4260 ;; (copy-recursively "docs/build/html" html)
4261 ;; (copy-file "docs/build/latex/ipython.pdf"
4262 ;; (string-append doc "/ipython.pdf"))
4263 (mkdir-p info)
4264 (copy-file "docs/build/texinfo/ipython.info"
4265 (string-append info "/ipython.info"))
4266 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4267 ;; Tests can only be run after the library has been installed and not
4268 ;; within the source directory.
4269 (delete 'check)
4270 (add-after
4271 'install 'check
4272 (lambda* (#:key outputs tests? #:allow-other-keys)
4273 (if tests?
4274 (with-directory-excursion "/tmp"
4275 (setenv "HOME" "/tmp/") ;; required by a test
4276 (zero? (system* (string-append (assoc-ref outputs "out")
4277 "/bin/iptest"))))
4278 #t)))
4279 (add-before
4280 'install 'fix-tests
4281 (lambda* (#:key inputs #:allow-other-keys)
4282 (substitute* "./IPython/utils/_process_posix.py"
4283 (("/usr/bin/env', 'which") (which "which")))
4284 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4285 (("#!/usr/bin/env python")
4286 (string-append "#!" (which "python"))))
4287 ;; Disable 1 failing test
4288 (substitute* "./IPython/core/tests/test_magic.py"
4289 (("def test_dirops\\(\\):" all)
4290 (string-append "@dec.skipif(True)\n" all))))))))
4291 (home-page "http://ipython.org")
4292 (synopsis "IPython is a tool for interactive computing in Python")
4293 (description
4294 "IPython provides a rich architecture for interactive computing with:
4295 Powerful interactive shells, a browser-based notebook, support for interactive
4296 data visualization, embeddable interpreters and tools for parallel
4297 computing.")
4298 (license bsd-3)))
4299
4300 (define-public python2-ipython
4301 (let ((ipython (package-with-python2 python-ipython)))
4302 (package
4303 (inherit ipython)
4304 ;; FIXME: some tests are failing
4305 (arguments
4306 `(#:tests? #f ,@(package-arguments ipython)))
4307 ;; Make sure we use custom python2-NAME packages.
4308 ;; FIXME: add pyreadline once available.
4309 (propagated-inputs
4310 `(("python2-terminado" ,python2-terminado)
4311 ,@(alist-delete "python-terminado"
4312 (package-propagated-inputs ipython))))
4313 (inputs
4314 `(("python2-mock" ,python2-mock)
4315 ("python2-matplotlib" ,python2-matplotlib)
4316 ("python2-numpy" ,python2-numpy)
4317 ,@(fold alist-delete (package-inputs ipython)
4318 '("python-matplotlib" "python-numpy")))))))
4319
4320 (define-public python-isodate
4321 (package
4322 (name "python-isodate")
4323 (version "0.5.1")
4324 (source
4325 (origin
4326 (method url-fetch)
4327 (uri (string-append
4328 "https://pypi.python.org/packages/source/i/isodate/isodate-"
4329 version
4330 ".tar.gz"))
4331 (sha256
4332 (base32
4333 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
4334 (build-system python-build-system)
4335 (inputs
4336 `(("python-setuptools" ,python-setuptools)))
4337 (home-page
4338 "http://cheeseshop.python.org/pypi/isodate")
4339 (synopsis
4340 "Python date parser and formatter")
4341 (description
4342 "Python-isodate is a python module for parsing and formatting
4343 ISO 8601 dates, time and duration.")
4344 (license bsd-3)))
4345
4346 (define-public python2-isodate
4347 (package-with-python2 python-isodate))
4348
4349 (define-public python-html5lib
4350 (package
4351 (name "python-html5lib")
4352 (version "1.0b3")
4353 (source
4354 (origin
4355 (method url-fetch)
4356 (uri (string-append
4357 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
4358 version
4359 ".tar.gz"))
4360 (sha256
4361 (base32
4362 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
4363 (build-system python-build-system)
4364 (propagated-inputs
4365 `(("python-six" ,python-six))) ; required to "import html5lib"
4366 (inputs
4367 `(("python-setuptools" ,python-setuptools)))
4368 (arguments
4369 `(#:test-target "check"))
4370 (home-page
4371 "https://github.com/html5lib/html5lib-python")
4372 (synopsis
4373 "Python HTML parser based on the WHATWG HTML specifcation")
4374 (description
4375 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4376 and written in Python.")
4377 (license license:expat)))
4378
4379 (define-public python2-html5lib
4380 (package-with-python2 python-html5lib))
4381
4382 (define-public python-urwid
4383 (package
4384 (name "python-urwid")
4385 (version "1.3.0")
4386 (source
4387 (origin
4388 (method url-fetch)
4389 (uri (string-append
4390 "https://pypi.python.org/packages/source/u/urwid/urwid-"
4391 version ".tar.gz"))
4392 (sha256
4393 (base32
4394 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
4395 (build-system python-build-system)
4396 (native-inputs `(("python-setuptools" ,python-setuptools)))
4397 (home-page "http://urwid.org")
4398 (synopsis "Console user interface library for Python")
4399 (description
4400 "Urwid is a curses-based UI/widget library for Python. It includes many
4401 features useful for text console applications.")
4402 (license lgpl2.1+)))
4403
4404 (define-public python2-urwid
4405 (package-with-python2 python-urwid))
4406
4407 (define-public python-dbus
4408 (package
4409 (name "python-dbus")
4410 (version "1.2.0")
4411 (source
4412 (origin
4413 (method url-fetch)
4414 (uri (string-append
4415 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4416 version ".tar.gz"))
4417 (sha256
4418 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4419 (build-system gnu-build-system)
4420 (arguments
4421 '(#:phases
4422 (modify-phases %standard-phases
4423 (add-before
4424 'check 'pre-check
4425 (lambda _
4426 ;; XXX: For the missing '/etc/machine-id'.
4427 (substitute* "test/run-test.sh"
4428 (("DBUS_FATAL_WARNINGS=1")
4429 "DBUS_FATAL_WARNINGS=0"))
4430 #t)))))
4431 (native-inputs
4432 `(("pkg-config" ,pkg-config)))
4433 (inputs
4434 `(("python" ,python)
4435 ("dbus-glib" ,dbus-glib)))
4436 (synopsis "Python bindings for D-bus")
4437 (description "python-dbus provides bindings for libdbus, the reference
4438 implementation of D-Bus.")
4439 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4440 (license license:expat)))
4441
4442 (define-public python2-dbus
4443 (package (inherit python-dbus)
4444 (name "python2-dbus")
4445 (inputs `(("python" ,python-2)
4446 ,@(alist-delete "python"
4447 (package-inputs python-dbus)
4448 equal?)))
4449 ;; FIXME: on Python 2, the test_utf8 fails with:
4450 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4451 (arguments `(#:tests? #f))))
4452
4453 (define-public python-apsw
4454 (package
4455 (name "python-apsw")
4456 (version "3.8.7.3-r1")
4457 (source
4458 (origin
4459 (method url-fetch)
4460 (uri (string-append
4461 "https://pypi.python.org/packages/source/a/apsw/apsw-"
4462 version
4463 ".tar.gz"))
4464 (sha256
4465 (base32
4466 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
4467 (build-system python-build-system)
4468 (inputs
4469 `(("python-setuptools" ,python-setuptools)
4470 ("sqlite" ,sqlite)))
4471 (arguments
4472 `(#:phases
4473 ;; swap check and install phases
4474 (alist-cons-after
4475 'install 'check
4476 (assoc-ref %standard-phases 'check)
4477 (alist-delete
4478 'check
4479 %standard-phases))))
4480 (home-page "https://github.com/rogerbinns/apsw/")
4481 (synopsis "Another Python SQLite Wrapper")
4482 (description "APSW is a Python wrapper for the SQLite
4483 embedded relational database engine. In contrast to other wrappers such as
4484 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4485 translate the complete SQLite API into Python.")
4486 (license license:zlib)))
4487
4488 (define-public python2-apsw
4489 (package-with-python2 python-apsw))
4490
4491 (define-public python-lxml
4492 (package
4493 (name "python-lxml")
4494 (version "3.4.2")
4495 (source
4496 (origin
4497 (method url-fetch)
4498 (uri (string-append
4499 "https://pypi.python.org/packages/source/l/lxml/lxml-"
4500 version
4501 ".tar.gz"))
4502 (sha256
4503 (base32
4504 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
4505 (build-system python-build-system)
4506 (inputs
4507 `(("libxml2" ,libxml2)
4508 ("libxslt" ,libxslt)
4509 ("python-setuptools" ,python-setuptools)))
4510 (home-page "http://lxml.de/")
4511 (synopsis
4512 "Python XML processing library")
4513 (description
4514 "The lxml XML toolkit is a Pythonic binding for the C libraries
4515 libxml2 and libxslt.")
4516 (license bsd-3))) ; and a few more, see LICENSES.txt
4517
4518 (define-public python2-lxml
4519 (package-with-python2 python-lxml))
4520
4521 (define-public python2-pil
4522 (package
4523 (name "python2-pil")
4524 (version "1.1.7")
4525 (source
4526 (origin
4527 (method url-fetch)
4528 (uri (string-append
4529 "http://effbot.org/downloads/Imaging-"
4530 version ".tar.gz"))
4531 (sha256
4532 (base32
4533 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
4534 (modules '((guix build utils)))
4535 (snippet
4536 ;; Adapt to newer freetype. As the package is unmaintained upstream,
4537 ;; there is no use in creating a patch and reporting it.
4538 '(substitute* "_imagingft.c"
4539 (("freetype/")
4540 "freetype2/")))))
4541 (build-system python-build-system)
4542 (inputs
4543 `(("freetype" ,freetype)
4544 ("libjpeg" ,libjpeg)
4545 ("libtiff" ,libtiff)
4546 ("python-setuptools" ,python-setuptools)
4547 ("zlib" ,zlib)))
4548 (arguments
4549 ;; Only the fork python-pillow works with Python 3.
4550 `(#:python ,python-2
4551 #:tests? #f ; no check target
4552 #:phases
4553 (alist-cons-before
4554 'build 'configure
4555 ;; According to README and setup.py, manual configuration is
4556 ;; the preferred way of "searching" for inputs.
4557 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
4558 (lambda* (#:key inputs #:allow-other-keys)
4559 (let ((jpeg (assoc-ref inputs "libjpeg"))
4560 (zlib (assoc-ref inputs "zlib"))
4561 (tiff (assoc-ref inputs "libtiff"))
4562 (freetype (assoc-ref inputs "freetype")))
4563 (substitute* "setup.py"
4564 (("JPEG_ROOT = None")
4565 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
4566 (("ZLIB_ROOT = None")
4567 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
4568 (("TIFF_ROOT = None")
4569 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
4570 (("FREETYPE_ROOT = None")
4571 (string-append "FREETYPE_ROOT = libinclude(\""
4572 freetype "\")")))))
4573 %standard-phases)))
4574 (home-page "http://www.pythonware.com/products/pil/")
4575 (synopsis "Python Imaging Library")
4576 (description "The Python Imaging Library (PIL) adds image processing
4577 capabilities to the Python interpreter.")
4578 (license (x11-style
4579 "file://README"
4580 "See 'README' in the distribution."))))
4581
4582 (define-public python2-cssutils
4583 (package
4584 (name "python2-cssutils")
4585 (version "1.0")
4586 (source
4587 (origin
4588 (method url-fetch)
4589 (uri (string-append
4590 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
4591 version
4592 ".zip"))
4593 (sha256
4594 (base32
4595 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
4596 (build-system python-build-system)
4597 (native-inputs
4598 `(("python2-mock" ,python2-mock) ; for the tests
4599 ("unzip" ,unzip))) ; for unpacking the source
4600 (inputs
4601 `(("python2-setuptools" ,python2-setuptools)))
4602 (arguments
4603 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4604 #:tests? #f ; The tests apparently download an external URL.
4605 ))
4606 (home-page "http://cthedot.de/cssutils/")
4607 (synopsis
4608 "CSS Cascading Style Sheets library for Python")
4609 (description
4610 "Cssutils is a Python package for parsing and building CSS
4611 Cascading Style Sheets. Currently it provides a DOM only and no rendering
4612 options.")
4613 (license lgpl3+)))
4614
4615 (define-public python-cssselect
4616 (package
4617 (name "python-cssselect")
4618 (version "0.9.1")
4619 (source
4620 (origin
4621 (method url-fetch)
4622 (uri (string-append
4623 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
4624 version
4625 ".tar.gz"))
4626 (sha256
4627 (base32
4628 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
4629 (build-system python-build-system)
4630 (inputs
4631 `(("python-setuptools" ,python-setuptools)))
4632 (arguments
4633 ;; tests fail with message
4634 ;; AttributeError: 'module' object has no attribute 'tests'
4635 `(#:tests? #f))
4636 (home-page
4637 "https://pythonhosted.org/cssselect/")
4638 (synopsis
4639 "CSS3 selector parser and translator to XPath 1.0")
4640 (description
4641 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4642 them to XPath 1.0 expressions. Such expressions can be used in lxml or
4643 another XPath engine to find the matching elements in an XML or HTML document.")
4644 (license bsd-3)))
4645
4646 (define-public python2-cssselect
4647 (package-with-python2 python-cssselect))
4648
4649 (define-public python-netifaces
4650 (package
4651 (name "python-netifaces")
4652 (version "0.10.4")
4653 (source
4654 (origin
4655 (method url-fetch)
4656 (uri (string-append
4657 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4658 version
4659 ".tar.gz"))
4660 (sha256
4661 (base32
4662 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4663 (build-system python-build-system)
4664 (inputs
4665 `(("python-setuptools" ,python-setuptools)))
4666 (home-page
4667 "https://bitbucket.org/al45tair/netifaces")
4668 (synopsis
4669 "Python module for portable network interface information")
4670 (description
4671 "Netifaces is a Python module providing information on network
4672 interfaces in an easy and portable manner.")
4673 (license license:expat)))
4674
4675 (define-public python2-netifaces
4676 (package-with-python2 python-netifaces))
4677
4678 (define-public python-networkx
4679 (package
4680 (name "python-networkx")
4681 (version "1.9.1")
4682 (source
4683 (origin
4684 (method url-fetch)
4685 (uri (string-append
4686 "https://pypi.python.org/packages/source/n/networkx/networkx-"
4687 version ".tar.gz"))
4688 (sha256
4689 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
4690 (build-system python-build-system)
4691 ;; python-decorator is needed at runtime
4692 (propagated-inputs
4693 `(("python-decorator" ,python-decorator)))
4694 (native-inputs
4695 `(("python-setuptools" ,python-setuptools)
4696 ("python-nose" ,python-nose)))
4697 (home-page "http://networkx.github.io/")
4698 (synopsis "Python module for creating and manipulating graphs and networks")
4699 (description
4700 "NetworkX is a Python package for the creation, manipulation, and study
4701 of the structure, dynamics, and functions of complex networks.")
4702 (license bsd-3)))
4703
4704 (define-public python2-networkx
4705 (package-with-python2 python-networkx))
4706
4707 (define-public snakemake
4708 (package
4709 (name "snakemake")
4710 (version "3.2.1")
4711 (source
4712 (origin
4713 (method url-fetch)
4714 (uri (string-append
4715 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4716 version ".tar.gz"))
4717 (sha256
4718 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4719 (build-system python-build-system)
4720 (inputs `(("python-setuptools" ,python-setuptools)))
4721 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4722 (synopsis "Python-based execution environment for make-like workflows")
4723 (description
4724 "Snakemake aims to reduce the complexity of creating workflows by
4725 providing a clean and modern domain specific specification language (DSL) in
4726 Python style, together with a fast and comfortable execution environment.")
4727 (license license:expat)))
4728
4729 (define-public python-seaborn
4730 (package
4731 (name "python-seaborn")
4732 (version "0.5.1")
4733 (source
4734 (origin
4735 (method url-fetch)
4736 (uri (string-append
4737 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
4738 version ".tar.gz"))
4739 (sha256
4740 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
4741 (build-system python-build-system)
4742 (propagated-inputs
4743 `(("python-pandas" ,python-pandas)
4744 ("python-matplotlib" ,python-matplotlib)
4745 ("python-scipy" ,python-scipy)))
4746 (native-inputs
4747 `(("python-setuptools" ,python-setuptools)))
4748 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4749 (synopsis "Statistical data visualization")
4750 (description
4751 "Seaborn is a library for making attractive and informative statistical
4752 graphics in Python. It is built on top of matplotlib and tightly integrated
4753 with the PyData stack, including support for numpy and pandas data structures
4754 and statistical routines from scipy and statsmodels.")
4755 (license bsd-3)))
4756
4757 (define-public python2-seaborn
4758 (let ((seaborn (package-with-python2 python-seaborn)))
4759 (package (inherit seaborn)
4760 (propagated-inputs
4761 `(("python2-pytz" ,python2-pytz)
4762 ("python2-pandas" ,python2-pandas)
4763 ("python2-matplotlib" ,python2-matplotlib)
4764 ("python2-scipy" ,python2-scipy))))))
4765
4766 (define-public python-sympy
4767 (package
4768 (name "python-sympy")
4769 (version "0.7.6")
4770 (source
4771 (origin
4772 (method url-fetch)
4773 (uri (string-append
4774 "https://github.com/sympy/sympy/releases/download/sympy-"
4775 version "/sympy-" version ".tar.gz"))
4776 (sha256
4777 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4778 (build-system python-build-system)
4779 (native-inputs
4780 `(("python-setuptools" ,python-setuptools)))
4781 (home-page "http://www.sympy.org/")
4782 (synopsis "Python library for symbolic mathematics")
4783 (description
4784 "SymPy is a Python library for symbolic mathematics. It aims to become a
4785 full-featured computer algebra system (CAS) while keeping the code as simple
4786 as possible in order to be comprehensible and easily extensible.")
4787 (license bsd-3)))
4788
4789 (define-public python2-sympy
4790 (package-with-python2 python-sympy))
4791
4792 (define-public python-testlib
4793 (package
4794 (name "python-testlib")
4795 (version "0.6.5")
4796 (source
4797 (origin
4798 (method url-fetch)
4799 (uri (string-append
4800 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4801 version ".zip"))
4802 (sha256
4803 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4804 (build-system python-build-system)
4805 (inputs
4806 `(("python-setuptools" ,python-setuptools)))
4807 (native-inputs
4808 `(("unzip" ,unzip)))
4809 (arguments
4810 `(#:phases
4811 (alist-replace
4812 'unpack
4813 (lambda* (#:key inputs outputs #:allow-other-keys)
4814 (let ((unzip (string-append (assoc-ref inputs "unzip")
4815 "/bin/unzip"))
4816 (source (assoc-ref inputs "source")))
4817 (and (zero? (system* unzip source))
4818 (chdir (string-append "testlib-" ,version)))))
4819 %standard-phases)))
4820 (synopsis "Python micro test suite harness")
4821 (description "A micro unittest suite harness for Python.")
4822 (home-page "https://github.com/trentm/testlib")
4823 (license license:expat)))
4824
4825 (define-public python2-testlib
4826 (package-with-python2 python-testlib))
4827
4828 (define-public python2-xlib
4829 (package
4830 (name "python2-xlib")
4831 (version "0.14")
4832 (source (origin
4833 (method url-fetch)
4834 (uri (string-append "mirror://sourceforge/python-xlib/"
4835 "python-xlib-" version ".tar.gz"))
4836 (sha256
4837 (base32
4838 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4839 (build-system python-build-system)
4840 (arguments
4841 `(#:python ,python-2 ;Python 2 only
4842 #:tests? #f)) ;no tests
4843 (inputs
4844 `(("python-setuptools" ,python-setuptools)))
4845 (home-page "http://python-xlib.sourceforge.net/")
4846 (synopsis "Python X11 client library")
4847 (description
4848 "The Python X Library is intended to be a fully functional X client
4849 library for Python programs. It is useful to implement low-level X clients.
4850 It is written entirely in Python.")
4851 (license gpl2+)))
4852
4853 (define-public python-singledispatch
4854 (package
4855 (name "python-singledispatch")
4856 (version "3.4.0.3")
4857 (source
4858 (origin
4859 (method url-fetch)
4860 (uri (string-append
4861 "https://pypi.python.org/packages/source/s/singledispatch/"
4862 "singledispatch-" version ".tar.gz"))
4863 (sha256
4864 (base32
4865 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4866 (build-system python-build-system)
4867 (native-inputs
4868 `(("python-setuptools" ,python-setuptools)))
4869 (propagated-inputs
4870 `(("python-six" ,python-six)))
4871 (home-page
4872 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4873 (synopsis "Backport of singledispatch feature from Python 3.4")
4874 (description
4875 "This library brings functools.singledispatch from Python 3.4 to Python
4876 2.6-3.3.")
4877 (license license:expat)))
4878
4879 (define-public python2-singledispatch
4880 (package-with-python2 python-singledispatch))
4881
4882 (define-public python-tornado
4883 (package
4884 (name "python-tornado")
4885 (version "4.1")
4886 (source
4887 (origin
4888 (method url-fetch)
4889 (uri (string-append
4890 "https://pypi.python.org/packages/source/t/tornado/"
4891 "tornado-" version ".tar.gz"))
4892 (sha256
4893 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
4894 (build-system python-build-system)
4895 (inputs
4896 `(("python-certifi" ,python-certifi)))
4897 (native-inputs
4898 `(("python-setuptools" ,python-setuptools)))
4899 (home-page "http://www.tornadoweb.org/")
4900 (synopsis "Python web framework and asynchronous networking library")
4901 (description
4902 "Tornado is a Python web framework and asynchronous networking library,
4903 originally developed at FriendFeed. By using non-blocking network I/O,
4904 Tornado can scale to tens of thousands of open connections, making it ideal
4905 for long polling, WebSockets, and other applications that require a long-lived
4906 connection to each user.")
4907 (license asl2.0)))
4908
4909 (define-public python2-tornado
4910 (let ((tornado (package-with-python2 python-tornado)))
4911 (package (inherit tornado)
4912 (inputs
4913 `(("python2-backport-ssl-match-hostname"
4914 ,python2-backport-ssl-match-hostname)
4915 ,@(package-inputs tornado))))))
4916
4917 (define-public python-waf
4918 (package
4919 (name "python-waf")
4920 (version "1.8.8")
4921 (source (origin
4922 (method url-fetch)
4923 (uri (string-append "https://waf.io/"
4924 "waf-" version ".tar.bz2"))
4925 (sha256
4926 (base32
4927 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4928 (build-system python-build-system)
4929 (arguments
4930 '(#:phases
4931 (modify-phases %standard-phases
4932 (replace 'build
4933 (lambda _
4934 (zero? (begin
4935 (system* "python" "waf-light" "configure")
4936 (system* "python" "waf-light" "build")))))
4937 (replace 'check
4938 (lambda _
4939 (zero? (system* "python" "waf" "--version"))))
4940 (replace 'install
4941 (lambda _
4942 (copy-file "waf" %output))))))
4943 (home-page "https://waf.io/")
4944 (synopsis "Python-based build system")
4945 (description
4946 "Waf is a Python-based framework for configuring, compiling and installing
4947 applications.")
4948 (license bsd-3)))
4949
4950 (define-public python2-waf
4951 (package-with-python2 python-waf))
4952
4953 (define-public python-pyzmq
4954 (package
4955 (name "python-pyzmq")
4956 (version "14.6.0")
4957 (source
4958 (origin
4959 (method url-fetch)
4960 (uri (string-append
4961 "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
4962 version ".tar.gz"))
4963 (sha256
4964 (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
4965 (build-system python-build-system)
4966 (arguments
4967 `(#:configure-flags
4968 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
4969 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
4970 ;; --inplace' for 'python setup.py test' to work.
4971 #:tests? #f))
4972 (inputs
4973 `(("zeromq" ,zeromq)))
4974 (native-inputs
4975 `(("pkg-config" ,pkg-config)
4976 ("python-nose" ,python-nose)
4977 ("python-setuptools" ,python-setuptools)))
4978 (home-page "http://github.com/zeromq/pyzmq")
4979 (synopsis "Python bindings for 0MQ")
4980 (description
4981 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
4982 (license bsd-4)))
4983
4984 (define-public python2-pyzmq
4985 (package-with-python2 python-pyzmq))
4986
4987 (define-public python-pep8
4988 (package
4989 (name "python-pep8")
4990 (version "1.6.2")
4991 (source
4992 (origin
4993 (method url-fetch)
4994 (uri (string-append
4995 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4996 version
4997 ".tar.gz"))
4998 (sha256
4999 (base32
5000 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
5001 (build-system python-build-system)
5002 (inputs
5003 `(("python-setuptools" ,python-setuptools)))
5004 (home-page "http://pep8.readthedocs.org/")
5005 (synopsis "Python style guide checker")
5006 (description
5007 "This tools checks Python code against some of the style conventions in
5008 PEP 8.")
5009 (license license:expat)))
5010
5011 (define-public python2-pep8
5012 (package-with-python2 python-pep8))
5013
5014 (define-public python-pyflakes
5015 (package
5016 (name "python-pyflakes")
5017 (version "0.9.2")
5018 (source
5019 (origin
5020 (method url-fetch)
5021 (uri (string-append
5022 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5023 version
5024 ".tar.gz"))
5025 (sha256
5026 (base32
5027 "0pvawddspdq0y22dbraq5gld9qr6rwa7zhmpfhl2b7v9rqiiqs82"))))
5028 (build-system python-build-system)
5029 (inputs
5030 `(("python-setuptools" ,python-setuptools)))
5031 (home-page
5032 "https://github.com/pyflakes/pyflakes")
5033 (synopsis "Passive checker of Python programs")
5034 (description
5035 "Pyflakes statically checks Python source code for common errors.")
5036 (license license:expat)))
5037
5038 (define-public python2-pyflakes
5039 (package-with-python2 python-pyflakes))
5040
5041 (define-public python-mccabe
5042 (package
5043 (name "python-mccabe")
5044 (version "0.3.1")
5045 (source
5046 (origin
5047 (method url-fetch)
5048 (uri (string-append
5049 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
5050 version
5051 ".tar.gz"))
5052 (sha256
5053 (base32
5054 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
5055 (build-system python-build-system)
5056 (inputs
5057 `(("python-setuptools" ,python-setuptools)))
5058 (home-page "https://github.com/flintwork/mccabe")
5059 (synopsis "McCabe checker, plugin for flake8")
5060 (description
5061 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5062 complexity of Python source code.")
5063 (license license:expat)))
5064
5065 (define-public python2-mccabe
5066 (package-with-python2 python-mccabe))
5067
5068 (define-public python-mccabe-0.2.1
5069 (package (inherit python-mccabe)
5070 (version "0.2.1")
5071 (source
5072 (origin
5073 (method url-fetch)
5074 (uri (pypi-uri "mccabe" version))
5075 (sha256
5076 (base32
5077 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5078
5079 (define-public python2-mccabe-0.2.1
5080 (package-with-python2 python-mccabe-0.2.1))
5081
5082 ;; Flake8 2.4.1 requires an older version of pep8.
5083 ;; This should be removed ASAP.
5084 (define-public python-pep8-1.5.7
5085 (package (inherit python-pep8)
5086 (version "1.5.7")
5087 (source
5088 (origin
5089 (method url-fetch)
5090 (uri (string-append
5091 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5092 version
5093 ".tar.gz"))
5094 (sha256
5095 (base32
5096 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5097
5098 (define-public python2-pep8-1.5.7
5099 (package-with-python2 python-pep8-1.5.7))
5100
5101 ;; Flake8 2.4.1 requires an older version of pyflakes.
5102 ;; This should be removed ASAP.
5103 (define-public python-pyflakes-0.8.1
5104 (package (inherit python-pyflakes)
5105 (version "0.8.1")
5106 (source
5107 (origin
5108 (method url-fetch)
5109 (uri (string-append
5110 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5111 version
5112 ".tar.gz"))
5113 (sha256
5114 (base32
5115 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5116
5117 (define-public python2-pyflakes-0.8.1
5118 (package-with-python2 python-pyflakes-0.8.1))
5119
5120 (define-public python-flake8
5121 (package
5122 (name "python-flake8")
5123 (version "2.4.1")
5124 (source
5125 (origin
5126 (method url-fetch)
5127 (uri (string-append
5128 "https://pypi.python.org/packages/source/f/flake8/flake8-"
5129 version
5130 ".tar.gz"))
5131 (sha256
5132 (base32
5133 "0dvmrpv7x98xkzffjz1z7lqr90sp5zdz16bdwckfd1cckpjvnzif"))))
5134 (build-system python-build-system)
5135 (inputs
5136 `(("python-setuptools" ,python-setuptools)
5137 ("python-pep8" ,python-pep8-1.5.7)
5138 ("python-pyflakes" ,python-pyflakes-0.8.1)
5139 ("python-mccabe" ,python-mccabe)
5140 ("python-mock" ,python-mock)
5141 ("python-nose" ,python-nose)))
5142 (home-page "https://gitlab.com/pycqa/flake8")
5143 (synopsis
5144 "The modular source code checker: pep8, pyflakes and co")
5145 (description
5146 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5147 (license license:expat)))
5148
5149 (define-public python2-flake8
5150 (package-with-python2 python-flake8))
5151
5152 ;; This will only be needed by the python-hacking package and will not be
5153 ;; necessary once python-hacking > 0.10.2 is released.
5154 (define-public python-flake8-2.2.4
5155 (package (inherit python-flake8)
5156 (inputs
5157 `(("python-setuptools" ,python-setuptools)
5158 ("python-pep8" ,python-pep8-1.5.7)
5159 ("python-pyflakes" ,python-pyflakes-0.8.1)
5160 ("python-mccabe" ,python-mccabe-0.2.1)
5161 ("python-mock" ,python-mock)
5162 ("python-nose" ,python-nose)))
5163 (version "2.2.4")
5164 (source
5165 (origin
5166 (method url-fetch)
5167 (uri (pypi-uri "flake8" version))
5168 (sha256
5169 (base32
5170 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5171
5172 (define-public python2-flake8-2.2.4
5173 (package-with-python2 python-flake8-2.2.4))
5174
5175 (define-public python-mistune
5176 (package
5177 (name "python-mistune")
5178 (version "0.7")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (string-append
5183 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5184 version
5185 ".tar.gz"))
5186 (sha256
5187 (base32
5188 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5189 (build-system python-build-system)
5190 (inputs
5191 `(("python-setuptools" ,python-setuptools)
5192 ("python-nose" ,python-nose)
5193 ("python-cython" ,python-cython)))
5194 (home-page "https://github.com/lepture/mistune")
5195 (synopsis "Markdown parser in pure Python")
5196 (description "This package provides a fast markdown parser in pure
5197 Python.")
5198 (license bsd-3)))
5199
5200 (define-public python2-mistune
5201 (package-with-python2 python-mistune))
5202
5203 (define-public python-ptyprocess
5204 (package
5205 (name "python-ptyprocess")
5206 (version "0.5")
5207 (source
5208 (origin
5209 (method url-fetch)
5210 (uri (string-append
5211 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5212 version ".tar.gz"))
5213 (sha256
5214 (base32
5215 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5216 (build-system python-build-system)
5217 (inputs
5218 `(("python-setuptools" ,python-setuptools)
5219 ("python-nose" ,python-nose)))
5220 (arguments
5221 `(#:phases
5222 (modify-phases %standard-phases
5223 (replace 'check
5224 (lambda _
5225 (zero? (system* "nosetests")))))))
5226 (home-page "https://github.com/pexpect/ptyprocess")
5227 (synopsis "Run a subprocess in a pseudo terminal")
5228 (description
5229 "This package provides a Python library used to launch a subprocess in a
5230 pseudo terminal (pty), and interact with both the process and its pty.")
5231 (license isc)))
5232
5233 (define-public python2-ptyprocess
5234 (package-with-python2 python-ptyprocess))
5235
5236 (define-public python-terminado
5237 (package
5238 (name "python-terminado")
5239 (version "0.5")
5240 (source
5241 (origin
5242 (method url-fetch)
5243 (uri (string-append
5244 "https://pypi.python.org/packages/source/t/terminado/terminado-"
5245 version ".tar.gz"))
5246 (sha256
5247 (base32
5248 "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33"))))
5249 (build-system python-build-system)
5250 (propagated-inputs
5251 `(("python-tornado" ,python-tornado)
5252 ("python-ptyprocess" ,python-ptyprocess)))
5253 (inputs
5254 `(("python-setuptools" ,python-setuptools)
5255 ("python-nose" ,python-nose)))
5256 (arguments
5257 `(#:phases
5258 (modify-phases %standard-phases
5259 (replace 'check
5260 (lambda _
5261 (zero? (system* "nosetests")))))))
5262 (home-page "https://github.com/takluyver/terminado")
5263 (synopsis "Terminals served to term.js using Tornado websockets")
5264 (description "This package provides a Tornado websocket backend for the
5265 term.js Javascript terminal emulator library.")
5266 (license bsd-2)))
5267
5268 (define-public python2-terminado
5269 (let ((terminado (package-with-python2 python-terminado)))
5270 (package (inherit terminado)
5271 (propagated-inputs
5272 `(("python2-tornado" ,python2-tornado)
5273 ("python2-backport-ssl-match-hostname"
5274 ,python2-backport-ssl-match-hostname)
5275 ,@(alist-delete "python-tornado"
5276 (package-propagated-inputs terminado)))))))
5277
5278 (define-public python-fonttools
5279 (package
5280 (name "python-fonttools")
5281 (version "2.5")
5282 (source (origin
5283 (method url-fetch)
5284 (uri (string-append
5285 "https://pypi.python.org/packages/source/F/FontTools/"
5286 "fonttools-" version ".tar.gz"))
5287 (sha256
5288 (base32
5289 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5290 (build-system python-build-system)
5291 (arguments '(#:test-target "check"))
5292 (propagated-inputs
5293 ;; XXX: module not found if setuptools is not available.
5294 `(("python-setuptools" ,python-setuptools)))
5295 (home-page "http://github.com/behdad/fonttools")
5296 (synopsis "Tools to manipulate font files")
5297 (description
5298 "FontTools/TTX is a library to manipulate font files from Python. It
5299 supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5300 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5301 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5302 from an XML-based format.")
5303 (license (non-copyleft "file://LICENSE.txt"
5304 "See LICENSE.txt in the distribution."))))
5305
5306 (define-public python2-fonttools
5307 (package-with-python2 python-fonttools))
5308
5309 (define-public python-ly
5310 (package
5311 (name "python-ly")
5312 (version "0.9.2")
5313 (source
5314 (origin
5315 (method url-fetch)
5316 (uri (string-append
5317 "https://pypi.python.org/packages/source/p/python-ly/python-ly-"
5318 version ".tar.gz"))
5319 (sha256
5320 (base32
5321 "1bsjg4q9ihr8bfdclrcmb8yjcg8xm9dznh58f3zsyrkrjzwbhcd2"))))
5322 (build-system python-build-system)
5323 (native-inputs
5324 `(("python-setuptools" ,python-setuptools)))
5325 (synopsis "Tool and library for manipulating LilyPond files")
5326 (description "This package provides a Python library to parse, manipulate
5327 or create documents in LilyPond format. A command line program ly is also
5328 provided that can be used to do various manipulations with LilyPond files.")
5329 (home-page "https://pypi.python.org/pypi/python-ly")
5330 (license gpl2+)))
5331
5332 (define-public python-appdirs
5333 (package
5334 (name "python-appdirs")
5335 (version "1.4.0")
5336 (source
5337 (origin
5338 (method url-fetch)
5339 (uri (string-append
5340 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5341 version
5342 ".tar.gz"))
5343 (sha256
5344 (base32
5345 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5346 (build-system python-build-system)
5347 (inputs
5348 `(("python-setuptools" ,python-setuptools)))
5349 (home-page "http://github.com/ActiveState/appdirs")
5350 (synopsis
5351 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5352 (description
5353 "This module provides a portable way of finding out where user data
5354 should be stored on various operating systems.")
5355 (license license:expat)))
5356
5357 (define-public python2-appdirs
5358 (package-with-python2 python-appdirs))
5359
5360 (define-public python-llfuse
5361 (package
5362 (name "python-llfuse")
5363 (version "0.41")
5364 (source (origin
5365 (method url-fetch)
5366 (uri (string-append
5367 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5368 "llfuse-" version ".tar.bz2"))
5369 (sha256
5370 (base32
5371 "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
5372 (build-system python-build-system)
5373 (inputs
5374 `(("fuse" ,fuse)
5375 ("attr" ,attr)))
5376 (native-inputs
5377 `(("pkg-config" ,pkg-config)
5378 ("python-setuptools" ,python-setuptools)))
5379 (synopsis "Python bindings for FUSE")
5380 (description
5381 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5382 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5383 ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
5384 ;; The rest of the package is licensed under LGPL2.0 or later.
5385 (license (list license:expat lgpl2.0+))))
5386
5387 (define-public python2-llfuse
5388 (package-with-python2 python-llfuse))
5389
5390 (define-public python-msgpack
5391 (package
5392 (name "python-msgpack")
5393 (version "0.4.6")
5394 (source (origin
5395 (method url-fetch)
5396 (uri (string-append
5397 "https://pypi.python.org/packages/source/m/"
5398 "msgpack-python/msgpack-python-" version ".tar.gz"))
5399 (sha256
5400 (base32
5401 "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
5402 (build-system python-build-system)
5403 (native-inputs
5404 `(("python-setuptools" ,python-setuptools)))
5405 (synopsis "MessagePack (de)serializer")
5406 (description "MessagePack is a fast, compact binary serialization format,
5407 suitable for similar data to JSON. This package provides CPython bindings for
5408 reading and writing MessagePack data.")
5409 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5410 (license asl2.0)))
5411
5412 (define-public python2-msgpack
5413 (package-with-python2 python-msgpack))
5414
5415 (define-public python-netaddr
5416 (package
5417 (name "python-netaddr")
5418 (version "0.7.18")
5419 (source
5420 (origin
5421 (method url-fetch)
5422 (uri (string-append
5423 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5424 version
5425 ".tar.gz"))
5426 (sha256
5427 (base32
5428 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5429 (build-system python-build-system)
5430 (arguments `(#:tests? #f)) ;; No tests.
5431 (inputs
5432 `(("python-setuptools" ,python-setuptools)))
5433 (home-page "https://github.com/drkjam/netaddr/")
5434 (synopsis "Pythonic manipulation of network addresses")
5435 (description
5436 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5437 and MAC network addresses.")
5438 (license bsd-3)))
5439
5440 (define-public python2-netaddr
5441 (package-with-python2 python-netaddr))
5442
5443 (define-public python-wrapt
5444 (package
5445 (name "python-wrapt")
5446 (version "1.10.5")
5447 (source
5448 (origin
5449 (method url-fetch)
5450 (uri (string-append
5451 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5452 version
5453 ".tar.gz"))
5454 (sha256
5455 (base32
5456 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5457 (build-system python-build-system)
5458 (arguments
5459 ;; Tests are not included in the tarball, they are only available in the
5460 ;; git repository.
5461 `(#:tests? #f))
5462 (inputs
5463 `(("python-setuptools" ,python-setuptools)))
5464 (home-page "https://github.com/GrahamDumpleton/wrapt")
5465 (synopsis "Module for decorators, wrappers and monkey patching")
5466 (description
5467 "The aim of the wrapt module is to provide a transparent object proxy for
5468 Python, which can be used as the basis for the construction of function
5469 wrappers and decorator functions.")
5470 (license bsd-2)))
5471
5472 (define-public python2-wrapt
5473 (package-with-python2 python-wrapt))
5474
5475 (define-public python-iso8601
5476 (package
5477 (name "python-iso8601")
5478 (version "0.1.10")
5479 (source
5480 (origin
5481 (method url-fetch)
5482 (uri (string-append
5483 "https://pypi.python.org/packages/source/i/iso8601/iso8601-"
5484 version
5485 ".tar.gz"))
5486 (sha256
5487 (base32
5488 "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7"))))
5489 (build-system python-build-system)
5490 (inputs
5491 `(("python-setuptools" ,python-setuptools)))
5492 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5493 (synopsis "Module to parse ISO 8601 dates")
5494 (description
5495 "This module parses the most common forms of ISO 8601 date strings (e.g.
5496 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5497 (license license:expat)))
5498
5499 (define-public python2-iso8601
5500 (package-with-python2 python-iso8601))
5501
5502 (define-public python-monotonic
5503 (package
5504 (name "python-monotonic")
5505 (version "0.3")
5506 (source
5507 (origin
5508 (method url-fetch)
5509 (uri (string-append
5510 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5511 version
5512 ".tar.gz"))
5513 (sha256
5514 (base32
5515 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5516 (build-system python-build-system)
5517 (inputs
5518 `(("python-setuptools" ,python-setuptools)))
5519 (home-page "https://github.com/atdt/monotonic")
5520 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5521 (description
5522 "This module provides a monotonic() function which returns the value (in
5523 fractional seconds) of a clock which never goes backwards.")
5524 (license asl2.0)))
5525
5526 (define-public python2-monotonic
5527 (package-with-python2 python-monotonic))
5528
5529 (define-public python-webob
5530 (package
5531 (name "python-webob")
5532 (version "1.5.0b0")
5533 (source
5534 (origin
5535 (method url-fetch)
5536 (uri (string-append
5537 "https://pypi.python.org/packages/source/W/WebOb/WebOb-"
5538 version ".tar.gz"))
5539 (sha256
5540 (base32
5541 "140b3iczclk1j0405rvw5gxshqfkhcc8254fj520z3m23cwbql4a"))))
5542 (build-system python-build-system)
5543 (inputs
5544 `(("python-nose" ,python-nose)
5545 ("python-setuptools" ,python-setuptools)))
5546 (home-page "http://webob.org/")
5547 (synopsis "WSGI request and response object")
5548 (description
5549 "WebOb provides wrappers around the WSGI request environment, and an
5550 object to help create WSGI responses.")
5551 (license license:expat)))
5552
5553 (define-public python2-webob
5554 (package-with-python2 python-webob))
5555
5556 (define-public python-xlrd
5557 (package
5558 (name "python-xlrd")
5559 (version "0.9.4")
5560 (source (origin
5561 (method url-fetch)
5562 (uri (string-append "https://pypi.python.org/packages/source/x/"
5563 "xlrd/xlrd-" version ".tar.gz"))
5564 (sha256
5565 (base32
5566 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5567 (build-system python-build-system)
5568 (arguments
5569 `(#:phases
5570 (modify-phases %standard-phases
5571 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5572 ;; run tests instead for now.
5573 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5574 (native-inputs `(("python-nose" ,python-nose)
5575 ("python-setuptools" ,python-setuptools)))
5576 (home-page "http://www.python-excel.org/")
5577 (synopsis "Library for extracting data from Excel files")
5578 (description "This packages provides a library to extract data from
5579 spreadsheets using Microsoft Excel® proprietary file formats @samp{.xls} and
5580 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5581 Unicode-aware. It is not intended as an end-user tool.")
5582 (license bsd-3)))
5583
5584 (define-public python2-xlrd
5585 (package-with-python2 python-xlrd))
5586
5587 (define-public python-prettytable
5588 (package
5589 (name "python-prettytable")
5590 (version "0.7.2")
5591 (source
5592 (origin
5593 (method url-fetch)
5594 (uri (string-append
5595 "https://pypi.python.org/packages/source/P/PrettyTable/"
5596 "prettytable-" version ".tar.bz2"))
5597 (sha256
5598 (base32
5599 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5600 (build-system python-build-system)
5601 (inputs
5602 `(("python-setuptools" ,python-setuptools)))
5603 (home-page "http://code.google.com/p/prettytable/")
5604 (synopsis "Display tabular data in an ASCII table format")
5605 (description
5606 "A library designed to represent tabular data in visually appealing ASCII
5607 tables. PrettyTable allows for selection of which columns are to be printed,
5608 independent alignment of columns (left or right justified or centred) and
5609 printing of sub-tables by specifying a row range.")
5610 (license bsd-3)))
5611
5612 (define-public python2-prettytable
5613 (package-with-python2 python-prettytable))
5614
5615 (define-public python-pyasn1
5616 (package
5617 (name "python-pyasn1")
5618 (version "0.1.8")
5619 (source
5620 (origin
5621 (method url-fetch)
5622 (uri (string-append "https://pypi.python.org/packages/source/p/"
5623 "pyasn1/pyasn1-" version ".tar.gz"))
5624 (sha256
5625 (base32
5626 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5627 (build-system python-build-system)
5628 (home-page "http://pyasn1.sourceforge.net/")
5629 (synopsis "ASN.1 types and codecs")
5630 (description
5631 "This is an implementation of ASN.1 types and codecs in Python. It is
5632 suitable for a wide range of protocols based on the ASN.1 specification.")
5633 (license bsd-2)))
5634
5635 (define-public python2-pyasn1
5636 (package-with-python2 python-pyasn1))
5637
5638 (define-public python2-ipaddress
5639 (package
5640 (name "python2-ipaddress")
5641 (version "1.0.14")
5642 (source
5643 (origin
5644 (method url-fetch)
5645 (uri (string-append "https://pypi.python.org/packages/source/i/"
5646 "ipaddress/ipaddress-" version ".tar.gz"))
5647 (sha256
5648 (base32
5649 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5650 (build-system python-build-system)
5651 (arguments
5652 `(#:tests? #f ; no tests
5653 #:python ,python-2))
5654 (home-page "https://github.com/phihag/ipaddress")
5655 (synopsis "IP address manipulation library")
5656 (description
5657 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5658 in Python. This library is used to create, poke at, and manipulate IPv4 and
5659 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5660 module to older versions of Python.")
5661 (license psfl)))
5662
5663 (define-public python-idna
5664 (package
5665 (name "python-idna")
5666 (version "2.0")
5667 (source
5668 (origin
5669 (method url-fetch)
5670 (uri (string-append "https://pypi.python.org/packages/source/i/"
5671 "idna/idna-" version ".tar.gz"))
5672 (sha256
5673 (base32
5674 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5675 (build-system python-build-system)
5676 (native-inputs
5677 `(("python-setuptools" ,python-setuptools)))
5678 (home-page "https://github.com/kjd/idna")
5679 (synopsis "Internationalized domain names in applications")
5680 (description
5681 "This is a library to support the Internationalised Domain Names in
5682 Applications (IDNA) protocol as specified in RFC 5891. This version of the
5683 protocol is often referred to as “IDNA2008” and can produce different results
5684 from the earlier standard from 2003. The library is also intended to act as a
5685 suitable drop-in replacement for the “encodings.idna” module that comes with
5686 the Python standard library but currently only supports the older 2003
5687 specification.")
5688 (license bsd-4)))
5689
5690 (define-public python2-idna
5691 (package-with-python2 python-idna))
5692
5693 (define-public python-pretend
5694 (package
5695 (name "python-pretend")
5696 (version "1.0.8")
5697 (source
5698 (origin
5699 (method url-fetch)
5700 (uri (string-append "https://pypi.python.org/packages/source/p/"
5701 "pretend/pretend-" version ".tar.gz"))
5702 (sha256
5703 (base32
5704 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5705 (build-system python-build-system)
5706 (native-inputs
5707 `(("python-setuptools" ,python-setuptools)))
5708 (home-page "https://github.com/alex/pretend")
5709 (synopsis "Library for stubbing in Python")
5710 (description
5711 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5712 technique for writing tests. You may hear the term mixed up with mocks,
5713 fakes, or doubles. Basically, a stub is an object that returns pre-canned
5714 responses, rather than doing any computation.")
5715 (license bsd-3)))
5716
5717 (define-public python2-pretend
5718 (package-with-python2 python-pretend))
5719
5720 (define-public python-cryptography-vectors
5721 (package
5722 (name "python-cryptography-vectors")
5723 (version "1.0.2")
5724 (source
5725 (origin
5726 (method url-fetch)
5727 (uri (string-append "https://pypi.python.org/packages/source/c/"
5728 "cryptography-vectors/cryptography_vectors-"
5729 version ".tar.gz"))
5730 (sha256
5731 (base32
5732 "0dx98kcypmarwwhi6rjwy30ridys2ja6mc6mjf0svd4nllkaljdq"))))
5733 (build-system python-build-system)
5734 (native-inputs
5735 `(("python-setuptools" ,python-setuptools)))
5736 (home-page "https://github.com/pyca/cryptography")
5737 (synopsis "Test vectors for the cryptography package.")
5738 (description
5739 "This package contains test vectors for the cryptography package.")
5740 ;; Distributed under either BSD-3 or ASL2.0
5741 (license (list bsd-3 asl2.0))))
5742
5743 (define-public python2-cryptography-vectors
5744 (package-with-python2 python-cryptography-vectors))
5745
5746 (define-public python-cryptography
5747 (package
5748 (name "python-cryptography")
5749 (version "1.0.2")
5750 (source
5751 (origin
5752 (method url-fetch)
5753 (uri (string-append "https://pypi.python.org/packages/source/c/"
5754 "cryptography/cryptography-" version ".tar.gz"))
5755 (sha256
5756 (base32
5757 "1jmcidddbbgdavvnvjjc0pda4b9a5i9idsivchn69pqxx68x8k6n"))))
5758 (build-system python-build-system)
5759 (inputs
5760 `(("openssl" ,openssl)))
5761 (propagated-inputs
5762 `(("python-cffi" ,python-cffi)
5763 ("python-six" ,python-six)
5764 ("python-pyasn1" ,python-pyasn1)
5765 ("python-enum34" ,python-enum34)
5766 ("python-idna" ,python-idna)
5767 ("python-iso8601" ,python-iso8601)))
5768 (native-inputs
5769 `(("python-cryptography-vectors" ,python-cryptography-vectors)
5770 ("python-setuptools" ,python-setuptools)
5771 ("python-pretend" ,python-pretend)
5772 ("python-pytest" ,python-pytest)))
5773 (home-page "https://github.com/pyca/cryptography")
5774 (synopsis "Cryptographic recipes and primitives for Python")
5775 (description
5776 "cryptography is a package which provides cryptographic recipes and
5777 primitives to Python developers. It aims to be the “cryptographic standard
5778 library” for Python. The package includes both high level recipes, and low
5779 level interfaces to common cryptographic algorithms such as symmetric ciphers,
5780 message digests and key derivation functions.")
5781 ;; Distributed under either BSD-3 or ASL2.0
5782 (license (list bsd-3 asl2.0))))
5783
5784 (define-public python2-cryptography
5785 (let ((crypto (package-with-python2 python-cryptography)))
5786 (package (inherit crypto)
5787 (propagated-inputs
5788 `(("python2-ipaddress" ,python2-ipaddress)
5789 ,@(package-propagated-inputs crypto))))))
5790
5791 (define-public python-pyopenssl
5792 (package
5793 (name "python-pyopenssl")
5794 (version "0.15.1")
5795 (source
5796 (origin
5797 (method url-fetch)
5798 (uri (string-append "https://pypi.python.org/packages/source/p/"
5799 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
5800 (sha256
5801 (base32
5802 "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
5803 (build-system python-build-system)
5804 (arguments
5805 `(#:phases
5806 (modify-phases %standard-phases
5807 (add-after 'unpack 'fix-tests
5808 (lambda* (#:key inputs #:allow-other-keys)
5809 (substitute* "OpenSSL/test/test_ssl.py"
5810 (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
5811 "return True")
5812 ;; FIXME: disable broken test
5813 (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
5814 (substitute* "OpenSSL/test/test_crypto.py"
5815 (("command = b\"openssl \"")
5816 (string-append "command = b\""
5817 (assoc-ref inputs "openssl")
5818 "/bin/openssl" " \""))
5819 ;; FIXME: disable four broken tests
5820 (("test_der") "disabled__der")
5821 (("test_digest") "disabled__digest")
5822 (("test_get_extension") "disabled__get_extension")
5823 (("test_extension_count") "disabled__extension_count"))
5824 #t)))))
5825 (propagated-inputs
5826 `(("python-cryptography" ,python-cryptography)
5827 ("python-six" ,python-six)))
5828 (inputs
5829 `(("openssl" ,openssl)))
5830 (native-inputs
5831 `(("python-setuptools" ,python-setuptools)))
5832 (home-page "https://github.com/pyca/pyopenssl")
5833 (synopsis "Python wrapper module around the OpenSSL library")
5834 (description
5835 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
5836 library.")
5837 (license asl2.0)))
5838
5839 (define-public python2-pyopenssl
5840 (let ((pyopenssl (package-with-python2 python-pyopenssl)))
5841 (package (inherit pyopenssl)
5842 (propagated-inputs
5843 `(("python2-cryptography" ,python2-cryptography)
5844 ,@(alist-delete "python-cryptography"
5845 (package-propagated-inputs pyopenssl)))))))
5846
5847 (define-public python-pip
5848 (package
5849 (name "python-pip")
5850 (version "7.1.2")
5851 (source
5852 (origin
5853 (method url-fetch)
5854 (uri (string-append
5855 "https://pypi.python.org/packages/source/p/pip/pip-"
5856 version ".tar.gz"))
5857 (sha256
5858 (base32
5859 "0xx4aypfgchxdknxq7gyqghd8wb221zrzyqlbabzm32jy237j16a"))))
5860 (build-system python-build-system)
5861 (inputs
5862 `(("python-setuptools" ,python-setuptools)
5863 ("python-virtualenv" ,python-virtualenv)
5864 ;; Tests
5865 ("python-mock" ,python-mock)
5866 ("python-pytest" ,python-pytest)
5867 ("python-scripttest" ,python-scripttest)))
5868 (home-page "https://pip.pypa.io/")
5869 (synopsis
5870 "Package manager for Python software")
5871 (description
5872 "Pip is a package manager for Python software, that finds packages on the
5873 Python Package Index (PyPI).")
5874 (license license:expat)))
5875
5876 (define-public python2-pip
5877 (package-with-python2 python-pip))
5878
5879 (define-public python-tlsh
5880 (package
5881 (name "python-tlsh")
5882 (version "3.4.1") ;according to CMakeLists.txt
5883 (home-page "https://github.com/trendmicro/tlsh")
5884 (source (origin
5885 (method git-fetch)
5886 (uri (git-reference
5887 (url home-page)
5888 ;; This is a commit right after 3.4.1; see
5889 ;; <https://github.com/trendmicro/tlsh/issues/9>.
5890 (commit "3ae3f1f")))
5891 (sha256
5892 (base32
5893 "12cvnr5ndm5cg6i7lch93id90kgwgrigjgrj8f186nh3h4bf9chj"))
5894 (file-name (string-append name "-" version "-checkout"))))
5895 (build-system cmake-build-system)
5896 (arguments
5897 '(#:out-of-source? #f
5898 #:phases (modify-phases %standard-phases
5899 (replace
5900 'install
5901 (lambda* (#:key outputs #:allow-other-keys)
5902 ;; Build and install the Python bindings. The underlying
5903 ;; C++ library is apparently not meant to be installed.
5904 (let ((out (assoc-ref outputs "out")))
5905 (with-directory-excursion "py_ext"
5906 (and (system* "python" "setup.py" "build")
5907 (system* "python" "setup.py" "install"
5908 (string-append "--prefix=" out))))))))))
5909 (inputs `(("python" ,python-wrapper))) ;for the bindings
5910 (synopsis "Fuzzy matching library for Python")
5911 (description
5912 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
5913 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
5914 value which can be used for similarity comparisons. Similar objects have
5915 similar hash values, which allows for the detection of similar objects by
5916 comparing their hash values. The byte stream should have a sufficient amount
5917 of complexity; for example, a byte stream of identical bytes will not generate
5918 a hash value.")
5919 (license asl2.0)))
5920
5921 (define-public python2-tlsh
5922 (package
5923 (inherit python-tlsh)
5924 (name "python2-tlsh")
5925 (inputs `(("python" ,python-2)))))
5926
5927 (define-public python-libarchive-c
5928 (package
5929 (name "python-libarchive-c")
5930 (version "2.1")
5931 (source (origin
5932 (method url-fetch)
5933 (uri (string-append
5934 "https://pypi.python.org/packages/source/l/libarchive-c/libarchive-c-"
5935 version ".tar.gz"))
5936 (sha256
5937 (base32
5938 "089lrz6xyrfnk55v35vis6jyqyyl77w093057djyspnd2744wi2n"))))
5939 (build-system python-build-system)
5940 (arguments
5941 '(#:phases (modify-phases %standard-phases
5942 (add-before
5943 'build 'reference-libarchive
5944 (lambda* (#:key inputs #:allow-other-keys)
5945 ;; Retain the absolute file name of libarchive.so.
5946 (let ((libarchive (assoc-ref inputs "libarchive")))
5947 (substitute* "libarchive/ffi.py"
5948 (("find_library\\('archive'\\)")
5949 (string-append "'" libarchive
5950 "/lib/libarchive.so'"))))
5951
5952 ;; Do not make a compressed egg (see
5953 ;; <http://bugs.gnu.org/20765>).
5954 (let ((port (open-file "setup.cfg" "a")))
5955 (display "\n[easy_install]\nzip_ok = 0\n"
5956 port)
5957 (close-port port)
5958 #t))))))
5959 (inputs
5960 `(("python-setuptools" ,python-setuptools)
5961 ("libarchive" ,libarchive)))
5962 (home-page "https://github.com/Changaco/python-libarchive-c")
5963 (synopsis "Python interface to libarchive")
5964 (description
5965 "This package provides Python bindings to libarchive, a C library to
5966 access possibly compressed archives in many different formats. It uses
5967 Python's @code{ctypes} foreign function interface (FFI).")
5968 (license lgpl2.0+)))
5969
5970 (define-public python2-libarchive-c
5971 (package-with-python2 python-libarchive-c))
5972
5973 (define-public python-file
5974 (package
5975 (inherit file)
5976 (name "python-file")
5977 (build-system python-build-system)
5978 (arguments
5979 '(#:tests? #f ;no tests
5980 #:phases (modify-phases %standard-phases
5981 (add-before 'build 'change-directory
5982 (lambda _
5983 (chdir "python")
5984 #t))
5985 (add-before 'build 'set-library-file-name
5986 (lambda* (#:key inputs #:allow-other-keys)
5987 (let ((file (assoc-ref inputs "file")))
5988 (substitute* "magic.py"
5989 (("find_library\\('magic'\\)")
5990 (string-append "'" file "/lib/libmagic.so'")))
5991 #t))))))
5992 (inputs `(("file" ,file)))
5993 (self-native-input? #f)
5994 (synopsis "Python bindings to the libmagic file type guesser")))
5995
5996 (define-public python2-file
5997 (package-with-python2 python-file))
5998
5999 (define-public python-debian
6000 (package
6001 (name "python-debian")
6002 (version "0.1.23")
6003 (source
6004 (origin
6005 (method url-fetch)
6006 (uri (string-append
6007 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6008 version ".tar.gz"))
6009 (sha256
6010 (base32
6011 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6012 (build-system python-build-system)
6013 (inputs
6014 `(("python-six" ,python-six)))
6015 (native-inputs
6016 `(("python-setuptools" ,python-setuptools)))
6017 (home-page "http://packages.debian.org/sid/python-debian")
6018 (synopsis "Debian package related modules")
6019 (description
6020 ;; XXX: Use @enumerate instead of @itemize to work around
6021 ;; <http://bugs.gnu.org/21772>.
6022 "This package provides Python modules that abstract many formats of
6023 Debian-related files, such as:
6024
6025 @enumerate
6026 @item Debtags information;
6027 @item @file{debian/changelog} files;
6028 @item packages files, pdiffs;
6029 @item control files of single or multiple RFC822-style paragraphs---e.g.
6030 @file{debian/control}, @file{.changes}, @file{.dsc};
6031 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6032 contained files and meta-information.
6033 @end enumerate\n")
6034
6035 ;; Modules are either GPLv2+ or GPLv3+.
6036 (license gpl3+)))
6037
6038 (define-public python2-debian
6039 (package-with-python2 python-debian))
6040
6041 (define-public python-chardet
6042 (package
6043 (name "python-chardet")
6044 (version "2.3.0")
6045 (source
6046 (origin
6047 (method url-fetch)
6048 (uri (string-append
6049 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6050 version
6051 ".tar.gz"))
6052 (sha256
6053 (base32
6054 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6055 (build-system python-build-system)
6056 (native-inputs
6057 `(("python-setuptools" ,python-setuptools)))
6058 (home-page "https://github.com/chardet/chardet")
6059 (synopsis "Universal encoding detector for Python 2 and 3")
6060 (description
6061 "This package provides @code{chardet}, a Python module that can
6062 automatically detect a wide range of file encodings.")
6063 (license lgpl2.1+)))
6064
6065 (define-public python2-chardet
6066 (package-with-python2 python-chardet))
6067
6068 (define-public python-docopt
6069 (package
6070 (name "python-docopt")
6071 (version "0.6.2")
6072 (source
6073 (origin
6074 (method url-fetch)
6075 ;; The release on PyPI does not include tests.
6076 (uri (string-append
6077 "https://github.com/docopt/docopt/archive/"
6078 version ".tar.gz"))
6079 (file-name (string-append name "-" version ".tar.gz"))
6080 (sha256
6081 (base32
6082 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6083 (build-system python-build-system)
6084 (native-inputs
6085 `(("python-pytest" ,python-pytest)
6086 ("python-setuptools" ,python-setuptools)))
6087 (arguments
6088 `(#:phases (alist-replace
6089 'check
6090 (lambda _ (zero? (system* "py.test")))
6091 %standard-phases)))
6092 (home-page "http://docopt.org")
6093 (synopsis "Command-line interface description language for Python")
6094 (description "This library allows the user to define a command-line
6095 interface from a program's help message rather than specifying it
6096 programatically with command-line parsers like @code{getopt} and
6097 @code{argparse}.")
6098 (license license:expat)))
6099
6100 (define-public python2-docopt
6101 (package-with-python2 python-docopt))
6102
6103 (define-public python-zope-event
6104 (package
6105 (name "python-zope-event")
6106 (version "4.1.0")
6107 (source
6108 (origin
6109 (method url-fetch)
6110 (uri (string-append "https://pypi.python.org/packages/source/z"
6111 "/zope.event/zope.event-" version ".tar.gz"))
6112 (sha256
6113 (base32
6114 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6115 (build-system python-build-system)
6116 (inputs
6117 `(("python-setuptools" ,python-setuptools)))
6118 (home-page "http://pypi.python.org/pypi/zope.event")
6119 (synopsis "Event publishing system for Python")
6120 (description "Zope.event provides an event publishing API, intended for
6121 use by applications which are unaware of any subscribers to their events. It
6122 is a simple event-dispatching system on which more sophisticated event
6123 dispatching systems can be built.")
6124 (license zpl2.1)))
6125
6126 (define-public python2-zope-event
6127 (package-with-python2 python-zope-event))
6128
6129 (define-public python-zope-interface
6130 (package
6131 (name "python-zope-interface")
6132 (version "4.1.3")
6133 (source
6134 (origin
6135 (method url-fetch)
6136 (uri (string-append "https://pypi.python.org/packages/source/z"
6137 "/zope.interface/zope.interface-" version ".tar.gz"))
6138 (sha256
6139 (base32
6140 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6141 (build-system python-build-system)
6142 (propagated-inputs
6143 `(("python-zope-event" ,python-zope-event)))
6144 (home-page "https://github.com/zopefoundation/zope.interface")
6145 (synopsis "Python implementation of the \"design by contract\"
6146 methodology")
6147 (description "Zope.interface provides an implementation of \"object
6148 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6149 conforming to a given API or contract.")
6150 (license zpl2.1)))
6151
6152 (define-public python2-zope-interface
6153 (package-with-python2 python-zope-interface))
6154
6155 (define-public python-zope-exceptions
6156 (package
6157 (name "python-zope-exceptions")
6158 (version "4.0.8")
6159 (source
6160 (origin
6161 (method url-fetch)
6162 (uri (string-append "https://pypi.python.org/packages/source/z"
6163 "/zope.exceptions/zope.exceptions-"
6164 version ".tar.gz"))
6165 (sha256
6166 (base32
6167 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6168 (build-system python-build-system)
6169 (arguments
6170 '(#:tests? #f)) ; circular dependency with zope.testrunner
6171 (propagated-inputs
6172 `(("python-zope-interface" ,python-zope-interface)))
6173 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6174 (synopsis "Zope exceptions")
6175 (description "Zope.exceptions provides general-purpose exception types
6176 that have uses outside of the Zope framework.")
6177 (license zpl2.1)))
6178
6179 (define-public python2-zope-exceptions
6180 (package-with-python2 python-zope-exceptions))
6181
6182 (define-public python-zope-testing
6183 (package
6184 (name "python-zope-testing")
6185 (version "4.5.0")
6186 (source
6187 (origin
6188 (method url-fetch)
6189 (uri (string-append "https://pypi.python.org/packages/source/z"
6190 "/zope.testing/zope.testing-" version ".tar.gz"))
6191 (sha256
6192 (base32
6193 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6194 (build-system python-build-system)
6195 (native-inputs
6196 `(("python-zope-exceptions" ,python-zope-exceptions)))
6197 (propagated-inputs
6198 `(("python-zope-interface" ,python-zope-interface)))
6199 (home-page "http://pypi.python.org/pypi/zope.testing")
6200 (synopsis "Zope testing helpers")
6201 (description "Zope.testing provides a number of testing utilities for HTML
6202 forms, HTTP servers, regular expressions, and more.")
6203 (license zpl2.1)))
6204
6205 (define-public python2-zope-testing
6206 (package-with-python2 python-zope-testing))
6207
6208 (define-public python-zope-testrunner
6209 (package
6210 (name "python-zope-testrunner")
6211 (version "4.4.9")
6212 (source
6213 (origin
6214 (method url-fetch)
6215 (uri (string-append "https://pypi.python.org/packages/source/z"
6216 "/zope.testrunner/zope.testrunner-"
6217 version ".zip"))
6218 (sha256
6219 (base32
6220 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6221 (build-system python-build-system)
6222 (native-inputs
6223 `(("python-six" ,python-six)
6224 ("python-zope-exceptions" ,python-zope-exceptions)
6225 ("python-zope-testing" ,python-zope-testing)
6226 ("unzip" ,unzip)))
6227 (propagated-inputs
6228 `(("python-zope-interface" ,python-zope-interface)))
6229 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6230 (synopsis "Zope testrunner script")
6231 (description "Zope.testrunner provides a script for running Python
6232 tests.")
6233 (license zpl2.1)))
6234
6235 (define-public python2-zope-testrunner
6236 (let ((base (package-with-python2 python-zope-testrunner)))
6237 (package
6238 (inherit base)
6239 (native-inputs
6240 (append (package-native-inputs base)
6241 `(("python2-subunit" ,python2-subunit)
6242 ("python2-mimeparse" ,python2-mimeparse)))))))
6243
6244 (define-public python-zope-i18nmessageid
6245 (package
6246 (name "python-zope-i18nmessageid")
6247 (version "4.0.3")
6248 (source
6249 (origin
6250 (method url-fetch)
6251 (uri (string-append
6252 "https://pypi.python.org/packages/source/z"
6253 "/zope.i18nmessageid/zope.i18nmessageid-"
6254 version ".tar.gz"))
6255 (sha256
6256 (base32
6257 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6258 (build-system python-build-system)
6259 (inputs
6260 `(("python-setuptools" ,python-setuptools)))
6261 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6262 (synopsis "Message identifiers for internationalization")
6263 (description "Zope.i18nmessageid provides facilities for declaring
6264 internationalized messages within program source text.")
6265 (license zpl2.1)))
6266
6267 (define-public python2-zope-i18nmessageid
6268 (package-with-python2 python-zope-i18nmessageid))
6269
6270 (define-public python-zope-schema
6271 (package
6272 (name "python-zope-schema")
6273 (version "4.4.2")
6274 (source
6275 (origin
6276 (method url-fetch)
6277 (uri (string-append "https://pypi.python.org/packages/source/z"
6278 "/zope.schema/zope.schema-" version ".tar.gz"))
6279 (sha256
6280 (base32
6281 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6282 (build-system python-build-system)
6283 (propagated-inputs
6284 `(("python-zope-event" ,python-zope-event)
6285 ("python-zope-interface" ,python-zope-interface)))
6286 (native-inputs
6287 `(("python-zope-testing" ,python-zope-testing)))
6288 (home-page "http://pypi.python.org/pypi/zope.schema")
6289 (synopsis "Zope data schemas")
6290 (description "Zope.scheme provides extensions to zope.interface for
6291 defining data schemas.")
6292 (license zpl2.1)))
6293
6294 (define-public python2-zope-schema
6295 (package-with-python2 python-zope-schema))
6296
6297 (define-public python-zope-configuration
6298 (package
6299 (name "python-zope-configuration")
6300 (version "4.0.3")
6301 (source (origin
6302 (method url-fetch)
6303 (uri (string-append "https://pypi.python.org/packages/source/z"
6304 "/zope.configuration/zope.configuration-"
6305 version ".tar.gz"))
6306 (sha256
6307 (base32
6308 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6309 (build-system python-build-system)
6310 (propagated-inputs
6311 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6312 ("python-zope-schema" ,python-zope-schema)))
6313 (home-page "http://pypi.python.org/pypi/zope.configuration")
6314 (synopsis "Zope Configuration Markup Language")
6315 (description "Zope.configuration implements ZCML, the Zope Configuration
6316 Markup Language.")
6317 (license zpl2.1)))
6318
6319 (define-public python2-zope-configuration
6320 (package-with-python2 python-zope-configuration))
6321
6322 (define-public python-zope-proxy
6323 (package
6324 (name "python-zope-proxy")
6325 (version "4.1.6")
6326 (source
6327 (origin
6328 (method url-fetch)
6329 (uri (string-append "https://pypi.python.org/packages/source/z"
6330 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6331 (sha256
6332 (base32
6333 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6334 (build-system python-build-system)
6335 (propagated-inputs
6336 `(("python-zope-interface" ,python-zope-interface)))
6337 (home-page "http://pypi.python.org/pypi/zope.proxy")
6338 (synopsis "Generic, transparent proxies")
6339 (description "Zope.proxy provides generic, transparent proxies for Python.
6340 Proxies are special objects which serve as mostly-transparent wrappers around
6341 another object, intervening in the apparent behavior of the wrapped object
6342 only when necessary to apply the policy (e.g., access checking, location
6343 brokering, etc.) for which the proxy is responsible.")
6344 (license zpl2.1)))
6345
6346 (define-public python2-zope-proxy
6347 (package-with-python2 python-zope-proxy))
6348
6349 (define-public python-zope-location
6350 (package
6351 (name "python-zope-location")
6352 (version "4.0.3")
6353 (source
6354 (origin
6355 (method url-fetch)
6356 (uri (string-append "https://pypi.python.org/packages/source/z"
6357 "/zope.location/zope.location-" version ".tar.gz"))
6358 (sha256
6359 (base32
6360 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6361 (build-system python-build-system)
6362 (native-inputs
6363 `(("python-zope-proxy" ,python-zope-proxy)
6364 ("python-zope-schema" ,python-zope-schema)))
6365 (home-page "http://pypi.python.org/pypi/zope.location/")
6366 (synopsis "Zope location library")
6367 (description "Zope.location implements the concept of \"locations\" in
6368 Zope3, which are are special objects that have a structural location.")
6369 (license zpl2.1)))
6370
6371 (define-public python2-zope-location
6372 (package-with-python2 python-zope-location))
6373
6374 (define-public python-zope-security
6375 (package
6376 (name "python-zope-security")
6377 (version "4.0.3")
6378 (source
6379 (origin
6380 (method url-fetch)
6381 (uri (string-append "https://pypi.python.org/packages/source/z"
6382 "/zope.security/zope.security-" version ".tar.gz"))
6383 (sha256
6384 (base32
6385 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6386 (build-system python-build-system)
6387 (propagated-inputs
6388 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6389 ("python-zope-component" ,python-zope-component)
6390 ("python-zope-location" ,python-zope-location)
6391 ("python-zope-proxy" ,python-zope-proxy)
6392 ("python-zope-schema" ,python-zope-schema)
6393 ("python-zope-testrunner" ,python-zope-testrunner)
6394 ("python-zope-testing" ,python-zope-testing)))
6395 (home-page "http://pypi.python.org/pypi/zope.security")
6396 (synopsis "Zope security framework")
6397 (description "Zope.security provides a generic mechanism to implement
6398 security policies on Python objects.")
6399 (license zpl2.1)))
6400
6401 (define-public python2-zope-security
6402 (let ((zope-security (package-with-python2 python-zope-security)))
6403 (package (inherit zope-security)
6404 (propagated-inputs
6405 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6406 ,@(alist-delete
6407 "python-zope-testrunner"
6408 (package-propagated-inputs zope-security)))))))
6409
6410 (define-public python-zope-component
6411 (package
6412 (name "python-zope-component")
6413 (version "4.2.2")
6414 (source
6415 (origin
6416 (method url-fetch)
6417 (uri (string-append "https://pypi.python.org/packages/source/z"
6418 "/zope.component/zope.component-" version ".tar.gz"))
6419 (sha256
6420 (base32
6421 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6422 (build-system python-build-system)
6423 (arguments
6424 ;; Skip tests due to circular dependency with python-zope-security.
6425 '(#:tests? #f))
6426 (native-inputs
6427 `(("python-zope-testing" ,python-zope-testing)))
6428 (propagated-inputs
6429 `(("python-zope-event" ,python-zope-event)
6430 ("python-zope-interface" ,python-zope-interface)
6431 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6432 ("python-zope-configuration" ,python-zope-configuration)))
6433 (home-page "https://github.com/zopefoundation/zope.component")
6434 (synopsis "Zope Component Architecture")
6435 (description "Zope.component represents the core of the Zope Component
6436 Architecture. Together with the zope.interface package, it provides
6437 facilities for defining, registering and looking up components.")
6438 (license zpl2.1)))
6439
6440 (define-public python2-zope-component
6441 (package-with-python2 python-zope-component))
6442
6443 (define-public python2-pythondialog
6444 (package
6445 (name "python2-pythondialog")
6446 (version "3.3.0")
6447 (source
6448 (origin
6449 (method url-fetch)
6450 (uri (string-append "https://pypi.python.org/packages/source/p/"
6451 "python2-pythondialog/python2-pythondialog-"
6452 version ".tar.gz"))
6453 (sha256
6454 (base32
6455 "1yhkagsh99bfi592ymczf8rnw8rk6n9hdqy3dd98m3yrx8zmjvry"))))
6456 (build-system python-build-system)
6457 (arguments
6458 `(#:phases
6459 (modify-phases %standard-phases
6460 (add-after 'unpack 'patch-path
6461 (lambda* (#:key inputs #:allow-other-keys)
6462 (let* ((dialog (assoc-ref inputs "dialog")))
6463 ;; Since this library really wants to grovel the search path, we
6464 ;; must hardcode dialog's store path into it.
6465 (substitute* "dialog.py"
6466 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6467 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6468 #t))))
6469 #:python ,python-2
6470 #:tests? #f)) ; no test suite
6471 (propagated-inputs
6472 `(("dialog" ,dialog)))
6473 (home-page "http://pythondialog.sourceforge.net/")
6474 (synopsis "Python interface to the UNIX dialog utility")
6475 (description "A Python wrapper for the dialog utility. Its purpose is to
6476 provide an easy to use, pythonic and comprehensive Python interface to dialog.
6477 This allows one to make simple text-mode user interfaces on Unix-like systems")
6478 (license lgpl2.1)))
6479
6480 (define-public python-pyrfc3339
6481 (package
6482 (name "python-pyrfc3339")
6483 (version "0.2")
6484 (source
6485 (origin
6486 (method url-fetch)
6487 (uri (string-append "https://pypi.python.org/packages/source/p/"
6488 "pyRFC3339/pyRFC3339-" version ".tar.gz"))
6489 (sha256
6490 (base32
6491 "1pp648xsjaw9h1xq2mgwzda5wis2ypjmzxlksc1a8grnrdmzy155"))))
6492 (build-system python-build-system)
6493 (propagated-inputs
6494 `(("python-pytz" ,python-pytz)))
6495 (native-inputs
6496 `(("python-nose" ,python-nose)
6497 ("python-setuptools" ,python-setuptools)))
6498 (home-page "https://github.com/kurtraschke/pyRFC3339")
6499 (synopsis "Python timestamp library")
6500 (description "Python library for generating and parsing RFC 3339-compliant
6501 timestamps.")
6502 (license license:expat)))
6503
6504 (define-public python2-pyrfc3339
6505 (package-with-python2 python-pyrfc3339))
6506
6507 (define-public python-werkzeug
6508 (package
6509 (name "python-werkzeug")
6510 (version "0.11.2")
6511 (source
6512 (origin
6513 (method url-fetch)
6514 (uri (string-append "https://pypi.python.org/packages/source/W/Werkzeug"
6515 "/Werkzeug-" version ".tar.gz"))
6516 (file-name (string-append name "-" version ".tar.gz"))
6517 (sha256
6518 (base32
6519 "1gzwn1lkl90f3l1nzzxr7vjhm21qk8f837i8rvny5a209fcrhkzb"))))
6520 (build-system python-build-system)
6521 (native-inputs
6522 `(("python-pytest" ,python-pytest)))
6523 (home-page "http://werkzeug.pocoo.org/")
6524 (synopsis "Utilities for WSGI applications")
6525 (description "One of the most advanced WSGI utility modules. It includes a
6526 powerful debugger, full-featured request and response objects, HTTP utilities to
6527 handle entity tags, cache control headers, HTTP dates, cookie handling, file
6528 uploads, a powerful URL routing system and a bunch of community-contributed
6529 addon modules.")
6530 (license x11)))
6531
6532 (define-public python2-werkzeug
6533 (package-with-python2 python-werkzeug))
6534
6535 (define-public python-configobj
6536 (package
6537 (name "python-configobj")
6538 (version "5.0.6")
6539 (source (origin
6540 (method url-fetch)
6541 (uri (string-append
6542 "https://pypi.python.org/packages/source/c/configobj/"
6543 "configobj-" version ".tar.gz"))
6544 (sha256
6545 (base32
6546 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6547 ;; Patch setup.py so it looks for python-setuptools, which is
6548 ;; required to parse the keyword 'install_requires' in setup.py.
6549 (patches (list (search-patch "python-configobj-setuptools.patch")))))
6550 (build-system python-build-system)
6551 (native-inputs
6552 `(("python-setuptools" ,python-setuptools)
6553 ("python-six" ,python-six)))
6554 (synopsis "Config file reading, writing and validation")
6555 (description "ConfigObj is a simple but powerful config file reader and
6556 writer: an ini file round tripper. Its main feature is that it is very easy to
6557 use, with a straightforward programmer’s interface and a simple syntax for
6558 config files.")
6559 (home-page "https://github.com/DiffSK/configobj")
6560 (license bsd-3)))
6561
6562 (define-public python2-configobj
6563 (package-with-python2 python-configobj))
6564
6565 (define-public python-configargparse
6566 (package
6567 (name "python-configargparse")
6568 (version "0.10.0")
6569 (source (origin
6570 (method url-fetch)
6571 (uri (string-append
6572 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6573 "ConfigArgParse-" version ".tar.gz"))
6574 (sha256
6575 (base32
6576 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6577 (build-system python-build-system)
6578 (arguments
6579 ;; FIXME: Bug in test suite filed upstream:
6580 ;; https://github.com/bw2/ConfigArgParse/issues/32
6581 '(#:tests? #f))
6582 (synopsis "Replacement for argparse")
6583 (description "A drop-in replacement for argparse that allows options to also
6584 be set via config files and/or environment variables.")
6585 (home-page "https://github.com/bw2/ConfigArgParse")
6586 (license license:expat)))
6587
6588 (define-public python2-configargparse
6589 (package-with-python2 python-configargparse))
6590
6591 (define-public python-ndg-httpsclient
6592 (package
6593 (name "python-ndg-httpsclient")
6594 (version "0.4.0")
6595 (source (origin
6596 (method url-fetch)
6597 (uri (string-append
6598 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6599 "ndg_httpsclient-" version ".tar.gz"))
6600 (sha256
6601 (base32
6602 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6603 (build-system python-build-system)
6604 (propagated-inputs
6605 `(("python-pyopenssl" ,python-pyopenssl)))
6606 (synopsis "HTTPS support for Python's httplib and urllib2")
6607 (description "This is a HTTPS client implementation for httplib and urllib2
6608 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6609 over the default provided with Python and importantly enables full verification
6610 of the SSL peer.")
6611 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6612 (license bsd-3)))
6613
6614 ;; python2-openssl requires special care, so package-with-python2 is
6615 ;; insufficient.
6616 (define-public python2-ndg-httpsclient
6617 (package (inherit python-ndg-httpsclient)
6618 (name "python2-ndg-httpsclient")
6619 (arguments `(#:python ,python-2))
6620 (propagated-inputs
6621 `(("python2-pyopenssl" ,python2-pyopenssl)))))