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