gnu: Add python2-pycrypto.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
da6dd842 3;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
03411993 4;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
ad320b20 10;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
f4de5b3b 11;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
a01b6da7
NK
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
1ffa7090 29(define-module (gnu packages python)
011b18c3 30 #:use-module ((guix licenses)
45203542 31 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
b8050e71 32 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
4ed20663 33 psfl public-domain x11-style))
bd3fa666 34 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
3fdc99da 35 #:use-module (gnu packages)
1ffa7090 36 #:use-module (gnu packages compression)
4ed20663 37 #:use-module (gnu packages databases)
4ed20663 38 #:use-module (gnu packages fontutils)
3fdc99da 39 #:use-module (gnu packages gdbm)
4ed20663
AE
40 #:use-module (gnu packages gcc)
41 #:use-module (gnu packages ghostscript)
42 #:use-module (gnu packages glib)
43 #:use-module (gnu packages gtk)
421a80a2 44 #:use-module (gnu packages icu4c)
c937562e 45 #:use-module (gnu packages image)
4ed20663 46 #:use-module (gnu packages imagemagick)
b10ab723 47 #:use-module (gnu packages libffi)
0da98533 48 #:use-module (gnu packages maths)
4ed20663 49 #:use-module (gnu packages multiprecision)
45203542 50 #:use-module (gnu packages networking)
be7134bf 51 #:use-module (gnu packages ncurses)
c9b1b4f9 52 #:use-module (gnu packages pcre)
4ed20663 53 #:use-module (gnu packages perl)
b10ab723 54 #:use-module (gnu packages pkg-config)
4ed20663 55 #:use-module (gnu packages readline)
c9b1b4f9 56 #:use-module (gnu packages statistics)
1c65314c
FB
57 #:use-module (gnu packages texlive)
58 #:use-module (gnu packages texinfo)
cc2b77df 59 #:use-module (gnu packages tls)
8d12be1e 60 #:use-module (gnu packages web)
ce0614dd 61 #:use-module (gnu packages base)
26b307e2 62 #:use-module (gnu packages xml)
6fa14469 63 #:use-module (gnu packages xorg)
4ed20663 64 #:use-module (gnu packages zip)
a01b6da7
NK
65 #:use-module (guix packages)
66 #:use-module (guix download)
ea5456c8 67 #:use-module (guix git-download)
11bb85a1 68 #:use-module (guix utils)
acc26ff1 69 #:use-module (guix build-system gnu)
898238b9 70 #:use-module (guix build-system python)
1c65314c
FB
71 #:use-module (guix build-system trivial)
72 #:use-module (srfi srfi-1))
a01b6da7 73
b24d1cfc 74(define-public python-2
a01b6da7
NK
75 (package
76 (name "python")
ee2b5109 77 (version "2.7.6")
a01b6da7
NK
78 (source
79 (origin
80 (method url-fetch)
9b43a0ff 81 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7 82 version "/Python-" version ".tar.xz"))
b88e1b0a
EB
83 (patches (list (search-patch "python-libffi-mips-n32-fix.patch")
84 (search-patch "python2-sqlite-3.8.4-test-fix.patch")))
32d5c729 85 (patch-flags '("-p0"))
a01b6da7
NK
86 (sha256
87 (base32
ee2b5109 88 "18gnpyh071dxa0rv3silrz92jw9qpblswzwv4gzqcwxzz20qxmhz"))))
a01b6da7 89 (build-system gnu-build-system)
3fdc99da 90 (arguments
af807dea
AE
91 `(#:tests? #f
92;; 258 tests OK.
93;; 103 tests failed:
94;; test_bz2 test_distutils test_file test_file2k test_popen2
95;; test_shutil test_signal test_site test_slice test_smtplib
96;; test_smtpnet test_socket test_socketserver test_softspace
97;; test_sort test_sqlite test_ssl test_startfile test_str
98;; test_strftime test_string test_stringprep test_strop test_strptime
99;; test_strtod test_struct test_structmembers test_structseq
100;; test_subprocess test_sunaudiodev test_sundry test_symtable
101;; test_syntax test_sys test_sys_setprofile test_sys_settrace
102;; test_sysconfig test_tarfile test_tcl test_telnetlib test_tempfile
103;; test_textwrap test_thread test_threaded_import
104;; test_threadedtempfile test_threading test_threading_local
105;; test_threadsignals test_time test_timeout test_tk test_tokenize
106;; test_tools test_trace test_traceback test_transformer
107;; test_ttk_guionly test_ttk_textonly test_tuple test_typechecks
108;; test_ucn test_unary test_undocumented_details test_unicode
109;; test_unicode_file test_unicodedata test_univnewlines
110;; test_univnewlines2k test_unpack test_urllib test_urllib2
111;; test_urllib2_localnet test_urllib2net test_urllibnet test_urlparse
112;; test_userdict test_userlist test_userstring test_uu test_uuid
113;; test_wait3 test_wait4 test_warnings test_wave test_weakref
114;; test_weakset test_whichdb test_winreg test_winsound test_with
115;; test_wsgiref test_xdrlib test_xml_etree test_xml_etree_c
116;; test_xmllib test_xmlrpc test_xpickle test_xrange test_zipfile
117;; test_zipfile64 test_zipimport test_zipimport_support test_zlib
118;; 31 tests skipped:
119;; test_aepack test_al test_applesingle test_ascii_formatd test_bsddb
120;; test_bsddb185 test_bsddb3 test_cd test_cl test_codecmaps_cn
121;; test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr
122;; test_codecmaps_tw test_ctypes test_curses test_dl test_gdb test_gl
123;; test_imageop test_imgfile test_ioctl test_kqueue
124;; test_linuxaudiodev test_macos test_macostools test_msilib
125;; test_multiprocessing test_ossaudiodev test_pep277
126;; test_scriptpackages
127;; 7 skips unexpected on linux2:
128;; test_ascii_formatd test_bsddb test_bsddb3 test_ctypes test_gdb
129;; test_ioctl test_multiprocessing
130;; One of the typical errors:
131;; test_unicode
132;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No such file or directory
133 #:test-target "test"
3fdc99da
CR
134 #:configure-flags
135 (let ((bz2 (assoc-ref %build-inputs "bzip2"))
136 (gdbm (assoc-ref %build-inputs "gdbm"))
b10ab723 137 (libffi (assoc-ref %build-inputs "libffi"))
b88e1b0a 138 (sqlite (assoc-ref %build-inputs "sqlite"))
3fdc99da
CR
139 (openssl (assoc-ref %build-inputs "openssl"))
140 (readline (assoc-ref %build-inputs "readline"))
1f434457
MW
141 (zlib (assoc-ref %build-inputs "zlib"))
142 (out (assoc-ref %outputs "out")))
fd982732 143 (list "--enable-shared" ; allow embedding
b10ab723 144 "--with-system-ffi" ; build ctypes
fd982732 145 (string-append "CPPFLAGS="
3fdc99da
CR
146 "-I" bz2 "/include "
147 "-I" gdbm "/include "
b88e1b0a 148 "-I" sqlite "/include "
3fdc99da
CR
149 "-I" openssl "/include "
150 "-I" readline "/include "
151 "-I" zlib "/include")
152 (string-append "LDFLAGS="
153 "-L" bz2 "/lib "
154 "-L" gdbm "/lib "
b10ab723 155 "-L" libffi "/lib "
b88e1b0a 156 "-L" sqlite "/lib "
3fdc99da
CR
157 "-L" openssl "/lib "
158 "-L" readline "/lib "
1f434457
MW
159 "-L" zlib "/lib "
160 "-Wl,-rpath=" out "/lib")))
fd982732 161
46472ecd
MW
162 #:modules ((ice-9 ftw)
163 ,@%gnu-build-system-modules)
fd982732 164 #:phases
46472ecd
MW
165 (modify-phases %standard-phases
166 (add-before
167 'configure 'patch-lib-shells
168 (lambda _
169 ;; Filter for existing files, since some may not exist in all
170 ;; versions of python that are built with this recipe.
171 (substitute* (filter file-exists?
172 '("Lib/subprocess.py"
173 "Lib/popen2.py"
174 "Lib/distutils/tests/test_spawn.py"
175 "Lib/test/test_subprocess.py"))
176 (("/bin/sh") (which "sh")))
177 #t))
178 (add-before
179 'check 'pre-check
180 (lambda _
181 ;; 'Lib/test/test_site.py' needs a valid $HOME
182 (setenv "HOME" (getcwd))
183 #t))
184 (add-after
185 'unpack 'set-source-file-times-to-1980
186 ;; XXX One of the tests uses a ZIP library to pack up some of the
187 ;; source tree, and fails with "ZIP does not support timestamps
188 ;; before 1980". Work around this by setting the file times in the
189 ;; source tree to sometime in early 1980.
190 (lambda _
191 (let ((circa-1980 (* 10 366 24 60 60)))
192 (ftw "." (lambda (file stat flag)
193 (utime file circa-1980 circa-1980)
194 #t))
195 #t))))))
a01b6da7 196 (inputs
3fdc99da
CR
197 `(("bzip2" ,bzip2)
198 ("gdbm" ,gdbm)
b10ab723 199 ("libffi" ,libffi) ; for ctypes
b88e1b0a 200 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 201 ("openssl" ,openssl)
3fdc99da 202 ("readline" ,readline)
1f434457 203 ("zlib" ,zlib)))
b10ab723
CR
204 (native-inputs
205 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
206 (native-search-paths
207 (list (search-path-specification
208 (variable "PYTHONPATH")
af070955 209 (files '("lib/python2.7/site-packages")))))
a01b6da7
NK
210 (home-page "http://python.org")
211 (synopsis
35b9e423 212 "High-level, dynamically-typed programming language")
a01b6da7
NK
213 (description
214 "Python is a remarkably powerful dynamic programming language that
215is used in a wide variety of application domains. Some of its key
216distinguishing features include: clear, readable syntax; strong
217introspection capabilities; intuitive object orientation; natural
218expression of procedural code; full modularity, supporting hierarchical
219packages; exception-based error handling; and very high level dynamic
220data types.")
221 (license psfl)))
acc26ff1 222
b24d1cfc
AE
223(define-public python
224 (package (inherit python-2)
08c04509 225 (version "3.4.3")
717003e3
LC
226 (source (origin
227 (method url-fetch)
228 (uri (string-append "https://www.python.org/ftp/python/"
229 version "/Python-" version ".tar.xz"))
4c50e5ab
MW
230 (patches (list (search-patch "python-fix-tests.patch")
231 ;; XXX Try removing this patch for python > 3.4.3
232 (search-patch "python-disable-ssl-test.patch")))
717003e3
LC
233 (patch-flags '("-p0"))
234 (sha256
235 (base32
08c04509 236 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
1f434457
MW
237 (arguments (substitute-keyword-arguments (package-arguments python-2)
238 ((#:tests? _) #t)))
1aebc0cb
AE
239 (native-search-paths
240 (list (search-path-specification
241 (variable "PYTHONPATH")
0e05d01e
SB
242 (files (list (string-append "lib/python"
243 (version-major+minor version)
244 "/site-packages"))))))))
f26a77ff 245
898238b9
AE
246(define-public python-wrapper
247 (package (inherit python)
248 (name "python-wrapper")
249 (source #f)
250 (build-system trivial-build-system)
3c0f2329 251 (propagated-inputs `(("python" ,python)))
898238b9
AE
252 (arguments
253 `(#:modules ((guix build utils))
254 #:builder
255 (begin
256 (use-modules (guix build utils))
257 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
258 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
259 (mkdir-p bin)
260 (for-each
261 (lambda (old new)
262 (symlink (string-append python old)
263 (string-append bin "/" new)))
264 `("python3", "pydoc3", "idle3")
265 `("python", "pydoc", "idle"))))))
266 (description (string-append (package-description python)
267 "\n\nThis wrapper package provides symbolic links to the python binaries
268 without version suffix."))))
269
aaf625b8
RW
270(define-public python-psutil
271 (package
272 (name "python-psutil")
273 (version "3.0.1")
274 (source
275 (origin
276 (method url-fetch)
277 (uri (string-append
278 "https://pypi.python.org/packages/source/p/psutil/psutil-"
279 version ".tar.gz"))
280 (sha256
281 (base32
282 "00c8h1mzqysih99z8pnbmdv117d2naldf11yjy50dhykxsf3n89z"))))
283 (build-system python-build-system)
284 (native-inputs
285 `(("python-setuptools" ,python-setuptools)))
286 (home-page "https://pypi.python.org/pypi/psutil/")
287 (synopsis "Library for retrieving information on running processes")
288 (description
289 "psutil (Python system and process utilities) is a library for retrieving
290information on running processes and system utilization (CPU, memory, disks,
291network) in Python. It is useful mainly for system monitoring, profiling and
292limiting process resources and management of running processes. It implements
293many functionalities offered by command line tools such as: ps, top, lsof,
294netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
295pidof, tty, taskset, pmap.")
296 (license bsd-3)))
297
298(define-public python2-psutil
299 (package-with-python2 python-psutil))
898238b9 300
89114f39 301(define-public python-pytz
acc26ff1 302 (package
89114f39 303 (name "python-pytz")
acc26ff1
CR
304 (version "2013b")
305 (source
306 (origin
307 (method url-fetch)
308 (uri (string-append "https://launchpad.net/pytz/main/" version
309 "/+download/pytz-" version ".tar.bz2"))
310 (sha256
311 (base32
312 "19giwgfcrg0nr1gdv49qnmf2jb2ilkcfc7qyqvfpz4dp0p64ksv5"))))
313 (build-system python-build-system)
8498b8cf 314 (arguments `(#:tests? #f)) ; no test target
acc26ff1 315 (home-page "https://launchpad.net/pytz")
9e771e3b 316 (synopsis "Python timezone library")
acc26ff1
CR
317 (description
318 "This library allows accurate and cross platform timezone calculations
319using Python 2.4 or higher and provides access to the Olson timezone database.")
320 (license x11)))
5ace6e2f 321
89114f39 322(define-public python2-pytz
11bb85a1 323 (package-with-python2 python-pytz))
89114f39 324
fc50e9c6 325
89114f39 326(define-public python-babel
5ace6e2f 327 (package
89114f39 328 (name "python-babel")
e1804763 329 (version "1.3")
5ace6e2f
CR
330 (source
331 (origin
332 (method url-fetch)
e1804763 333 (uri (string-append "https://pypi.python.org/packages/source/B/Babel/Babel-"
5ace6e2f
CR
334 version ".tar.gz"))
335 (sha256
336 (base32
e1804763 337 "0bnin777lc53nxd1hp3apq410jj5wx92n08h7h4izpl4f4sx00lz"))))
5ace6e2f
CR
338 (build-system python-build-system)
339 (inputs
e1804763
AE
340 `(("python-pytz" ,python-pytz)
341 ("python-setuptools" ,python-setuptools)))
8498b8cf 342 (arguments `(#:tests? #f)) ; no test target
e1804763 343 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
344 (synopsis
345 "Tools for internationalizing Python applications")
346 (description
347 "Babel is composed of two major parts:
348- tools to build and work with gettext message catalogs
349- a Python interface to the CLDR (Common Locale Data Repository), providing
350access to various locale display names, localized number and date formatting,
351etc. ")
352 (license bsd-3)))
89114f39
AE
353
354(define-public python2-babel
11bb85a1 355 (package-with-python2 python-babel))
73adf220 356
ed377cc6
RW
357(define-public python2-backport-ssl-match-hostname
358 (package
359 (name "python2-backport-ssl-match-hostname")
360 (version "3.4.0.2")
361 (source
362 (origin
363 (method url-fetch)
364 (uri (string-append
365 "https://pypi.python.org/packages/source/b/"
366 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
367 version ".tar.gz"))
368 (sha256
369 (base32
370 "1bnn47ipvhy49n0m50v27lp4xj6sqdkdw676ypd7pawsn1zhwh87"))))
371 (build-system python-build-system)
372 (arguments `(#:python ,python-2))
373 (inputs
374 `(("python2-setuptools" ,python2-setuptools)))
375 (home-page "https://pypi.python.org/pypi/backports.ssl_match_hostname")
376 (synopsis "Backport of ssl.match_hostname() function from Python 3.4")
377 (description
378 "This backport brings the ssl.match_hostname() function to users of
379earlier versions of Python. The function checks the hostname in the
380certificate returned by the server to which a connection has been established,
381and verifies that it matches the intended target hostname.")
382 (license psfl)))
383
ef5cbf9b
RW
384(define-public python-h5py
385 (package
386 (name "python-h5py")
387 (version "2.4.0")
388 (source
389 (origin
390 (method url-fetch)
391 (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-"
392 version ".tar.gz"))
393 (sha256
394 (base32
395 "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps"))))
396 (build-system python-build-system)
397 (inputs
398 `(("python-cython" ,python-cython)
399 ("python-numpy" ,python-numpy)
400 ("hdf5" ,hdf5)))
401 (native-inputs
402 `(("python-setuptools" ,python-setuptools)))
403 (arguments `(#:tests? #f)) ; no test target
404 (home-page "http://www.h5py.org/")
405 (synopsis "Read and write HDF5 files from Python")
406 (description
407 "The h5py package provides both a high- and low-level interface to the
408HDF5 library from Python. The low-level interface is intended to be a
409complete wrapping of the HDF5 API, while the high-level component supports
410access to HDF5 files, datasets and groups using established Python and NumPy
411concepts.")
412 (license bsd-3)))
413
414(define-public python2-h5py
415 (let ((h5py (package-with-python2 python-h5py)))
416 (package (inherit h5py)
417 (inputs
418 `(("python2-numpy" ,python2-numpy)
419 ,@(alist-delete
420 "python-numpy"
421 (package-inputs h5py)))))))
422
c1448c69
EB
423(define-public python-lockfile
424 (package
425 (name "python-lockfile")
426 (version "0.9.1")
427 (source
428 (origin
429 (method url-fetch)
430 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
431 "lockfile-" version ".tar.gz"))
432 (sha256
433 (base32
434 "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
435 (build-system python-build-system)
436 (arguments '(#:test-target "check"))
437 (home-page "http://code.google.com/p/pylockfile/")
438 (synopsis "Platform-independent file locking module")
439 (description
440 "The lockfile package exports a LockFile class which provides a simple
441API for locking files.")
bd3fa666 442 (license license:expat)))
c1448c69
EB
443
444(define-public python2-lockfile
445 (package-with-python2 python-lockfile))
446
5a1a4bf6
EB
447(define-public python-mock
448 (package
449 (name "python-mock")
450 (version "1.0.1")
451 (source
452 (origin
453 (method url-fetch)
454 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
455 "mock-" version ".tar.gz"))
456 (sha256
457 (base32
458 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
459 (build-system python-build-system)
460 (arguments '(#:test-target "check"))
07af3e5e 461 (home-page "http://code.google.com/p/mock/")
9e771e3b 462 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
463 (description
464 "Mock is a library for testing in Python. It allows you to replace parts
465of your system under test with mock objects and make assertions about how they
466have been used.")
bd3fa666 467 (license license:expat)))
5a1a4bf6
EB
468
469(define-public python2-mock
470 (package-with-python2 python-mock))
471
fc50e9c6 472
73adf220
AE
473(define-public python-setuptools
474 (package
475 (name "python-setuptools")
d3d656c5 476 (version "12.1")
73adf220
AE
477 (source
478 (origin
479 (method url-fetch)
480 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
481 version ".tar.gz"))
482 (sha256
483 (base32
d3d656c5 484 "04bfk7si1pwj3b5k2b1x9b1zkiclybmzpw6alrs5bciri56lg9zs"))))
73adf220 485 (build-system python-build-system)
d3d656c5
AE
486 ;; FIXME: Tests require pytest, which itself relies on setuptools.
487 ;; One could bootstrap with an internal untested setuptools.
73adf220 488 (arguments
824af8ca 489 `(#:tests? #f))
73adf220
AE
490 (home-page "https://pypi.python.org/pypi/setuptools")
491 (synopsis
492 "Library designed to facilitate packaging Python projects")
493 (description
494 "Setuptools is a fully-featured, stable library designed to facilitate
495packaging Python projects, where packaging includes:
496Python package and module definitions,
497distribution package metadata,
498test hooks,
499project installation,
500platform-specific details,
501Python 3 support.")
502 (license psfl)))
503
504(define-public python2-setuptools
505 (package-with-python2 python-setuptools))
fc50e9c6
AE
506
507
cafc3f5a
EB
508(define-public python-pycrypto
509 (package
510 (name "python-pycrypto")
511 (version "2.6.1")
512 (source
513 (origin
514 (method url-fetch)
515 (uri (string-append "https://pypi.python.org/packages/source/p/"
516 "pycrypto/pycrypto-" version ".tar.gz"))
517 (sha256
518 (base32
519 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
520 (build-system python-build-system)
521 (native-inputs
522 `(("python-setuptools" ,python-setuptools)))
523 (inputs
524 `(("python" ,python)
525 ("gmp" ,gmp)))
526 (arguments
527 `(#:phases
528 (alist-cons-before
529 'build 'set-build-env
530 ;; pycrypto runs an autoconf configure script behind the scenes
531 (lambda _
532 (setenv "CONFIG_SHELL" (which "bash")))
533 %standard-phases)))
534 (home-page "http://www.pycrypto.org/")
535 (synopsis "Cryptographic modules for Python")
536 (description
537 "Pycrypto is a collection of both secure hash functions (such as SHA256
538and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 539etc.). The package is structured to make adding new modules easy.")
cafc3f5a
EB
540 (license public-domain)))
541
345f0611
ED
542(define-public python2-pycrypto
543 (package-with-python2 python-pycrypto))
544
cafc3f5a
EB
545(define-public python-keyring
546 (package
547 (name "python-keyring")
548 (version "3.8")
549 (source
550 (origin
551 (method url-fetch)
552 (uri (string-append "https://pypi.python.org/packages/source/k/"
553 "keyring/keyring-" version ".zip"))
554 (sha256
555 (base32
556 "1vxazfbcwggyfyramh55shkxs08skhpqrkm6lrrjnygnm8c1l2zg"))))
557 (build-system python-build-system)
558 (native-inputs
559 `(("unzip" ,unzip)
560 ("python-setuptools" ,python-setuptools)
561 ("python-mock" ,python-mock)))
562 (inputs
563 `(("python-pycrypto" ,python-pycrypto)))
564 (arguments
565 `(#:tests? #f ;TODO: tests require pytest
566 #:phases
567 (alist-replace
568 'unpack
569 (lambda _
570 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
571 "/bin/unzip"))
572 (source (assoc-ref %build-inputs "source")))
573 (and (zero? (system* unzip source))
574 (chdir (string-append "keyring-" ,version)))))
575 %standard-phases)))
576 (home-page "http://bitbucket.org/kang/python-keyring-lib")
577 (synopsis "Store and access your passwords safely")
578 (description
579 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 580service from python. It can be used in any application that needs safe
cafc3f5a
EB
581password storage.")
582 ;; "MIT" and PSF dual license
583 (license x11)))
584
a480bc41
EB
585(define-public python-six
586 (package
587 (name "python-six")
588 (version "1.7.2")
589 (source
590 (origin
591 (method url-fetch)
592 (uri (string-append "https://pypi.python.org/packages/source/s/"
593 "six/six-" version ".tar.gz"))
594 (sha256
595 (base32
596 "164rns26aqfqx2hwi0qq3scl50s69japn0fvgvrjsbyg7r1mxf67"))))
597 (build-system python-build-system)
598 (inputs
599 `(("python-setuptools" ,python-setuptools)))
600 (home-page "http://pypi.python.org/pypi/six/")
601 (synopsis "Python 2 and 3 compatibility utilities")
602 (description
35b9e423 603 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
604functions for smoothing over the differences between the Python versions with
605the goal of writing Python code that is compatible on both Python versions.
35b9e423 606Six supports every Python version since 2.5. It is contained in only one
a480bc41
EB
607Python file, so it can be easily copied into your project.")
608 (license x11)))
609
0c20025c
AE
610(define-public python2-six
611 (package-with-python2 python-six))
612
cafc3f5a
EB
613(define-public python-dateutil-2
614 (package
615 (name "python-dateutil")
616 (version "2.2")
617 (source
618 (origin
619 (method url-fetch)
620 (uri (string-append "https://pypi.python.org/packages/source/p/"
621 name "/" name "-" version ".tar.gz"))
622 (sha256
623 (base32
624 "0s74ad6r789810s10dxgvaf48ni6adac2icrdad34zxygqq6bj7f"))))
625 (build-system python-build-system)
626 (inputs
627 `(("python-setuptools" ,python-setuptools)
628 ("python-six" ,python-six)))
629 (home-page "http://labix.org/python-dateutil")
630 (synopsis "Extensions to the standard datetime module")
631 (description
632 "The dateutil module provides powerful extensions to the standard
633datetime module, available in Python 2.3+.")
634 (license bsd-3)))
635
636(define-public python2-dateutil-2
637 (package-with-python2 python-dateutil-2))
638
fc50e9c6
AE
639(define-public python-dateutil
640 (package
641 (name "python-dateutil")
642 (version "1.5") ; last version for python < 3
643 (source
644 (origin
645 (method url-fetch)
cafc3f5a
EB
646 (uri (string-append "http://labix.org/download/python-dateutil/"
647 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
648 (sha256
649 (base32
650 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
651 (build-system python-build-system)
652 (inputs
653 `(("python-setuptools" ,python-setuptools)))
654 (home-page "http://labix.org/python-dateutil")
cafc3f5a 655 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
656 (description
657 "The dateutil module provides powerful extensions to the standard
658datetime module, available in Python 2.3+.")
659 (license psfl)))
660
661(define-public python2-dateutil
662 (package-with-python2 python-dateutil))
1d08c01f 663
cafc3f5a
EB
664(define-public python-parsedatetime
665 (package
666 (name "python-parsedatetime")
667 (version "1.2")
668 (source
669 (origin
670 (method url-fetch)
671 (uri (string-append "https://pypi.python.org/packages/source/p/"
672 "parsedatetime/parsedatetime-" version ".tar.gz"))
673 (sha256
674 (base32
675 "1zcj0pzxvpl4j2ma9awmpkfxldybi2kjaahjjpmgfbg5cxwcjsqv"))))
676 (build-system python-build-system)
677 (native-inputs
678 `(("python-setuptools" ,python-setuptools)))
679 (arguments `(#:tests? #f)) ;no test target
680 (home-page "http://github.com/bear/parsedatetime/")
681 (synopsis
682 "Parse human-readable date/time text")
683 (description
e881752c 684 "Parse human-readable date/time text.")
cafc3f5a
EB
685 (license asl2.0)))
686
d072efcb
RW
687(define-public python-pandas
688 (package
689 (name "python-pandas")
690 (version "0.16.0")
691 (source
692 (origin
693 (method url-fetch)
694 (uri (string-append "https://pypi.python.org/packages/source/p/"
695 "pandas/pandas-" version ".tar.gz"))
696 (sha256
697 (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0"))))
698 (build-system python-build-system)
699 (arguments
700 `(;; Three tests fail:
701 ;; - test_read_google
702 ;; - test_read_yahoo
703 ;; - test_month_range_union_tz_dateutil
704 #:tests? #f))
705 (propagated-inputs
706 `(("python-numpy" ,python-numpy)
707 ("python-pytz" ,python-pytz)
708 ("python-dateutil" ,python-dateutil-2)))
709 (native-inputs
710 `(("python-nose" ,python-nose)
711 ("python-setuptools" ,python-setuptools)))
712 (home-page "http://pandas.pydata.org")
713 (synopsis "Data structures for data analysis, time series, and statistics")
714 (description
715 "Pandas is a Python package providing fast, flexible, and expressive data
716structures designed to make working with structured (tabular,
717multidimensional, potentially heterogeneous) and time series data both easy
718and intuitive. It aims to be the fundamental high-level building block for
719doing practical, real world data analysis in Python.")
720 (license bsd-3)))
721
722(define-public python2-pandas
723 (package-with-python2 python-pandas))
724
cafc3f5a
EB
725(define-public python-tzlocal
726 (package
727 (name "python-tzlocal")
728 (version "1.1.1")
729 (source
730 (origin
731 (method url-fetch)
732 (uri (string-append "https://pypi.python.org/packages/source/t/"
733 "tzlocal/tzlocal-" version ".zip"))
734 (sha256
735 (base32
736 "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9"))))
737 (build-system python-build-system)
738 (native-inputs
739 `(("unzip" ,unzip)
740 ("python-setuptools" ,python-setuptools)))
741 (inputs `(("python-pytz" ,python-pytz)))
742 (arguments
743 `(#:phases
744 (alist-replace
745 'unpack
746 (lambda _
747 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
748 "/bin/unzip"))
749 (source (assoc-ref %build-inputs "source")))
750 (and (zero? (system* unzip source))
751 (chdir (string-append "tzlocal-" ,version)))))
752 %standard-phases)))
753 (home-page "https://github.com/regebro/tzlocal")
754 (synopsis
35b9e423 755 "Local timezone information for Python")
cafc3f5a
EB
756 (description
757 "Tzlocal returns a tzinfo object with the local timezone information.
758This module attempts to fix a glaring hole in pytz, that there is no way to
759get the local timezone information, unless you know the zoneinfo name, and
760under several distributions that's hard or impossible to figure out.")
761 (license cc0)))
762
be7134bf
RW
763(define-public python-pysam
764 (package
765 (name "python-pysam")
766 (version "0.8.1")
767 (source
768 (origin
769 (method url-fetch)
770 (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-"
771 version ".tar.gz"))
772 (sha256
773 (base32
774 "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459"))))
775 (build-system python-build-system)
776 (arguments
777 `(#:tests? #f ; tests are excluded in the manifest
778 #:phases
779 (alist-cons-before
780 'build 'set-flags
781 (lambda _
782 (setenv "LDFLAGS" "-lncurses")
783 (setenv "CFLAGS" "-D_CURSES_LIB=1"))
784 %standard-phases)))
785 (inputs
786 `(("python-cython" ,python-cython)
787 ("python-setuptools" ,python-setuptools)
788 ("ncurses" ,ncurses)
789 ("zlib" ,zlib)))
790 (home-page "https://github.com/pysam-developers/pysam")
791 (synopsis "Python bindings to the SAMtools C API")
792 (description
793 "Pysam is a Python module for reading and manipulating files in the
794SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It
795also includes an interface for tabix.")
bd3fa666 796 (license license:expat)))
be7134bf
RW
797
798(define-public python2-pysam
799 (package-with-python2 python-pysam))
1d08c01f
AE
800
801(define-public python2-pysqlite
802 (package
803 (name "python2-pysqlite")
7a03af70 804 (version "2.6.3a") ; see below
1d08c01f
AE
805 (source
806 (origin
807 (method url-fetch)
7a03af70
LC
808 ;; During the switch from code.google.com to pypi.python.org, the 2.6.3
809 ;; tarball was modified, but the version number was kept:
810 ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>.
811 ;; Here we want to refer to the pypi-hosted 2.6.3 tarball.
812 (uri (string-append
813 "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-"
814 "2.6.3" ".tar.gz"))
1d08c01f
AE
815 (sha256
816 (base32
7a03af70 817 "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y"))))
1d08c01f
AE
818 (build-system python-build-system)
819 (inputs
820 `(("sqlite" ,sqlite)))
821 (arguments
822 `(#:python ,python-2 ; incompatible with Python 3
823 #:tests? #f)) ; no test target
7a03af70
LC
824 (home-page "https://pypi.python.org/pypi/pysqlite")
825 (synopsis "SQLite bindings for Python")
1d08c01f
AE
826 (description
827 "Pysqlite provides SQLite bindings for Python that comply to the
828Database API 2.0T.")
ed0cdf83 829 (license license:zlib)))
1d08c01f 830
2875caf5
AE
831
832(define-public python2-mechanize
833 (package
834 (name "python2-mechanize")
835 (version "0.2.5")
836 (source
837 (origin
838 (method url-fetch)
839 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
840 version ".tar.gz"))
841 (sha256
842 (base32
843 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
844 (build-system python-build-system)
845 (inputs
846 `(("python2-setuptools" ,python2-setuptools)))
847 (arguments
848 `(#:python ,python-2 ; apparently incompatible with Python 3
849 #:tests? #f))
850 ;; test fails with message
851 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
852 ;; (python-3.3.2) or
853 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
854 ;; (python-2.7.5).
855 ;; The source code is from March 2011 and probably not up-to-date
856 ;; with respect to python unit tests.
857 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
858 (synopsis
859 "Stateful programmatic web browsing in Python")
860 (description
861 "Mechanize implements stateful programmatic web browsing in Python,
862after Andy Lester’s Perl module WWW::Mechanize.")
166191b3 863 (license (non-copyleft "file://COPYING"
e881752c 864 "See COPYING in the distribution."))))
2875caf5 865
0352532e
AE
866
867(define-public python-simplejson
868 (package
869 (name "python-simplejson")
870 (version "3.3.0")
871 (source
872 (origin
873 (method url-fetch)
874 (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-"
875 version ".tar.gz"))
876 (sha256
877 (base32
878 "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks"))))
879 (build-system python-build-system)
880 (home-page "http://simplejson.readthedocs.org/en/latest/")
881 (synopsis
882 "Json library for Python")
883 (description
e881752c
AK
884 "JSON (JavaScript Object Notation) is a subset of JavaScript
885syntax (ECMA-262 3rd edition) used as a lightweight data interchange
886format.
0352532e
AE
887
888Simplejson exposes an API familiar to users of the standard library marshal
889and pickle modules. It is the externally maintained version of the json
890library contained in Python 2.6, but maintains compatibility with Python 2.5
891and (currently) has significant performance advantages, even without using
892the optional C extension for speedups. Simplejson is also supported on
893Python 3.3+.")
894 (license x11)))
895
896(define-public python2-simplejson
897 (package-with-python2 python-simplejson))
421a80a2
AE
898
899
900(define-public python2-pyicu
901 (package
902 (name "python2-pyicu")
569ac046 903 (version "1.8")
421a80a2
AE
904 (source
905 (origin
906 (method url-fetch)
907 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
908 version ".tar.gz"))
909 (sha256
910 (base32
569ac046 911 "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw"))))
421a80a2
AE
912 (build-system python-build-system)
913 (inputs
914 `(("icu4c" ,icu4c)))
915 (arguments
916 `(#:python ,python-2 ; Python 3 works also, but needs special care for
917 ; linking with libpython3.3m
918 #:tests? #f)) ; no check target
919 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 920 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
921 (description
922 "PyICU is a python extension wrapping the ICU C++ API.")
923 (license x11)))
cc20a22a
LC
924
925(define-public python2-dogtail
926 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
927 ;; spaces in indentation" with Python 3.
928 (package
929 (name "python2-dogtail")
930 (version "0.8.2")
931 (source (origin
932 (method url-fetch)
933 (uri (string-append
934 "https://fedorahosted.org/released/dogtail/dogtail-"
935 version ".tar.gz"))
936 (sha256
937 (base32
938 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
939 (build-system python-build-system)
940 (arguments `(#:python ,python-2
941 #:tests? #f)) ; invalid command "test"
942 (home-page "https://fedorahosted.org/dogtail/")
943 (synopsis "GUI test tool and automation framework written in ​Python")
944 (description
35b9e423 945 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
946It uses Accessibility (a11y) technologies to communicate with desktop
947applications. dogtail scripts are written in Python and executed like any
948other Python program.")
949 (license gpl2+)))
515e6878 950
011b18c3
LC
951(define-public python2-empy
952 (package
953 (name "python2-empy")
954 (version "3.3")
955 (source (origin
956 (method url-fetch)
957 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
958 version ".tar.gz"))
959 (sha256
960 (base32
961 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
962 (build-system python-build-system)
963 (arguments
964 `(#:python ,python-2
965 #:phases (alist-replace
966 'check
967 (lambda _
968 (zero? (system* "./test.sh")))
969 %standard-phases)))
970 (home-page "http://www.alcyone.com/software/empy/")
971 (synopsis "Templating system for Python")
972 (description
973 "EmPy is a system for embedding Python expressions and statements in
974template text; it takes an EmPy source file, processes it, and produces
975output. This is accomplished via expansions, which are special signals to the
976EmPy system and are set off by a special prefix (by default the at sign, @).
977EmPy can expand arbitrary Python expressions and statements in this way, as
978well as a variety of special forms. Textual data not explicitly delimited in
979this way is sent unaffected to the output, allowing Python to be used in
980effect as a markup language. Also supported are callbacks via hooks,
981recording and playback via diversions, and dynamic, chainable filters. The
982system is highly configurable via command line options and embedded
983commands.")
984 (license lgpl2.1+)))
985
8deeda0c
LC
986(define-public python2-element-tree
987 (package
988 (name "python2-element-tree")
989 (version "1.2.6")
990 (source (origin
991 (method url-fetch)
992 (uri (string-append
993 "http://effbot.org/media/downloads/elementtree-"
994 version "-20050316.tar.gz"))
995 (sha256
996 (base32
997 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
998 (build-system python-build-system)
999 (arguments
1000 `(#:python ,python-2 ; seems to be part of Python 3
1001 #:tests? #f)) ; no 'test' sub-command
1002 (synopsis "Toolkit for XML processing in Python")
1003 (description
1004 "ElementTree is a Python library supporting lightweight XML processing.")
1005 (home-page "http://effbot.org/zone/element-index.htm")
1006 (license (x11-style "http://docs.python.org/2/license.html"
1007 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
10080.9.0 THROUGH 1.2\"."))))
1009
1010(define-public python2-pybugz
1011 (package
1012 (name "python2-pybugz")
1013 (version "0.6.11")
1014 (source (origin
1015 (method url-fetch)
1016 (uri (string-append
1017 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1018 version ".tar.gz"))
1019 (sha256
1020 (base32
6f194a1e
LC
1021 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1022 (patches (map search-patch
1023 (list "pybugz-stty.patch"
1024 "pybugz-encode-error.patch")))))
8deeda0c
LC
1025 (build-system python-build-system)
1026 (arguments
1027 `(#:python ,python-2 ; SyntaxError with Python 3
1028 #:tests? #f)) ; no 'test' sub-command
1029 (inputs `(("element-tree" ,python2-element-tree)))
1030 (synopsis "Python and command-line interface to Bugzilla")
1031 (description
1032 "PyBugz is a Python library and command-line tool to query the Bugzilla
1033bug tracking system. It is meant as an aid to speed up interaction with the
1034bug tracker.")
1035 (home-page "http://www.liquidx.net/pybugz/")
1036 (license gpl2)))
1037
a480bc41
EB
1038(define-public python-enum34
1039 (package
1040 (name "python-enum34")
1041 (version "1.0")
1042 (source
1043 (origin
1044 (method url-fetch)
1045 (uri (string-append "https://pypi.python.org/packages/source/e/"
1046 "enum34/enum34-" version ".tar.gz"))
1047 (sha256
1048 (base32
1049 "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq"))))
1050 (build-system python-build-system)
1051 (inputs
1052 `(("python-setuptools" ,python-setuptools)))
1053 (arguments
1054 `(#:phases
1055 (alist-replace
1056 'check
1057 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1058 %standard-phases)))
1059 (home-page "https://pypi.python.org/pypi/enum34")
1060 (synopsis "Backported Python 3.4 Enum")
1061 (description
1062 "Enum34 is the new Python stdlib enum module available in Python 3.4
1063backported for previous versions of Python from 2.4 to 3.3.")
1064 (license bsd-3)))
1065
1066(define-public python-parse-type
1067 (package
1068 (name "python-parse-type")
1069 (version "0.3.4")
1070 (source
1071 (origin
1072 (method url-fetch)
1073 (uri (string-append "https://pypi.python.org/packages/source/p/"
1074 "parse_type/parse_type-" version ".tar.gz"))
1075 (sha256
1076 (base32
1077 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1078 (build-system python-build-system)
1079 (inputs
1080 `(("python-setuptools" ,python-setuptools)
1081 ("python-six" ,python-six)
1082 ("python-parse" ,python-parse)
1083 ("python-enum34" ,python-enum34))) ;required for python<3.4
1084 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1085 (home-page "https://github.com/jenisys/parse_type")
1086 (synopsis "Extended parse module")
1087 (description
1088 "Parse_type extends the python parse module.")
1089 (license bsd-3)))
1090
1091(define-public python-parse
1092 (package
1093 (name "python-parse")
1094 (version "1.6.4")
1095 (source
1096 (origin
1097 (method url-fetch)
1098 (uri (string-append "https://pypi.python.org/packages/source/p/"
1099 "parse/parse-" version ".tar.gz"))
1100 (sha256
1101 (base32
1102 "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57"))))
1103 (build-system python-build-system)
1104 (arguments
1105 `(#:phases
1106 (alist-replace
1107 'check
1108 (lambda _ (zero? (system* "python" "test_parse.py")))
1109 %standard-phases)))
1110 (home-page "https://github.com/r1chardj0n3s/parse")
1111 (synopsis "Parse strings")
1112 (description
1113 "Parse strings using a specification based on the Python format()
1114syntax.")
1115 (license x11)))
1116
1117
515e6878
LC
1118(define-public scons
1119 (package
1120 (name "scons")
a3f61425 1121 (version "2.3.4")
515e6878
LC
1122 (source (origin
1123 (method url-fetch)
1124 (uri (string-append "mirror://sourceforge/scons/scons-"
1125 version ".tar.gz"))
1126 (sha256
1127 (base32
a3f61425 1128 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1129 (build-system python-build-system)
1130 (arguments
1131 ;; With Python 3.x, fails to build with a syntax error.
1132 `(#:python ,python-2
1133 #:tests? #f)) ; no 'python setup.py test' command
1134 (home-page "http://scons.org/")
1135 (synopsis "Software construction tool written in Python")
1136 (description
1137 "SCons is a software construction tool. Think of SCons as an improved,
1138cross-platform substitute for the classic Make utility with integrated
1139functionality similar to autoconf/automake and compiler caches such as ccache.
1140In short, SCons is an easier, more reliable and faster way to build
1141software.")
1142 (license x11)))
011b18c3 1143
c15a5c0e
DT
1144(define-public python-extras
1145 (package
1146 (name "python-extras")
1147 (version "0.0.3")
1148 (source
1149 (origin
1150 (method url-fetch)
1151 (uri (string-append
1152 "https://pypi.python.org/packages/source/e/extras/extras-"
1153 version ".tar.gz"))
1154 (sha256
1155 (base32
1156 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1157 (build-system python-build-system)
1158 (inputs
1159 `(("python-setuptools" ,python-setuptools)))
1160 (arguments
1161 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1162 '(#:tests? #f))
1163 (home-page "https://github.com/testing-cabal/extras")
1164 (synopsis "Useful extensions to the Python standard library")
1165 (description
1166 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1167 (license license:expat)))
c15a5c0e
DT
1168
1169(define-public python2-extras
1170 (package-with-python2 python-extras))
1171
56ea0efd
DT
1172(define-public python-mimeparse
1173 (package
1174 (name "python-mimeparse")
1175 (version "0.1.4")
1176 (source
1177 (origin
1178 (method url-fetch)
1179 (uri (string-append
1180 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1181 version ".tar.gz"))
1182 (sha256
1183 (base32
1184 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1185 (build-system python-build-system)
1186 (inputs
1187 `(("python-setuptools" ,python-setuptools)))
1188 (arguments
1189 '(#:tests? #f)) ; no setup.py test command
1190 (home-page
1191 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1192 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1193 (description
1194 "Mimeparse provides basic functions for parsing MIME type names and
1195matching them against a list of media-ranges.")
bd3fa666 1196 (license license:expat)))
56ea0efd
DT
1197
1198(define-public python2-mimeparse
1199 (package-with-python2 python-mimeparse))
1200
4435427e
DT
1201(define-public python-nose
1202 (package
1203 (name "python-nose")
1204 (version "1.3.4")
1205 (source
1206 (origin
1207 (method url-fetch)
1208 (uri (string-append
1209 "https://pypi.python.org/packages/source/n/nose/nose-"
1210 version ".tar.gz"))
1211 (sha256
1212 (base32
1213 "00qymfgwg4iam4xi0w9bnv7lcb3fypq1hzfafzgs1rfmwaj67g3n"))))
1214 (build-system python-build-system)
1215 (inputs
1216 `(("python-setuptools" ,python-setuptools)))
1217 (arguments
1218 '(#:tests? #f)) ; FIXME: test suite fails
1219 (home-page "http://readthedocs.org/docs/nose/")
1220 (synopsis "Python testing library")
1221 (description
1222 "Nose extends the unittest library to make testing easier.")
1223 (license lgpl2.0+)))
1224
1225(define-public python2-nose
1226 (package-with-python2 python-nose))
1227
6cd9c356
DT
1228(define-public python-unittest2
1229 (package
1230 (name "python-unittest2")
1231 (version "0.5.1")
1232 (source
1233 (origin
1234 (method url-fetch)
1235 (uri (string-append
1236 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1237 version ".tar.gz"))
1238 (sha256
1239 (base32
1240 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1241 (build-system python-build-system)
1242 (inputs
1243 `(("python-setuptools" ,python-setuptools)))
1244 (home-page "http://pypi.python.org/pypi/unittest2")
1245 (synopsis "Python unit testing library")
1246 (description
1247 "Unittest2 is a replacement for the unittest module in the Python
1248standard library.")
1249 (license psfl)))
1250
1251(define-public python2-unittest2
1252 (package (inherit python-unittest2)
1253 (name "python2-unittest2")
1254 (version "0.5.1")
1255 (source
1256 (origin
1257 (method url-fetch)
1258 (uri (string-append
1259 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1260 version ".tar.gz"))
1261 (sha256
1262 (base32
1263 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1264 (inputs
1265 `(("python2-setuptools" ,python-setuptools)))
1266 (arguments
1267 `(#:python ,python-2
1268 #:tests? #f)))) ; no setup.py test command
1269
542ad60f
DT
1270(define-public python-py
1271 (package
1272 (name "python-py")
1273 (version "1.4.23")
1274 (source
1275 (origin
1276 (method url-fetch)
1277 (uri (string-append
1278 "https://pypi.python.org/packages/source/p/py/py-"
1279 version ".tar.gz"))
1280 (sha256
1281 (base32
1282 "1jkhffpai419v5rickm2vz86p9bkg3b3kcm2k4bi5wfajhw2m3xs"))))
1283 (build-system python-build-system)
1284 (inputs
1285 `(("python-setuptools" ,python-setuptools)))
1286 (home-page "http://pylib.readthedocs.org/")
1287 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1288 (description
1289 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1290code introspection, and logging.")
bd3fa666 1291 (license license:expat)))
542ad60f
DT
1292
1293(define-public python2-py
1294 (package-with-python2 python-py))
1295
855d4761
DT
1296(define-public python-pytest
1297 (package
1298 (name "python-pytest")
1299 (version "2.6.1")
1300 (source
1301 (origin
1302 (method url-fetch)
1303 (uri (string-append
1304 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1305 version ".tar.gz"))
1306 (sha256
1307 (base32
1308 "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
1309 (modules '((guix build utils)))
1310 (snippet
1311 ;; One of the tests involves the /usr directory, so it fails.
1312 '(substitute* "testing/test_argcomplete.py"
1313 (("def test_remove_dir_prefix\\(self\\):")
1314 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1315 (build-system python-build-system)
1316 (inputs
1317 `(("python-setuptools" ,python-setuptools)
1318 ("python-py" ,python-py)
1319 ("python-nose" ,python-nose)
1320 ("python-mock" ,python-mock)))
1321 (home-page "http://pytest.org")
1322 (synopsis "Python testing library")
1323 (description
1324 "Pytest is a testing tool that provides auto-discovery of test modules
1325and functions, detailed info on failing assert statements, modular fixtures,
1326and many external plugins.")
bd3fa666 1327 (license license:expat)))
855d4761
DT
1328
1329(define-public python2-pytest
1330 (package-with-python2 python-pytest))
1331
84d24017
DT
1332(define-public python-scripttest
1333 (package
1334 (name "python-scripttest")
1335 (version "1.3")
1336 (source
1337 (origin
1338 (method url-fetch)
1339 (uri (string-append
1340 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1341 version ".tar.gz"))
1342 (sha256
1343 (base32
1344 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1345 (build-system python-build-system)
1346 (inputs
1347 `(("python-setuptools" ,python-setuptools)
1348 ("python-pytest" ,python-pytest)))
1349 (home-page "http://pythonpaste.org/scripttest/")
1350 (synopsis "Python library to test command-line scripts")
1351 (description "Scripttest is a Python helper library for testing
1352interactive command-line applications. With it you can run a script in a
1353subprocess and see the output as well as any file modifications.")
bd3fa666 1354 (license license:expat)))
84d24017
DT
1355
1356(define-public python2-scripttest
1357 (package-with-python2 python-scripttest))
1358
d8fa80e1
DT
1359(define-public python-testtools
1360 (package
1361 (name "python-testtools")
1362 (version "1.0.0")
1363 (source
1364 (origin
1365 (method url-fetch)
1366 (uri (string-append
1367 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1368 version ".tar.gz"))
1369 (sha256
1370 (base32
1371 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1372 (build-system python-build-system)
0e88cbf8
CR
1373 (propagated-inputs
1374 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1375 (inputs
1376 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1377 ("python-extras" ,python-extras)))
1378 (home-page "https://github.com/testing-cabal/testtools")
1379 (synopsis
1380 "Extensions to the Python standard library unit testing framework")
1381 (description
1382 "Testtools extends the Python standard library unit testing framework to
1383provide matchers, more debugging information, and cross-Python
1384compatibility.")
1385 (license psfl)))
1386
1387(define-public python2-testtools
1388 (package-with-python2 python-testtools))
1389
5bf3afea
DT
1390(define-public python-testscenarios
1391 (package
1392 (name "python-testscenarios")
1393 (version "0.4")
1394 (source
1395 (origin
1396 (method url-fetch)
1397 (uri (string-append
1398 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1399 version ".tar.gz"))
1400 (sha256
1401 (base32
1402 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1403 (build-system python-build-system)
1404 (inputs
1405 `(("python-setuptools" ,python-setuptools)
1406 ("python-testtools" ,python-testtools)
1407 ("python-mimeparse" ,python-mimeparse)))
1408 (home-page "https://launchpad.net/testscenarios")
1409 (synopsis "Pyunit extension for dependency injection")
1410 (description
1411 "Testscenarios provides clean dependency injection for Python unittest
1412style tests.")
1413 (license (list bsd-3 asl2.0)))) ; at the user's option
1414
1415(define-public python2-testscenarios
1416 (package-with-python2 python-testscenarios))
1417
dac79ecc
DT
1418(define-public python-testresources
1419 (package
1420 (name "python-testresources")
1421 (version "0.2.7")
1422 (source
1423 (origin
1424 (method url-fetch)
1425 (uri (string-append
1426 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1427 version ".tar.gz"))
1428 (sha256
1429 (base32
1430 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1431 (build-system python-build-system)
1432 (inputs
1433 `(("python-setuptools" ,python-setuptools)))
1434 (home-page "https://launchpad.net/testresources")
1435 (synopsis
1436 "Pyunit extension for managing test resources")
1437 (description
1438 "Testresources is an extension to Python's unittest to allow declarative
1439use of resources by test cases.")
1440 (license (list bsd-3 asl2.0)))) ; at the user's option
1441
1442(define-public python2-testresources
1443 (package-with-python2 python-testresources))
1444
070ab058
DT
1445(define-public python-subunit
1446 (package
1447 (name "python-subunit")
1448 (version "0.0.21")
1449 (source
1450 (origin
1451 (method url-fetch)
1452 (uri (string-append
1453 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1454 version ".tar.gz"))
1455 (sha256
1456 (base32
1457 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1458 (build-system python-build-system)
1459 (inputs
1460 `(("python-setuptools" ,python-setuptools)
1461 ("python-testtools" ,python-testtools)
1462 ("python-mimeparse" ,python-mimeparse)
1463 ("python-testscenarios" ,python-testscenarios)))
1464 (home-page "http://launchpad.net/subunit")
1465 (synopsis "Python implementation of the subunit protocol")
1466 (description
1467 "Python-subunit is a Python implementation of the subunit test streaming
1468protocol.")
1469 (license (list bsd-3 asl2.0)))) ; at the user's option
1470
1471(define-public python2-subunit
1472 (package-with-python2 python-subunit))
1473
cd49454b
DT
1474(define-public python-fixtures
1475 (package
1476 (name "python-fixtures")
1477 (version "0.3.16")
1478 (source
1479 (origin
1480 (method url-fetch)
1481 (uri (string-append
1482 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1483 version ".tar.gz"))
1484 (sha256
1485 (base32
1486 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1487 (build-system python-build-system)
1488 (inputs
1489 `(("python-setuptools" ,python-setuptools)))
1490 (arguments
1491 '(#:tests? #f)) ; no setup.py test command
1492 (home-page "https://launchpad.net/python-fixtures")
1493 (synopsis "Python test fixture library")
1494 (description
1495 "Fixtures provides a way to create reusable state, useful when writing
1496Python tests.")
1497 (license (list bsd-3 asl2.0)))) ; at user's option
1498
1499(define-public python2-fixtures
1500 (package-with-python2 python-fixtures))
1501
b24a0c00
DT
1502(define-public python-testrepository
1503 (package
1504 (name "python-testrepository")
1505 (version "0.0.20")
1506 (source
1507 (origin
1508 (method url-fetch)
1509 (uri (string-append
1510 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1511 version ".tar.gz"))
1512 (sha256
1513 (base32
1514 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1515 (build-system python-build-system)
1516 (inputs
1517 `(("python-setuptools" ,python-setuptools)
1518 ("python-testtools" ,python-testtools)
1519 ("python-subunit" ,python-subunit)
1520 ("python-fixtures" ,python-fixtures)
1521 ("python-mimeparse" ,python-mimeparse)))
1522 (home-page "https://launchpad.net/testrepository")
1523 (synopsis "Database for Python test results")
1524 (description "Testrepository provides a database of test results which can
1525be used as part of a developer's workflow to check things such as what tests
1526have failed since the last commit or what tests are currently failing.")
1527 (license (list bsd-3 asl2.0)))) ; at user's option
1528
1529(define-public python2-testrepository
1530 (package-with-python2 python-testrepository))
1531
243a009a
DT
1532(define-public python-coverage
1533 (package
1534 (name "python-coverage")
1535 (version "3.7.1")
1536 (source
1537 (origin
1538 (method url-fetch)
1539 (uri (string-append
1540 "https://pypi.python.org/packages/source/c/coverage/coverage-"
1541 version ".tar.gz"))
1542 (sha256
1543 (base32
1544 "0knlbq79g2ww6xzsyknj9rirrgrgc983dpa2d9nkdf31mb2a3bni"))))
1545 (build-system python-build-system)
1546 (inputs
1547 `(("python-setuptools" ,python-setuptools)))
1548 (home-page "http://nedbatchelder.com/code/coverage")
1549 (synopsis "Code coverage measurement for Python")
1550 (description
1551 "Coverage measures code coverage, typically during test execution. It
1552uses the code analysis tools and tracing hooks provided in the Python standard
1553library to determine which lines are executable, and which have been
1554executed.")
1555 (license bsd-3)))
1556
1557(define-public python2-coverage
1558 (package-with-python2 python-coverage))
1559
041358fb
DT
1560(define-public python-discover
1561 (package
1562 (name "python-discover")
1563 (version "0.4.0")
1564 (source
1565 (origin
1566 (method url-fetch)
1567 (uri (string-append
1568 "https://pypi.python.org/packages/source/d/discover/discover-"
1569 version ".tar.gz"))
1570 (sha256
1571 (base32
1572 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1573 (build-system python-build-system)
1574 (inputs
1575 `(("python-setuptools" ,python-setuptools)))
1576 (home-page "http://pypi.python.org/pypi/discover/")
1577 (synopsis
1578 "Python test discovery for unittest")
1579 (description
1580 "Discover provides test discovery for unittest, a feature that has been
e881752c 1581backported from Python 2.7 for Python 2.4+.")
041358fb
DT
1582 (license bsd-3)))
1583
1584(define-public python2-discover
1585 (package-with-python2 python-discover))
1586
a480bc41
EB
1587(define-public behave
1588 (package
1589 (name "behave")
1590 (version "1.2.4")
1591 (source (origin
1592 (method url-fetch)
1593 (uri (string-append "https://pypi.python.org/packages/source/b/"
1594 name "/" name "-" version ".tar.gz"))
1595 (sha256
1596 (base32
1597 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
1598 (build-system python-build-system)
1599 (inputs
1600 `(("python-setuptools" ,python-setuptools)
1601 ("python-six" ,python-six)
1602 ("python-enum43" ,python-enum34)
1603 ("python-parse" ,python-parse)
1604 ("python-parse-type" ,python-parse-type)))
1605 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
1606 ;PyHamcrest>=1.8
1607 (home-page "http://github.com/behave/behave")
1608 (synopsis "Python behavior-driven development")
1609 (description
1610 "Behave is a tool for behavior-driven development in python.
1611Behavior-driven development (or BDD) is an agile software development
1612technique that encourages collaboration between developers, QA and
1613non-technical or business participants in a software project. Behave uses
1614tests written in a natural language style, backed up by Python code.")
1615 (license x11)))
c7303d3c
DT
1616
1617(define-public python-exif-read
1618 (package
1619 (name "python-exif-read")
1620 (version "1.4.2")
1621 (source (origin
1622 (method url-fetch)
1623 (uri
1624 (string-append
1625 "https://pypi.python.org/packages/source/E/ExifRead/ExifRead-"
1626 version ".tar.gz"))
1627 (sha256
1628 (base32
1629 "17c627gcdmyc05hz4zk8qs4pjgw6rc68qzjzgz8gh1cmpsd7acf1"))))
1630 (build-system python-build-system)
1631 (inputs
1632 `(("python-setuptools" ,python-setuptools)))
1633 (arguments `(#:tests? #f)) ; no tests
1634 (home-page "https://github.com/ianare/exif-py")
1635 (synopsis "Python library to extract EXIF data from image files")
1636 (description
1637 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1638files.")
1639 (license bsd-3)))
1640
1641(define-public python2-exif-read
1642 (package-with-python2 python-exif-read))
d5f89b22
DT
1643
1644(define-public python-pyld
1645 (package
1646 (name "python-pyld")
1647 (version "0.6.0")
1648 (source (origin
1649 (method url-fetch)
1650 (uri
1651 (string-append
1652 "https://pypi.python.org/packages/source/P/PyLD/PyLD-"
1653 version ".tar.gz"))
1654 (sha256
1655 (base32
1656 "1l9ymj85fsvayqplinzpk0kyiq6m74ps9xd3a9fhlxfn1rldf8x8"))))
1657 (build-system python-build-system)
1658 (inputs
1659 `(("python-setuptools" ,python-setuptools)))
1660 (arguments `(#:tests? #f)) ; no tests
1661 (home-page "http://github.com/digitalbazaar/pyld")
1662 (synopsis "Python implementation of the JSON-LD specification")
1663 (description
1664 "PyLD is an implementation of the JSON-LD specification.")
1665 (license bsd-3)))
1666
1667(define-public python2-pyld
1668 (package-with-python2 python-pyld))
3a1f9a68
DT
1669
1670(define-public python-certifi
1671 (package
1672 (name "python-certifi")
1673 (version "14.05.14")
1674 (source (origin
1675 (method url-fetch)
1676 (uri
1677 (string-append
1678 "https://pypi.python.org/packages/source/c/certifi/certifi-"
1679 version ".tar.gz"))
1680 (sha256
1681 (base32
1682 "0s8vxzfz6s4m6fvxc7z25k9j35w0rh6jkw3wwcd1az1mssncn6qy"))))
1683 (build-system python-build-system)
1684 (inputs
1685 `(("python-setuptools" ,python-setuptools)))
1686 (arguments `(#:tests? #f)) ; no tests
1687 (home-page "http://python-requests.org/")
1688 (synopsis "Python CA certificate bundle")
1689 (description
1690 "Certifi is a Python library that contains a CA certificate bundle, which
1691is used by the Requests library to verify HTTPS requests.")
1692 (license asl2.0)))
1693
1694(define-public python2-certifi
1695 (package-with-python2 python-certifi))
e6cfbd36 1696
12c270dd
RW
1697(define-public python-click
1698 (package
1699 (name "python-click")
1700 (version "4.0")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (string-append
1705 "https://pypi.python.org/packages/source/c/click/click-"
1706 version ".tar.gz"))
1707 (sha256
1708 (base32 "0294x9g28w6zgswl0rsygkwi0wf6n480gf7fiiw5f9az3xhh77pl"))))
1709 (build-system python-build-system)
1710 (native-inputs
1711 `(("python-setuptools" ,python-setuptools)))
1712 (home-page "http://click.pocoo.org")
1713 (synopsis "Command line library for Python")
1714 (description
1715 "Click is a Python package for creating command line interfaces in a
1716composable way with as little code as necessary. Its name stands for
1717\"Command Line Interface Creation Kit\". It's highly configurable but comes
1718with sensible defaults out of the box.")
1719 (license bsd-3)))
1720
1721(define-public python2-click
1722 (package-with-python2 python-click))
1723
ae641128 1724(define-public python-requests
e6cfbd36 1725 (package
ae641128 1726 (name "python-requests")
e6cfbd36
DT
1727 (version "2.4.0")
1728 (source (origin
1729 (method url-fetch)
1730 (uri
1731 (string-append
1732 "https://pypi.python.org/packages/source/r/requests/requests-"
1733 version ".tar.gz"))
1734 (sha256
1735 (base32
1736 "0gknlfx1wakrrm1zi8gi03x2lzj4dsns0vjw0nsmgqvkphyf01vh"))))
1737 (build-system python-build-system)
1738 (inputs
1739 `(("python-setuptools" ,python-setuptools)
1740 ("python-certifi" ,python-certifi)))
ae641128 1741 (arguments `(#:tests? #f)) ; no tests
e6cfbd36
DT
1742 (home-page "http://python-requests.org/")
1743 (synopsis "Python HTTP library")
1744 (description
1745 "Requests is a Python HTTP client library. It aims to be easier to use
1746than Python’s urllib2 library.")
1747 (license asl2.0)))
864b5211 1748
ae641128
DT
1749(define-public python2-requests
1750 (package-with-python2 python-requests))
1751
864b5211
DT
1752(define-public python-jsonschema
1753 (package
1754 (name "python-jsonschema")
1755 (version "2.4.0")
1756 (source (origin
1757 (method url-fetch)
1758 (uri
1759 (string-append
1760 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1761 version ".tar.gz"))
1762 (sha256
1763 (base32
1764 "1yik3031ziygvq66rj3mzfqdgxj29sg1bkfc46wsgi7lnbqs560j"))))
1765 (build-system python-build-system)
1766 (inputs
1767 `(("python-setuptools" ,python-setuptools)))
1768 (home-page "http://github.com/Julian/jsonschema")
1769 (synopsis "Implementation of JSON Schema for Python")
1770 (description
1771 "Jsonschema is an implementation of JSON Schema for Python.")
bd3fa666 1772 (license license:expat)))
864b5211
DT
1773
1774(define-public python2-jsonschema
1775 (package-with-python2 python-jsonschema))
850189b8
DT
1776
1777(define-public python-unidecode
1778 (package
1779 (name "python-unidecode")
1780 (version "0.04.16")
1781 (source (origin
1782 (method url-fetch)
1783 (uri
1784 (string-append
1785 "https://pypi.python.org/packages/source/U/Unidecode/Unidecode-"
1786 version ".tar.gz"))
1787 (sha256
1788 (base32
1789 "0yv56vc49rvippyxgxvcyz7jklc07ky38rcspax7p00sgmriiljc"))))
1790 (build-system python-build-system)
1791 (inputs
1792 `(("python-setuptools" ,python-setuptools)))
1793 (home-page "https://pypi.python.org/pypi/Unidecode")
1794 (synopsis "ASCII transliterations of Unicode text")
1795 (description
1796 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1797useful when integrating with legacy code that doesn't support Unicode, or for
1798ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1799machine identifiers from human-readable Unicode strings that should still be
1800somewhat intelligeble.")
1801 (license gpl2+)))
1802
1803(define-public python2-unidecode
1804 (package-with-python2 python-unidecode))
6d45fef4
DT
1805
1806(define-public python-pyjwt
1807 (package
1808 (name "python-pyjwt")
1809 (version "0.2.1")
1810 (source
1811 (origin
1812 (method url-fetch)
1813 (uri (string-append
1814 "https://pypi.python.org/packages/source/P/PyJWT/PyJWT-"
1815 version ".tar.gz"))
1816 (sha256
1817 (base32
1818 "1ahqblfy2sj3xz34wsa48cn9rp0dspzq56p54i5znmws3b8gml6g"))))
1819 (build-system python-build-system)
1820 (inputs
1821 `(("python-setuptools" ,python-setuptools)))
1822 (arguments
1823 '(#:tests? #f)) ; test suite doesn't work
1824 (home-page "http://github.com/progrium/pyjwt")
1825 (synopsis "JSON Web Token implementation in Python")
1826 (description
1827 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 1828 (license license:expat)))
6d45fef4
DT
1829
1830(define-public python2-pyjwt
1831 (package-with-python2 python-pyjwt))
1832
2cec1f6f
DT
1833(define-public python-oauthlib
1834 (package
1835 (name "python-oauthlib")
1836 (version "0.6.3")
1837 (source (origin
1838 (method url-fetch)
1839 (uri
1840 (string-append
1841 "https://pypi.python.org/packages/source/o/oauthlib/oauthlib-"
1842 version ".tar.gz"))
1843 (sha256
1844 (base32
1845 "1yaj3j64la4arwsbhbfmpnickzh3jpg9nlpyg409v8pp24isn48a"))))
1846 (build-system python-build-system)
1847 (inputs
1848 `(("python-setuptools" ,python-setuptools)
1849 ("python-pyjwt" ,python-pyjwt)
1850 ("python-pycrypto" ,python-pycrypto)
1851 ("python-nose" ,python-nose)
1852 ("python-mock" ,python-mock)))
1853 (home-page "https://github.com/idan/oauthlib")
1854 (synopsis "OAuth implementation for Python")
1855 (description
1856 "Oauthlib is a generic, spec-compliant, thorough implementation of the
1857OAuth request-signing logic.")
1858 (license bsd-3)))
1859
1860(define-public python2-oauthlib
1861 (let ((base (package-with-python2 python-oauthlib)))
1862 (package
1863 (inherit base)
2cec1f6f
DT
1864 (inputs
1865 (append (package-inputs base)
1866 `(("python2-unittest2" ,python2-unittest2)))))))
ec5dbb5c
DT
1867
1868(define-public python-itsdangerous
1869 (package
1870 (name "python-itsdangerous")
1871 (version "0.24")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (string-append
1876 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
1877 version ".tar.gz"))
1878 (sha256
1879 (base32
1880 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
1881 (build-system python-build-system)
1882 (inputs
1883 `(("python-setuptools" ,python-setuptools)))
1884 (home-page "http://github.com/mitsuhiko/itsdangerous")
1885 (synopsis "Python library for passing data to/from untrusted environments")
1886 (description
1887 "Itsdangerous provides various helpers to pass trusted data to untrusted
1888environments and back.")
1889 (license bsd-3)))
1890
1891(define-public python2-itsdangerous
1892 (package-with-python2 python-itsdangerous))
5731cae3 1893
8d12be1e
RW
1894(define-public python-pyyaml
1895 (package
1896 (name "python-pyyaml")
1897 (version "3.11")
1898 (source
1899 (origin
1900 (method url-fetch)
1901 (uri (string-append
1902 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
1903 version ".tar.gz"))
1904 (sha256
1905 (base32
1906 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
1907 (build-system python-build-system)
1908 (inputs
1909 `(("libyaml" ,libyaml)))
1910 (native-inputs
1911 `(("python-setuptools" ,python-setuptools)))
1912 (home-page "http://pyyaml.org/wiki/PyYAML")
1913 (synopsis "YAML parser and emitter for Python")
1914 (description
1915 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
1916complete YAML 1.1 parser, Unicode support, pickle support, capable extension
1917API, and sensible error messages. PyYAML supports standard YAML tags and
1918provides Python-specific tags that allow to represent an arbitrary Python
1919object.")
1920 (license license:expat)))
1921
1922(define-public python2-pyyaml
1923 (package-with-python2 python-pyyaml))
1924
5731cae3
DT
1925(define-public python-virtualenv
1926 (package
1927 (name "python-virtualenv")
1928 (version "1.11.6")
1929 (source
1930 (origin
1931 (method url-fetch)
1932 (uri (string-append
1933 "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-"
1934 version ".tar.gz"))
1935 (sha256
1936 (base32
1937 "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy"))))
1938 (build-system python-build-system)
1939 (inputs
1940 `(("python-setuptools" ,python-setuptools)
1941 ("python-mock" ,python-mock)
1942 ("python-nose" ,python-nose)))
1943 (home-page "https://virtualenv.pypa.io/")
1944 (synopsis "Virtual Python environment builder")
1945 (description
1946 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 1947 (license license:expat)))
5731cae3
DT
1948
1949(define-public python2-virtualenv
1950 (package-with-python2 python-virtualenv))
8176d4d5
DT
1951
1952(define-public python-markupsafe
1953 (package
1954 (name "python-markupsafe")
1955 (version "0.23")
1956 (source
1957 (origin
1958 (method url-fetch)
1959 (uri (string-append
1960 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
1961 version ".tar.gz"))
1962 (sha256
1963 (base32
1964 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
1965 (build-system python-build-system)
1966 (inputs
1967 `(("python-setuptools" ,python-setuptools)))
1968 (home-page "http://github.com/mitsuhiko/markupsafe")
1969 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
1970 (description
1971 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
1972for Python.")
1973 (license bsd-3)))
1974
1975(define-public python2-markupsafe
1976 (package-with-python2 python-markupsafe))
fe34f0d1
DT
1977
1978(define-public python-jinja2
1979 (package
1980 (name "python-jinja2")
1981 (version "2.7.3")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (string-append
1986 "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-"
1987 version ".tar.gz"))
1988 (sha256
1989 (base32
1990 "1nwg9yfqgy421lncnm63k1zf9xkd1klc0jm0fr4p3dad01fsq91f"))))
1991 (build-system python-build-system)
1992 (inputs
1993 `(("python-setuptools" ,python-setuptools)
1994 ("python-markupsafe" ,python-markupsafe)))
1995 (home-page "http://jinja.pocoo.org/")
1996 (synopsis "Python template engine")
1997 (description
1998 "Jinja2 is a small but fast and easy to use stand-alone template engine
1999written in pure Python.")
2000 (license bsd-3)))
2001
2002(define-public python2-jinja2
2003 (package-with-python2 python-jinja2))
3580ab8b
DT
2004
2005(define-public python-docutils
2006 (package
2007 (name "python-docutils")
2008 (version "0.12")
2009 (source
2010 (origin
2011 (method url-fetch)
2012 (uri (string-append
2013 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2014 version ".tar.gz"))
2015 (sha256
2016 (base32
2017 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2018 (build-system python-build-system)
2019 (inputs
2020 `(("python-setuptools" ,python-setuptools)))
2021 (arguments
2022 '(#:tests? #f)) ; no setup.py test command
2023 (home-page "http://docutils.sourceforge.net/")
2024 (synopsis "Python Documentation Utilities")
2025 (description
2026 "Docutils is a modular system for processing documentation into useful
2027formats, such as HTML, XML, and LaTeX. For input Docutils supports
2028reStructuredText.")
2029 ;; Most of the source code is public domain, but some source files are
2030 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2031 (license (list public-domain psfl bsd-2 gpl3+))))
2032
2033(define-public python2-docutils
2034 (package-with-python2 python-docutils))
fb35b7c0
DT
2035
2036(define-public python-pygments
2037 (package
2038 (name "python-pygments")
2039 (version "1.6")
2040 (source
2041 (origin
2042 (method url-fetch)
2043 (uri (string-append
2044 "https://pypi.python.org/packages/source/P/Pygments/Pygments-"
2045 version ".tar.gz"))
2046 (sha256
2047 (base32
2048 "1h11r6ss8waih51vcksfvzghfxiav2f8svc0812fa5kmyz5d97kr"))))
2049 (build-system python-build-system)
2050 (inputs
2051 `(("python-setuptools" ,python-setuptools)))
2052 (home-page "http://pygments.org/")
2053 (synopsis "Syntax highlighting")
2054 (description
2055 "Pygments is a syntax highlighting package written in Python.")
2056 (license bsd-2)))
2057
2058(define-public python2-pygments
2059 (package-with-python2 python-pygments))
9dd6078d
DT
2060
2061(define-public python-sphinx
2062 (package
2063 (name "python-sphinx")
2064 (version "1.2.3")
2065 (source
2066 (origin
2067 (method url-fetch)
2068 (uri (string-append
2069 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2070 version ".tar.gz"))
2071 (sha256
2072 (base32
2073 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2074 (build-system python-build-system)
2075 (inputs
2076 `(("python-setuptools" ,python-setuptools)
2077 ("python-jinja2" ,python-jinja2)
2078 ("python-docutils" ,python-docutils)
2079 ("python-pygments" ,python-pygments)))
2080 (home-page "http://sphinx-doc.org/")
2081 (synopsis "Python documentation generator")
2082 (description "Sphinx is a tool that makes it easy to create documentation
2083for Python projects or other documents consisting of multiple reStructuredText
2084sources.")
2085 (license bsd-3)))
2086
2087(define-public python2-sphinx
2088 (package-with-python2 python-sphinx))
6888830b 2089
ad320b20
RW
2090(define-public python-sphinx-rtd-theme
2091 (package
2092 (name "python-sphinx-rtd-theme")
2093 (version "0.1.6")
2094 (source
2095 (origin
2096 (method url-fetch)
2097 (uri (string-append "https://pypi.python.org/packages/source/s/"
2098 "sphinx_rtd_theme/sphinx_rtd_theme-"
2099 version ".tar.gz"))
2100 (sha256
2101 (base32
2102 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2103 (build-system python-build-system)
2104 (arguments
2105 `(;; With standard flags, the install phase attempts to create a zip'd
2106 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2107 ;; before 1980'
2108 #:configure-flags '("--single-version-externally-managed"
2109 "--record=sphinx-rtd-theme.txt")))
2110 (native-inputs
2111 `(("python-setuptools" ,python-setuptools)))
2112 (inputs
2113 `(("python-docutils" ,python-docutils)
2114 ("python-sphinx" ,python-sphinx)))
2115 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2116 (synopsis "ReadTheDocs.org theme for Sphinx")
2117 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2118 (license license:expat)))
ad320b20
RW
2119
2120(define-public python2-sphinx-rtd-theme
2121 (package-with-python2 python-sphinx-rtd-theme))
2122
f4de5b3b
CAW
2123(define-public python-feedgenerator
2124 (package
2125 (name "python-feedgenerator")
2126 (version "20150710.97185b7")
2127 (source
2128 ;; Using the git checkout for now because license file not added till
2129 ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
2130 (origin
2131 (method git-fetch)
2132 (uri (git-reference
2133 (url "https://github.com/dmdm/feedgenerator-py3k.git")
2134 (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
2135 (sha256
2136 (base32
2137 "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
2138 (arguments
2139 `(;; With standard flags, the install phase attempts to create a zip'd
2140 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2141 ;; before 1980'
2142 #:configure-flags '("--single-version-externally-managed"
2143 "--record=feedgenerator.txt")))
2144 (build-system python-build-system)
2145 (inputs
2146 `(("python-setuptools" ,python-setuptools)
2147 ("python-pytz" ,python-pytz)
2148 ("python-six" ,python-six)))
2149 (home-page
2150 "https://github.com/dmdm/feedgenerator-py3k.git")
2151 (synopsis
2152 "Standalone version of Django's Atom/RSS feed generator")
2153 (description
2154 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2155which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2156 (license bsd-3)))
2157
2158(define-public python2-feedgenerator
2159 (package-with-python2 python-feedgenerator))
2160
59ad30e3
CAW
2161(define-public python-blinker
2162 (package
2163 (name "python-blinker")
2164 (version "1.3")
2165 (source
2166 (origin
2167 (method url-fetch)
2168 (uri (string-append
2169 "https://pypi.python.org/packages/source/b/blinker/blinker-"
2170 version ".tar.gz"))
2171 (sha256
2172 (base32
2173 "0bvfxkmjx6bpa302pv7v2vw5rwr3dlzjzfdp3bj628i6144024b8"))))
2174 (build-system python-build-system)
2175 (native-inputs
2176 `(("python-setuptools" ,python-setuptools)))
2177 ;; No "test" command supplied to setuptools, so unless there's another way
2178 ;; to run tests, we're skipping them!
2179 (arguments '(#:tests? #f))
2180 (home-page "http://pythonhosted.org/blinker/")
2181 (synopsis "Fast, simple object-to-object and broadcast signaling")
2182 (description
2183 "Blinker provides a fast dispatching system that allows any number of
2184interested parties to subscribe to events, or \"signals\".")
2185 (license license:expat)))
2186
2187(define-public python2-blinker
2188 (package-with-python2 python-blinker))
2189
b8050e71
CAW
2190(define-public pelican
2191 (package
2192 (name "pelican")
2193 (version "3.6.0")
2194 (source
2195 (origin
2196 (method url-fetch)
2197 (uri (string-append
2198 "https://pypi.python.org/packages/source/p/pelican/pelican-"
2199 version ".tar.gz"))
2200 (sha256
2201 (base32
2202 "0lbkk902mqxpp452pp76n6qcjv6f99lq2zl204xmqyzcan9zr3ps"))))
2203 (build-system python-build-system)
2204 (native-inputs
2205 `(("python-setuptools" ,python-setuptools)))
2206 (propagated-inputs
2207 `(("python-feedgenerator" ,python-feedgenerator)
2208 ("python-jinja2" ,python-jinja2)
2209 ("python-pygments" ,python-pygments)
2210 ("python-docutils" ,python-docutils)
2211 ("python-pytz" ,python-pytz)
2212 ("python-blinker" ,python-blinker)
2213 ("python-unidecode" ,python-unidecode)
2214 ("python-six" ,python-six)
2215 ("python-dateutil-2" ,python-dateutil-2)))
2216 (home-page "http://getpelican.com/")
2217 (arguments
2218 `(;; XXX Requires a lot more packages to do unit tests :P
2219 #:tests? #f
2220 #:phases (modify-phases %standard-phases
2221 (add-before
2222 'install 'adjust-requires
2223 ;; Since feedgenerator is installed from git, it doesn't
2224 ;; conform to the version requirements.
2225 ;;
2226 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2227 ;; version requirement so setuptools doesn't get confused.
2228 (lambda _
2229 (substitute* "setup.py"
2230 (("['\"]feedgenerator.*?['\"]")
2231 "'feedgenerator'")))))))
2232 (synopsis "Python-based static site publishing system")
2233 (description
2234 "Pelican is a tool to generate a static blog from reStructuredText,
2235Markdown input files, and more. Pelican uses Jinja2 for templating
2236and is very extensible.")
2237 (license agpl3+)))
2238
240ca4aa
RW
2239(define-public python-scikit-learn
2240 (package
2241 (name "python-scikit-learn")
be0a4c26 2242 (version "0.16.1")
240ca4aa
RW
2243 (source
2244 (origin
2245 (method url-fetch)
2246 (uri (string-append
2247 "https://github.com/scikit-learn/scikit-learn/archive/"
2248 version ".tar.gz"))
2249 (sha256
2250 (base32
be0a4c26 2251 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2252 (build-system python-build-system)
2253 (arguments
2254 `(#:phases
2255 (alist-cons-before
2f6b3d2e
RW
2256 'check 'set-HOME
2257 ;; some tests require access to "$HOME"
2258 (lambda _ (setenv "HOME" "/tmp"))
2259 ;; Tests can only be run after the library has been installed and not
2260 ;; within the source directory.
2261 (alist-cons-after
2262 'install 'check
2263 (lambda _
2264 (with-directory-excursion "/tmp"
2265 ;; With Python 3 one test of 3334 fails
2266 ;; (sklearn.tests.test_common.test_transformers); see
2267 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2268 (system* "nosetests" "-v" "sklearn")))
2269 (alist-delete 'check %standard-phases)))))
240ca4aa 2270 (inputs
2f6b3d2e 2271 `(("openblas" ,openblas)
240ca4aa
RW
2272 ("python-nose" ,python-nose)))
2273 (propagated-inputs
2274 `(("python-numpy" ,python-numpy)
2275 ("python-scipy" ,python-scipy)))
2276 (home-page "http://scikit-learn.org/")
2277 (synopsis "Machine Learning in Python")
2278 (description
2279 "Scikit-learn provides simple and efficient tools for data
2280mining and data analysis.")
2281 (license bsd-3)))
2282
2283(define-public python2-scikit-learn
2284 (let ((scikit (package-with-python2 python-scikit-learn)))
2285 (package (inherit scikit)
2286 (propagated-inputs
2287 `(("python2-numpy" ,python2-numpy)
2288 ("python2-scipy" ,python2-scipy)
2289 ,@(alist-delete
2290 "python-numpy"
2291 (alist-delete
2292 "python-scipy" (package-propagated-inputs scikit))))))))
2293
12f8f9bb
RW
2294(define-public python-scikit-image
2295 (package
2296 (name "python-scikit-image")
2297 (version "0.11.3")
2298 (source
2299 (origin
2300 (method url-fetch)
2301 (uri (string-append
2302 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2303 version ".tar.gz"))
2304 (sha256
2305 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2306 (build-system python-build-system)
2307 (propagated-inputs
2308 `(("python-matplotlib" ,python-matplotlib)
2309 ("python-networkx" ,python-networkx)
2310 ("python-numpy" ,python-numpy)
2311 ("python-scipy" ,python-scipy)
2312 ("python-six" ,python-six)
2313 ("python-pillow" ,python-pillow)))
2314 (native-inputs
2315 `(("python-cython" ,python-cython)
2316 ("python-setuptools" ,python-setuptools)))
2317 (home-page "http://scikit-image.org/")
2318 (synopsis "Image processing in Python")
2319 (description
e881752c 2320 "Scikit-image is a collection of algorithms for image processing.")
12f8f9bb
RW
2321 (license bsd-3)))
2322
2323(define-public python2-scikit-image
2324 (let ((scikit-image (package-with-python2 python-scikit-image)))
2325 (package (inherit scikit-image)
2326 (native-inputs
2327 `(("python2-mock" ,python2-mock)
2328 ,@(package-native-inputs scikit-image)))
2329 (propagated-inputs
2330 `(("python2-pytz" ,python2-pytz)
2331 ,@(package-propagated-inputs scikit-image))))))
2332
5394a6a6
RW
2333(define-public python-redis
2334 (package
2335 (name "python-redis")
2336 (version "2.10.3")
2337 (source
2338 (origin
2339 (method url-fetch)
2340 (uri (string-append
2341 "https://pypi.python.org/packages/source/r/redis/redis-"
2342 version ".tar.gz"))
2343 (sha256
2344 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2345 (build-system python-build-system)
2346 ;; Tests require a running Redis server
2347 (arguments '(#:tests? #f))
2348 (native-inputs
2349 `(("python-setuptools" ,python-setuptools)
2350 ("python-pytest" ,python-pytest)))
2351 (home-page "https://github.com/andymccurdy/redis-py")
2352 (synopsis "Redis Python client")
2353 (description
2354 "This package provides a Python interface to the Redis key-value store.")
2355 (license license:expat)))
2356
2357(define-public python2-redis
2358 (package-with-python2 python-redis))
2359
748cef5b
RW
2360(define-public python-rq
2361 (package
2362 (name "python-rq")
2363 (version "0.5.2")
2364 (source
2365 (origin
2366 (method url-fetch)
2367 (uri (string-append
2368 "https://pypi.python.org/packages/source/r/rq/rq-"
2369 version ".tar.gz"))
2370 (sha256
2371 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2372 (build-system python-build-system)
2373 (propagated-inputs
2374 `(("python-click" ,python-click)
2375 ("python-redis" ,python-redis)))
2376 (native-inputs
2377 `(("python-setuptools" ,python-setuptools)))
2378 (home-page "http://python-rq.org/")
2379 (synopsis "Simple job queues for Python")
2380 (description
2381 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2382processing them in the background with workers. It is backed by Redis and it
2383is designed to have a low barrier to entry.")
2384 (license bsd-2)))
2385
2386(define-public python2-rq
2387 (package-with-python2 python-rq))
2388
6888830b
FB
2389(define-public python-cython
2390 (package
2391 (name "python-cython")
2392 (version "0.21.1")
2393 (source
2394 (origin
2395 (method url-fetch)
2396 (uri (string-append "http://cython.org/release/Cython-"
2397 version ".tar.gz"))
2398 (sha256
2399 (base32
2400 "0ddz2l2dvcy5hdkxx4xlfiwpccvwia7ixgcy4h0pdv46a4i4vxj3"))))
2401 (build-system python-build-system)
2402 ;; we need the full python package and not just the python-wrapper
2403 ;; because we need libpython3.3m.so
2404 (inputs
2405 `(("python" ,python)))
2406 (arguments
2407 `(#:phases
2408 (alist-cons-before
2409 'check 'set-HOME
2410 ;; some tests require access to "$HOME/.cython"
2411 (lambda* _ (setenv "HOME" "/tmp"))
2412 (alist-replace
2413 'check
2414 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2415 %standard-phases))))
2416 (home-page "http://cython.org/")
2417 (synopsis "C extensions for Python")
2418 (description "Cython is an optimising static compiler for both the Python
2419programming language and the extended Cython programming language. It makes
2420writing C extensions for Python as easy as Python itself.")
2421 (license asl2.0)))
2422
2423(define-public python2-cython
2424 (package (inherit (package-with-python2 python-cython))
2425 (name "python2-cython")
2426 (inputs
2427 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
2428
2429;; This version of numpy is missing the documentation and is only used to
2430;; build matplotlib which is required to build numpy's documentation.
2431(define python-numpy-bootstrap
2432 (package
2433 (name "python-numpy-bootstrap")
2434 (version "1.9.1")
2435 (source
2436 (origin
2437 (method url-fetch)
2438 (uri (string-append "mirror://sourceforge/numpy"
2439 "/numpy-" version ".tar.gz"))
2440 (sha256
2441 (base32
2442 "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80"))))
2443 (build-system python-build-system)
2444 (inputs
2445 `(("python-nose" ,python-nose)
cba256f8
RW
2446 ("openblas" ,openblas)
2447 ("lapack" ,lapack)))
0da98533 2448 (native-inputs
19afbea1 2449 `(("gfortran" ,gfortran)))
0da98533
FB
2450 (arguments
2451 `(#:phases
2452 (alist-cons-before
2453 'build 'set-environment-variables
2454 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
2455 (call-with-output-file "site.cfg"
2456 (lambda (port)
cba256f8
RW
2457 (format port
2458 "[openblas]
dbdfe515
RW
2459libraries = openblas
2460library_dirs = ~a/lib
2461include_dirs = ~a/include
cba256f8
RW
2462
2463[lapack]
2464lapack_libs = lapack
2465library_dirs = ~a/lib
2466include_dirs = ~a/include
2467"
2468 (assoc-ref inputs "openblas")
2469 (assoc-ref inputs "openblas")
2470 (assoc-ref inputs "lapack")
2471 (assoc-ref inputs "lapack"))))
dbdfe515
RW
2472 ;; Use "gcc" executable, not "cc".
2473 (substitute* "numpy/distutils/system_info.py"
2474 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2475 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2476 #t)
6a843168
FB
2477 ;; Tests can only be run after the library has been installed and not
2478 ;; within the source directory.
2479 (alist-cons-after
2480 'install 'check
89b5c60e 2481 (lambda _
6a843168 2482 (with-directory-excursion "/tmp"
89b5c60e 2483 (zero? (system* "python" "-c"
6a843168 2484 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
2485 (alist-delete
2486 'check
6a843168 2487 %standard-phases)))))
0da98533
FB
2488 (home-page "http://www.numpy.org/")
2489 (synopsis "Fundamental package for scientific computing with Python")
2490 (description "NumPy is the fundamental package for scientific computing
e881752c 2491with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
2492object, sophisticated (broadcasting) functions, tools for integrating C/C++
2493and Fortran code, useful linear algebra, Fourier transform, and random number
2494capabilities.")
2495 (license bsd-3)))
2496
2497(define python2-numpy-bootstrap
2498 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 2499
3a1bfe18
RW
2500(define-public python2-fastlmm
2501 (package
2502 (name "python2-fastlmm")
2503 (version "0.2.14")
2504 (source
2505 (origin
2506 (method url-fetch)
2507 (uri (string-append
2508 "https://pypi.python.org/packages/source/f/fastlmm"
2509 "/fastlmm-" version ".zip"))
2510 (sha256
2511 (base32
2512 "023sydkrc3yxad2bycar02jfswwlh4199kafzhf2bssyx2c3xa0l"))))
2513 (build-system python-build-system)
2514 (arguments
2515 `(#:python ,python-2)) ; only Python 2.7 is supported
2516 (propagated-inputs
2517 `(("python2-numpy" ,python2-numpy)
2518 ("python2-scipy" ,python2-scipy)
2519 ("python2-matplotlib" ,python2-matplotlib)
2520 ("python2-pandas" ,python2-pandas)
2521 ("python2-scikit-learn" ,python2-scikit-learn)
2522 ("python2-cython" ,python2-cython)
2523 ("python2-pysnptools" ,python2-pysnptools)))
2524 (native-inputs
2525 `(("unzip" ,unzip)
2526 ("python2-mock" ,python2-mock)
2527 ("python2-setuptools" ,python2-setuptools)))
2528 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
2529 (synopsis "Perform genome-wide association studies on large data sets")
2530 (description
2531 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
2532Models, is a program for performing both single-SNP and SNP-set genome-wide
2533association studies (GWAS) on extremely large data sets.")
2534 (license asl2.0)))
2535
2ee8869a
FB
2536(define-public python-numpy
2537 (package (inherit python-numpy-bootstrap)
2538 (name "python-numpy")
2539 (outputs '("out" "doc"))
89b5c60e 2540 (inputs
2ee8869a
FB
2541 `(("which" ,which)
2542 ("python-setuptools" ,python-setuptools)
2543 ("python-matplotlib" ,python-matplotlib)
2544 ("python-sphinx" ,python-sphinx)
2545 ("python-pyparsing" ,python-pyparsing)
2546 ("python-numpydoc" ,python-numpydoc)
2547 ,@(package-inputs python-numpy-bootstrap)))
2548 (native-inputs
2549 `(("pkg-config" ,pkg-config)
2550 ("texlive" ,texlive)
2551 ("texinfo" ,texinfo)
2552 ("perl" ,perl)
2553 ,@(package-native-inputs python-numpy-bootstrap)))
2554 (arguments
89b5c60e 2555 `(,@(substitute-keyword-arguments
2ee8869a
FB
2556 (package-arguments python-numpy-bootstrap)
2557 ((#:phases phases)
2558 `(alist-cons-after
2559 'install 'install-doc
2560 (lambda* (#:key outputs #:allow-other-keys)
2561 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
2562 (doc (string-append
2563 data "/doc/" ,name "-"
2ee8869a
FB
2564 ,(package-version python-numpy-bootstrap)))
2565 (info (string-append data "/info"))
2566 (html (string-append doc "/html"))
2567 (pyver ,(string-append "PYVER=")))
2568 (with-directory-excursion "doc"
2569 (mkdir-p html)
2570 (system* "make" "html" pyver)
2571 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 2572 (system* "make" "-C" "build/latex"
2ee8869a
FB
2573 "all-pdf" "PAPER=a4" pyver)
2574 ;; FIXME: Generation of the info file fails.
2575 ;; (system* "make" "info" pyver)
2576 ;; (mkdir-p info)
2577 ;; (copy-file "build/texinfo/numpy.info"
2578 ;; (string-append info "/numpy.info"))
2579 (for-each (lambda (file)
2580 (copy-file (string-append "build/latex" file)
2581 (string-append doc file)))
2582 '("/numpy-ref.pdf" "/numpy-user.pdf"))
2583 (with-directory-excursion "build/html"
2584 (for-each (lambda (file)
2585 (let* ((dir (dirname file))
2586 (tgt-dir (string-append html "/" dir)))
2587 (unless (equal? "." dir)
2588 (mkdir-p tgt-dir))
2589 (copy-file file (string-append html "/" file))))
2590 (find-files "." ".*"))))))
2591 ,phases)))))))
2592
764c077b
LC
2593(define-public python2-numpy
2594 (let ((numpy (package-with-python2 python-numpy)))
2595 (package (inherit numpy)
88c26834
AE
2596 ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
2597 ;; Python 2.
2598 (inputs `(("python2-matplotlib" ,python2-matplotlib)
2599 ,@(alist-delete "python-matplotlib"
2600 (package-inputs numpy)))))))
2ee8869a 2601
15bfe6d6
FB
2602(define-public python-pyparsing
2603 (package
2604 (name "python-pyparsing")
e0669289 2605 (version "2.0.3")
15bfe6d6
FB
2606 (source
2607 (origin
2608 (method url-fetch)
2609 (uri (string-append "mirror://sourceforge/pyparsing"
2610 "/pyparsing-" version ".tar.gz"))
2611 (sha256
2612 (base32
e0669289 2613 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
2614 (build-system python-build-system)
2615 (outputs '("out" "doc"))
2616 (arguments
2617 `(#:tests? #f ; no test target
2618 #:modules ((guix build python-build-system)
2619 (guix build utils))
2620 #:phases
2621 (alist-cons-after
2622 'install 'install-doc
2623 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 2624 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
2625 "/share/doc/" ,name "-" ,version))
2626 (html-doc (string-append doc "/html"))
2627 (examples (string-append doc "/examples")))
2628 (mkdir-p html-doc)
2629 (mkdir-p examples)
89b5c60e 2630 (for-each
15bfe6d6 2631 (lambda (dir tgt)
89b5c60e 2632 (map (lambda (file)
15bfe6d6
FB
2633 (copy-file file (string-append tgt "/" (basename file))))
2634 (find-files dir ".*")))
2635 (list "docs" "htmldoc" "examples")
2636 (list doc html-doc examples))))
2637 %standard-phases)))
2638 (home-page "http://pyparsing.wikispaces.com")
2639 (synopsis "Python parsing class library")
2640 (description
2641 "The pyparsing module is an alternative approach to creating and
2642executing simple grammars, vs. the traditional lex/yacc approach, or the use
2643of regular expressions. The pyparsing module provides a library of classes
2644that client code uses to construct the grammar directly in Python code.")
bd3fa666 2645 (license license:expat)))
15bfe6d6
FB
2646
2647(define-public python2-pyparsing
2648 (package-with-python2 python-pyparsing))
2649
ec00de35
FB
2650(define-public python-numpydoc
2651 (package
2652 (name "python-numpydoc")
2653 (version "0.5")
2654 (source
2655 (origin
2656 (method url-fetch)
89b5c60e 2657 (uri (string-append
ec00de35
FB
2658 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
2659 version ".tar.gz"))
2660 (sha256
2661 (base32
5e4d8f67
AE
2662 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
2663 (modules '((guix build utils)))
2664 (snippet
2665 '(begin
2666 ;; Drop a test requiring matplotlib, which we cannot add as an
2667 ;; input since it would create a circular dependency: Extend the
2668 ;; test for Python 3, where it is already dropped, to Python 2.
2669 (substitute* "numpydoc/tests/test_plot_directive.py"
2670 (("3") "2"))))))
ec00de35
FB
2671 (build-system python-build-system)
2672 (inputs
2673 `(("python-setuptools" ,python-setuptools)
2674 ("python-docutils" ,python-docutils)
2675 ("python-sphinx" ,python-sphinx)
2676 ("python-nose" ,python-nose)))
2677 (home-page "https://pypi.python.org/pypi/numpydoc")
2678 (synopsis
2679 "Numpy's Sphinx extensions")
2680 (description
2681 "Sphinx extension to support docstrings in Numpy format.")
2682 (license bsd-2)))
2683
2684(define-public python2-numpydoc
5e4d8f67 2685 (package-with-python2 python-numpydoc))
1c65314c
FB
2686
2687(define-public python-matplotlib
2688 (package
2689 (name "python-matplotlib")
2690 (version "1.4.2")
2691 (source
2692 (origin
2693 (method url-fetch)
2694 (uri (string-append "mirror://sourceforge/matplotlib"
2695 "/matplotlib-" version ".tar.gz"))
2696 (sha256
2697 (base32
2698 "0m6v9nwdldlwk22gcd339zg6mny5m301fxgks7z8sb8m9wawg8qp"))))
2699 (build-system python-build-system)
2700 (outputs '("out" "doc"))
25f9a068
FB
2701 (propagated-inputs ; the following packages are all needed at run time
2702 `(("python-pyparsing" ,python-pyparsing)
2703 ("python-pygobject" ,python-pygobject)
2704 ("gobject-introspection" ,gobject-introspection)
2705 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
2706 ;; from 'gtk+') provides the required 'typelib' files used by
2707 ;; 'gobject-introspection'. The location of these files is set with the
2708 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
2709 ;; is done automatically by a 'native-search-path' procedure. However,
2710 ;; at run-time the user must set this variable as follows:
2711 ;;
2712 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
2713 ("gtk+" ,gtk+)
2714 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
2715 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
2716 ;; object. For this reason we need to import both libraries.
2717 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
2718 ("python-pycairo" ,python-pycairo)
2719 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
2720 (inputs
2721 `(("python-setuptools" ,python-setuptools)
2722 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
2723 ("python-six" ,python-six)
2724 ("python-pytz" ,python-pytz)
2725 ("python-numpy" ,python-numpy-bootstrap)
2726 ("python-sphinx" ,python-sphinx)
2727 ("python-numpydoc" ,python-numpydoc)
2728 ("python-nose" ,python-nose)
2729 ("python-mock" ,python-mock)
2730 ("libpng" ,libpng)
2731 ("imagemagick" ,imagemagick)
2732 ("freetype" ,freetype)
25f9a068
FB
2733 ("cairo" ,cairo)
2734 ("glib" ,glib)
4e7a137a 2735 ("python-pillow" ,python-pillow)
1c65314c 2736 ;; FIXME: Add backends when available.
1c65314c
FB
2737 ;("python-wxpython" ,python-wxpython)
2738 ;("python-pyqt" ,python-pyqt)
2739 ))
2740 (native-inputs
2741 `(("pkg-config" ,pkg-config)
2742 ("texlive" ,texlive)
2743 ("texinfo" ,texinfo)))
2744 (arguments
2745 `(#:phases
25f9a068
FB
2746 (alist-cons-before
2747 'build 'configure-environment
2748 (lambda* (#:key outputs inputs #:allow-other-keys)
2749 (let ((cairo (assoc-ref inputs "cairo"))
2750 (gtk+ (assoc-ref inputs "gtk+")))
2751 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
2752 ;; has not effect.
25f9a068
FB
2753 (setenv "LD_LIBRARY_PATH"
2754 (string-append cairo "/lib:" gtk+ "/lib"))
2755 (setenv "HOME" (getcwd))
2756 (call-with-output-file "setup.cfg"
2757 (lambda (port)
2758 (format port "[rc_options]~%
2759backend = GTK3Agg~%")))))
2760 (alist-cons-after
2761 'install 'install-doc
2762 (lambda* (#:key outputs #:allow-other-keys)
2763 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2764 (doc (string-append data "/doc/" ,name "-" ,version))
2765 (info (string-append data "/info"))
2766 (html (string-append doc "/html")))
2767 (with-directory-excursion "doc"
25f9a068
FB
2768 ;; Produce pdf in 'A4' format.
2769 (substitute* (find-files "." "conf\\.py")
2770 (("latex_paper_size = 'letter'")
2771 "latex_paper_size = 'a4'"))
2772 (mkdir-p html)
2773 (mkdir-p info)
2774 ;; The doc recommends to run the 'html' target twice.
2775 (system* "python" "make.py" "html")
2776 (system* "python" "make.py" "html")
2777 (system* "python" "make.py" "latex")
2778 (system* "python" "make.py" "texinfo")
2779 (copy-file "build/texinfo/matplotlib.info"
2780 (string-append info "/matplotlib.info"))
2781 (copy-file "build/latex/Matplotlib.pdf"
2782 (string-append doc "/Matplotlib.pdf"))
2783 (copy-recursively "build/html" html))))
2784 %standard-phases))))
1c65314c
FB
2785 (home-page "http://matplotlib.org")
2786 (synopsis "2D plotting library for Python")
2787 (description
2788 "Matplotlib is a Python 2D plotting library which produces publication
2789quality figures in a variety of hardcopy formats and interactive environments
2790across platforms. Matplotlib can be used in Python scripts, the python and
2791ipython shell, web application servers, and six graphical user interface
2792toolkits.")
2793 (license psfl)))
2794
764c077b
LC
2795(define-public python2-matplotlib
2796 (let ((matplotlib (package-with-python2 python-matplotlib)))
2797 (package (inherit matplotlib)
88c26834
AE
2798 ;; Make sure to use special packages for Python 2 instead
2799 ;; of those automatically rewritten by package-with-python2.
89b5c60e 2800 (propagated-inputs
7ca0dbc3 2801 `(("python2-pycairo" ,python2-pycairo)
764c077b
LC
2802 ("python2-pygobject-2" ,python2-pygobject-2)
2803 ,@(alist-delete "python-pycairo"
2804 (alist-delete "python-pygobject"
89b5c60e 2805 (package-propagated-inputs
88c26834 2806 matplotlib))))))))
94914805 2807
0dde6232
RW
2808(define-public python2-pysnptools
2809 (package
2810 (name "python2-pysnptools")
2811 (version "0.2.13")
2812 (source
2813 (origin
2814 (method url-fetch)
2815 (uri (string-append
2816 "https://pypi.python.org/packages/source/p/pysnptools"
2817 "/pysnptools-" version ".zip"))
2818 (sha256
2819 (base32
2820 "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib"))))
2821 (build-system python-build-system)
2822 (arguments
2823 `(#:python ,python-2)) ; only Python 2.7 is supported
2824 (propagated-inputs
2825 `(("python2-numpy" ,python2-numpy)
2826 ("python2-scipy" ,python2-scipy)
2827 ("python2-pandas" ,python2-pandas)
2828 ("python2-cython" ,python2-cython)))
2829 (native-inputs
2830 `(("unzip" ,unzip)
2831 ("python2-setuptools" ,python2-setuptools)))
2832 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
2833 (synopsis "Library for reading and manipulating genetic data")
2834 (description
2835 "PySnpTools is a library for reading and manipulating genetic data. It
2836can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
2837those files. It can also efficiently manipulate ranges of integers using set
2838operators such as union, intersection, and difference.")
2839 (license asl2.0)))
2840
c9b1b4f9
RW
2841(define-public python-rpy2
2842 (package
2843 (name "python-rpy2")
2844 (version "2.6.0")
2845 (source
2846 (origin
2847 (method url-fetch)
2848 (uri (string-append "https://pypi.python.org/packages/source/r/rpy2"
2849 "/rpy2-" version ".tar.gz"))
2850 (sha256
2851 (base32
2852 "1dp4l8hpv0jpf4crz4wis6in3lvwk86cr5zvpw410y4a07rrbqjk"))))
2853 (build-system python-build-system)
2854 (inputs
2855 `(("python-six" ,python-six)
2856 ("readline" ,readline)
2857 ("icu4c" ,icu4c)
2858 ("pcre" ,pcre)
2859 ("r" ,r)))
2860 (native-inputs
2861 `(("python-setuptools" ,python-setuptools)))
2862 (home-page "http://rpy.sourceforge.net/")
2863 (synopsis "Python interface to the R language")
2864 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
2865low-level interface to R from Python, a proposed high-level interface,
2866including wrappers to graphical libraries, as well as R-like structures and
2867functions.")
2868 (license gpl3+)))
2869
2870(define-public python2-rpy2
2871 (let ((rpy2 (package-with-python2 python-rpy2)))
2872 (package (inherit rpy2)
2873 (native-inputs
2874 `(("python2-singledispatch" ,python2-singledispatch)
2875 ,@(package-native-inputs rpy2))))))
2876
bb986599
FB
2877(define-public python-scipy
2878 (package
2879 (name "python-scipy")
da6ce3f1 2880 (version "0.15.0")
bb986599
FB
2881 (source
2882 (origin
2883 (method url-fetch)
2884 (uri (string-append "mirror://sourceforge/scipy"
da6ce3f1 2885 "/scipy-" version ".tar.xz"))
bb986599
FB
2886 (sha256
2887 (base32
da6ce3f1 2888 "0fsqi05s035d7p6s8h3h2pvk1axias16chy17rw9l1bxvrfhmncf"))))
bb986599
FB
2889 (build-system python-build-system)
2890 (inputs
2891 `(("python-numpy" ,python-numpy)
2892 ("python-matplotlib" ,python-matplotlib)
2893 ("python-pyparsing" ,python-pyparsing)
2894 ("python-nose" ,python-nose)
2895 ("python-sphinx" ,python-sphinx)
719b01c1
RW
2896 ("lapack" ,lapack)
2897 ("openblas" ,openblas)))
bb986599 2898 (native-inputs
19afbea1 2899 `(("gfortran" ,gfortran)
bb986599
FB
2900 ("texlive" ,texlive)
2901 ("perl" ,perl)))
2902 (outputs '("out" "doc"))
2903 (arguments
2904 `(#:phases
2905 (alist-cons-before
719b01c1 2906 'build 'configure-openblas
bb986599 2907 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
2908 (call-with-output-file "site.cfg"
2909 (lambda (port)
2910 (format port
2911 "[blas]
2912libraries = openblas
2913library_dirs = ~a/lib
2914include_dirs = ~a/include
2915[atlas]
2916library_dirs = ~a/lib
2917atlas_libs = openblas
2918"
2919 (assoc-ref inputs "openblas")
2920 (assoc-ref inputs "openblas")
2921 (assoc-ref inputs "openblas"))))
2922 #t)
bb986599
FB
2923 (alist-cons-after
2924 'install 'install-doc
2925 (lambda* (#:key outputs #:allow-other-keys)
2926 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2927 (doc (string-append data "/doc/" ,name "-" ,version))
2928 (html (string-append doc "/html"))
2929 (pyver ,(string-append "PYVER=")))
2930 (with-directory-excursion "doc"
bb986599
FB
2931 ;; Fix generation of images for mathematical expressions.
2932 (substitute* (find-files "source" "conf\\.py")
2933 (("pngmath_use_preview = True")
2934 "pngmath_use_preview = False"))
2935 (mkdir-p html)
2936 (system* "make" "html" pyver)
2937 (system* "make" "latex" "PAPER=a4" pyver)
2938 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
2939 (copy-file "build/latex/scipy-ref.pdf"
2940 (string-append doc "/scipy-ref.pdf"))
2941 (with-directory-excursion "build/html"
2942 (for-each (lambda (file)
2943 (let* ((dir (dirname file))
2944 (tgt-dir (string-append html "/" dir)))
2945 (unless (equal? "." dir)
2946 (mkdir-p tgt-dir))
2947 (copy-file file (string-append html "/" file))))
2948 (find-files "." ".*"))))))
2949 ;; Tests can only be run after the library has been installed and not
2950 ;; within the source directory.
2951 (alist-cons-after
2952 'install 'check
89b5c60e 2953 (lambda _
bb986599
FB
2954 (with-directory-excursion "/tmp"
2955 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
2956 (alist-delete
2957 'check
bb986599
FB
2958 %standard-phases))))))
2959 (home-page "http://www.scipy.org/")
2960 (synopsis "The Scipy library provides efficient numerical routines")
2961 (description "The SciPy library is one of the core packages that make up
2962the SciPy stack. It provides many user-friendly and efficient numerical
2963routines such as routines for numerical integration and optimization.")
2964 (license bsd-3)))
2965
764c077b
LC
2966(define-public python2-scipy
2967 (let ((scipy (package-with-python2 python-scipy)))
2968 (package (inherit scipy)
2969 ;; Use packages customized for python-2.
2970 (inputs `(("python2-matplotlib" ,python2-matplotlib)
2971 ("python2-numpy" ,python2-numpy)
89b5c60e
AE
2972 ,@(alist-delete "python-matplotlib"
2973 (alist-delete "python-numpy"
764c077b 2974 (package-inputs scipy))))))))
bb986599 2975
94914805
EB
2976(define-public python-sqlalchemy
2977 (package
2978 (name "python-sqlalchemy")
2979 (version "0.9.7")
2980 (source
2981 (origin
2982 (method url-fetch)
2983 (uri (string-append "https://pypi.python.org/packages/source/S/"
2984 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
2985 (sha256
2986 (base32
2987 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
2988 (build-system python-build-system)
2989 (native-inputs
2990 `(("python-cython" ,python-cython) ;for c extensions
2991 ("python-pytest" ,python-pytest)
2992 ("python-mock" ,python-mock))) ;for tests
2993 (arguments
2994 `(#:phases (alist-replace
2995 'check
2996 (lambda _ (zero? (system* "py.test")))
2997 %standard-phases)))
2998 (home-page "http://www.sqlalchemy.org")
2999 (synopsis "Database abstraction library")
3000 (description
3001 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3002gives application developers the full power and flexibility of SQL. It
3003provides a full suite of well known enterprise-level persistence patterns,
3004designed for efficient and high-performing database access, adapted into a
3005simple and Pythonic domain language.")
3006 (license x11)))
3007
3008(define-public python2-sqlalchemy
3009 (package-with-python2 python-sqlalchemy))
c937562e 3010
1671c07c
EB
3011(define-public python-distutils-extra
3012 (package
3013 (name "python-distutils-extra")
3014 (version "2.38")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3019 version "/+download/python-distutils-extra-"
3020 version ".tar.gz"))
3021 (sha256
3022 (base32
3023 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3024 (build-system python-build-system)
3025 (native-inputs
3026 `(("python-setuptools" ,python-setuptools)))
3027 (home-page "https://launchpad.net/python-distutils-extra/")
3028 (synopsis "Enhancements to Python's distutils")
3029 (description
3030 "The python-distutils-extra module enables you to easily integrate
3031gettext support, themed icons, and scrollkeeper-based documentation into
3032Python's distutils.")
3033 (license gpl2)))
3034
3035(define-public python2-distutils-extra
3036 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3037
3038(define-public python2-elib.intl
3039 (package
3040 (name "python2-elib.intl")
3041 (version "0.0.3")
3042 (source
3043 (origin
3044 ;; This project doesn't tag releases or publish tarballs, so we take
3045 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3046 (method git-fetch)
3047 (uri (git-reference
3048 (url "https://github.com/dieterv/elib.intl.git")
3049 (commit "d09997cfef")))
3050 (sha256
3051 (base32
3052 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3053 (build-system python-build-system)
3054 (native-inputs
3055 `(("python2-setuptools" ,python2-setuptools)))
3056 (arguments
3057 ;; incompatible with Python 3 (exception syntax)
3058 `(#:python ,python-2
3059 #:tests? #f
3060 ;; With standard flags, the install phase attempts to create a zip'd
3061 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3062 ;; before 1980'
3063 #:configure-flags '("--single-version-externally-managed"
3064 "--record=elib.txt")))
3065 (home-page "https://github.com/dieterv/elib.intl")
3066 (synopsis "Enhanced internationalization for Python")
3067 (description
3068 "The elib.intl module provides enhanced internationalization (I18N)
3069services for your Python modules and applications.")
3070 (license lgpl3+)))
3071
c937562e
EB
3072(define-public python-pillow
3073 (package
3074 (name "python-pillow")
5ff408d9 3075 (version "2.8.1")
c937562e
EB
3076 (source
3077 (origin
3078 (method url-fetch)
3079 (uri (string-append "https://pypi.python.org/packages/source/P/"
3080 "Pillow/Pillow-" version ".tar.gz"))
3081 (sha256
3082 (base32
5ff408d9 3083 "15n92axxph2s3kvg68bki9gv3nzwgq7130kp7wbblpi1l0cc2q47"))))
c937562e
EB
3084 (build-system python-build-system)
3085 (native-inputs
3086 `(("python-setuptools" ,python-setuptools)
3087 ("python-nose" ,python-nose)))
3088 (inputs
5ff408d9
SB
3089 `(("freetype" ,freetype)
3090 ("lcms" ,lcms)
c937562e
EB
3091 ("zlib" ,zlib)
3092 ("libjpeg" ,libjpeg)
3093 ("openjpeg" ,openjpeg)
5ff408d9
SB
3094 ("libtiff" ,libtiff)
3095 ("libwebp" ,libwebp)))
c937562e
EB
3096 (propagated-inputs
3097 `(;; Used at runtime for pkg_resources
3098 ("python-setuptools" ,python-setuptools)))
3099 (arguments
e5358a6b
LC
3100 `(#:phases (modify-phases %standard-phases
3101 (add-before
3102 'install 'disable-egg-compression
3103 (lambda _
3104 ;; Leave the .egg uncompressed since compressing it would
3105 ;; prevent the GC from identifying run-time dependencies.
3106 ;; See <http://bugs.gnu.org/20765>.
3107 (let ((port (open-file "setup.cfg" "a")))
3108 (display "\n[easy_install]\nzip_ok = 0\n"
3109 port)
3110 (close-port port)
3111 #t)))
3112 (add-after
3113 'install 'check-installed
3114 (lambda _
3115 (begin
3116 (setenv "HOME" (getcwd))
3117 (and (zero? (system* "python" "selftest.py"
3118 "--installed"))
3119 (zero? (system* "python" "test-installed.py"))))))
3120 (delete 'check))))
c937562e
EB
3121 (home-page "https://pypi.python.org/pypi/Pillow")
3122 (synopsis "Fork of the Python Imaging Library")
3123 (description
3124 "The Python Imaging Library adds image processing capabilities to your
3125Python interpreter. This library provides extensive file format support, an
3126efficient internal representation, and fairly powerful image processing
3127capabilities. The core image library is designed for fast access to data
3128stored in a few basic pixel formats. It should provide a solid foundation for
3129a general image processing tool.")
3130 (license (x11-style
3131 "http://www.pythonware.com/products/pil/license.htm"
3132 "The PIL Software License"))))
3133
3134(define-public python2-pillow
3135 (package-with-python2 python-pillow))
bb986599 3136
a415f036
FB
3137(define-public python-pycparser
3138 (package
3139 (name "python-pycparser")
3140 (version "2.10")
3141 (source
3142 (origin
3143 (method url-fetch)
3144 (uri (string-append "https://pypi.python.org/packages/source/p/"
3145 "pycparser/pycparser-" version ".tar.gz"))
3146 (sha256
3147 (base32
3148 "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm"))))
3149 (outputs '("out" "doc"))
3150 (build-system python-build-system)
3151 (native-inputs
3152 `(("pkg-config" ,pkg-config)
3153 ("python-setuptools" ,python-setuptools)))
3154 (arguments
89b5c60e 3155 `(#:phases
a415f036
FB
3156 (alist-replace
3157 'check
3158 (lambda _
3159 (with-directory-excursion "tests"
3160 (zero? (system* "python" "all_tests.py"))))
3161 (alist-cons-after
3162 'install 'install-doc
3163 (lambda* (#:key outputs #:allow-other-keys)
3164 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3165 (doc (string-append data "/doc/" ,name "-" ,version))
3166 (examples (string-append doc "/examples")))
3167 (mkdir-p examples)
3168 (for-each (lambda (file)
3169 (copy-file (string-append "." file)
3170 (string-append doc file)))
3171 '("/README.rst" "/CHANGES" "/LICENSE"))
3172 (copy-recursively "examples" examples)))
3173 %standard-phases))))
3174 (home-page "https://github.com/eliben/pycparser")
3175 (synopsis "C parser in Python")
3176 (description
3177 "Pycparser is a complete parser of the C language, written in pure Python
3178using the PLY parsing library. It parses C code into an AST and can serve as
3179a front-end for C compilers or analysis tools.")
3180 (license bsd-3)))
3181
3182(define-public python2-pycparser
3183 (package-with-python2 python-pycparser))
57c3f716
FB
3184
3185(define-public python-cffi
3186 (package
3187 (name "python-cffi")
3188 (version "0.8.6")
3189 (source
3190 (origin
3191 (method url-fetch)
3192 (uri (string-append "https://pypi.python.org/packages/source/c/"
3193 "cffi/cffi-" version ".tar.gz"))
89b5c60e 3194 (sha256
57c3f716
FB
3195 (base32 "0406j3sgndmx88idv5zxkkrwfqxmjl18pj8gf47nsg4ymzixjci5"))))
3196 (build-system python-build-system)
3197 (outputs '("out" "doc"))
3198 (inputs
3199 `(("libffi" ,libffi)))
3200 (propagated-inputs ; required at run-time
3201 `(("python-pycparser" ,python-pycparser)))
3202 (native-inputs
3203 `(("pkg-config" ,pkg-config)
3204 ("python-sphinx" ,python-sphinx)
3205 ("python-setuptools" ,python-setuptools)))
3206 (arguments
3207 `(#:tests? #f ; FIXME: requires pytest
89b5c60e 3208 #:phases
57c3f716
FB
3209 (alist-cons-after
3210 'install 'install-doc
3211 (lambda* (#:key outputs #:allow-other-keys)
3212 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3213 (doc (string-append data "/doc/" ,name "-" ,version))
3214 (html (string-append doc "/html")))
3215 (with-directory-excursion "doc"
3216 (system* "make" "html")
3217 (mkdir-p html)
3218 (copy-recursively "build/html" html))
3219 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3220 %standard-phases)))
3221 (home-page "http://cffi.readthedocs.org")
3222 (synopsis "Foreign function interface for Python")
3223 (description
3224 "Foreign Function Interface for Python calling C code.")
bd3fa666 3225 (license license:expat)))
57c3f716
FB
3226
3227(define-public python2-cffi
3228 (package-with-python2 python-cffi))
6fa14469
FB
3229
3230(define-public python-xcffib
3231 (package
3232 (name "python-xcffib")
3233 (version "0.1.9")
3234 (source
3235 (origin
3236 (method url-fetch)
3237 (uri (string-append "https://pypi.python.org/packages/source/x/"
3238 "xcffib/xcffib-" version ".tar.gz"))
3239 (sha256
3240 (base32
3241 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3242 (build-system python-build-system)
3243 (inputs
3244 `(("libxcb" ,libxcb)
3245 ("python-six" ,python-six)))
3246 (native-inputs
3247 `(("python-setuptools" ,python-setuptools)))
3248 (propagated-inputs
3249 `(("python-cffi" ,python-cffi))) ; used at run time
3250 (arguments
89b5c60e 3251 `(#:phases
6fa14469
FB
3252 (alist-cons-after
3253 'install 'install-doc
3254 (lambda* (#:key outputs #:allow-other-keys)
3255 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3256 "/doc/" ,name "-" ,version)))
3257 (mkdir-p doc)
3258 (copy-file "README.md"
3259 (string-append doc "/README.md"))))
3260 %standard-phases)))
3261 (home-page "https://github.com/tych0/xcffib")
3262 (synopsis "XCB Python bindings")
3263 (description
3264 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3265support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 3266 (license license:expat)))
6fa14469
FB
3267
3268(define-public python2-xcffib
3269 (package-with-python2 python-xcffib))
3270
9e099723
FB
3271(define-public python-cairocffi
3272 (package
3273 (name "python-cairocffi")
3274 (version "0.6")
3275 (source
3276 (origin
3277 (method url-fetch)
3278 ;; The archive on pypi is missing the 'utils' directory!
3279 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3280 version ".tar.gz"))
f586c877 3281 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
3282 (sha256
3283 (base32
3284 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3285 (build-system python-build-system)
3286 (outputs '("out" "doc"))
3287 (inputs
3288 `(("gdk-pixbuf" ,gdk-pixbuf)
3289 ("cairo" ,cairo)))
3290 (native-inputs
3291 `(("pkg-config" ,pkg-config)
3292 ("python-sphinx" ,python-sphinx)
3293 ("python-docutils" ,python-docutils)
3294 ("python-setuptools" ,python-setuptools)))
3295 (propagated-inputs
3296 `(("python-xcffib" ,python-xcffib))) ; used at run time
3297 (arguments
89b5c60e 3298 `(#:phases
9e099723
FB
3299 (alist-cons-after
3300 'install 'install-doc
3301 (lambda* (#:key inputs outputs #:allow-other-keys)
3302 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3303 (doc (string-append data "/doc/" ,name "-" ,version))
3304 (html (string-append doc "/html")))
89b5c60e 3305 (setenv "LD_LIBRARY_PATH"
9e099723
FB
3306 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3307 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3308 (setenv "LANG" "en_US.UTF-8")
3309 (mkdir-p html)
3310 (for-each (lambda (file)
3311 (copy-file (string-append "." file)
3312 (string-append doc file)))
3313 '("/README.rst" "/CHANGES" "/LICENSE"))
3314 (system* "python" "setup.py" "build_sphinx")
3315 (copy-recursively "docs/_build/html" html)))
3316 %standard-phases)))
3317 (home-page "https://github.com/SimonSapin/cairocffi")
3318 (synopsis "Python bindings and object-oriented API for Cairo")
3319 (description
3320 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3321Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3322graphics library with support for multiple backends including image buffers,
3323PNG, PostScript, PDF, and SVG file output.")
3324 (license bsd-3)))
3325
3326(define-public python2-cairocffi
3327 (package-with-python2 python-cairocffi))
3328
3cff95cb
RW
3329(define-public python-decorator
3330 (package
3331 (name "python-decorator")
3332 (version "3.4.2")
3333 (source
3334 (origin
3335 (method url-fetch)
3336 (uri (string-append
3337 "https://pypi.python.org/packages/source/d/decorator/decorator-"
3338 version ".tar.gz"))
3339 (sha256
3340 (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k"))))
3341 (build-system python-build-system)
3342 (arguments '(#:tests? #f)) ; no test target
3343 (native-inputs
3344 `(("python-setuptools" ,python-setuptools)))
3345 (home-page "http://pypi.python.org/pypi/decorator/")
3346 (synopsis "Python module to simplify usage of decorators")
3347 (description
3348 "The aim of the decorator module is to simplify the usage of decorators
3349for the average programmer, and to popularize decorators usage giving examples
3350of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3351etc. The core of this module is a decorator factory.")
3352 (license license:expat)))
3353
3354(define-public python2-decorator
3355 (package-with-python2 python-decorator))
3356
2c0499ad
RW
3357(define-public python-drmaa
3358 (package
3359 (name "python-drmaa")
3360 (version "0.7.6")
3361 (source
3362 (origin
3363 (method url-fetch)
3364 (uri (string-append
3365 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3366 version ".tar.gz"))
3367 (sha256
3368 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3369 (build-system python-build-system)
3370 ;; The test suite requires libdrmaa which is provided by the cluster
3371 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3372 ;; should be set to the path of the libdrmaa library.
3373 (arguments '(#:tests? #f))
3374 (native-inputs
3375 `(("python-nose" ,python-nose)
3376 ("python-setuptools" ,python-setuptools)))
3377 (home-page "https://pypi.python.org/pypi/drmaa")
3378 (synopsis "Python bindings for the DRMAA library")
3379 (description
3380 "A Python package for Distributed Resource Management (DRM) job
3381submission and control. This package is an implementation of the DRMAA 1.0
3382Python language binding specification.")
3383 (license bsd-3)))
3384
3385(define-public python2-drmaa
3386 (package-with-python2 python-drmaa))
3387
d05c6da0
RW
3388(define-public python-gridmap
3389 (package
3390 (name "python-gridmap")
3391 (version "0.13.0")
3392 (source
3393 (origin
3394 (method url-fetch)
3395 (uri (string-append
3396 "https://github.com/pygridtools/gridmap/archive/v"
3397 version ".tar.gz"))
3398 (file-name (string-append name "-" version ".tar.gz"))
3399 (sha256
3400 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
3401 (build-system python-build-system)
3402 (inputs
3403 `(("python-psutil" ,python-psutil)
3404 ("python-drmaa" ,python-drmaa)
3405 ("python-pyzmq" ,python-pyzmq)))
3406 (native-inputs
3407 `(("python-setuptools" ,python-setuptools)))
3408 (home-page "https://github.com/pygridtools/gridmap")
3409 (synopsis "Create jobs on a cluster directly from Python")
3410 (description
3411 "Gridmap is a Python package to allow you to easily create jobs on the
3412cluster directly from Python. You can directly map Python functions onto the
3413cluster without needing to write any wrapper code yourself.")
3414 (license gpl3+)))
3415
3416(define-public python2-gridmap
3417 (package-with-python2 python-gridmap))
3418
ae1ab9fe
FB
3419(define-public python-ipython
3420 (package
3421 (name "python-ipython")
3422 (version "2.3.1")
3423 (source
3424 (origin
3425 (method url-fetch)
3426 (uri (string-append "https://pypi.python.org/packages/source/i/"
3427 "ipython/ipython-" version ".tar.gz"))
3428 (sha256
3429 (base32 "1764gi5m3ff481rjk336cw6i2h4zlc0nxam9rc5m8m7yl9m4d61y"))))
3430 (build-system python-build-system)
3431 (outputs '("out" "doc"))
3432 ;; FIXME: add optional dependencies when available: pyzmq, tornado, ...
3433 (inputs
3434 `(("readline" ,readline)
3435 ("python-matplotlib" ,python-matplotlib)
3436 ("python-numpy" ,python-numpy-bootstrap)
3437 ("python-numpydoc" ,python-numpydoc)
3438 ("python-nose" ,python-nose)))
3439 (native-inputs
3440 `(("pkg-config" ,pkg-config)
3441 ("python-sphinx" ,python-sphinx)
3442 ("texlive" ,texlive)
3443 ("texinfo" ,texinfo)
3444 ("python-setuptools" ,python-setuptools)))
3445 (arguments
89b5c60e 3446 `(#:phases
ae1ab9fe
FB
3447 (alist-cons-after
3448 'install 'install-doc
3449 (lambda* (#:key inputs outputs #:allow-other-keys)
3450 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3451 (doc (string-append data "/doc/" ,name "-" ,version))
3452 (html (string-append doc "/html"))
3453 (man1 (string-append data "/man/man1"))
3454 (info (string-append data "/info"))
3455 (examples (string-append doc "/examples")))
3456 (setenv "LANG" "en_US.UTF-8")
3457 (with-directory-excursion "docs"
3458 ;; FIXME: html and pdf fail to build without optional pyzmq
3459 ;(system* "make" "html")
3460 ;(system* "make" "pdf" "PAPER=a4")
3461 (system* "make" "info"))
3462 (copy-recursively "docs/man" man1)
3463 (copy-recursively "examples" examples)
3464 ;; (copy-recursively "docs/build/html" html)
3465 ;; (copy-file "docs/build/latex/ipython.pdf"
3466 ;; (string-append doc "/ipython.pdf"))
3467 (mkdir-p info)
3468 (copy-file "docs/build/texinfo/ipython.info"
3469 (string-append info "/ipython.info"))
3470 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst"))))
3471 ;; Tests can only be run after the library has been installed and not
3472 ;; within the source directory.
3473 (alist-cons-after
3474 'install 'check
3475 (lambda* (#:key outputs #:allow-other-keys)
3476 ;; The test procedure appears to miss the fact that some optional
3477 ;; dependencies are missing.
3478 ;; (with-directory-excursion "/tmp"
3479 ;; (zero? (system* (string-append (assoc-ref outputs "out")
3480 ;; "/bin/iptest"))))
3481 #t)
89b5c60e
AE
3482 (alist-delete
3483 'check
ae1ab9fe
FB
3484 %standard-phases)))))
3485 (home-page "http://ipython.org")
3486 (synopsis "IPython is a tool for interactive computing in Python")
3487 (description
3488 "IPython provides a rich architecture for interactive computing with:
3489Powerful interactive shells, a browser-based notebook, support for interactive
3490data visualization, embeddable interpreters and tools for parallel
3491computing.")
3492 (license bsd-3)))
3493
3494(define-public python2-ipython
3495 (let ((ipython (package-with-python2 python-ipython)))
3496 (package (inherit ipython)
3497 ;; Make sure we use custom python2-NAME packages.
89b5c60e 3498 (inputs
88c26834
AE
3499 `(("python2-matplotlib" ,python2-matplotlib)
3500 ,@(alist-delete "python-matplotlib"
3501 (package-inputs ipython)))))))
03411993
AE
3502
3503(define-public python-isodate
3504 (package
3505 (name "python-isodate")
3506 (version "0.5.1")
3507 (source
3508 (origin
3509 (method url-fetch)
3510 (uri (string-append
3511 "https://pypi.python.org/packages/source/i/isodate/isodate-"
3512 version
3513 ".tar.gz"))
3514 (sha256
3515 (base32
3516 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
3517 (build-system python-build-system)
3518 (inputs
3519 `(("python-setuptools" ,python-setuptools)))
3520 (home-page
3521 "http://cheeseshop.python.org/pypi/isodate")
3522 (synopsis
3523 "Python date parser and formatter")
3524 (description
3525 "Python-isodate is a python module for parsing and formatting
3526ISO 8601 dates, time and duration.")
3527 (license bsd-3)))
3528
3529(define-public python2-isodate
3530 (package-with-python2 python-isodate))
673ab897
AE
3531
3532(define-public python-html5lib
3533 (package
3534 (name "python-html5lib")
3535 (version "1.0b3")
3536 (source
3537 (origin
3538 (method url-fetch)
3539 (uri (string-append
3540 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
3541 version
3542 ".tar.gz"))
3543 (sha256
3544 (base32
3545 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
3546 (build-system python-build-system)
3dd75476
AE
3547 (propagated-inputs
3548 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
3549 (inputs
3550 `(("python-setuptools" ,python-setuptools)))
3551 (arguments
3552 `(#:test-target "check"))
3553 (home-page
3554 "https://github.com/html5lib/html5lib-python")
3555 (synopsis
3556 "Python HTML parser based on the WHATWG HTML specifcation")
3557 (description
3558 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
3559and written in Python.")
bd3fa666 3560 (license license:expat)))
673ab897
AE
3561
3562(define-public python2-html5lib
3563 (package-with-python2 python-html5lib))
e99f4211
MW
3564
3565(define-public python-urwid
3566 (package
3567 (name "python-urwid")
3568 (version "1.3.0")
3569 (source
3570 (origin
3571 (method url-fetch)
be1f44bb
MW
3572 (uri (string-append
3573 "https://pypi.python.org/packages/source/u/urwid/urwid-"
3574 version ".tar.gz"))
e99f4211
MW
3575 (sha256
3576 (base32
3577 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
3578 (build-system python-build-system)
3579 (native-inputs `(("python-setuptools" ,python-setuptools)))
3580 (home-page "http://urwid.org")
3581 (synopsis "Console user interface library for Python")
3582 (description
3583 "Urwid is a curses-based UI/widget library for Python. It includes many
3584features useful for text console applications.")
3585 (license lgpl2.1+)))
3586
3587(define-public python2-urwid
3588 (package-with-python2 python-urwid))
d95a56c6
PAR
3589
3590(define-public python-dbus
3591 (package
3592 (name "python-dbus")
3593 (version "1.2.0")
3594 (source
3595 (origin
3596 (method url-fetch)
3597 (uri (string-append
3598 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
3599 version ".tar.gz"))
3600 (sha256
3601 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
3602 (build-system gnu-build-system)
3603 (native-inputs
3604 `(("pkg-config" ,pkg-config)))
3605 (inputs
3606 `(("python" ,python)
2e88d113 3607 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
3608 (synopsis "Python bindings for D-bus")
3609 (description "python-dbus provides bindings for libdbus, the reference
3610implementation of D-Bus.")
3611 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 3612 (license license:expat)))
b52af02b
MW
3613
3614(define-public python2-dbus
3615 (package (inherit python-dbus)
3616 (name "python2-dbus")
3617 (inputs `(("python" ,python-2)
3618 ,@(alist-delete "python"
3619 (package-inputs python-dbus)
3620 equal?)))
3621 ;; FIXME: on Python 2, the test_utf8 fails with:
3622 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
3623 (arguments `(#:tests? #f))))
a6ac8332
AE
3624
3625(define-public python-apsw
3626 (package
3627 (name "python-apsw")
3628 (version "3.8.7.3-r1")
3629 (source
3630 (origin
3631 (method url-fetch)
3632 (uri (string-append
3633 "https://pypi.python.org/packages/source/a/apsw/apsw-"
3634 version
3635 ".tar.gz"))
3636 (sha256
3637 (base32
3638 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
3639 (build-system python-build-system)
3640 (inputs
3641 `(("python-setuptools" ,python-setuptools)
3642 ("sqlite" ,sqlite)))
3643 (arguments
3644 `(#:phases
3645 ;; swap check and install phases
3646 (alist-cons-after
3647 'install 'check
3648 (assoc-ref %standard-phases 'check)
3649 (alist-delete
3650 'check
3651 %standard-phases))))
3652 (home-page "https://github.com/rogerbinns/apsw/")
3653 (synopsis "Another Python SQLite Wrapper")
3654 (description "APSW is a Python wrapper for the SQLite
3655embedded relational database engine. In contrast to other wrappers such as
3656pysqlite it focuses on being a minimal layer over SQLite attempting just to
3657translate the complete SQLite API into Python.")
abde5f37 3658 (license license:zlib)))
a6ac8332
AE
3659
3660(define-public python2-apsw
3661 (package-with-python2 python-apsw))
26b307e2
AE
3662
3663(define-public python-lxml
3664 (package
3665 (name "python-lxml")
3666 (version "3.4.2")
3667 (source
3668 (origin
3669 (method url-fetch)
3670 (uri (string-append
3671 "https://pypi.python.org/packages/source/l/lxml/lxml-"
3672 version
3673 ".tar.gz"))
3674 (sha256
3675 (base32
3676 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
3677 (build-system python-build-system)
3678 (inputs
3679 `(("libxml2" ,libxml2)
3680 ("libxslt" ,libxslt)
3681 ("python-setuptools" ,python-setuptools)))
3682 (home-page "http://lxml.de/")
3683 (synopsis
3684 "Python XML processing library")
3685 (description
3686 "The lxml XML toolkit is a Pythonic binding for the C libraries
3687libxml2 and libxslt.")
3688 (license bsd-3))) ; and a few more, see LICENSES.txt
3689
3690(define-public python2-lxml
3691 (package-with-python2 python-lxml))
4ed20663 3692
bec07a7c
AE
3693(define-public python2-pil
3694 (package
3695 (name "python2-pil")
3696 (version "1.1.7")
3697 (source
3698 (origin
3699 (method url-fetch)
3700 (uri (string-append
3701 "http://effbot.org/downloads/Imaging-"
3702 version ".tar.gz"))
3703 (sha256
3704 (base32
516277cb
AE
3705 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
3706 (modules '((guix build utils)))
3707 (snippet
3708 ;; Adapt to newer freetype. As the package is unmaintained upstream,
3709 ;; there is no use in creating a patch and reporting it.
3710 '(substitute* "_imagingft.c"
3711 (("freetype/")
3712 "freetype2/")))))
bec07a7c
AE
3713 (build-system python-build-system)
3714 (inputs
3715 `(("freetype" ,freetype)
3716 ("libjpeg" ,libjpeg)
3717 ("libtiff" ,libtiff)
3718 ("python-setuptools" ,python-setuptools)
3719 ("zlib" ,zlib)))
3720 (arguments
3721 ;; Only the fork python-pillow works with Python 3.
3722 `(#:python ,python-2
3723 #:tests? #f ; no check target
3724 #:phases
3725 (alist-cons-before
3726 'build 'configure
3727 ;; According to README and setup.py, manual configuration is
3728 ;; the preferred way of "searching" for inputs.
3729 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
3730 (lambda* (#:key inputs #:allow-other-keys)
3731 (let ((jpeg (assoc-ref inputs "libjpeg"))
3732 (zlib (assoc-ref inputs "zlib"))
3733 (tiff (assoc-ref inputs "libtiff"))
3734 (freetype (assoc-ref inputs "freetype")))
3735 (substitute* "setup.py"
3736 (("JPEG_ROOT = None")
3737 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
3738 (("ZLIB_ROOT = None")
3739 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
3740 (("TIFF_ROOT = None")
3741 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
3742 (("FREETYPE_ROOT = None")
3743 (string-append "FREETYPE_ROOT = libinclude(\""
3744 freetype "\")")))))
3745 %standard-phases)))
3746 (home-page "http://www.pythonware.com/products/pil/")
3747 (synopsis "Python Imaging Library")
3748 (description "The Python Imaging Library (PIL) adds image processing
3749capabilities to the Python interpreter.")
3750 (license (x11-style
3751 "file://README"
3752 "See 'README' in the distribution."))))
092e86f5
AE
3753
3754(define-public python2-cssutils
3755 (package
3756 (name "python2-cssutils")
3757 (version "1.0")
3758 (source
3759 (origin
3760 (method url-fetch)
3761 (uri (string-append
3762 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
3763 version
3764 ".zip"))
3765 (sha256
3766 (base32
3767 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
3768 (build-system python-build-system)
3769 (native-inputs
3770 `(("python2-mock" ,python2-mock) ; for the tests
3771 ("unzip" ,unzip))) ; for unpacking the source
3772 (inputs
3773 `(("python2-setuptools" ,python2-setuptools)))
3774 (arguments
3775 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
3776 #:tests? #f ; The tests apparently download an external URL.
da6dd842 3777 ))
092e86f5
AE
3778 (home-page "http://cthedot.de/cssutils/")
3779 (synopsis
3780 "CSS Cascading Style Sheets library for Python")
3781 (description
3782 "Cssutils is a Python package for parsing and building CSS
3783Cascading Style Sheets. Currently it provides a DOM only and no rendering
3784options.")
3785 (license lgpl3+)))
880ff77c
AE
3786
3787(define-public python-cssselect
3788 (package
3789 (name "python-cssselect")
3790 (version "0.9.1")
3791 (source
3792 (origin
3793 (method url-fetch)
3794 (uri (string-append
3795 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
3796 version
3797 ".tar.gz"))
3798 (sha256
3799 (base32
3800 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
3801 (build-system python-build-system)
3802 (inputs
3803 `(("python-setuptools" ,python-setuptools)))
3804 (arguments
3805 ;; tests fail with message
3806 ;; AttributeError: 'module' object has no attribute 'tests'
3807 `(#:tests? #f))
3808 (home-page
3809 "https://pythonhosted.org/cssselect/")
3810 (synopsis
3811 "CSS3 selector parser and translator to XPath 1.0")
3812 (description
3813 "Cssselect ia a Python module that parses CSS3 Selectors and translates
3814them to XPath 1.0 expressions. Such expressions can be used in lxml or
3815another XPath engine to find the matching elements in an XML or HTML document.")
3816 (license bsd-3)))
3817
3818(define-public python2-cssselect
3819 (package-with-python2 python-cssselect))
60357f99
AE
3820
3821(define-public python-netifaces
3822 (package
3823 (name "python-netifaces")
3824 (version "0.10.4")
3825 (source
3826 (origin
3827 (method url-fetch)
3828 (uri (string-append
3829 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
3830 version
3831 ".tar.gz"))
3832 (sha256
3833 (base32
3834 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
3835 (build-system python-build-system)
3836 (inputs
3837 `(("python-setuptools" ,python-setuptools)))
3838 (home-page
3839 "https://bitbucket.org/al45tair/netifaces")
3840 (synopsis
3841 "Python module for portable network interface information")
3842 (description
3843 "Netifaces is a Python module providing information on network
3844interfaces in an easy and portable manner.")
3845 (license license:expat)))
3846
3847(define-public python2-netifaces
3848 (package-with-python2 python-netifaces))
92cb152b 3849
32f77c04
RW
3850(define-public python-networkx
3851 (package
3852 (name "python-networkx")
3853 (version "1.9.1")
3854 (source
3855 (origin
3856 (method url-fetch)
3857 (uri (string-append
3858 "https://pypi.python.org/packages/source/n/networkx/networkx-"
3859 version ".tar.gz"))
3860 (sha256
3861 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
3862 (build-system python-build-system)
3863 ;; python-decorator is needed at runtime
3864 (propagated-inputs
3865 `(("python-decorator" ,python-decorator)))
3866 (native-inputs
3867 `(("python-setuptools" ,python-setuptools)
3868 ("python-nose" ,python-nose)))
3869 (home-page "http://networkx.github.io/")
3870 (synopsis "Python module for creating and manipulating graphs and networks")
3871 (description
3872 "NetworkX is a Python package for the creation, manipulation, and study
3873of the structure, dynamics, and functions of complex networks.")
3874 (license bsd-3)))
3875
3876(define-public python2-networkx
3877 (package-with-python2 python-networkx))
3878
92cb152b
RW
3879(define-public snakemake
3880 (package
3881 (name "snakemake")
3882 (version "3.2.1")
3883 (source
3884 (origin
3885 (method url-fetch)
3886 (uri (string-append
3887 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
3888 version ".tar.gz"))
3889 (sha256
3890 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
3891 (build-system python-build-system)
3892 (inputs `(("python-setuptools" ,python-setuptools)))
3893 (home-page "https://bitbucket.org/johanneskoester/snakemake")
3894 (synopsis "Python-based execution environment for make-like workflows")
3895 (description
3896 "Snakemake aims to reduce the complexity of creating workflows by
3897providing a clean and modern domain specific specification language (DSL) in
3898Python style, together with a fast and comfortable execution environment.")
3899 (license license:expat)))
a1920bc9 3900
35de1fbd
RW
3901(define-public python-seaborn
3902 (package
3903 (name "python-seaborn")
3904 (version "0.5.1")
3905 (source
3906 (origin
3907 (method url-fetch)
3908 (uri (string-append
3909 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
3910 version ".tar.gz"))
3911 (sha256
3912 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
3913 (build-system python-build-system)
3914 (propagated-inputs
3915 `(("python-pandas" ,python-pandas)
3916 ("python-matplotlib" ,python-matplotlib)
3917 ("python-scipy" ,python-scipy)))
3918 (native-inputs
3919 `(("python-setuptools" ,python-setuptools)))
3920 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
3921 (synopsis "Statistical data visualization")
3922 (description
3923 "Seaborn is a library for making attractive and informative statistical
3924graphics in Python. It is built on top of matplotlib and tightly integrated
3925with the PyData stack, including support for numpy and pandas data structures
3926and statistical routines from scipy and statsmodels.")
3927 (license bsd-3)))
3928
3929(define-public python2-seaborn
3930 (let ((seaborn (package-with-python2 python-seaborn)))
3931 (package (inherit seaborn)
3932 (propagated-inputs
3933 `(("python2-pytz" ,python2-pytz)
3934 ,@(package-propagated-inputs seaborn))))))
3935
90fc547f
RW
3936(define-public python-sympy
3937 (package
3938 (name "python-sympy")
3939 (version "0.7.6")
3940 (source
3941 (origin
3942 (method url-fetch)
3943 (uri (string-append
3944 "https://github.com/sympy/sympy/releases/download/sympy-"
3945 version "/sympy-" version ".tar.gz"))
3946 (sha256
3947 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
3948 (build-system python-build-system)
3949 (native-inputs
3950 `(("python-setuptools" ,python-setuptools)))
3951 (home-page "http://www.sympy.org/")
3952 (synopsis "Python library for symbolic mathematics")
3953 (description
3954 "SymPy is a Python library for symbolic mathematics. It aims to become a
3955full-featured computer algebra system (CAS) while keeping the code as simple
3956as possible in order to be comprehensible and easily extensible.")
3957 (license bsd-3)))
3958
3959(define-public python2-sympy
3960 (package-with-python2 python-sympy))
3961
a1920bc9
FB
3962(define-public python-testlib
3963 (package
3964 (name "python-testlib")
3965 (version "0.6.5")
3966 (source
3967 (origin
3968 (method url-fetch)
3969 (uri (string-append
3970 "https://pypi.python.org/packages/source/t/testlib/testlib-"
3971 version ".zip"))
3972 (sha256
3973 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
3974 (build-system python-build-system)
3975 (inputs
3976 `(("python-setuptools" ,python-setuptools)))
3977 (native-inputs
3978 `(("unzip" ,unzip)))
3979 (arguments
3980 `(#:phases
3981 (alist-replace
3982 'unpack
3983 (lambda* (#:key inputs outputs #:allow-other-keys)
3984 (let ((unzip (string-append (assoc-ref inputs "unzip")
3985 "/bin/unzip"))
3986 (source (assoc-ref inputs "source")))
3987 (and (zero? (system* unzip source))
3988 (chdir (string-append "testlib-" ,version)))))
3989 %standard-phases)))
3990 (synopsis "Python micro test suite harness")
3991 (description "A micro unittest suite harness for Python.")
3992 (home-page "https://github.com/trentm/testlib")
1cb9c006 3993 (license license:expat)))
a1920bc9
FB
3994
3995(define-public python2-testlib
3996 (package-with-python2 python-testlib))
db62afa5
LC
3997
3998(define-public python2-xlib
3999 (package
4000 (name "python2-xlib")
4001 (version "0.14")
4002 (source (origin
4003 (method url-fetch)
4004 (uri (string-append "mirror://sourceforge/python-xlib/"
4005 "python-xlib-" version ".tar.gz"))
4006 (sha256
4007 (base32
4008 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4009 (build-system python-build-system)
4010 (arguments
4011 `(#:python ,python-2 ;Python 2 only
4012 #:tests? #f)) ;no tests
4013 (inputs
4014 `(("python-setuptools" ,python-setuptools)))
4015 (home-page "http://python-xlib.sourceforge.net/")
4016 (synopsis "Python X11 client library")
4017 (description
4018 "The Python X Library is intended to be a fully functional X client
4019library for Python programs. It is useful to implement low-level X clients.
4020It is written entirely in Python.")
4021 (license gpl2+)))
0234ca06
DT
4022
4023(define-public python-singledispatch
4024 (package
4025 (name "python-singledispatch")
4026 (version "3.4.0.3")
4027 (source
4028 (origin
4029 (method url-fetch)
4030 (uri (string-append
4031 "https://pypi.python.org/packages/source/s/singledispatch/"
4032 "singledispatch-" version ".tar.gz"))
4033 (sha256
4034 (base32
4035 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4036 (build-system python-build-system)
4037 (native-inputs
4038 `(("python-setuptools" ,python-setuptools)))
4039 (propagated-inputs
4040 `(("python-six" ,python-six)))
4041 (home-page
4042 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4043 (synopsis "Backport of singledispatch feature from Python 3.4")
4044 (description
4045 "This library brings functools.singledispatch from Python 3.4 to Python
40462.6-3.3.")
4047 (license license:expat)))
4048
4049(define-public python2-singledispatch
4050 (package-with-python2 python-singledispatch))
feaae484 4051
310d218f
RW
4052(define-public python-tornado
4053 (package
4054 (name "python-tornado")
4055 (version "4.1")
4056 (source
4057 (origin
4058 (method url-fetch)
4059 (uri (string-append
4060 "https://pypi.python.org/packages/source/t/tornado/"
4061 "tornado-" version ".tar.gz"))
4062 (sha256
4063 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
4064 (build-system python-build-system)
4065 (inputs
4066 `(("python-certifi" ,python-certifi)))
4067 (native-inputs
4068 `(("python-setuptools" ,python-setuptools)))
4069 (home-page "https://pypi.python.org/pypi/tornado/4.1")
4070 (synopsis "Python web framework and asynchronous networking library")
4071 (description
4072 "Tornado is a Python web framework and asynchronous networking library,
4073originally developed at FriendFeed. By using non-blocking network I/O,
4074Tornado can scale to tens of thousands of open connections, making it ideal
4075for long polling, WebSockets, and other applications that require a long-lived
4076connection to each user.")
4077 (license asl2.0)))
4078
4079(define-public python2-tornado
4080 (let ((tornado (package-with-python2 python-tornado)))
4081 (package (inherit tornado)
4082 (inputs
4083 `(("python2-backport-ssl-match-hostname"
4084 ,python2-backport-ssl-match-hostname)
4085 ,@(package-inputs tornado))))))
4086
feaae484
SB
4087(define-public python-waf
4088 (package
4089 (name "python-waf")
4090 (version "1.8.8")
4091 (source (origin
4092 (method url-fetch)
4093 (uri (string-append "https://waf.io/"
4094 "waf-" version ".tar.bz2"))
4095 (sha256
4096 (base32
4097 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4098 (build-system python-build-system)
4099 (arguments
4100 '(#:phases
4101 (modify-phases %standard-phases
4102 (replace 'build
4103 (lambda _
4104 (zero? (begin
4105 (system* "python" "waf-light" "configure")
4106 (system* "python" "waf-light" "build")))))
4107 (replace 'check
4108 (lambda _
4109 (zero? (system* "python" "waf" "--version"))))
4110 (replace 'install
4111 (lambda _
4112 (copy-file "waf" %output))))))
4113 (home-page "https://waf.io/")
4114 (synopsis "Python-based build system")
4115 (description
4116 "Waf is a Python-based framework for configuring, compiling and installing
4117applications.")
4118 (license bsd-3)))
4119
4120(define-public python2-waf
4121 (package-with-python2 python-waf))
45203542
RW
4122
4123(define-public python-pyzmq
4124 (package
4125 (name "python-pyzmq")
4126 (version "14.6.0")
4127 (source
4128 (origin
4129 (method url-fetch)
4130 (uri (string-append
4131 "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
4132 version ".tar.gz"))
4133 (sha256
4134 (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
4135 (build-system python-build-system)
4136 (arguments
4137 `(#:configure-flags
4138 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
4139 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
4140 ;; --inplace' for 'python setup.py test' to work.
4141 #:tests? #f))
4142 (inputs
4143 `(("zeromq" ,zeromq)))
4144 (native-inputs
4145 `(("pkg-config" ,pkg-config)
4146 ("python-nose" ,python-nose)
4147 ("python-setuptools" ,python-setuptools)))
4148 (home-page "http://github.com/zeromq/pyzmq")
4149 (synopsis "Python bindings for 0MQ")
4150 (description
4151 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
4152 (license bsd-4)))
4153
4154(define-public python2-pyzmq
4155 (package-with-python2 python-pyzmq))
d889e6c4
CR
4156
4157(define-public python-pep8
4158 (package
4159 (name "python-pep8")
4160 (version "1.6.2")
4161 (source
4162 (origin
4163 (method url-fetch)
4164 (uri (string-append
4165 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4166 version
4167 ".tar.gz"))
4168 (sha256
4169 (base32
4170 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
4171 (build-system python-build-system)
4172 (inputs
4173 `(("python-setuptools" ,python-setuptools)))
4174 (home-page "http://pep8.readthedocs.org/")
4175 (synopsis "Python style guide checker")
4176 (description
4177 "This tools checks Python code against some of the style conventions in
4178PEP 8.")
4179 (license license:expat)))
4180
4181(define-public python2-pep8
4182 (package-with-python2 python-pep8))
e31d7f44
CR
4183
4184(define-public python-pyflakes
4185 (package
4186 (name "python-pyflakes")
4187 (version "0.9.2")
4188 (source
4189 (origin
4190 (method url-fetch)
4191 (uri (string-append
4192 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
4193 version
4194 ".tar.gz"))
4195 (sha256
4196 (base32
4197 "0pvawddspdq0y22dbraq5gld9qr6rwa7zhmpfhl2b7v9rqiiqs82"))))
4198 (build-system python-build-system)
4199 (inputs
4200 `(("python-setuptools" ,python-setuptools)))
4201 (home-page
4202 "https://github.com/pyflakes/pyflakes")
4203 (synopsis "Passive checker of Python programs")
4204 (description
4205 "Pyflakes statically checks Python source code for common errors.")
4206 (license license:expat)))
a59e017c
CR
4207
4208(define-public python-mccabe
4209 (package
4210 (name "python-mccabe")
4211 (version "0.3.1")
4212 (source
4213 (origin
4214 (method url-fetch)
4215 (uri (string-append
4216 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
4217 version
4218 ".tar.gz"))
4219 (sha256
4220 (base32
4221 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
4222 (build-system python-build-system)
4223 (inputs
4224 `(("python-setuptools" ,python-setuptools)))
4225 (home-page "https://github.com/flintwork/mccabe")
4226 (synopsis "McCabe checker, plugin for flake8")
4227 (description
4228 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
4229complexity of Python source code.")
7362371d 4230 (license license:expat)))
a59e017c
CR
4231
4232(define-public python2-mccabe
4233 (package-with-python2 python-mccabe))
e8df8f47
CR
4234
4235;; Flake8 2.4.1 requires an older version of pep8.
4236;; This should be removed ASAP.
4237(define-public python-pep8-1.5.7
4238 (package (inherit python-pep8)
4239 (version "1.5.7")
4240 (source
4241 (origin
4242 (method url-fetch)
4243 (uri (string-append
4244 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4245 version
4246 ".tar.gz"))
4247 (sha256
4248 (base32
4249 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
4250
4251(define-public python2-pep8-1.5.7
4252 (package-with-python2 python-pep8-1.5.7))
4253
4254;; Flake8 2.4.1 requires an older version of pyflakes.
4255;; This should be removed ASAP.
4256(define-public python-pyflakes-0.8.1
4257 (package (inherit python-pyflakes)
4258 (version "0.8.1")
4259 (source
4260 (origin
4261 (method url-fetch)
4262 (uri (string-append
4263 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
4264 version
4265 ".tar.gz"))
4266 (sha256
4267 (base32
4268 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
4269
4270(define-public python2-pyflakes-0.8.1
4271 (package-with-python2 python-pyflakes))
4272
4273(define-public python-flake8
4274 (package
4275 (name "python-flake8")
4276 (version "2.4.1")
4277 (source
4278 (origin
4279 (method url-fetch)
4280 (uri (string-append
4281 "https://pypi.python.org/packages/source/f/flake8/flake8-"
4282 version
4283 ".tar.gz"))
4284 (sha256
4285 (base32
4286 "0dvmrpv7x98xkzffjz1z7lqr90sp5zdz16bdwckfd1cckpjvnzif"))))
4287 (build-system python-build-system)
4288 (inputs
4289 `(("python-setuptools" ,python-setuptools)
4290 ("python-pep8" ,python-pep8-1.5.7)
4291 ("python-pyflakes" ,python-pyflakes-0.8.1)
4292 ("python-mccabe" ,python-mccabe)
4293 ("python-mock" ,python-mock)
4294 ("python-nose" ,python-nose)))
4295 (home-page "https://gitlab.com/pycqa/flake8")
4296 (synopsis
4297 "The modular source code checker: pep8, pyflakes and co")
4298 (description
4299 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
4300 (license license:expat)))
4301
4302(define-public python2-flake8
4303 (package-with-python2 python-flake8))