1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages python)
28 #:use-module ((guix licenses)
29 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
30 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+
31 psfl public-domain x11-style))
32 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages databases)
36 #:use-module (gnu packages fontutils)
37 #:use-module (gnu packages gdbm)
38 #:use-module (gnu packages gcc)
39 #:use-module (gnu packages ghostscript)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gtk)
42 #:use-module (gnu packages icu4c)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages imagemagick)
45 #:use-module (gnu packages libffi)
46 #:use-module (gnu packages maths)
47 #:use-module (gnu packages multiprecision)
48 #:use-module (gnu packages networking)
49 #:use-module (gnu packages ncurses)
50 #:use-module (gnu packages openssl)
51 #:use-module (gnu packages perl)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages readline)
54 #:use-module (gnu packages texlive)
55 #:use-module (gnu packages texinfo)
56 #:use-module (gnu packages web)
57 #:use-module (gnu packages base)
58 #:use-module (gnu packages xml)
59 #:use-module (gnu packages xorg)
60 #:use-module (gnu packages zip)
61 #:use-module (guix packages)
62 #:use-module (guix download)
63 #:use-module (guix git-download)
64 #:use-module (guix utils)
65 #:use-module (guix build-system gnu)
66 #:use-module (guix build-system python)
67 #:use-module (guix build-system trivial)
68 #:use-module (srfi srfi-1))
70 (define-public python-2
77 (uri (string-append "https://www.python.org/ftp/python/"
78 version "/Python-" version ".tar.xz"))
79 (patches (list (search-patch "python-libffi-mips-n32-fix.patch")
80 (search-patch "python2-sqlite-3.8.4-test-fix.patch")))
81 (patch-flags '("-p0"))
84 "18gnpyh071dxa0rv3silrz92jw9qpblswzwv4gzqcwxzz20qxmhz"))))
85 (build-system gnu-build-system)
90 ;; test_bz2 test_distutils test_file test_file2k test_popen2
91 ;; test_shutil test_signal test_site test_slice test_smtplib
92 ;; test_smtpnet test_socket test_socketserver test_softspace
93 ;; test_sort test_sqlite test_ssl test_startfile test_str
94 ;; test_strftime test_string test_stringprep test_strop test_strptime
95 ;; test_strtod test_struct test_structmembers test_structseq
96 ;; test_subprocess test_sunaudiodev test_sundry test_symtable
97 ;; test_syntax test_sys test_sys_setprofile test_sys_settrace
98 ;; test_sysconfig test_tarfile test_tcl test_telnetlib test_tempfile
99 ;; test_textwrap test_thread test_threaded_import
100 ;; test_threadedtempfile test_threading test_threading_local
101 ;; test_threadsignals test_time test_timeout test_tk test_tokenize
102 ;; test_tools test_trace test_traceback test_transformer
103 ;; test_ttk_guionly test_ttk_textonly test_tuple test_typechecks
104 ;; test_ucn test_unary test_undocumented_details test_unicode
105 ;; test_unicode_file test_unicodedata test_univnewlines
106 ;; test_univnewlines2k test_unpack test_urllib test_urllib2
107 ;; test_urllib2_localnet test_urllib2net test_urllibnet test_urlparse
108 ;; test_userdict test_userlist test_userstring test_uu test_uuid
109 ;; test_wait3 test_wait4 test_warnings test_wave test_weakref
110 ;; test_weakset test_whichdb test_winreg test_winsound test_with
111 ;; test_wsgiref test_xdrlib test_xml_etree test_xml_etree_c
112 ;; test_xmllib test_xmlrpc test_xpickle test_xrange test_zipfile
113 ;; test_zipfile64 test_zipimport test_zipimport_support test_zlib
115 ;; test_aepack test_al test_applesingle test_ascii_formatd test_bsddb
116 ;; test_bsddb185 test_bsddb3 test_cd test_cl test_codecmaps_cn
117 ;; test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr
118 ;; test_codecmaps_tw test_ctypes test_curses test_dl test_gdb test_gl
119 ;; test_imageop test_imgfile test_ioctl test_kqueue
120 ;; test_linuxaudiodev test_macos test_macostools test_msilib
121 ;; test_multiprocessing test_ossaudiodev test_pep277
122 ;; test_scriptpackages
123 ;; 7 skips unexpected on linux2:
124 ;; test_ascii_formatd test_bsddb test_bsddb3 test_ctypes test_gdb
125 ;; test_ioctl test_multiprocessing
126 ;; One of the typical errors:
128 ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No such file or directory
131 (let ((bz2 (assoc-ref %build-inputs "bzip2"))
132 (gdbm (assoc-ref %build-inputs "gdbm"))
133 (libffi (assoc-ref %build-inputs "libffi"))
134 (sqlite (assoc-ref %build-inputs "sqlite"))
135 (openssl (assoc-ref %build-inputs "openssl"))
136 (readline (assoc-ref %build-inputs "readline"))
137 (zlib (assoc-ref %build-inputs "zlib"))
138 (out (assoc-ref %outputs "out")))
139 (list "--enable-shared" ; allow embedding
140 "--with-system-ffi" ; build ctypes
141 (string-append "CPPFLAGS="
143 "-I" gdbm "/include "
144 "-I" sqlite "/include "
145 "-I" openssl "/include "
146 "-I" readline "/include "
147 "-I" zlib "/include")
148 (string-append "LDFLAGS="
154 "-L" readline "/lib "
156 "-Wl,-rpath=" out "/lib")))
160 'configure 'patch-lib-shells
162 ;; Filter for existing files, since some may not exist in all
163 ;; versions of python that are built with this recipe.
164 (substitute* (filter file-exists?
165 '("Lib/subprocess.py"
167 "Lib/distutils/tests/test_spawn.py"
168 "Lib/test/test_subprocess.py"))
169 (("/bin/sh") (which "sh"))))
173 ;; 'Lib/test/test_site.py' needs a valid $HOME
174 (setenv "HOME" (getcwd)))
179 ("libffi" ,libffi) ; for ctypes
180 ("sqlite" ,sqlite) ; for sqlite extension
182 ("readline" ,readline)
185 `(("pkg-config" ,pkg-config)))
187 (list (search-path-specification
188 (variable "PYTHONPATH")
189 (files '("lib/python2.7/site-packages")))))
190 (home-page "http://python.org")
192 "High-level, dynamically-typed programming language")
194 "Python is a remarkably powerful dynamic programming language that
195 is used in a wide variety of application domains. Some of its key
196 distinguishing features include: clear, readable syntax; strong
197 introspection capabilities; intuitive object orientation; natural
198 expression of procedural code; full modularity, supporting hierarchical
199 packages; exception-based error handling; and very high level dynamic
203 (define-public python
204 (package (inherit python-2)
208 (uri (string-append "https://www.python.org/ftp/python/"
209 version "/Python-" version ".tar.xz"))
210 (patches (list (search-patch "python-fix-tests.patch")
211 ;; XXX Try removing this patch for python > 3.4.3
212 (search-patch "python-disable-ssl-test.patch")))
213 (patch-flags '("-p0"))
216 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
217 (arguments (substitute-keyword-arguments (package-arguments python-2)
220 (list (search-path-specification
221 (variable "PYTHONPATH")
222 (files (list (string-append "lib/python"
223 (version-major+minor version)
224 "/site-packages"))))))))
226 (define-public python-wrapper
227 (package (inherit python)
228 (name "python-wrapper")
230 (build-system trivial-build-system)
231 (propagated-inputs `(("python" ,python)))
233 `(#:modules ((guix build utils))
236 (use-modules (guix build utils))
237 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
238 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
242 (symlink (string-append python old)
243 (string-append bin "/" new)))
244 `("python3", "pydoc3", "idle3")
245 `("python", "pydoc", "idle"))))))
246 (description (string-append (package-description python)
247 "\n\nThis wrapper package provides symbolic links to the python binaries
248 without version suffix."))))
251 (define-public python-pytz
258 (uri (string-append "https://launchpad.net/pytz/main/" version
259 "/+download/pytz-" version ".tar.bz2"))
262 "19giwgfcrg0nr1gdv49qnmf2jb2ilkcfc7qyqvfpz4dp0p64ksv5"))))
263 (build-system python-build-system)
264 (arguments `(#:tests? #f)) ; no test target
265 (home-page "https://launchpad.net/pytz")
266 (synopsis "Python timezone library")
268 "This library allows accurate and cross platform timezone calculations
269 using Python 2.4 or higher and provides access to the Olson timezone database.")
272 (define-public python2-pytz
273 (package-with-python2 python-pytz))
276 (define-public python-babel
278 (name "python-babel")
283 (uri (string-append "https://pypi.python.org/packages/source/B/Babel/Babel-"
287 "0bnin777lc53nxd1hp3apq410jj5wx92n08h7h4izpl4f4sx00lz"))))
288 (build-system python-build-system)
290 `(("python-pytz" ,python-pytz)
291 ("python-setuptools" ,python-setuptools)))
292 (arguments `(#:tests? #f)) ; no test target
293 (home-page "http://babel.pocoo.org/")
295 "Tools for internationalizing Python applications")
297 "Babel is composed of two major parts:
298 - tools to build and work with gettext message catalogs
299 - a Python interface to the CLDR (Common Locale Data Repository), providing
300 access to various locale display names, localized number and date formatting,
304 (define-public python2-babel
305 (package-with-python2 python-babel))
307 (define-public python2-backport-ssl-match-hostname
309 (name "python2-backport-ssl-match-hostname")
315 "https://pypi.python.org/packages/source/b/"
316 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
320 "1bnn47ipvhy49n0m50v27lp4xj6sqdkdw676ypd7pawsn1zhwh87"))))
321 (build-system python-build-system)
322 (arguments `(#:python ,python-2))
324 `(("python2-setuptools" ,python2-setuptools)))
325 (home-page "https://pypi.python.org/pypi/backports.ssl_match_hostname")
326 (synopsis "Backport of ssl.match_hostname() function from Python 3.4")
328 "This backport brings the ssl.match_hostname() function to users of
329 earlier versions of Python. The function checks the hostname in the
330 certificate returned by the server to which a connection has been established,
331 and verifies that it matches the intended target hostname.")
334 (define-public python-h5py
341 (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-"
345 "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps"))))
346 (build-system python-build-system)
348 `(("python-cython" ,python-cython)
349 ("python-numpy" ,python-numpy)
352 `(("python-setuptools" ,python-setuptools)))
353 (arguments `(#:tests? #f)) ; no test target
354 (home-page "http://www.h5py.org/")
355 (synopsis "Read and write HDF5 files from Python")
357 "The h5py package provides both a high- and low-level interface to the
358 HDF5 library from Python. The low-level interface is intended to be a
359 complete wrapping of the HDF5 API, while the high-level component supports
360 access to HDF5 files, datasets and groups using established Python and NumPy
364 (define-public python2-h5py
365 (let ((h5py (package-with-python2 python-h5py)))
366 (package (inherit h5py)
368 `(("python2-numpy" ,python2-numpy)
371 (package-inputs h5py)))))))
373 (define-public python-lockfile
375 (name "python-lockfile")
380 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
381 "lockfile-" version ".tar.gz"))
384 "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
385 (build-system python-build-system)
386 (arguments '(#:test-target "check"))
387 (home-page "http://code.google.com/p/pylockfile/")
388 (synopsis "Platform-independent file locking module")
390 "The lockfile package exports a LockFile class which provides a simple
391 API for locking files.")
392 (license license:expat)))
394 (define-public python2-lockfile
395 (package-with-python2 python-lockfile))
397 (define-public python-mock
404 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
405 "mock-" version ".tar.gz"))
408 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
409 (build-system python-build-system)
410 (arguments '(#:test-target "check"))
411 (home-page "http://code.google.com/p/mock/")
412 (synopsis "Python mocking and patching library for testing")
414 "Mock is a library for testing in Python. It allows you to replace parts
415 of your system under test with mock objects and make assertions about how they
417 (license license:expat)))
419 (define-public python2-mock
420 (package-with-python2 python-mock))
423 (define-public python-setuptools
425 (name "python-setuptools")
430 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
434 "04bfk7si1pwj3b5k2b1x9b1zkiclybmzpw6alrs5bciri56lg9zs"))))
435 (build-system python-build-system)
436 ;; FIXME: Tests require pytest, which itself relies on setuptools.
437 ;; One could bootstrap with an internal untested setuptools.
440 (home-page "https://pypi.python.org/pypi/setuptools")
442 "Library designed to facilitate packaging Python projects")
444 "Setuptools is a fully-featured, stable library designed to facilitate
445 packaging Python projects, where packaging includes:
446 Python package and module definitions,
447 distribution package metadata,
449 project installation,
450 platform-specific details,
454 (define-public python2-setuptools
455 (package-with-python2 python-setuptools))
458 (define-public python-pycrypto
460 (name "python-pycrypto")
465 (uri (string-append "https://pypi.python.org/packages/source/p/"
466 "pycrypto/pycrypto-" version ".tar.gz"))
469 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
470 (build-system python-build-system)
472 `(("python-setuptools" ,python-setuptools)))
479 'build 'set-build-env
480 ;; pycrypto runs an autoconf configure script behind the scenes
482 (setenv "CONFIG_SHELL" (which "bash")))
484 (home-page "http://www.pycrypto.org/")
485 (synopsis "Cryptographic modules for Python")
487 "Pycrypto is a collection of both secure hash functions (such as SHA256
488 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
489 etc.). The package is structured to make adding new modules easy.")
490 (license public-domain)))
492 (define-public python-keyring
494 (name "python-keyring")
499 (uri (string-append "https://pypi.python.org/packages/source/k/"
500 "keyring/keyring-" version ".zip"))
503 "1vxazfbcwggyfyramh55shkxs08skhpqrkm6lrrjnygnm8c1l2zg"))))
504 (build-system python-build-system)
507 ("python-setuptools" ,python-setuptools)
508 ("python-mock" ,python-mock)))
510 `(("python-pycrypto" ,python-pycrypto)))
512 `(#:tests? #f ;TODO: tests require pytest
517 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
519 (source (assoc-ref %build-inputs "source")))
520 (and (zero? (system* unzip source))
521 (chdir (string-append "keyring-" ,version)))))
523 (home-page "http://bitbucket.org/kang/python-keyring-lib")
524 (synopsis "Store and access your passwords safely")
526 "The Python keyring lib provides a easy way to access the system keyring
527 service from python. It can be used in any application that needs safe
529 ;; "MIT" and PSF dual license
532 (define-public python-six
539 (uri (string-append "https://pypi.python.org/packages/source/s/"
540 "six/six-" version ".tar.gz"))
543 "164rns26aqfqx2hwi0qq3scl50s69japn0fvgvrjsbyg7r1mxf67"))))
544 (build-system python-build-system)
546 `(("python-setuptools" ,python-setuptools)))
547 (home-page "http://pypi.python.org/pypi/six/")
548 (synopsis "Python 2 and 3 compatibility utilities")
550 "Six is a Python 2 and 3 compatibility library. It provides utility
551 functions for smoothing over the differences between the Python versions with
552 the goal of writing Python code that is compatible on both Python versions.
553 Six supports every Python version since 2.5. It is contained in only one
554 Python file, so it can be easily copied into your project.")
557 (define-public python2-six
558 (package-with-python2 python-six))
560 (define-public python-dateutil-2
562 (name "python-dateutil")
567 (uri (string-append "https://pypi.python.org/packages/source/p/"
568 name "/" name "-" version ".tar.gz"))
571 "0s74ad6r789810s10dxgvaf48ni6adac2icrdad34zxygqq6bj7f"))))
572 (build-system python-build-system)
574 `(("python-setuptools" ,python-setuptools)
575 ("python-six" ,python-six)))
576 (home-page "http://labix.org/python-dateutil")
577 (synopsis "Extensions to the standard datetime module")
579 "The dateutil module provides powerful extensions to the standard
580 datetime module, available in Python 2.3+.")
583 (define-public python2-dateutil-2
584 (package-with-python2 python-dateutil-2))
586 (define-public python-dateutil
588 (name "python-dateutil")
589 (version "1.5") ; last version for python < 3
593 (uri (string-append "http://labix.org/download/python-dateutil/"
594 "python-dateutil-" version ".tar.gz"))
597 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
598 (build-system python-build-system)
600 `(("python-setuptools" ,python-setuptools)))
601 (home-page "http://labix.org/python-dateutil")
602 (synopsis "Extensions to the standard datetime module")
604 "The dateutil module provides powerful extensions to the standard
605 datetime module, available in Python 2.3+.")
608 (define-public python2-dateutil
609 (package-with-python2 python-dateutil))
611 (define-public python-parsedatetime
613 (name "python-parsedatetime")
618 (uri (string-append "https://pypi.python.org/packages/source/p/"
619 "parsedatetime/parsedatetime-" version ".tar.gz"))
622 "1zcj0pzxvpl4j2ma9awmpkfxldybi2kjaahjjpmgfbg5cxwcjsqv"))))
623 (build-system python-build-system)
625 `(("python-setuptools" ,python-setuptools)))
626 (arguments `(#:tests? #f)) ;no test target
627 (home-page "http://github.com/bear/parsedatetime/")
629 "Parse human-readable date/time text")
631 "Parse human-readable date/time text")
634 (define-public python-pandas
636 (name "python-pandas")
641 (uri (string-append "https://pypi.python.org/packages/source/p/"
642 "pandas/pandas-" version ".tar.gz"))
644 (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0"))))
645 (build-system python-build-system)
647 `(;; Three tests fail:
648 ;; - test_read_google
650 ;; - test_month_range_union_tz_dateutil
653 `(("python-numpy" ,python-numpy)
654 ("python-pytz" ,python-pytz)
655 ("python-dateutil" ,python-dateutil-2)))
657 `(("python-nose" ,python-nose)
658 ("python-setuptools" ,python-setuptools)))
659 (home-page "http://pandas.pydata.org")
660 (synopsis "Data structures for data analysis, time series, and statistics")
662 "Pandas is a Python package providing fast, flexible, and expressive data
663 structures designed to make working with structured (tabular,
664 multidimensional, potentially heterogeneous) and time series data both easy
665 and intuitive. It aims to be the fundamental high-level building block for
666 doing practical, real world data analysis in Python.")
669 (define-public python2-pandas
670 (package-with-python2 python-pandas))
672 (define-public python-tzlocal
674 (name "python-tzlocal")
679 (uri (string-append "https://pypi.python.org/packages/source/t/"
680 "tzlocal/tzlocal-" version ".zip"))
683 "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9"))))
684 (build-system python-build-system)
687 ("python-setuptools" ,python-setuptools)))
688 (inputs `(("python-pytz" ,python-pytz)))
694 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
696 (source (assoc-ref %build-inputs "source")))
697 (and (zero? (system* unzip source))
698 (chdir (string-append "tzlocal-" ,version)))))
700 (home-page "https://github.com/regebro/tzlocal")
702 "Local timezone information for Python")
704 "Tzlocal returns a tzinfo object with the local timezone information.
705 This module attempts to fix a glaring hole in pytz, that there is no way to
706 get the local timezone information, unless you know the zoneinfo name, and
707 under several distributions that's hard or impossible to figure out.")
710 (define-public python-pysam
712 (name "python-pysam")
717 (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-"
721 "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459"))))
722 (build-system python-build-system)
724 `(#:tests? #f ; tests are excluded in the manifest
729 (setenv "LDFLAGS" "-lncurses")
730 (setenv "CFLAGS" "-D_CURSES_LIB=1"))
733 `(("python-cython" ,python-cython)
734 ("python-setuptools" ,python-setuptools)
737 (home-page "https://github.com/pysam-developers/pysam")
738 (synopsis "Python bindings to the SAMtools C API")
740 "Pysam is a Python module for reading and manipulating files in the
741 SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It
742 also includes an interface for tabix.")
743 (license license:expat)))
745 (define-public python2-pysam
746 (package-with-python2 python-pysam))
748 (define-public python2-pysqlite
750 (name "python2-pysqlite")
751 (version "2.6.3a") ; see below
755 ;; During the switch from code.google.com to pypi.python.org, the 2.6.3
756 ;; tarball was modified, but the version number was kept:
757 ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>.
758 ;; Here we want to refer to the pypi-hosted 2.6.3 tarball.
760 "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-"
764 "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y"))))
765 (build-system python-build-system)
767 `(("sqlite" ,sqlite)))
769 `(#:python ,python-2 ; incompatible with Python 3
770 #:tests? #f)) ; no test target
771 (home-page "https://pypi.python.org/pypi/pysqlite")
772 (synopsis "SQLite bindings for Python")
774 "Pysqlite provides SQLite bindings for Python that comply to the
776 (license license:zlib)))
779 (define-public python2-mechanize
781 (name "python2-mechanize")
786 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
790 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
791 (build-system python-build-system)
793 `(("python2-setuptools" ,python2-setuptools)))
795 `(#:python ,python-2 ; apparently incompatible with Python 3
797 ;; test fails with message
798 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
800 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
802 ;; The source code is from March 2011 and probably not up-to-date
803 ;; with respect to python unit tests.
804 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
806 "Stateful programmatic web browsing in Python")
808 "Mechanize implements stateful programmatic web browsing in Python,
809 after Andy Lester’s Perl module WWW::Mechanize.")
810 (license (non-copyleft "file://COPYING"
811 "See COPYING in the distribution."))))
814 (define-public python-simplejson
816 (name "python-simplejson")
821 (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-"
825 "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks"))))
826 (build-system python-build-system)
827 (home-page "http://simplejson.readthedocs.org/en/latest/")
829 "Json library for Python")
831 "JSON (JavaScript Object Notation) is a subset of JavaScript syntax
832 (ECMA-262 3rd edition) used as a lightweight data interchange format.
834 Simplejson exposes an API familiar to users of the standard library marshal
835 and pickle modules. It is the externally maintained version of the json
836 library contained in Python 2.6, but maintains compatibility with Python 2.5
837 and (currently) has significant performance advantages, even without using
838 the optional C extension for speedups. Simplejson is also supported on
842 (define-public python2-simplejson
843 (package-with-python2 python-simplejson))
846 (define-public python2-pyicu
848 (name "python2-pyicu")
853 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
857 "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw"))))
858 (build-system python-build-system)
862 `(#:python ,python-2 ; Python 3 works also, but needs special care for
863 ; linking with libpython3.3m
864 #:tests? #f)) ; no check target
865 (home-page "http://pyicu.osafoundation.org/")
866 (synopsis "Python extension wrapping the ICU C++ API")
868 "PyICU is a python extension wrapping the ICU C++ API.")
871 (define-public python2-dogtail
872 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
873 ;; spaces in indentation" with Python 3.
875 (name "python2-dogtail")
880 "https://fedorahosted.org/released/dogtail/dogtail-"
884 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
885 (build-system python-build-system)
886 (arguments `(#:python ,python-2
887 #:tests? #f)) ; invalid command "test"
888 (home-page "https://fedorahosted.org/dogtail/")
889 (synopsis "GUI test tool and automation framework written in Python")
891 "Dogtail is a GUI test tool and automation framework written in Python.
892 It uses Accessibility (a11y) technologies to communicate with desktop
893 applications. dogtail scripts are written in Python and executed like any
894 other Python program.")
897 (define-public python2-empy
899 (name "python2-empy")
903 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
907 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
908 (build-system python-build-system)
911 #:phases (alist-replace
914 (zero? (system* "./test.sh")))
916 (home-page "http://www.alcyone.com/software/empy/")
917 (synopsis "Templating system for Python")
919 "EmPy is a system for embedding Python expressions and statements in
920 template text; it takes an EmPy source file, processes it, and produces
921 output. This is accomplished via expansions, which are special signals to the
922 EmPy system and are set off by a special prefix (by default the at sign, @).
923 EmPy can expand arbitrary Python expressions and statements in this way, as
924 well as a variety of special forms. Textual data not explicitly delimited in
925 this way is sent unaffected to the output, allowing Python to be used in
926 effect as a markup language. Also supported are callbacks via hooks,
927 recording and playback via diversions, and dynamic, chainable filters. The
928 system is highly configurable via command line options and embedded
932 (define-public python2-element-tree
934 (name "python2-element-tree")
939 "http://effbot.org/media/downloads/elementtree-"
940 version "-20050316.tar.gz"))
943 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
944 (build-system python-build-system)
946 `(#:python ,python-2 ; seems to be part of Python 3
947 #:tests? #f)) ; no 'test' sub-command
948 (synopsis "Toolkit for XML processing in Python")
950 "ElementTree is a Python library supporting lightweight XML processing.")
951 (home-page "http://effbot.org/zone/element-index.htm")
952 (license (x11-style "http://docs.python.org/2/license.html"
953 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
954 0.9.0 THROUGH 1.2\"."))))
956 (define-public python2-pybugz
958 (name "python2-pybugz")
963 "http://bits.liquidx.net/projects/pybugz/pybugz-"
967 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
968 (patches (map search-patch
969 (list "pybugz-stty.patch"
970 "pybugz-encode-error.patch")))))
971 (build-system python-build-system)
973 `(#:python ,python-2 ; SyntaxError with Python 3
974 #:tests? #f)) ; no 'test' sub-command
975 (inputs `(("element-tree" ,python2-element-tree)))
976 (synopsis "Python and command-line interface to Bugzilla")
978 "PyBugz is a Python library and command-line tool to query the Bugzilla
979 bug tracking system. It is meant as an aid to speed up interaction with the
981 (home-page "http://www.liquidx.net/pybugz/")
984 (define-public python-enum34
986 (name "python-enum34")
991 (uri (string-append "https://pypi.python.org/packages/source/e/"
992 "enum34/enum34-" version ".tar.gz"))
995 "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq"))))
996 (build-system python-build-system)
998 `(("python-setuptools" ,python-setuptools)))
1003 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1005 (home-page "https://pypi.python.org/pypi/enum34")
1006 (synopsis "Backported Python 3.4 Enum")
1008 "Enum34 is the new Python stdlib enum module available in Python 3.4
1009 backported for previous versions of Python from 2.4 to 3.3.")
1012 (define-public python-parse-type
1014 (name "python-parse-type")
1019 (uri (string-append "https://pypi.python.org/packages/source/p/"
1020 "parse_type/parse_type-" version ".tar.gz"))
1023 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1024 (build-system python-build-system)
1026 `(("python-setuptools" ,python-setuptools)
1027 ("python-six" ,python-six)
1028 ("python-parse" ,python-parse)
1029 ("python-enum34" ,python-enum34))) ;required for python<3.4
1030 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1031 (home-page "https://github.com/jenisys/parse_type")
1032 (synopsis "Extended parse module")
1034 "Parse_type extends the python parse module.")
1037 (define-public python-parse
1039 (name "python-parse")
1044 (uri (string-append "https://pypi.python.org/packages/source/p/"
1045 "parse/parse-" version ".tar.gz"))
1048 "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57"))))
1049 (build-system python-build-system)
1054 (lambda _ (zero? (system* "python" "test_parse.py")))
1056 (home-page "https://github.com/r1chardj0n3s/parse")
1057 (synopsis "Parse strings")
1059 "Parse strings using a specification based on the Python format()
1064 (define-public scons
1070 (uri (string-append "mirror://sourceforge/scons/scons-"
1074 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1075 (build-system python-build-system)
1077 ;; With Python 3.x, fails to build with a syntax error.
1078 `(#:python ,python-2
1079 #:tests? #f)) ; no 'python setup.py test' command
1080 (home-page "http://scons.org/")
1081 (synopsis "Software construction tool written in Python")
1083 "SCons is a software construction tool. Think of SCons as an improved,
1084 cross-platform substitute for the classic Make utility with integrated
1085 functionality similar to autoconf/automake and compiler caches such as ccache.
1086 In short, SCons is an easier, more reliable and faster way to build
1090 (define-public python-extras
1092 (name "python-extras")
1098 "https://pypi.python.org/packages/source/e/extras/extras-"
1102 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1103 (build-system python-build-system)
1105 `(("python-setuptools" ,python-setuptools)))
1107 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1109 (home-page "https://github.com/testing-cabal/extras")
1110 (synopsis "Useful extensions to the Python standard library")
1112 "Extras is a set of extensions to the Python standard library.")
1113 (license license:expat)))
1115 (define-public python2-extras
1116 (package-with-python2 python-extras))
1118 (define-public python-mimeparse
1120 (name "python-mimeparse")
1126 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1130 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1131 (build-system python-build-system)
1133 `(("python-setuptools" ,python-setuptools)))
1135 '(#:tests? #f)) ; no setup.py test command
1137 "https://github.com/dbtsai/python-mimeparse")
1138 (synopsis "Python library for parsing MIME types")
1140 "Mimeparse provides basic functions for parsing MIME type names and
1141 matching them against a list of media-ranges.")
1142 (license license:expat)))
1144 (define-public python2-mimeparse
1145 (package-with-python2 python-mimeparse))
1147 (define-public python-nose
1149 (name "python-nose")
1155 "https://pypi.python.org/packages/source/n/nose/nose-"
1159 "00qymfgwg4iam4xi0w9bnv7lcb3fypq1hzfafzgs1rfmwaj67g3n"))))
1160 (build-system python-build-system)
1162 `(("python-setuptools" ,python-setuptools)))
1164 '(#:tests? #f)) ; FIXME: test suite fails
1165 (home-page "http://readthedocs.org/docs/nose/")
1166 (synopsis "Python testing library")
1168 "Nose extends the unittest library to make testing easier.")
1169 (license lgpl2.0+)))
1171 (define-public python2-nose
1172 (package-with-python2 python-nose))
1174 (define-public python-unittest2
1176 (name "python-unittest2")
1182 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1186 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1187 (build-system python-build-system)
1189 `(("python-setuptools" ,python-setuptools)))
1190 (home-page "http://pypi.python.org/pypi/unittest2")
1191 (synopsis "Python unit testing library")
1193 "Unittest2 is a replacement for the unittest module in the Python
1197 (define-public python2-unittest2
1198 (package (inherit python-unittest2)
1199 (name "python2-unittest2")
1205 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1209 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1211 `(("python2-setuptools" ,python-setuptools)))
1213 `(#:python ,python-2
1214 #:tests? #f)))) ; no setup.py test command
1216 (define-public python-py
1224 "https://pypi.python.org/packages/source/p/py/py-"
1228 "1jkhffpai419v5rickm2vz86p9bkg3b3kcm2k4bi5wfajhw2m3xs"))))
1229 (build-system python-build-system)
1231 `(("python-setuptools" ,python-setuptools)))
1232 (home-page "http://pylib.readthedocs.org/")
1233 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1235 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1236 code introspection, and logging.")
1237 (license license:expat)))
1239 (define-public python2-py
1240 (package-with-python2 python-py))
1242 (define-public python-pytest
1244 (name "python-pytest")
1250 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1254 "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
1255 (modules '((guix build utils)))
1257 ;; One of the tests involves the /usr directory, so it fails.
1258 '(substitute* "testing/test_argcomplete.py"
1259 (("def test_remove_dir_prefix\\(self\\):")
1260 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1261 (build-system python-build-system)
1263 `(("python-setuptools" ,python-setuptools)
1264 ("python-py" ,python-py)
1265 ("python-nose" ,python-nose)
1266 ("python-mock" ,python-mock)))
1267 (home-page "http://pytest.org")
1268 (synopsis "Python testing library")
1270 "Pytest is a testing tool that provides auto-discovery of test modules
1271 and functions, detailed info on failing assert statements, modular fixtures,
1272 and many external plugins.")
1273 (license license:expat)))
1275 (define-public python2-pytest
1276 (package-with-python2 python-pytest))
1278 (define-public python-scripttest
1280 (name "python-scripttest")
1286 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1290 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1291 (build-system python-build-system)
1293 `(("python-setuptools" ,python-setuptools)
1294 ("python-pytest" ,python-pytest)))
1295 (home-page "http://pythonpaste.org/scripttest/")
1296 (synopsis "Python library to test command-line scripts")
1297 (description "Scripttest is a Python helper library for testing
1298 interactive command-line applications. With it you can run a script in a
1299 subprocess and see the output as well as any file modifications.")
1300 (license license:expat)))
1302 (define-public python2-scripttest
1303 (package-with-python2 python-scripttest))
1305 (define-public python-testtools
1307 (name "python-testtools")
1313 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1317 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1318 (build-system python-build-system)
1320 `(("python-setuptools" ,python-setuptools)
1321 ("python-mimeparse" ,python-mimeparse)
1322 ("python-extras" ,python-extras)))
1323 (home-page "https://github.com/testing-cabal/testtools")
1325 "Extensions to the Python standard library unit testing framework")
1327 "Testtools extends the Python standard library unit testing framework to
1328 provide matchers, more debugging information, and cross-Python
1332 (define-public python2-testtools
1333 (package-with-python2 python-testtools))
1335 (define-public python-testscenarios
1337 (name "python-testscenarios")
1343 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1347 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1348 (build-system python-build-system)
1350 `(("python-setuptools" ,python-setuptools)
1351 ("python-testtools" ,python-testtools)
1352 ("python-mimeparse" ,python-mimeparse)))
1353 (home-page "https://launchpad.net/testscenarios")
1354 (synopsis "Pyunit extension for dependency injection")
1356 "Testscenarios provides clean dependency injection for Python unittest
1358 (license (list bsd-3 asl2.0)))) ; at the user's option
1360 (define-public python2-testscenarios
1361 (package-with-python2 python-testscenarios))
1363 (define-public python-testresources
1365 (name "python-testresources")
1371 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1375 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1376 (build-system python-build-system)
1378 `(("python-setuptools" ,python-setuptools)))
1379 (home-page "https://launchpad.net/testresources")
1381 "Pyunit extension for managing test resources")
1383 "Testresources is an extension to Python's unittest to allow declarative
1384 use of resources by test cases.")
1385 (license (list bsd-3 asl2.0)))) ; at the user's option
1387 (define-public python2-testresources
1388 (package-with-python2 python-testresources))
1390 (define-public python-subunit
1392 (name "python-subunit")
1398 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1402 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1403 (build-system python-build-system)
1405 `(("python-setuptools" ,python-setuptools)
1406 ("python-testtools" ,python-testtools)
1407 ("python-mimeparse" ,python-mimeparse)
1408 ("python-testscenarios" ,python-testscenarios)))
1409 (home-page "http://launchpad.net/subunit")
1410 (synopsis "Python implementation of the subunit protocol")
1412 "Python-subunit is a Python implementation of the subunit test streaming
1414 (license (list bsd-3 asl2.0)))) ; at the user's option
1416 (define-public python2-subunit
1417 (package-with-python2 python-subunit))
1419 (define-public python-fixtures
1421 (name "python-fixtures")
1427 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1431 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1432 (build-system python-build-system)
1434 `(("python-setuptools" ,python-setuptools)))
1436 '(#:tests? #f)) ; no setup.py test command
1437 (home-page "https://launchpad.net/python-fixtures")
1438 (synopsis "Python test fixture library")
1440 "Fixtures provides a way to create reusable state, useful when writing
1442 (license (list bsd-3 asl2.0)))) ; at user's option
1444 (define-public python2-fixtures
1445 (package-with-python2 python-fixtures))
1447 (define-public python-testrepository
1449 (name "python-testrepository")
1455 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1459 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1460 (build-system python-build-system)
1462 `(("python-setuptools" ,python-setuptools)
1463 ("python-testtools" ,python-testtools)
1464 ("python-subunit" ,python-subunit)
1465 ("python-fixtures" ,python-fixtures)
1466 ("python-mimeparse" ,python-mimeparse)))
1467 (home-page "https://launchpad.net/testrepository")
1468 (synopsis "Database for Python test results")
1469 (description "Testrepository provides a database of test results which can
1470 be used as part of a developer's workflow to check things such as what tests
1471 have failed since the last commit or what tests are currently failing.")
1472 (license (list bsd-3 asl2.0)))) ; at user's option
1474 (define-public python2-testrepository
1475 (package-with-python2 python-testrepository))
1477 (define-public python-coverage
1479 (name "python-coverage")
1485 "https://pypi.python.org/packages/source/c/coverage/coverage-"
1489 "0knlbq79g2ww6xzsyknj9rirrgrgc983dpa2d9nkdf31mb2a3bni"))))
1490 (build-system python-build-system)
1492 `(("python-setuptools" ,python-setuptools)))
1493 (home-page "http://nedbatchelder.com/code/coverage")
1494 (synopsis "Code coverage measurement for Python")
1496 "Coverage measures code coverage, typically during test execution. It
1497 uses the code analysis tools and tracing hooks provided in the Python standard
1498 library to determine which lines are executable, and which have been
1502 (define-public python2-coverage
1503 (package-with-python2 python-coverage))
1505 (define-public python-discover
1507 (name "python-discover")
1513 "https://pypi.python.org/packages/source/d/discover/discover-"
1517 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1518 (build-system python-build-system)
1520 `(("python-setuptools" ,python-setuptools)))
1521 (home-page "http://pypi.python.org/pypi/discover/")
1523 "Python test discovery for unittest")
1525 "Discover provides test discovery for unittest, a feature that has been
1526 backported from Python 2.7 for Python 2.4+")
1529 (define-public python2-discover
1530 (package-with-python2 python-discover))
1532 (define-public behave
1538 (uri (string-append "https://pypi.python.org/packages/source/b/"
1539 name "/" name "-" version ".tar.gz"))
1542 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
1543 (build-system python-build-system)
1545 `(("python-setuptools" ,python-setuptools)
1546 ("python-six" ,python-six)
1547 ("python-enum43" ,python-enum34)
1548 ("python-parse" ,python-parse)
1549 ("python-parse-type" ,python-parse-type)))
1550 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
1552 (home-page "http://github.com/behave/behave")
1553 (synopsis "Python behavior-driven development")
1555 "Behave is a tool for behavior-driven development in python.
1556 Behavior-driven development (or BDD) is an agile software development
1557 technique that encourages collaboration between developers, QA and
1558 non-technical or business participants in a software project. Behave uses
1559 tests written in a natural language style, backed up by Python code.")
1562 (define-public python-exif-read
1564 (name "python-exif-read")
1570 "https://pypi.python.org/packages/source/E/ExifRead/ExifRead-"
1574 "17c627gcdmyc05hz4zk8qs4pjgw6rc68qzjzgz8gh1cmpsd7acf1"))))
1575 (build-system python-build-system)
1577 `(("python-setuptools" ,python-setuptools)))
1578 (arguments `(#:tests? #f)) ; no tests
1579 (home-page "https://github.com/ianare/exif-py")
1580 (synopsis "Python library to extract EXIF data from image files")
1582 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1586 (define-public python2-exif-read
1587 (package-with-python2 python-exif-read))
1589 (define-public python-pyld
1591 (name "python-pyld")
1597 "https://pypi.python.org/packages/source/P/PyLD/PyLD-"
1601 "1l9ymj85fsvayqplinzpk0kyiq6m74ps9xd3a9fhlxfn1rldf8x8"))))
1602 (build-system python-build-system)
1604 `(("python-setuptools" ,python-setuptools)))
1605 (arguments `(#:tests? #f)) ; no tests
1606 (home-page "http://github.com/digitalbazaar/pyld")
1607 (synopsis "Python implementation of the JSON-LD specification")
1609 "PyLD is an implementation of the JSON-LD specification.")
1612 (define-public python2-pyld
1613 (package-with-python2 python-pyld))
1615 (define-public python-certifi
1617 (name "python-certifi")
1618 (version "14.05.14")
1623 "https://pypi.python.org/packages/source/c/certifi/certifi-"
1627 "0s8vxzfz6s4m6fvxc7z25k9j35w0rh6jkw3wwcd1az1mssncn6qy"))))
1628 (build-system python-build-system)
1630 `(("python-setuptools" ,python-setuptools)))
1631 (arguments `(#:tests? #f)) ; no tests
1632 (home-page "http://python-requests.org/")
1633 (synopsis "Python CA certificate bundle")
1635 "Certifi is a Python library that contains a CA certificate bundle, which
1636 is used by the Requests library to verify HTTPS requests.")
1639 (define-public python2-certifi
1640 (package-with-python2 python-certifi))
1642 (define-public python-click
1644 (name "python-click")
1650 "https://pypi.python.org/packages/source/c/click/click-"
1653 (base32 "0294x9g28w6zgswl0rsygkwi0wf6n480gf7fiiw5f9az3xhh77pl"))))
1654 (build-system python-build-system)
1656 `(("python-setuptools" ,python-setuptools)))
1657 (home-page "http://click.pocoo.org")
1658 (synopsis "Command line library for Python")
1660 "Click is a Python package for creating command line interfaces in a
1661 composable way with as little code as necessary. Its name stands for
1662 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1663 with sensible defaults out of the box.")
1666 (define-public python2-click
1667 (package-with-python2 python-click))
1669 (define-public python-requests
1671 (name "python-requests")
1677 "https://pypi.python.org/packages/source/r/requests/requests-"
1681 "0gknlfx1wakrrm1zi8gi03x2lzj4dsns0vjw0nsmgqvkphyf01vh"))))
1682 (build-system python-build-system)
1684 `(("python-setuptools" ,python-setuptools)
1685 ("python-certifi" ,python-certifi)))
1686 (arguments `(#:tests? #f)) ; no tests
1687 (home-page "http://python-requests.org/")
1688 (synopsis "Python HTTP library")
1690 "Requests is a Python HTTP client library. It aims to be easier to use
1691 than Python’s urllib2 library.")
1694 (define-public python2-requests
1695 (package-with-python2 python-requests))
1697 (define-public python-jsonschema
1699 (name "python-jsonschema")
1705 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1709 "1yik3031ziygvq66rj3mzfqdgxj29sg1bkfc46wsgi7lnbqs560j"))))
1710 (build-system python-build-system)
1712 `(("python-setuptools" ,python-setuptools)))
1713 (home-page "http://github.com/Julian/jsonschema")
1714 (synopsis "Implementation of JSON Schema for Python")
1716 "Jsonschema is an implementation of JSON Schema for Python.")
1717 (license license:expat)))
1719 (define-public python2-jsonschema
1720 (package-with-python2 python-jsonschema))
1722 (define-public python-unidecode
1724 (name "python-unidecode")
1730 "https://pypi.python.org/packages/source/U/Unidecode/Unidecode-"
1734 "0yv56vc49rvippyxgxvcyz7jklc07ky38rcspax7p00sgmriiljc"))))
1735 (build-system python-build-system)
1737 `(("python-setuptools" ,python-setuptools)))
1738 (home-page "https://pypi.python.org/pypi/Unidecode")
1739 (synopsis "ASCII transliterations of Unicode text")
1741 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1742 useful when integrating with legacy code that doesn't support Unicode, or for
1743 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1744 machine identifiers from human-readable Unicode strings that should still be
1745 somewhat intelligeble.")
1748 (define-public python2-unidecode
1749 (package-with-python2 python-unidecode))
1751 (define-public python-pyjwt
1753 (name "python-pyjwt")
1759 "https://pypi.python.org/packages/source/P/PyJWT/PyJWT-"
1763 "1ahqblfy2sj3xz34wsa48cn9rp0dspzq56p54i5znmws3b8gml6g"))))
1764 (build-system python-build-system)
1766 `(("python-setuptools" ,python-setuptools)))
1768 '(#:tests? #f)) ; test suite doesn't work
1769 (home-page "http://github.com/progrium/pyjwt")
1770 (synopsis "JSON Web Token implementation in Python")
1772 "PyJWT is a JSON Web Token implementation written in Python.")
1773 (license license:expat)))
1775 (define-public python2-pyjwt
1776 (package-with-python2 python-pyjwt))
1778 (define-public python-oauthlib
1780 (name "python-oauthlib")
1786 "https://pypi.python.org/packages/source/o/oauthlib/oauthlib-"
1790 "1yaj3j64la4arwsbhbfmpnickzh3jpg9nlpyg409v8pp24isn48a"))))
1791 (build-system python-build-system)
1793 `(("python-setuptools" ,python-setuptools)
1794 ("python-pyjwt" ,python-pyjwt)
1795 ("python-pycrypto" ,python-pycrypto)
1796 ("python-nose" ,python-nose)
1797 ("python-mock" ,python-mock)))
1798 (home-page "https://github.com/idan/oauthlib")
1799 (synopsis "OAuth implementation for Python")
1801 "Oauthlib is a generic, spec-compliant, thorough implementation of the
1802 OAuth request-signing logic.")
1805 (define-public python2-oauthlib
1806 (let ((base (package-with-python2 python-oauthlib)))
1810 (append (package-inputs base)
1811 `(("python2-unittest2" ,python2-unittest2)))))))
1813 (define-public python-itsdangerous
1815 (name "python-itsdangerous")
1821 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
1825 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
1826 (build-system python-build-system)
1828 `(("python-setuptools" ,python-setuptools)))
1829 (home-page "http://github.com/mitsuhiko/itsdangerous")
1830 (synopsis "Python library for passing data to/from untrusted environments")
1832 "Itsdangerous provides various helpers to pass trusted data to untrusted
1833 environments and back.")
1836 (define-public python2-itsdangerous
1837 (package-with-python2 python-itsdangerous))
1839 (define-public python-pyyaml
1841 (name "python-pyyaml")
1847 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
1851 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
1852 (build-system python-build-system)
1854 `(("libyaml" ,libyaml)))
1856 `(("python-setuptools" ,python-setuptools)))
1857 (home-page "http://pyyaml.org/wiki/PyYAML")
1858 (synopsis "YAML parser and emitter for Python")
1860 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
1861 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
1862 API, and sensible error messages. PyYAML supports standard YAML tags and
1863 provides Python-specific tags that allow to represent an arbitrary Python
1865 (license license:expat)))
1867 (define-public python2-pyyaml
1868 (package-with-python2 python-pyyaml))
1870 (define-public python-virtualenv
1872 (name "python-virtualenv")
1878 "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-"
1882 "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy"))))
1883 (build-system python-build-system)
1885 `(("python-setuptools" ,python-setuptools)
1886 ("python-mock" ,python-mock)
1887 ("python-nose" ,python-nose)))
1888 (home-page "https://virtualenv.pypa.io/")
1889 (synopsis "Virtual Python environment builder")
1891 "Virtualenv is a tool to create isolated Python environments.")
1892 (license license:expat)))
1894 (define-public python2-virtualenv
1895 (package-with-python2 python-virtualenv))
1897 (define-public python-markupsafe
1899 (name "python-markupsafe")
1905 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
1909 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
1910 (build-system python-build-system)
1912 `(("python-setuptools" ,python-setuptools)))
1913 (home-page "http://github.com/mitsuhiko/markupsafe")
1914 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
1916 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
1920 (define-public python2-markupsafe
1921 (package-with-python2 python-markupsafe))
1923 (define-public python-jinja2
1925 (name "python-jinja2")
1931 "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-"
1935 "1nwg9yfqgy421lncnm63k1zf9xkd1klc0jm0fr4p3dad01fsq91f"))))
1936 (build-system python-build-system)
1938 `(("python-setuptools" ,python-setuptools)
1939 ("python-markupsafe" ,python-markupsafe)))
1940 (home-page "http://jinja.pocoo.org/")
1941 (synopsis "Python template engine")
1943 "Jinja2 is a small but fast and easy to use stand-alone template engine
1944 written in pure Python.")
1947 (define-public python2-jinja2
1948 (package-with-python2 python-jinja2))
1950 (define-public python-docutils
1952 (name "python-docutils")
1958 "https://pypi.python.org/packages/source/d/docutils/docutils-"
1962 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
1963 (build-system python-build-system)
1965 `(("python-setuptools" ,python-setuptools)))
1967 '(#:tests? #f)) ; no setup.py test command
1968 (home-page "http://docutils.sourceforge.net/")
1969 (synopsis "Python Documentation Utilities")
1971 "Docutils is a modular system for processing documentation into useful
1972 formats, such as HTML, XML, and LaTeX. For input Docutils supports
1974 ;; Most of the source code is public domain, but some source files are
1975 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
1976 (license (list public-domain psfl bsd-2 gpl3+))))
1978 (define-public python2-docutils
1979 (package-with-python2 python-docutils))
1981 (define-public python-pygments
1983 (name "python-pygments")
1989 "https://pypi.python.org/packages/source/P/Pygments/Pygments-"
1993 "1h11r6ss8waih51vcksfvzghfxiav2f8svc0812fa5kmyz5d97kr"))))
1994 (build-system python-build-system)
1996 `(("python-setuptools" ,python-setuptools)))
1997 (home-page "http://pygments.org/")
1998 (synopsis "Syntax highlighting")
2000 "Pygments is a syntax highlighting package written in Python.")
2003 (define-public python2-pygments
2004 (package-with-python2 python-pygments))
2006 (define-public python-sphinx
2008 (name "python-sphinx")
2014 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2018 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2019 (build-system python-build-system)
2021 `(("python-setuptools" ,python-setuptools)
2022 ("python-jinja2" ,python-jinja2)
2023 ("python-docutils" ,python-docutils)
2024 ("python-pygments" ,python-pygments)))
2025 (home-page "http://sphinx-doc.org/")
2026 (synopsis "Python documentation generator")
2027 (description "Sphinx is a tool that makes it easy to create documentation
2028 for Python projects or other documents consisting of multiple reStructuredText
2032 (define-public python2-sphinx
2033 (package-with-python2 python-sphinx))
2035 (define-public python-sphinx-rtd-theme
2037 (name "python-sphinx-rtd-theme")
2042 (uri (string-append "https://pypi.python.org/packages/source/s/"
2043 "sphinx_rtd_theme/sphinx_rtd_theme-"
2047 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2048 (build-system python-build-system)
2050 `(;; With standard flags, the install phase attempts to create a zip'd
2051 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2053 #:configure-flags '("--single-version-externally-managed"
2054 "--record=sphinx-rtd-theme.txt")))
2056 `(("python-setuptools" ,python-setuptools)))
2058 `(("python-docutils" ,python-docutils)
2059 ("python-sphinx" ,python-sphinx)))
2060 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2061 (synopsis "ReadTheDocs.org theme for Sphinx")
2062 (description "A theme for Sphinx used by ReadTheDocs.org.")
2063 (license license:expat)))
2065 (define-public python2-sphinx-rtd-theme
2066 (package-with-python2 python-sphinx-rtd-theme))
2068 (define-public python-scikit-learn
2070 (name "python-scikit-learn")
2076 "https://github.com/scikit-learn/scikit-learn/archive/"
2080 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2081 (build-system python-build-system)
2086 ;; some tests require access to "$HOME"
2087 (lambda _ (setenv "HOME" "/tmp"))
2088 ;; Tests can only be run after the library has been installed and not
2089 ;; within the source directory.
2093 (with-directory-excursion "/tmp"
2094 ;; With Python 3 one test of 3334 fails
2095 ;; (sklearn.tests.test_common.test_transformers); see
2096 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2097 (system* "nosetests" "-v" "sklearn")))
2098 (alist-delete 'check %standard-phases)))))
2100 `(("openblas" ,openblas)
2101 ("python-nose" ,python-nose)))
2103 `(("python-numpy" ,python-numpy)
2104 ("python-scipy" ,python-scipy)))
2105 (home-page "http://scikit-learn.org/")
2106 (synopsis "Machine Learning in Python")
2108 "Scikit-learn provides simple and efficient tools for data
2109 mining and data analysis.")
2112 (define-public python2-scikit-learn
2113 (let ((scikit (package-with-python2 python-scikit-learn)))
2114 (package (inherit scikit)
2116 `(("python2-numpy" ,python2-numpy)
2117 ("python2-scipy" ,python2-scipy)
2121 "python-scipy" (package-propagated-inputs scikit))))))))
2123 (define-public python-scikit-image
2125 (name "python-scikit-image")
2131 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2134 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2135 (build-system python-build-system)
2137 `(("python-matplotlib" ,python-matplotlib)
2138 ("python-networkx" ,python-networkx)
2139 ("python-numpy" ,python-numpy)
2140 ("python-scipy" ,python-scipy)
2141 ("python-six" ,python-six)
2142 ("python-pillow" ,python-pillow)))
2144 `(("python-cython" ,python-cython)
2145 ("python-setuptools" ,python-setuptools)))
2146 (home-page "http://scikit-image.org/")
2147 (synopsis "Image processing in Python")
2149 "scikit-image is a collection of algorithms for image processing.")
2152 (define-public python2-scikit-image
2153 (let ((scikit-image (package-with-python2 python-scikit-image)))
2154 (package (inherit scikit-image)
2156 `(("python2-mock" ,python2-mock)
2157 ,@(package-native-inputs scikit-image)))
2159 `(("python2-pytz" ,python2-pytz)
2160 ,@(package-propagated-inputs scikit-image))))))
2162 (define-public python-redis
2164 (name "python-redis")
2170 "https://pypi.python.org/packages/source/r/redis/redis-"
2173 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2174 (build-system python-build-system)
2175 ;; Tests require a running Redis server
2176 (arguments '(#:tests? #f))
2178 `(("python-setuptools" ,python-setuptools)
2179 ("python-pytest" ,python-pytest)))
2180 (home-page "https://github.com/andymccurdy/redis-py")
2181 (synopsis "Redis Python client")
2183 "This package provides a Python interface to the Redis key-value store.")
2184 (license license:expat)))
2186 (define-public python2-redis
2187 (package-with-python2 python-redis))
2189 (define-public python-rq
2197 "https://pypi.python.org/packages/source/r/rq/rq-"
2200 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2201 (build-system python-build-system)
2203 `(("python-click" ,python-click)
2204 ("python-redis" ,python-redis)))
2206 `(("python-setuptools" ,python-setuptools)))
2207 (home-page "http://python-rq.org/")
2208 (synopsis "Simple job queues for Python")
2210 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2211 processing them in the background with workers. It is backed by Redis and it
2212 is designed to have a low barrier to entry.")
2215 (define-public python2-rq
2216 (package-with-python2 python-rq))
2218 (define-public python-cython
2220 (name "python-cython")
2225 (uri (string-append "http://cython.org/release/Cython-"
2229 "0ddz2l2dvcy5hdkxx4xlfiwpccvwia7ixgcy4h0pdv46a4i4vxj3"))))
2230 (build-system python-build-system)
2231 ;; we need the full python package and not just the python-wrapper
2232 ;; because we need libpython3.3m.so
2234 `(("python" ,python)))
2239 ;; some tests require access to "$HOME/.cython"
2240 (lambda* _ (setenv "HOME" "/tmp"))
2243 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2244 %standard-phases))))
2245 (home-page "http://cython.org/")
2246 (synopsis "C extensions for Python")
2247 (description "Cython is an optimising static compiler for both the Python
2248 programming language and the extended Cython programming language. It makes
2249 writing C extensions for Python as easy as Python itself.")
2252 (define-public python2-cython
2253 (package (inherit (package-with-python2 python-cython))
2254 (name "python2-cython")
2256 `(("python-2" ,python-2))))) ; this is not automatically changed
2258 ;; This version of numpy is missing the documentation and is only used to
2259 ;; build matplotlib which is required to build numpy's documentation.
2260 (define python-numpy-bootstrap
2262 (name "python-numpy-bootstrap")
2267 (uri (string-append "mirror://sourceforge/numpy"
2268 "/numpy-" version ".tar.gz"))
2271 "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80"))))
2272 (build-system python-build-system)
2274 `(("python-nose" ,python-nose)
2275 ("openblas" ,openblas)
2276 ("lapack" ,lapack)))
2278 `(("gfortran" ,gfortran-4.8)))
2282 'build 'set-environment-variables
2283 (lambda* (#:key inputs #:allow-other-keys)
2284 (call-with-output-file "site.cfg"
2288 libraries = openblas
2289 library_dirs = ~a/lib
2290 include_dirs = ~a/include
2293 lapack_libs = lapack
2294 library_dirs = ~a/lib
2295 include_dirs = ~a/include
2297 (assoc-ref inputs "openblas")
2298 (assoc-ref inputs "openblas")
2299 (assoc-ref inputs "lapack")
2300 (assoc-ref inputs "lapack"))))
2301 ;; Use "gcc" executable, not "cc".
2302 (substitute* "numpy/distutils/system_info.py"
2303 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2304 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2306 ;; Tests can only be run after the library has been installed and not
2307 ;; within the source directory.
2311 (with-directory-excursion "/tmp"
2312 (zero? (system* "python" "-c"
2313 "import numpy; numpy.test(verbose=2)"))))
2316 %standard-phases)))))
2317 (home-page "http://www.numpy.org/")
2318 (synopsis "Fundamental package for scientific computing with Python")
2319 (description "NumPy is the fundamental package for scientific computing
2320 with Python. It contains among other things: a powerful N-dimensional array
2321 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2322 and Fortran code, useful linear algebra, Fourier transform, and random number
2326 (define python2-numpy-bootstrap
2327 (package-with-python2 python-numpy-bootstrap))
2329 (define-public python-numpy
2330 (package (inherit python-numpy-bootstrap)
2331 (name "python-numpy")
2332 (outputs '("out" "doc"))
2335 ("python-setuptools" ,python-setuptools)
2336 ("python-matplotlib" ,python-matplotlib)
2337 ("python-sphinx" ,python-sphinx)
2338 ("python-pyparsing" ,python-pyparsing)
2339 ("python-numpydoc" ,python-numpydoc)
2340 ,@(package-inputs python-numpy-bootstrap)))
2342 `(("pkg-config" ,pkg-config)
2343 ("texlive" ,texlive)
2344 ("texinfo" ,texinfo)
2346 ,@(package-native-inputs python-numpy-bootstrap)))
2348 `(,@(substitute-keyword-arguments
2349 (package-arguments python-numpy-bootstrap)
2352 'install 'install-doc
2353 (lambda* (#:key outputs #:allow-other-keys)
2354 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2356 data "/doc/" ,name "-"
2357 ,(package-version python-numpy-bootstrap)))
2358 (info (string-append data "/info"))
2359 (html (string-append doc "/html"))
2360 (pyver ,(string-append "PYVER=")))
2361 (with-directory-excursion "doc"
2363 (system* "make" "html" pyver)
2364 (system* "make" "latex" "PAPER=a4" pyver)
2365 (system* "make" "-C" "build/latex"
2366 "all-pdf" "PAPER=a4" pyver)
2367 ;; FIXME: Generation of the info file fails.
2368 ;; (system* "make" "info" pyver)
2370 ;; (copy-file "build/texinfo/numpy.info"
2371 ;; (string-append info "/numpy.info"))
2372 (for-each (lambda (file)
2373 (copy-file (string-append "build/latex" file)
2374 (string-append doc file)))
2375 '("/numpy-ref.pdf" "/numpy-user.pdf"))
2376 (with-directory-excursion "build/html"
2377 (for-each (lambda (file)
2378 (let* ((dir (dirname file))
2379 (tgt-dir (string-append html "/" dir)))
2380 (unless (equal? "." dir)
2382 (copy-file file (string-append html "/" file))))
2383 (find-files "." ".*"))))))
2386 (define-public python2-numpy
2387 (let ((numpy (package-with-python2 python-numpy)))
2388 (package (inherit numpy)
2389 ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
2391 (inputs `(("python2-matplotlib" ,python2-matplotlib)
2392 ,@(alist-delete "python-matplotlib"
2393 (package-inputs numpy)))))))
2395 (define-public python-pyparsing
2397 (name "python-pyparsing")
2402 (uri (string-append "mirror://sourceforge/pyparsing"
2403 "/pyparsing-" version ".tar.gz"))
2406 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
2407 (build-system python-build-system)
2408 (outputs '("out" "doc"))
2410 `(#:tests? #f ; no test target
2411 #:modules ((guix build python-build-system)
2415 'install 'install-doc
2416 (lambda* (#:key outputs #:allow-other-keys)
2417 (let* ((doc (string-append (assoc-ref outputs "doc")
2418 "/share/doc/" ,name "-" ,version))
2419 (html-doc (string-append doc "/html"))
2420 (examples (string-append doc "/examples")))
2426 (copy-file file (string-append tgt "/" (basename file))))
2427 (find-files dir ".*")))
2428 (list "docs" "htmldoc" "examples")
2429 (list doc html-doc examples))))
2431 (home-page "http://pyparsing.wikispaces.com")
2432 (synopsis "Python parsing class library")
2434 "The pyparsing module is an alternative approach to creating and
2435 executing simple grammars, vs. the traditional lex/yacc approach, or the use
2436 of regular expressions. The pyparsing module provides a library of classes
2437 that client code uses to construct the grammar directly in Python code.")
2438 (license license:expat)))
2440 (define-public python2-pyparsing
2441 (package-with-python2 python-pyparsing))
2443 (define-public python-numpydoc
2445 (name "python-numpydoc")
2451 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
2455 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
2456 (modules '((guix build utils)))
2459 ;; Drop a test requiring matplotlib, which we cannot add as an
2460 ;; input since it would create a circular dependency: Extend the
2461 ;; test for Python 3, where it is already dropped, to Python 2.
2462 (substitute* "numpydoc/tests/test_plot_directive.py"
2464 (build-system python-build-system)
2466 `(("python-setuptools" ,python-setuptools)
2467 ("python-docutils" ,python-docutils)
2468 ("python-sphinx" ,python-sphinx)
2469 ("python-nose" ,python-nose)))
2470 (home-page "https://pypi.python.org/pypi/numpydoc")
2472 "Numpy's Sphinx extensions")
2474 "Sphinx extension to support docstrings in Numpy format.")
2477 (define-public python2-numpydoc
2478 (package-with-python2 python-numpydoc))
2480 (define-public python-matplotlib
2482 (name "python-matplotlib")
2487 (uri (string-append "mirror://sourceforge/matplotlib"
2488 "/matplotlib-" version ".tar.gz"))
2491 "0m6v9nwdldlwk22gcd339zg6mny5m301fxgks7z8sb8m9wawg8qp"))))
2492 (build-system python-build-system)
2493 (outputs '("out" "doc"))
2494 (propagated-inputs ; the following packages are all needed at run time
2495 `(("python-pyparsing" ,python-pyparsing)
2496 ("python-pygobject" ,python-pygobject)
2497 ("gobject-introspection" ,gobject-introspection)
2498 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
2499 ;; from 'gtk+') provides the required 'typelib' files used by
2500 ;; 'gobject-introspection'. The location of these files is set with the
2501 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
2502 ;; is done automatically by a 'native-search-path' procedure. However,
2503 ;; at run-time the user must set this variable as follows:
2505 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
2507 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
2508 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
2509 ;; object. For this reason we need to import both libraries.
2510 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
2511 ("python-pycairo" ,python-pycairo)
2512 ("python-cairocffi" ,python-cairocffi)))
2514 `(("python-setuptools" ,python-setuptools)
2515 ("python-dateutil" ,python-dateutil-2)
2516 ("python-six" ,python-six)
2517 ("python-pytz" ,python-pytz)
2518 ("python-numpy" ,python-numpy-bootstrap)
2519 ("python-sphinx" ,python-sphinx)
2520 ("python-numpydoc" ,python-numpydoc)
2521 ("python-nose" ,python-nose)
2522 ("python-mock" ,python-mock)
2524 ("imagemagick" ,imagemagick)
2525 ("freetype" ,freetype)
2528 ("python-pillow" ,python-pillow)
2529 ;; FIXME: Add backends when available.
2530 ;("python-wxpython" ,python-wxpython)
2531 ;("python-pyqt" ,python-pyqt)
2534 `(("pkg-config" ,pkg-config)
2535 ("texlive" ,texlive)
2536 ("texinfo" ,texinfo)))
2540 'build 'configure-environment
2541 (lambda* (#:key outputs inputs #:allow-other-keys)
2542 (let ((cairo (assoc-ref inputs "cairo"))
2543 (gtk+ (assoc-ref inputs "gtk+")))
2544 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
2546 (setenv "LD_LIBRARY_PATH"
2547 (string-append cairo "/lib:" gtk+ "/lib"))
2548 (setenv "HOME" (getcwd))
2549 (call-with-output-file "setup.cfg"
2551 (format port "[rc_options]~%
2552 backend = GTK3Agg~%")))))
2554 'install 'install-doc
2555 (lambda* (#:key outputs #:allow-other-keys)
2556 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2557 (doc (string-append data "/doc/" ,name "-" ,version))
2558 (info (string-append data "/info"))
2559 (html (string-append doc "/html")))
2560 (with-directory-excursion "doc"
2561 ;; Produce pdf in 'A4' format.
2562 (substitute* (find-files "." "conf\\.py")
2563 (("latex_paper_size = 'letter'")
2564 "latex_paper_size = 'a4'"))
2567 ;; The doc recommends to run the 'html' target twice.
2568 (system* "python" "make.py" "html")
2569 (system* "python" "make.py" "html")
2570 (system* "python" "make.py" "latex")
2571 (system* "python" "make.py" "texinfo")
2572 (copy-file "build/texinfo/matplotlib.info"
2573 (string-append info "/matplotlib.info"))
2574 (copy-file "build/latex/Matplotlib.pdf"
2575 (string-append doc "/Matplotlib.pdf"))
2576 (copy-recursively "build/html" html))))
2577 %standard-phases))))
2578 (home-page "http://matplotlib.org")
2579 (synopsis "2D plotting library for Python")
2581 "Matplotlib is a Python 2D plotting library which produces publication
2582 quality figures in a variety of hardcopy formats and interactive environments
2583 across platforms. Matplotlib can be used in Python scripts, the python and
2584 ipython shell, web application servers, and six graphical user interface
2588 (define-public python2-matplotlib
2589 (let ((matplotlib (package-with-python2 python-matplotlib)))
2590 (package (inherit matplotlib)
2591 ;; Make sure to use special packages for Python 2 instead
2592 ;; of those automatically rewritten by package-with-python2.
2594 `(("python2-pycairo" ,python2-pycairo)
2595 ("python2-pygobject-2" ,python2-pygobject-2)
2596 ,@(alist-delete "python-pycairo"
2597 (alist-delete "python-pygobject"
2598 (package-propagated-inputs
2601 (define-public python-scipy
2603 (name "python-scipy")
2608 (uri (string-append "mirror://sourceforge/scipy"
2609 "/scipy-" version ".tar.xz"))
2612 "0fsqi05s035d7p6s8h3h2pvk1axias16chy17rw9l1bxvrfhmncf"))))
2613 (build-system python-build-system)
2615 `(("python-numpy" ,python-numpy)
2616 ("python-matplotlib" ,python-matplotlib)
2617 ("python-pyparsing" ,python-pyparsing)
2618 ("python-nose" ,python-nose)
2619 ("python-sphinx" ,python-sphinx)
2621 ("openblas" ,openblas)))
2623 `(("gfortran" ,gfortran-4.8)
2624 ("texlive" ,texlive)
2626 (outputs '("out" "doc"))
2630 'build 'configure-openblas
2631 (lambda* (#:key inputs #:allow-other-keys)
2632 (call-with-output-file "site.cfg"
2636 libraries = openblas
2637 library_dirs = ~a/lib
2638 include_dirs = ~a/include
2640 library_dirs = ~a/lib
2641 atlas_libs = openblas
2643 (assoc-ref inputs "openblas")
2644 (assoc-ref inputs "openblas")
2645 (assoc-ref inputs "openblas"))))
2648 'install 'install-doc
2649 (lambda* (#:key outputs #:allow-other-keys)
2650 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2651 (doc (string-append data "/doc/" ,name "-" ,version))
2652 (html (string-append doc "/html"))
2653 (pyver ,(string-append "PYVER=")))
2654 (with-directory-excursion "doc"
2655 ;; Fix generation of images for mathematical expressions.
2656 (substitute* (find-files "source" "conf\\.py")
2657 (("pngmath_use_preview = True")
2658 "pngmath_use_preview = False"))
2660 (system* "make" "html" pyver)
2661 (system* "make" "latex" "PAPER=a4" pyver)
2662 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
2663 (copy-file "build/latex/scipy-ref.pdf"
2664 (string-append doc "/scipy-ref.pdf"))
2665 (with-directory-excursion "build/html"
2666 (for-each (lambda (file)
2667 (let* ((dir (dirname file))
2668 (tgt-dir (string-append html "/" dir)))
2669 (unless (equal? "." dir)
2671 (copy-file file (string-append html "/" file))))
2672 (find-files "." ".*"))))))
2673 ;; Tests can only be run after the library has been installed and not
2674 ;; within the source directory.
2678 (with-directory-excursion "/tmp"
2679 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
2682 %standard-phases))))))
2683 (home-page "http://www.scipy.org/")
2684 (synopsis "The Scipy library provides efficient numerical routines")
2685 (description "The SciPy library is one of the core packages that make up
2686 the SciPy stack. It provides many user-friendly and efficient numerical
2687 routines such as routines for numerical integration and optimization.")
2690 (define-public python2-scipy
2691 (let ((scipy (package-with-python2 python-scipy)))
2692 (package (inherit scipy)
2693 ;; Use packages customized for python-2.
2694 (inputs `(("python2-matplotlib" ,python2-matplotlib)
2695 ("python2-numpy" ,python2-numpy)
2696 ,@(alist-delete "python-matplotlib"
2697 (alist-delete "python-numpy"
2698 (package-inputs scipy))))))))
2700 (define-public python-sqlalchemy
2702 (name "python-sqlalchemy")
2707 (uri (string-append "https://pypi.python.org/packages/source/S/"
2708 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
2711 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
2712 (build-system python-build-system)
2714 `(("python-cython" ,python-cython) ;for c extensions
2715 ("python-pytest" ,python-pytest)
2716 ("python-mock" ,python-mock))) ;for tests
2718 `(#:phases (alist-replace
2720 (lambda _ (zero? (system* "py.test")))
2722 (home-page "http://www.sqlalchemy.org")
2723 (synopsis "Database abstraction library")
2725 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2726 gives application developers the full power and flexibility of SQL. It
2727 provides a full suite of well known enterprise-level persistence patterns,
2728 designed for efficient and high-performing database access, adapted into a
2729 simple and Pythonic domain language.")
2732 (define-public python2-sqlalchemy
2733 (package-with-python2 python-sqlalchemy))
2735 (define-public python-distutils-extra
2737 (name "python-distutils-extra")
2742 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
2743 version "/+download/python-distutils-extra-"
2747 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
2748 (build-system python-build-system)
2750 `(("python-setuptools" ,python-setuptools)))
2751 (home-page "https://launchpad.net/python-distutils-extra/")
2752 (synopsis "Enhancements to Python's distutils")
2754 "The python-distutils-extra module enables you to easily integrate
2755 gettext support, themed icons, and scrollkeeper-based documentation into
2756 Python's distutils.")
2759 (define-public python2-distutils-extra
2760 (package-with-python2 python-distutils-extra))
2762 (define-public python2-elib.intl
2764 (name "python2-elib.intl")
2768 ;; This project doesn't tag releases or publish tarballs, so we take
2769 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
2772 (url "https://github.com/dieterv/elib.intl.git")
2773 (commit "d09997cfef")))
2776 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
2777 (build-system python-build-system)
2779 `(("python2-setuptools" ,python2-setuptools)))
2781 ;; incompatible with Python 3 (exception syntax)
2782 `(#:python ,python-2
2784 ;; With standard flags, the install phase attempts to create a zip'd
2785 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2787 #:configure-flags '("--single-version-externally-managed"
2788 "--record=elib.txt")))
2789 (home-page "https://github.com/dieterv/elib.intl")
2790 (synopsis "Enhanced internationalization for Python")
2792 "The elib.intl module provides enhanced internationalization (I18N)
2793 services for your Python modules and applications.")
2796 (define-public python-pillow
2798 (name "python-pillow")
2803 (uri (string-append "https://pypi.python.org/packages/source/P/"
2804 "Pillow/Pillow-" version ".tar.gz"))
2807 "15n92axxph2s3kvg68bki9gv3nzwgq7130kp7wbblpi1l0cc2q47"))))
2808 (build-system python-build-system)
2810 `(("python-setuptools" ,python-setuptools)
2811 ("python-nose" ,python-nose)))
2813 `(("freetype" ,freetype)
2816 ("libjpeg" ,libjpeg)
2817 ("openjpeg" ,openjpeg)
2818 ("libtiff" ,libtiff)
2819 ("libwebp" ,libwebp)))
2821 `(;; Used at runtime for pkg_resources
2822 ("python-setuptools" ,python-setuptools)))
2824 `(#:phases (alist-cons-after
2825 'install 'check-installed
2828 (setenv "HOME" (getcwd))
2829 (and (zero? (system* "python" "selftest.py" "--installed"))
2830 (zero? (system* "python" "test-installed.py")))))
2831 (alist-delete 'check %standard-phases))))
2832 (home-page "https://pypi.python.org/pypi/Pillow")
2833 (synopsis "Fork of the Python Imaging Library")
2835 "The Python Imaging Library adds image processing capabilities to your
2836 Python interpreter. This library provides extensive file format support, an
2837 efficient internal representation, and fairly powerful image processing
2838 capabilities. The core image library is designed for fast access to data
2839 stored in a few basic pixel formats. It should provide a solid foundation for
2840 a general image processing tool.")
2842 "http://www.pythonware.com/products/pil/license.htm"
2843 "The PIL Software License"))))
2845 (define-public python2-pillow
2846 (package-with-python2 python-pillow))
2848 (define-public python-pycparser
2850 (name "python-pycparser")
2855 (uri (string-append "https://pypi.python.org/packages/source/p/"
2856 "pycparser/pycparser-" version ".tar.gz"))
2859 "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm"))))
2860 (outputs '("out" "doc"))
2861 (build-system python-build-system)
2863 `(("pkg-config" ,pkg-config)
2864 ("python-setuptools" ,python-setuptools)))
2870 (with-directory-excursion "tests"
2871 (zero? (system* "python" "all_tests.py"))))
2873 'install 'install-doc
2874 (lambda* (#:key outputs #:allow-other-keys)
2875 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2876 (doc (string-append data "/doc/" ,name "-" ,version))
2877 (examples (string-append doc "/examples")))
2879 (for-each (lambda (file)
2880 (copy-file (string-append "." file)
2881 (string-append doc file)))
2882 '("/README.rst" "/CHANGES" "/LICENSE"))
2883 (copy-recursively "examples" examples)))
2884 %standard-phases))))
2885 (home-page "https://github.com/eliben/pycparser")
2886 (synopsis "C parser in Python")
2888 "Pycparser is a complete parser of the C language, written in pure Python
2889 using the PLY parsing library. It parses C code into an AST and can serve as
2890 a front-end for C compilers or analysis tools.")
2893 (define-public python2-pycparser
2894 (package-with-python2 python-pycparser))
2896 (define-public python-cffi
2898 (name "python-cffi")
2903 (uri (string-append "https://pypi.python.org/packages/source/c/"
2904 "cffi/cffi-" version ".tar.gz"))
2906 (base32 "0406j3sgndmx88idv5zxkkrwfqxmjl18pj8gf47nsg4ymzixjci5"))))
2907 (build-system python-build-system)
2908 (outputs '("out" "doc"))
2910 `(("libffi" ,libffi)))
2911 (propagated-inputs ; required at run-time
2912 `(("python-pycparser" ,python-pycparser)))
2914 `(("pkg-config" ,pkg-config)
2915 ("python-sphinx" ,python-sphinx)
2916 ("python-setuptools" ,python-setuptools)))
2918 `(#:tests? #f ; FIXME: requires pytest
2921 'install 'install-doc
2922 (lambda* (#:key outputs #:allow-other-keys)
2923 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2924 (doc (string-append data "/doc/" ,name "-" ,version))
2925 (html (string-append doc "/html")))
2926 (with-directory-excursion "doc"
2927 (system* "make" "html")
2929 (copy-recursively "build/html" html))
2930 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
2932 (home-page "http://cffi.readthedocs.org")
2933 (synopsis "Foreign function interface for Python")
2935 "Foreign Function Interface for Python calling C code.")
2936 (license license:expat)))
2938 (define-public python2-cffi
2939 (package-with-python2 python-cffi))
2941 (define-public python-xcffib
2943 (name "python-xcffib")
2948 (uri (string-append "https://pypi.python.org/packages/source/x/"
2949 "xcffib/xcffib-" version ".tar.gz"))
2952 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
2953 (build-system python-build-system)
2955 `(("libxcb" ,libxcb)
2956 ("python-six" ,python-six)))
2958 `(("python-setuptools" ,python-setuptools)))
2960 `(("python-cffi" ,python-cffi))) ; used at run time
2964 'install 'install-doc
2965 (lambda* (#:key outputs #:allow-other-keys)
2966 (let ((doc (string-append (assoc-ref outputs "out") "/share"
2967 "/doc/" ,name "-" ,version)))
2969 (copy-file "README.md"
2970 (string-append doc "/README.md"))))
2972 (home-page "https://github.com/tych0/xcffib")
2973 (synopsis "XCB Python bindings")
2975 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
2976 support for Python 3 and PyPy. It is based on cffi.")
2977 (license license:expat)))
2979 (define-public python2-xcffib
2980 (package-with-python2 python-xcffib))
2982 (define-public python-cairocffi
2984 (name "python-cairocffi")
2989 ;; The archive on pypi is missing the 'utils' directory!
2990 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
2992 (file-name (string-append name "-" version ".tar.gz"))
2995 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
2996 (build-system python-build-system)
2997 (outputs '("out" "doc"))
2999 `(("gdk-pixbuf" ,gdk-pixbuf)
3002 `(("pkg-config" ,pkg-config)
3003 ("python-sphinx" ,python-sphinx)
3004 ("python-docutils" ,python-docutils)
3005 ("python-setuptools" ,python-setuptools)))
3007 `(("python-xcffib" ,python-xcffib))) ; used at run time
3011 'install 'install-doc
3012 (lambda* (#:key inputs outputs #:allow-other-keys)
3013 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3014 (doc (string-append data "/doc/" ,name "-" ,version))
3015 (html (string-append doc "/html")))
3016 (setenv "LD_LIBRARY_PATH"
3017 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3018 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3019 (setenv "LANG" "en_US.UTF-8")
3021 (for-each (lambda (file)
3022 (copy-file (string-append "." file)
3023 (string-append doc file)))
3024 '("/README.rst" "/CHANGES" "/LICENSE"))
3025 (system* "python" "setup.py" "build_sphinx")
3026 (copy-recursively "docs/_build/html" html)))
3028 (home-page "https://github.com/SimonSapin/cairocffi")
3029 (synopsis "Python bindings and object-oriented API for Cairo")
3031 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3032 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3033 graphics library with support for multiple backends including image buffers,
3034 PNG, PostScript, PDF, and SVG file output.")
3037 (define-public python2-cairocffi
3038 (package-with-python2 python-cairocffi))
3040 (define-public python-decorator
3042 (name "python-decorator")
3048 "https://pypi.python.org/packages/source/d/decorator/decorator-"
3051 (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k"))))
3052 (build-system python-build-system)
3053 (arguments '(#:tests? #f)) ; no test target
3055 `(("python-setuptools" ,python-setuptools)))
3056 (home-page "http://pypi.python.org/pypi/decorator/")
3057 (synopsis "Python module to simplify usage of decorators")
3059 "The aim of the decorator module is to simplify the usage of decorators
3060 for the average programmer, and to popularize decorators usage giving examples
3061 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3062 etc. The core of this module is a decorator factory.")
3063 (license license:expat)))
3065 (define-public python2-decorator
3066 (package-with-python2 python-decorator))
3068 (define-public python-drmaa
3070 (name "python-drmaa")
3076 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3079 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3080 (build-system python-build-system)
3081 ;; The test suite requires libdrmaa which is provided by the cluster
3082 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3083 ;; should be set to the path of the libdrmaa library.
3084 (arguments '(#:tests? #f))
3086 `(("python-nose" ,python-nose)
3087 ("python-setuptools" ,python-setuptools)))
3088 (home-page "https://pypi.python.org/pypi/drmaa")
3089 (synopsis "Python bindings for the DRMAA library")
3091 "A Python package for Distributed Resource Management (DRM) job
3092 submission and control. This package is an implementation of the DRMAA 1.0
3093 Python language binding specification.")
3096 (define-public python2-drmaa
3097 (package-with-python2 python-drmaa))
3099 (define-public python-ipython
3101 (name "python-ipython")
3106 (uri (string-append "https://pypi.python.org/packages/source/i/"
3107 "ipython/ipython-" version ".tar.gz"))
3109 (base32 "1764gi5m3ff481rjk336cw6i2h4zlc0nxam9rc5m8m7yl9m4d61y"))))
3110 (build-system python-build-system)
3111 (outputs '("out" "doc"))
3112 ;; FIXME: add optional dependencies when available: pyzmq, tornado, ...
3114 `(("readline" ,readline)
3115 ("python-matplotlib" ,python-matplotlib)
3116 ("python-numpy" ,python-numpy-bootstrap)
3117 ("python-numpydoc" ,python-numpydoc)
3118 ("python-nose" ,python-nose)))
3120 `(("pkg-config" ,pkg-config)
3121 ("python-sphinx" ,python-sphinx)
3122 ("texlive" ,texlive)
3123 ("texinfo" ,texinfo)
3124 ("python-setuptools" ,python-setuptools)))
3128 'install 'install-doc
3129 (lambda* (#:key inputs outputs #:allow-other-keys)
3130 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3131 (doc (string-append data "/doc/" ,name "-" ,version))
3132 (html (string-append doc "/html"))
3133 (man1 (string-append data "/man/man1"))
3134 (info (string-append data "/info"))
3135 (examples (string-append doc "/examples")))
3136 (setenv "LANG" "en_US.UTF-8")
3137 (with-directory-excursion "docs"
3138 ;; FIXME: html and pdf fail to build without optional pyzmq
3139 ;(system* "make" "html")
3140 ;(system* "make" "pdf" "PAPER=a4")
3141 (system* "make" "info"))
3142 (copy-recursively "docs/man" man1)
3143 (copy-recursively "examples" examples)
3144 ;; (copy-recursively "docs/build/html" html)
3145 ;; (copy-file "docs/build/latex/ipython.pdf"
3146 ;; (string-append doc "/ipython.pdf"))
3148 (copy-file "docs/build/texinfo/ipython.info"
3149 (string-append info "/ipython.info"))
3150 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst"))))
3151 ;; Tests can only be run after the library has been installed and not
3152 ;; within the source directory.
3155 (lambda* (#:key outputs #:allow-other-keys)
3156 ;; The test procedure appears to miss the fact that some optional
3157 ;; dependencies are missing.
3158 ;; (with-directory-excursion "/tmp"
3159 ;; (zero? (system* (string-append (assoc-ref outputs "out")
3160 ;; "/bin/iptest"))))
3164 %standard-phases)))))
3165 (home-page "http://ipython.org")
3166 (synopsis "IPython is a tool for interactive computing in Python")
3168 "IPython provides a rich architecture for interactive computing with:
3169 Powerful interactive shells, a browser-based notebook, support for interactive
3170 data visualization, embeddable interpreters and tools for parallel
3174 (define-public python2-ipython
3175 (let ((ipython (package-with-python2 python-ipython)))
3176 (package (inherit ipython)
3177 ;; Make sure we use custom python2-NAME packages.
3179 `(("python2-matplotlib" ,python2-matplotlib)
3180 ,@(alist-delete "python-matplotlib"
3181 (package-inputs ipython)))))))
3183 (define-public python-isodate
3185 (name "python-isodate")
3191 "https://pypi.python.org/packages/source/i/isodate/isodate-"
3196 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
3197 (build-system python-build-system)
3199 `(("python-setuptools" ,python-setuptools)))
3201 "http://cheeseshop.python.org/pypi/isodate")
3203 "Python date parser and formatter")
3205 "Python-isodate is a python module for parsing and formatting
3206 ISO 8601 dates, time and duration.")
3209 (define-public python2-isodate
3210 (package-with-python2 python-isodate))
3212 (define-public python-html5lib
3214 (name "python-html5lib")
3220 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
3225 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
3226 (build-system python-build-system)
3228 `(("python-six" ,python-six))) ; required to "import html5lib"
3230 `(("python-setuptools" ,python-setuptools)))
3232 `(#:test-target "check"))
3234 "https://github.com/html5lib/html5lib-python")
3236 "Python HTML parser based on the WHATWG HTML specifcation")
3238 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
3239 and written in Python.")
3240 (license license:expat)))
3242 (define-public python2-html5lib
3243 (package-with-python2 python-html5lib))
3245 (define-public python-urwid
3247 (name "python-urwid")
3253 "https://pypi.python.org/packages/source/u/urwid/urwid-"
3257 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
3258 (build-system python-build-system)
3259 (native-inputs `(("python-setuptools" ,python-setuptools)))
3260 (home-page "http://urwid.org")
3261 (synopsis "Console user interface library for Python")
3263 "Urwid is a curses-based UI/widget library for Python. It includes many
3264 features useful for text console applications.")
3265 (license lgpl2.1+)))
3267 (define-public python2-urwid
3268 (package-with-python2 python-urwid))
3270 (define-public python-dbus
3272 (name "python-dbus")
3278 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
3281 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
3282 (build-system gnu-build-system)
3284 `(("pkg-config" ,pkg-config)))
3286 `(("python" ,python)
3287 ("dbus-glib" ,dbus-glib)))
3288 (synopsis "Python bindings for D-bus")
3289 (description "python-dbus provides bindings for libdbus, the reference
3290 implementation of D-Bus.")
3291 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
3292 (license license:expat)))
3294 (define-public python2-dbus
3295 (package (inherit python-dbus)
3296 (name "python2-dbus")
3297 (inputs `(("python" ,python-2)
3298 ,@(alist-delete "python"
3299 (package-inputs python-dbus)
3301 ;; FIXME: on Python 2, the test_utf8 fails with:
3302 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
3303 (arguments `(#:tests? #f))))
3305 (define-public python-apsw
3307 (name "python-apsw")
3308 (version "3.8.7.3-r1")
3313 "https://pypi.python.org/packages/source/a/apsw/apsw-"
3318 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
3319 (build-system python-build-system)
3321 `(("python-setuptools" ,python-setuptools)
3322 ("sqlite" ,sqlite)))
3325 ;; swap check and install phases
3328 (assoc-ref %standard-phases 'check)
3331 %standard-phases))))
3332 (home-page "https://github.com/rogerbinns/apsw/")
3333 (synopsis "Another Python SQLite Wrapper")
3334 (description "APSW is a Python wrapper for the SQLite
3335 embedded relational database engine. In contrast to other wrappers such as
3336 pysqlite it focuses on being a minimal layer over SQLite attempting just to
3337 translate the complete SQLite API into Python.")
3338 (license license:zlib)))
3340 (define-public python2-apsw
3341 (package-with-python2 python-apsw))
3343 (define-public python-lxml
3345 (name "python-lxml")
3351 "https://pypi.python.org/packages/source/l/lxml/lxml-"
3356 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
3357 (build-system python-build-system)
3359 `(("libxml2" ,libxml2)
3360 ("libxslt" ,libxslt)
3361 ("python-setuptools" ,python-setuptools)))
3362 (home-page "http://lxml.de/")
3364 "Python XML processing library")
3366 "The lxml XML toolkit is a Pythonic binding for the C libraries
3367 libxml2 and libxslt.")
3368 (license bsd-3))) ; and a few more, see LICENSES.txt
3370 (define-public python2-lxml
3371 (package-with-python2 python-lxml))
3373 (define-public python2-pil
3375 (name "python2-pil")
3381 "http://effbot.org/downloads/Imaging-"
3385 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
3386 (modules '((guix build utils)))
3388 ;; Adapt to newer freetype. As the package is unmaintained upstream,
3389 ;; there is no use in creating a patch and reporting it.
3390 '(substitute* "_imagingft.c"
3393 (build-system python-build-system)
3395 `(("freetype" ,freetype)
3396 ("libjpeg" ,libjpeg)
3397 ("libtiff" ,libtiff)
3398 ("python-setuptools" ,python-setuptools)
3401 ;; Only the fork python-pillow works with Python 3.
3402 `(#:python ,python-2
3403 #:tests? #f ; no check target
3407 ;; According to README and setup.py, manual configuration is
3408 ;; the preferred way of "searching" for inputs.
3409 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
3410 (lambda* (#:key inputs #:allow-other-keys)
3411 (let ((jpeg (assoc-ref inputs "libjpeg"))
3412 (zlib (assoc-ref inputs "zlib"))
3413 (tiff (assoc-ref inputs "libtiff"))
3414 (freetype (assoc-ref inputs "freetype")))
3415 (substitute* "setup.py"
3416 (("JPEG_ROOT = None")
3417 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
3418 (("ZLIB_ROOT = None")
3419 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
3420 (("TIFF_ROOT = None")
3421 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
3422 (("FREETYPE_ROOT = None")
3423 (string-append "FREETYPE_ROOT = libinclude(\""
3426 (home-page "http://www.pythonware.com/products/pil/")
3427 (synopsis "Python Imaging Library")
3428 (description "The Python Imaging Library (PIL) adds image processing
3429 capabilities to the Python interpreter.")
3432 "See 'README' in the distribution."))))
3434 (define-public python2-cssutils
3436 (name "python2-cssutils")
3442 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
3447 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
3448 (build-system python-build-system)
3450 `(("python2-mock" ,python2-mock) ; for the tests
3451 ("unzip" ,unzip))) ; for unpacking the source
3453 `(("python2-setuptools" ,python2-setuptools)))
3455 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
3456 #:tests? #f ; The tests apparently download an external URL.
3458 (home-page "http://cthedot.de/cssutils/")
3460 "CSS Cascading Style Sheets library for Python")
3462 "Cssutils is a Python package for parsing and building CSS
3463 Cascading Style Sheets. Currently it provides a DOM only and no rendering
3467 (define-public python-cssselect
3469 (name "python-cssselect")
3475 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
3480 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
3481 (build-system python-build-system)
3483 `(("python-setuptools" ,python-setuptools)))
3485 ;; tests fail with message
3486 ;; AttributeError: 'module' object has no attribute 'tests'
3489 "https://pythonhosted.org/cssselect/")
3491 "CSS3 selector parser and translator to XPath 1.0")
3493 "Cssselect ia a Python module that parses CSS3 Selectors and translates
3494 them to XPath 1.0 expressions. Such expressions can be used in lxml or
3495 another XPath engine to find the matching elements in an XML or HTML document.")
3498 (define-public python2-cssselect
3499 (package-with-python2 python-cssselect))
3501 (define-public python-netifaces
3503 (name "python-netifaces")
3509 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
3514 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
3515 (build-system python-build-system)
3517 `(("python-setuptools" ,python-setuptools)))
3519 "https://bitbucket.org/al45tair/netifaces")
3521 "Python module for portable network interface information")
3523 "Netifaces is a Python module providing information on network
3524 interfaces in an easy and portable manner.")
3525 (license license:expat)))
3527 (define-public python2-netifaces
3528 (package-with-python2 python-netifaces))
3530 (define-public python-networkx
3532 (name "python-networkx")
3538 "https://pypi.python.org/packages/source/n/networkx/networkx-"
3541 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
3542 (build-system python-build-system)
3543 ;; python-decorator is needed at runtime
3545 `(("python-decorator" ,python-decorator)))
3547 `(("python-setuptools" ,python-setuptools)
3548 ("python-nose" ,python-nose)))
3549 (home-page "http://networkx.github.io/")
3550 (synopsis "Python module for creating and manipulating graphs and networks")
3552 "NetworkX is a Python package for the creation, manipulation, and study
3553 of the structure, dynamics, and functions of complex networks.")
3556 (define-public python2-networkx
3557 (package-with-python2 python-networkx))
3559 (define-public snakemake
3567 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
3570 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
3571 (build-system python-build-system)
3572 (inputs `(("python-setuptools" ,python-setuptools)))
3573 (home-page "https://bitbucket.org/johanneskoester/snakemake")
3574 (synopsis "Python-based execution environment for make-like workflows")
3576 "Snakemake aims to reduce the complexity of creating workflows by
3577 providing a clean and modern domain specific specification language (DSL) in
3578 Python style, together with a fast and comfortable execution environment.")
3579 (license license:expat)))
3581 (define-public python-seaborn
3583 (name "python-seaborn")
3589 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
3592 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
3593 (build-system python-build-system)
3595 `(("python-pandas" ,python-pandas)
3596 ("python-matplotlib" ,python-matplotlib)
3597 ("python-scipy" ,python-scipy)))
3599 `(("python-setuptools" ,python-setuptools)))
3600 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
3601 (synopsis "Statistical data visualization")
3603 "Seaborn is a library for making attractive and informative statistical
3604 graphics in Python. It is built on top of matplotlib and tightly integrated
3605 with the PyData stack, including support for numpy and pandas data structures
3606 and statistical routines from scipy and statsmodels.")
3609 (define-public python2-seaborn
3610 (let ((seaborn (package-with-python2 python-seaborn)))
3611 (package (inherit seaborn)
3613 `(("python2-pytz" ,python2-pytz)
3614 ,@(package-propagated-inputs seaborn))))))
3616 (define-public python-sympy
3618 (name "python-sympy")
3624 "https://github.com/sympy/sympy/releases/download/sympy-"
3625 version "/sympy-" version ".tar.gz"))
3627 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
3628 (build-system python-build-system)
3630 `(("python-setuptools" ,python-setuptools)))
3631 (home-page "http://www.sympy.org/")
3632 (synopsis "Python library for symbolic mathematics")
3634 "SymPy is a Python library for symbolic mathematics. It aims to become a
3635 full-featured computer algebra system (CAS) while keeping the code as simple
3636 as possible in order to be comprehensible and easily extensible.")
3639 (define-public python2-sympy
3640 (package-with-python2 python-sympy))
3642 (define-public python-testlib
3644 (name "python-testlib")
3650 "https://pypi.python.org/packages/source/t/testlib/testlib-"
3653 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
3654 (build-system python-build-system)
3656 `(("python-setuptools" ,python-setuptools)))
3658 `(("unzip" ,unzip)))
3663 (lambda* (#:key inputs outputs #:allow-other-keys)
3664 (let ((unzip (string-append (assoc-ref inputs "unzip")
3666 (source (assoc-ref inputs "source")))
3667 (and (zero? (system* unzip source))
3668 (chdir (string-append "testlib-" ,version)))))
3670 (synopsis "Python micro test suite harness")
3671 (description "A micro unittest suite harness for Python.")
3672 (home-page "https://github.com/trentm/testlib")
3673 (license license:expat)))
3675 (define-public python2-testlib
3676 (package-with-python2 python-testlib))
3678 (define-public python2-xlib
3680 (name "python2-xlib")
3684 (uri (string-append "mirror://sourceforge/python-xlib/"
3685 "python-xlib-" version ".tar.gz"))
3688 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
3689 (build-system python-build-system)
3691 `(#:python ,python-2 ;Python 2 only
3692 #:tests? #f)) ;no tests
3694 `(("python-setuptools" ,python-setuptools)))
3695 (home-page "http://python-xlib.sourceforge.net/")
3696 (synopsis "Python X11 client library")
3698 "The Python X Library is intended to be a fully functional X client
3699 library for Python programs. It is useful to implement low-level X clients.
3700 It is written entirely in Python.")
3703 (define-public python-singledispatch
3705 (name "python-singledispatch")
3711 "https://pypi.python.org/packages/source/s/singledispatch/"
3712 "singledispatch-" version ".tar.gz"))
3715 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
3716 (build-system python-build-system)
3718 `(("python-setuptools" ,python-setuptools)))
3720 `(("python-six" ,python-six)))
3722 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
3723 (synopsis "Backport of singledispatch feature from Python 3.4")
3725 "This library brings functools.singledispatch from Python 3.4 to Python
3727 (license license:expat)))
3729 (define-public python2-singledispatch
3730 (package-with-python2 python-singledispatch))
3732 (define-public python-tornado
3734 (name "python-tornado")
3740 "https://pypi.python.org/packages/source/t/tornado/"
3741 "tornado-" version ".tar.gz"))
3743 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
3744 (build-system python-build-system)
3746 `(("python-certifi" ,python-certifi)))
3748 `(("python-setuptools" ,python-setuptools)))
3749 (home-page "https://pypi.python.org/pypi/tornado/4.1")
3750 (synopsis "Python web framework and asynchronous networking library")
3752 "Tornado is a Python web framework and asynchronous networking library,
3753 originally developed at FriendFeed. By using non-blocking network I/O,
3754 Tornado can scale to tens of thousands of open connections, making it ideal
3755 for long polling, WebSockets, and other applications that require a long-lived
3756 connection to each user.")
3759 (define-public python2-tornado
3760 (let ((tornado (package-with-python2 python-tornado)))
3761 (package (inherit tornado)
3763 `(("python2-backport-ssl-match-hostname"
3764 ,python2-backport-ssl-match-hostname)
3765 ,@(package-inputs tornado))))))
3767 (define-public python-waf
3773 (uri (string-append "https://waf.io/"
3774 "waf-" version ".tar.bz2"))
3777 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
3778 (build-system python-build-system)
3781 (modify-phases %standard-phases
3785 (system* "python" "waf-light" "configure")
3786 (system* "python" "waf-light" "build")))))
3789 (zero? (system* "python" "waf" "--version"))))
3792 (copy-file "waf" %output))))))
3793 (home-page "https://waf.io/")
3794 (synopsis "Python-based build system")
3796 "Waf is a Python-based framework for configuring, compiling and installing
3800 (define-public python2-waf
3801 (package-with-python2 python-waf))
3803 (define-public python-pyzmq
3805 (name "python-pyzmq")
3811 "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
3814 (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
3815 (build-system python-build-system)
3818 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
3819 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
3820 ;; --inplace' for 'python setup.py test' to work.
3823 `(("zeromq" ,zeromq)))
3825 `(("pkg-config" ,pkg-config)
3826 ("python-nose" ,python-nose)
3827 ("python-setuptools" ,python-setuptools)))
3828 (home-page "http://github.com/zeromq/pyzmq")
3829 (synopsis "Python bindings for 0MQ")
3831 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3834 (define-public python2-pyzmq
3835 (package-with-python2 python-pyzmq))