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