;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
(define-module (gnu packages python)
#:use-module ((guix licenses)
- #:select (asl2.0 bsd-3 bsd-2 bsd-style cc0 x11 x11-style
+ #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+
psfl public-domain x11-style))
#:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages compression)
#:use-module (gnu packages databases)
- #:use-module (gnu packages elf)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gdbm)
#:use-module (gnu packages gcc)
#:use-module (gnu packages libffi)
#:use-module (gnu packages maths)
#:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages networking)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages openssl)
#:use-module (gnu packages perl)
#:use-module (gnu packages readline)
#:use-module (gnu packages texlive)
#:use-module (gnu packages texinfo)
- #:use-module (gnu packages which)
+ #:use-module (gnu packages web)
+ #:use-module (gnu packages base)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages zip)
(sqlite (assoc-ref %build-inputs "sqlite"))
(openssl (assoc-ref %build-inputs "openssl"))
(readline (assoc-ref %build-inputs "readline"))
- (zlib (assoc-ref %build-inputs "zlib")))
+ (zlib (assoc-ref %build-inputs "zlib"))
+ (out (assoc-ref %outputs "out")))
(list "--enable-shared" ; allow embedding
"--with-system-ffi" ; build ctypes
(string-append "CPPFLAGS="
"-L" sqlite "/lib "
"-L" openssl "/lib "
"-L" readline "/lib "
- "-L" zlib "/lib")))
-
- #:modules ((guix build gnu-build-system)
- (guix build utils)
- (guix build rpath)
- (srfi srfi-26))
- #:imported-modules ((guix build gnu-build-system)
- (guix build utils)
- (guix build rpath))
+ "-L" zlib "/lib "
+ "-Wl,-rpath=" out "/lib")))
#:phases
- (alist-cons-after
- 'strip 'add-lib-to-runpath
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lib (string-append out "/lib")))
- ;; Add LIB to the RUNPATH of all the executables.
- (with-directory-excursion out
- (for-each (cut augment-rpath <> lib)
- (find-files "bin" ".*")))))
+ (alist-cons-before
+ 'configure 'patch-lib-shells
+ (lambda _
+ ;; Filter for existing files, since some may not exist in all
+ ;; versions of python that are built with this recipe.
+ (substitute* (filter file-exists?
+ '("Lib/subprocess.py"
+ "Lib/popen2.py"
+ "Lib/distutils/tests/test_spawn.py"
+ "Lib/test/test_subprocess.py"))
+ (("/bin/sh") (which "sh"))))
(alist-cons-before
- 'configure 'patch-lib-shells
+ 'check 'pre-check
(lambda _
- ;; Filter for existing files, since some may not exist in all
- ;; versions of python that are built with this recipe.
- (substitute* (filter file-exists?
- '("Lib/subprocess.py"
- "Lib/popen2.py"
- "Lib/distutils/tests/test_spawn.py"
- "Lib/test/test_subprocess.py"))
- (("/bin/sh") (which "sh"))))
- (alist-cons-before
- 'check 'pre-check
- (lambda _
- ;; 'Lib/test/test_site.py' needs a valid $HOME
- (setenv "HOME" (getcwd)))
- %standard-phases)))))
+ ;; 'Lib/test/test_site.py' needs a valid $HOME
+ (setenv "HOME" (getcwd)))
+ %standard-phases))))
(inputs
`(("bzip2" ,bzip2)
("gdbm" ,gdbm)
("sqlite" ,sqlite) ; for sqlite extension
("openssl" ,openssl)
("readline" ,readline)
- ("zlib" ,zlib)
- ("patchelf" ,patchelf))) ; for (guix build rpath)
+ ("zlib" ,zlib)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(native-search-paths
(define-public python
(package (inherit python-2)
- (version "3.3.5")
+ (version "3.4.3")
(source (origin
(method url-fetch)
(uri (string-append "https://www.python.org/ftp/python/"
version "/Python-" version ".tar.xz"))
(patches (list (search-patch "python-fix-tests.patch")
- (search-patch "python-sqlite-3.8.4-test-fix.patch")
- (search-patch "python-libffi-mips-n32-fix.patch")))
+ ;; XXX Try removing this patch for python > 3.4.3
+ (search-patch "python-disable-ssl-test.patch")))
(patch-flags '("-p0"))
(sha256
(base32
- "1rdncc7g8g6f3lfdg33rli1yffbiq8z283xy4f5ksl1l8i49psdb"))))
- (arguments
- (let ((args `(#:modules ((guix build gnu-build-system)
- (guix build utils)
- (srfi srfi-1)
- (srfi srfi-26))
- ,@(package-arguments python-2))))
- (substitute-keyword-arguments args
- ((#:tests? _) #t))))
+ "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
+ (arguments (substitute-keyword-arguments (package-arguments python-2)
+ ((#:tests? _) #t)))
(native-search-paths
(list (search-path-specification
(variable "PYTHONPATH")
- (files '("lib/python3.3/site-packages")))))))
+ (files (list (string-append "lib/python"
+ (version-major+minor version)
+ "/site-packages"))))))))
(define-public python-wrapper
(package (inherit python)
(define-public python2-babel
(package-with-python2 python-babel))
+(define-public python2-backport-ssl-match-hostname
+ (package
+ (name "python2-backport-ssl-match-hostname")
+ (version "3.4.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/b/"
+ "backports.ssl_match_hostname/backports.ssl_match_hostname-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1bnn47ipvhy49n0m50v27lp4xj6sqdkdw676ypd7pawsn1zhwh87"))))
+ (build-system python-build-system)
+ (arguments `(#:python ,python-2))
+ (inputs
+ `(("python2-setuptools" ,python2-setuptools)))
+ (home-page "https://pypi.python.org/pypi/backports.ssl_match_hostname")
+ (synopsis "Backport of ssl.match_hostname() function from Python 3.4")
+ (description
+ "This backport brings the ssl.match_hostname() function to users of
+earlier versions of Python. The function checks the hostname in the
+certificate returned by the server to which a connection has been established,
+and verifies that it matches the intended target hostname.")
+ (license psfl)))
+
+(define-public python-h5py
+ (package
+ (name "python-h5py")
+ (version "2.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python-cython" ,python-cython)
+ ("python-numpy" ,python-numpy)
+ ("hdf5" ,hdf5)))
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (arguments `(#:tests? #f)) ; no test target
+ (home-page "http://www.h5py.org/")
+ (synopsis "Read and write HDF5 files from Python")
+ (description
+ "The h5py package provides both a high- and low-level interface to the
+HDF5 library from Python. The low-level interface is intended to be a
+complete wrapping of the HDF5 API, while the high-level component supports
+access to HDF5 files, datasets and groups using established Python and NumPy
+concepts.")
+ (license bsd-3)))
+
+(define-public python2-h5py
+ (let ((h5py (package-with-python2 python-h5py)))
+ (package (inherit h5py)
+ (inputs
+ `(("python2-numpy" ,python2-numpy)
+ ,@(alist-delete
+ "python-numpy"
+ (package-inputs h5py)))))))
+
(define-public python-lockfile
(package
(name "python-lockfile")
Python file, so it can be easily copied into your project.")
(license x11)))
+(define-public python2-six
+ (package-with-python2 python-six))
+
(define-public python-dateutil-2
(package
(name "python-dateutil")
"Parse human-readable date/time text")
(license asl2.0)))
+(define-public python-pandas
+ (package
+ (name "python-pandas")
+ (version "0.16.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/p/"
+ "pandas/pandas-" version ".tar.gz"))
+ (sha256
+ (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0"))))
+ (build-system python-build-system)
+ (arguments
+ `(;; Three tests fail:
+ ;; - test_read_google
+ ;; - test_read_yahoo
+ ;; - test_month_range_union_tz_dateutil
+ #:tests? #f))
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)
+ ("python-pytz" ,python-pytz)
+ ("python-dateutil" ,python-dateutil-2)))
+ (native-inputs
+ `(("python-nose" ,python-nose)
+ ("python-setuptools" ,python-setuptools)))
+ (home-page "http://pandas.pydata.org")
+ (synopsis "Data structures for data analysis, time series, and statistics")
+ (description
+ "Pandas is a Python package providing fast, flexible, and expressive data
+structures designed to make working with structured (tabular,
+multidimensional, potentially heterogeneous) and time series data both easy
+and intuitive. It aims to be the fundamental high-level building block for
+doing practical, real world data analysis in Python.")
+ (license bsd-3)))
+
+(define-public python2-pandas
+ (package-with-python2 python-pandas))
+
(define-public python-tzlocal
(package
(name "python-tzlocal")
(description
"Mechanize implements stateful programmatic web browsing in Python,
after Andy Lester’s Perl module WWW::Mechanize.")
- (license (bsd-style "file://COPYING"
+ (license (non-copyleft "file://COPYING"
"See COPYING in the distribution."))))
(define-public scons
(package
(name "scons")
- (version "2.1.0")
+ (version "2.3.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/scons/scons-"
version ".tar.gz"))
(sha256
(base32
- "07cjn4afb2cljjrd3cr7xf062qq58z8q96f58z6yplhdyqafsfa1"))))
+ "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
(build-system python-build-system)
(arguments
;; With Python 3.x, fails to build with a syntax error.
(define-public python2-certifi
(package-with-python2 python-certifi))
-(define-public python2-requests
+(define-public python-click
(package
- (name "python2-requests")
+ (name "python-click")
+ (version "4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/c/click/click-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0294x9g28w6zgswl0rsygkwi0wf6n480gf7fiiw5f9az3xhh77pl"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "http://click.pocoo.org")
+ (synopsis "Command line library for Python")
+ (description
+ "Click is a Python package for creating command line interfaces in a
+composable way with as little code as necessary. Its name stands for
+\"Command Line Interface Creation Kit\". It's highly configurable but comes
+with sensible defaults out of the box.")
+ (license bsd-3)))
+
+(define-public python2-click
+ (package-with-python2 python-click))
+
+(define-public python-requests
+ (package
+ (name "python-requests")
(version "2.4.0")
(source (origin
(method url-fetch)
(inputs
`(("python-setuptools" ,python-setuptools)
("python-certifi" ,python-certifi)))
- (arguments `(#:tests? #f ; no tests
- #:python ,python-2))
+ (arguments `(#:tests? #f)) ; no tests
(home-page "http://python-requests.org/")
(synopsis "Python HTTP library")
(description
than Python’s urllib2 library.")
(license asl2.0)))
+(define-public python2-requests
+ (package-with-python2 python-requests))
+
(define-public python-jsonschema
(package
(name "python-jsonschema")
(let ((base (package-with-python2 python-oauthlib)))
(package
(inherit base)
- (name "python2-oauthlib")
- (version "0.6.3")
- (source (origin
- (method url-fetch)
- (uri
- (string-append
- "https://pypi.python.org/packages/source/o/oauthlib/oauthlib-"
- version ".tar.gz"))
- (sha256
- (base32
- "1yaj3j64la4arwsbhbfmpnickzh3jpg9nlpyg409v8pp24isn48a"))))
(inputs
(append (package-inputs base)
`(("python2-unittest2" ,python2-unittest2)))))))
(define-public python2-itsdangerous
(package-with-python2 python-itsdangerous))
+(define-public python-pyyaml
+ (package
+ (name "python-pyyaml")
+ (version "3.11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
+ (build-system python-build-system)
+ (inputs
+ `(("libyaml" ,libyaml)))
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "http://pyyaml.org/wiki/PyYAML")
+ (synopsis "YAML parser and emitter for Python")
+ (description
+ "PyYAML is a YAML parser and emitter for Python. PyYAML features a
+complete YAML 1.1 parser, Unicode support, pickle support, capable extension
+API, and sensible error messages. PyYAML supports standard YAML tags and
+provides Python-specific tags that allow to represent an arbitrary Python
+object.")
+ (license license:expat)))
+
+(define-public python2-pyyaml
+ (package-with-python2 python-pyyaml))
+
(define-public python-virtualenv
(package
(name "python-virtualenv")
(define-public python2-sphinx-rtd-theme
(package-with-python2 python-sphinx-rtd-theme))
+(define-public python-scikit-learn
+ (package
+ (name "python-scikit-learn")
+ (version "0.16.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/scikit-learn/scikit-learn/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (alist-cons-before
+ 'check 'set-HOME
+ ;; some tests require access to "$HOME"
+ (lambda _ (setenv "HOME" "/tmp"))
+ ;; Tests can only be run after the library has been installed and not
+ ;; within the source directory.
+ (alist-cons-after
+ 'install 'check
+ (lambda _
+ (with-directory-excursion "/tmp"
+ ;; With Python 3 one test of 3334 fails
+ ;; (sklearn.tests.test_common.test_transformers); see
+ ;; https://github.com/scikit-learn/scikit-learn/issues/3693
+ (system* "nosetests" "-v" "sklearn")))
+ (alist-delete 'check %standard-phases)))))
+ (inputs
+ `(("openblas" ,openblas)
+ ("python-nose" ,python-nose)))
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)))
+ (home-page "http://scikit-learn.org/")
+ (synopsis "Machine Learning in Python")
+ (description
+ "Scikit-learn provides simple and efficient tools for data
+mining and data analysis.")
+ (license bsd-3)))
+
+(define-public python2-scikit-learn
+ (let ((scikit (package-with-python2 python-scikit-learn)))
+ (package (inherit scikit)
+ (propagated-inputs
+ `(("python2-numpy" ,python2-numpy)
+ ("python2-scipy" ,python2-scipy)
+ ,@(alist-delete
+ "python-numpy"
+ (alist-delete
+ "python-scipy" (package-propagated-inputs scikit))))))))
+
+(define-public python-scikit-image
+ (package
+ (name "python-scikit-image")
+ (version "0.11.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-matplotlib" ,python-matplotlib)
+ ("python-networkx" ,python-networkx)
+ ("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)
+ ("python-six" ,python-six)
+ ("python-pillow" ,python-pillow)))
+ (native-inputs
+ `(("python-cython" ,python-cython)
+ ("python-setuptools" ,python-setuptools)))
+ (home-page "http://scikit-image.org/")
+ (synopsis "Image processing in Python")
+ (description
+ "scikit-image is a collection of algorithms for image processing.")
+ (license bsd-3)))
+
+(define-public python2-scikit-image
+ (let ((scikit-image (package-with-python2 python-scikit-image)))
+ (package (inherit scikit-image)
+ (native-inputs
+ `(("python2-mock" ,python2-mock)
+ ,@(package-native-inputs scikit-image)))
+ (propagated-inputs
+ `(("python2-pytz" ,python2-pytz)
+ ,@(package-propagated-inputs scikit-image))))))
+
+(define-public python-redis
+ (package
+ (name "python-redis")
+ (version "2.10.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/r/redis/redis-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
+ (build-system python-build-system)
+ ;; Tests require a running Redis server
+ (arguments '(#:tests? #f))
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)
+ ("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/andymccurdy/redis-py")
+ (synopsis "Redis Python client")
+ (description
+ "This package provides a Python interface to the Redis key-value store.")
+ (license license:expat)))
+
+(define-public python2-redis
+ (package-with-python2 python-redis))
+
+(define-public python-rq
+ (package
+ (name "python-rq")
+ (version "0.5.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/r/rq/rq-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-click" ,python-click)
+ ("python-redis" ,python-redis)))
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "http://python-rq.org/")
+ (synopsis "Simple job queues for Python")
+ (description
+ "RQ (Redis Queue) is a simple Python library for queueing jobs and
+processing them in the background with workers. It is backed by Redis and it
+is designed to have a low barrier to entry.")
+ (license bsd-2)))
+
+(define-public python2-rq
+ (package-with-python2 python-rq))
+
(define-public python-cython
(package
(name "python-cython")
(build-system python-build-system)
(inputs
`(("python-nose" ,python-nose)
- ("atlas" ,atlas)))
+ ("openblas" ,openblas)
+ ("lapack" ,lapack)))
(native-inputs
- `(("gfortran" ,gfortran-4.8)))
+ `(("gfortran" ,gfortran)))
(arguments
`(#:phases
(alist-cons-before
'build 'set-environment-variables
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((atlas-threaded
- (string-append (assoc-ref inputs "atlas")
- "/lib/libtatlas.so"))
- ;; On single core CPUs only the serial library is created.
- (atlas-lib
- (if (file-exists? atlas-threaded)
- atlas-threaded
- (string-append (assoc-ref inputs "atlas")
- "/lib/libsatlas.so"))))
- (setenv "ATLAS" atlas-lib)))
+ (call-with-output-file "site.cfg"
+ (lambda (port)
+ (format port
+ "[openblas]
+libraries = openblas
+library_dirs = ~a/lib
+include_dirs = ~a/include
+
+[lapack]
+lapack_libs = lapack
+library_dirs = ~a/lib
+include_dirs = ~a/include
+"
+ (assoc-ref inputs "openblas")
+ (assoc-ref inputs "openblas")
+ (assoc-ref inputs "lapack")
+ (assoc-ref inputs "lapack"))))
+ ;; Use "gcc" executable, not "cc".
+ (substitute* "numpy/distutils/system_info.py"
+ (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
+ "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
+ #t)
;; Tests can only be run after the library has been installed and not
;; within the source directory.
(alist-cons-after
'install 'check
- (lambda _
+ (lambda _
(with-directory-excursion "/tmp"
- (zero? (system* "python" "-c"
+ (zero? (system* "python" "-c"
"import numpy; numpy.test(verbose=2)"))))
- (alist-delete
- 'check
+ (alist-delete
+ 'check
%standard-phases)))))
(home-page "http://www.numpy.org/")
(synopsis "Fundamental package for scientific computing with Python")
(package (inherit python-numpy-bootstrap)
(name "python-numpy")
(outputs '("out" "doc"))
- (inputs
+ (inputs
`(("which" ,which)
("python-setuptools" ,python-setuptools)
("python-matplotlib" ,python-matplotlib)
("perl" ,perl)
,@(package-native-inputs python-numpy-bootstrap)))
(arguments
- `(,@(substitute-keyword-arguments
+ `(,@(substitute-keyword-arguments
(package-arguments python-numpy-bootstrap)
((#:phases phases)
`(alist-cons-after
'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
(let* ((data (string-append (assoc-ref outputs "doc") "/share"))
- (doc (string-append
- data "/doc/" ,name "-"
+ (doc (string-append
+ data "/doc/" ,name "-"
,(package-version python-numpy-bootstrap)))
(info (string-append data "/info"))
(html (string-append doc "/html"))
(mkdir-p html)
(system* "make" "html" pyver)
(system* "make" "latex" "PAPER=a4" pyver)
- (system* "make" "-C" "build/latex"
+ (system* "make" "-C" "build/latex"
"all-pdf" "PAPER=a4" pyver)
;; FIXME: Generation of the info file fails.
;; (system* "make" "info" pyver)
(define-public python2-numpy
(let ((numpy (package-with-python2 python-numpy)))
(package (inherit numpy)
- ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is customized for
- ;; Python 2. Since it is also an input to PYTHON2-MATPLOTLIB, we need to
- ;; import the right version of 'matplotlib' as well.
- (inputs `(("python2-numpydoc" ,python2-numpydoc)
- ("python2-matplotlib" ,python2-matplotlib)
- ,@(alist-delete "python-numpydoc"
- (alist-delete "python-matplotlib"
- (package-inputs numpy))))))))
+ ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
+ ;; Python 2.
+ (inputs `(("python2-matplotlib" ,python2-matplotlib)
+ ,@(alist-delete "python-matplotlib"
+ (package-inputs numpy)))))))
(define-public python-pyparsing
(package
(alist-cons-after
'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
- (let* ((doc (string-append (assoc-ref outputs "doc")
+ (let* ((doc (string-append (assoc-ref outputs "doc")
"/share/doc/" ,name "-" ,version))
(html-doc (string-append doc "/html"))
(examples (string-append doc "/examples")))
(mkdir-p html-doc)
(mkdir-p examples)
- (for-each
+ (for-each
(lambda (dir tgt)
- (map (lambda (file)
+ (map (lambda (file)
(copy-file file (string-append tgt "/" (basename file))))
(find-files dir ".*")))
(list "docs" "htmldoc" "examples")
(source
(origin
(method url-fetch)
- (uri (string-append
+ (uri (string-append
"https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
version ".tar.gz"))
(sha256
(base32
- "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))))
+ "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Drop a test requiring matplotlib, which we cannot add as an
+ ;; input since it would create a circular dependency: Extend the
+ ;; test for Python 3, where it is already dropped, to Python 2.
+ (substitute* "numpydoc/tests/test_plot_directive.py"
+ (("3") "2"))))))
(build-system python-build-system)
(inputs
`(("python-setuptools" ,python-setuptools)
(license bsd-2)))
(define-public python2-numpydoc
- (package
- (inherit (package-with-python2 python-numpydoc))
- ;; With python-2 1 test (out of 30) fails because it doesn't find
- ;; matplotlib. With python-3 it seems to detect at run-time the absence
- ;; of matplotlib.
- (arguments `(#:tests? #f
- #:python ,python-2))))
+ (package-with-python2 python-numpydoc))
(define-public python-matplotlib
(package
(info (string-append data "/info"))
(html (string-append doc "/html")))
(with-directory-excursion "doc"
- ;; Install and set UTF-8 locale to avoid an encoding error.
- (setenv "LOCPATH" (getcwd))
- (system* "localedef" "--no-archive"
- "--prefix" (getcwd) "-i" "en_US"
- "-f" "UTF-8" "./en_US.UTF-8")
- (setenv "LANG" "en_US.UTF-8")
;; Produce pdf in 'A4' format.
(substitute* (find-files "." "conf\\.py")
(("latex_paper_size = 'letter'")
(define-public python2-matplotlib
(let ((matplotlib (package-with-python2 python-matplotlib)))
(package (inherit matplotlib)
- ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is
- ;; customized for Python 2.
- (propagated-inputs
- `(("python2-py2cairo" ,python2-py2cairo)
+ ;; Make sure to use special packages for Python 2 instead
+ ;; of those automatically rewritten by package-with-python2.
+ (propagated-inputs
+ `(("python2-pycairo" ,python2-pycairo)
("python2-pygobject-2" ,python2-pygobject-2)
,@(alist-delete "python-pycairo"
(alist-delete "python-pygobject"
- (package-propagated-inputs
- matplotlib)))))
- (inputs
- `(("python2-numpydoc" ,python2-numpydoc)
- ,@(alist-delete "python-numpydoc"
- (package-inputs matplotlib)))))))
+ (package-propagated-inputs
+ matplotlib))))))))
+
+(define-public python2-pysnptools
+ (package
+ (name "python2-pysnptools")
+ (version "0.2.13")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/p/pysnptools"
+ "/pysnptools-" version ".zip"))
+ (sha256
+ (base32
+ "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:python ,python-2)) ; only Python 2.7 is supported
+ (propagated-inputs
+ `(("python2-numpy" ,python2-numpy)
+ ("python2-scipy" ,python2-scipy)
+ ("python2-pandas" ,python2-pandas)
+ ("python2-cython" ,python2-cython)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("python2-setuptools" ,python2-setuptools)))
+ (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
+ (synopsis "Library for reading and manipulating genetic data")
+ (description
+ "PySnpTools is a library for reading and manipulating genetic data. It
+can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
+those files. It can also efficiently manipulate ranges of integers using set
+operators such as union, intersection, and difference.")
+ (license asl2.0)))
(define-public python-scipy
(package
("python-pyparsing" ,python-pyparsing)
("python-nose" ,python-nose)
("python-sphinx" ,python-sphinx)
- ("atlas" ,atlas)))
+ ("lapack" ,lapack)
+ ("openblas" ,openblas)))
(native-inputs
- `(("gfortran" ,gfortran-4.8)
+ `(("gfortran" ,gfortran)
("texlive" ,texlive)
("perl" ,perl)))
(outputs '("out" "doc"))
(arguments
`(#:phases
(alist-cons-before
- 'build 'set-environment-variables
+ 'build 'configure-openblas
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((atlas-threaded
- (string-append (assoc-ref inputs "atlas")
- "/lib/libtatlas.so"))
- ;; On single core CPUs only the serial library is created.
- (atlas-lib
- (if (file-exists? atlas-threaded)
- atlas-threaded
- (string-append (assoc-ref inputs "atlas")
- "/lib/libsatlas.so"))))
- (setenv "ATLAS" atlas-lib)))
+ (call-with-output-file "site.cfg"
+ (lambda (port)
+ (format port
+ "[blas]
+libraries = openblas
+library_dirs = ~a/lib
+include_dirs = ~a/include
+[atlas]
+library_dirs = ~a/lib
+atlas_libs = openblas
+"
+ (assoc-ref inputs "openblas")
+ (assoc-ref inputs "openblas")
+ (assoc-ref inputs "openblas"))))
+ #t)
(alist-cons-after
'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
(html (string-append doc "/html"))
(pyver ,(string-append "PYVER=")))
(with-directory-excursion "doc"
- ;; Without setting this variable we get an encoding error.
- (setenv "LANG" "en_US.UTF-8")
;; Fix generation of images for mathematical expressions.
(substitute* (find-files "source" "conf\\.py")
(("pngmath_use_preview = True")
;; within the source directory.
(alist-cons-after
'install 'check
- (lambda _
+ (lambda _
(with-directory-excursion "/tmp"
(zero? (system* "python" "-c" "import scipy; scipy.test()"))))
- (alist-delete
- 'check
+ (alist-delete
+ 'check
%standard-phases))))))
(home-page "http://www.scipy.org/")
(synopsis "The Scipy library provides efficient numerical routines")
;; Use packages customized for python-2.
(inputs `(("python2-matplotlib" ,python2-matplotlib)
("python2-numpy" ,python2-numpy)
- ,@(alist-delete "python-matplotlib"
- (alist-delete "python-numpy"
+ ,@(alist-delete "python-matplotlib"
+ (alist-delete "python-numpy"
(package-inputs scipy))))))))
(define-public python-sqlalchemy
(define-public python-pillow
(package
(name "python-pillow")
- (version "2.6.1")
+ (version "2.8.1")
(source
(origin
(method url-fetch)
"Pillow/Pillow-" version ".tar.gz"))
(sha256
(base32
- "0iw36c73wkhz88wa78v6l43llsb080ihw8yq7adhfqxdib7l4hzr"))))
+ "15n92axxph2s3kvg68bki9gv3nzwgq7130kp7wbblpi1l0cc2q47"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)
("python-nose" ,python-nose)))
(inputs
- `(("lcms" ,lcms)
+ `(("freetype" ,freetype)
+ ("lcms" ,lcms)
("zlib" ,zlib)
("libjpeg" ,libjpeg)
("openjpeg" ,openjpeg)
- ("libtiff" ,libtiff)))
+ ("libtiff" ,libtiff)
+ ("libwebp" ,libwebp)))
(propagated-inputs
`(;; Used at runtime for pkg_resources
("python-setuptools" ,python-setuptools)))
`(("pkg-config" ,pkg-config)
("python-setuptools" ,python-setuptools)))
(arguments
- `(#:phases
+ `(#:phases
(alist-replace
'check
(lambda _
(method url-fetch)
(uri (string-append "https://pypi.python.org/packages/source/c/"
"cffi/cffi-" version ".tar.gz"))
- (sha256
+ (sha256
(base32 "0406j3sgndmx88idv5zxkkrwfqxmjl18pj8gf47nsg4ymzixjci5"))))
(build-system python-build-system)
(outputs '("out" "doc"))
("python-setuptools" ,python-setuptools)))
(arguments
`(#:tests? #f ; FIXME: requires pytest
- #:phases
+ #:phases
(alist-cons-after
'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
(propagated-inputs
`(("python-cffi" ,python-cffi))) ; used at run time
(arguments
- `(#:phases
+ `(#:phases
(alist-cons-after
'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
;; The archive on pypi is missing the 'utils' directory!
(uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
(propagated-inputs
`(("python-xcffib" ,python-xcffib))) ; used at run time
(arguments
- `(#:phases
+ `(#:phases
(alist-cons-after
'install 'install-doc
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((data (string-append (assoc-ref outputs "doc") "/share"))
(doc (string-append data "/doc/" ,name "-" ,version))
(html (string-append doc "/html")))
- (setenv "LD_LIBRARY_PATH"
+ (setenv "LD_LIBRARY_PATH"
(string-append (assoc-ref inputs "cairo") "/lib" ":"
(assoc-ref inputs "gdk-pixbuf") "/lib"))
(setenv "LANG" "en_US.UTF-8")
(define-public python2-cairocffi
(package-with-python2 python-cairocffi))
+(define-public python-decorator
+ (package
+ (name "python-decorator")
+ (version "3.4.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/d/decorator/decorator-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k"))))
+ (build-system python-build-system)
+ (arguments '(#:tests? #f)) ; no test target
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "http://pypi.python.org/pypi/decorator/")
+ (synopsis "Python module to simplify usage of decorators")
+ (description
+ "The aim of the decorator module is to simplify the usage of decorators
+for the average programmer, and to popularize decorators usage giving examples
+of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
+etc. The core of this module is a decorator factory.")
+ (license license:expat)))
+
+(define-public python2-decorator
+ (package-with-python2 python-decorator))
+
+(define-public python-drmaa
+ (package
+ (name "python-drmaa")
+ (version "0.7.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
+ (build-system python-build-system)
+ ;; The test suite requires libdrmaa which is provided by the cluster
+ ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
+ ;; should be set to the path of the libdrmaa library.
+ (arguments '(#:tests? #f))
+ (native-inputs
+ `(("python-nose" ,python-nose)
+ ("python-setuptools" ,python-setuptools)))
+ (home-page "https://pypi.python.org/pypi/drmaa")
+ (synopsis "Python bindings for the DRMAA library")
+ (description
+ "A Python package for Distributed Resource Management (DRM) job
+submission and control. This package is an implementation of the DRMAA 1.0
+Python language binding specification.")
+ (license bsd-3)))
+
+(define-public python2-drmaa
+ (package-with-python2 python-drmaa))
+
(define-public python-ipython
(package
(name "python-ipython")
("texinfo" ,texinfo)
("python-setuptools" ,python-setuptools)))
(arguments
- `(#:phases
+ `(#:phases
(alist-cons-after
'install 'install-doc
(lambda* (#:key inputs outputs #:allow-other-keys)
;; (zero? (system* (string-append (assoc-ref outputs "out")
;; "/bin/iptest"))))
#t)
- (alist-delete
- 'check
+ (alist-delete
+ 'check
%standard-phases)))))
(home-page "http://ipython.org")
(synopsis "IPython is a tool for interactive computing in Python")
(let ((ipython (package-with-python2 python-ipython)))
(package (inherit ipython)
;; Make sure we use custom python2-NAME packages.
- (inputs
- `(("python2-numpydoc" ,python2-numpydoc)
- ("python2-matplotlib" ,python2-matplotlib)
- ,@(alist-delete "python-numpydoc"
- (alist-delete "python-matplotlib"
- (package-inputs ipython))))))))
+ (inputs
+ `(("python2-matplotlib" ,python2-matplotlib)
+ ,@(alist-delete "python-matplotlib"
+ (package-inputs ipython)))))))
(define-public python-isodate
(package
(base32
"1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
(build-system python-build-system)
+ (propagated-inputs
+ `(("python-six" ,python-six))) ; required to "import html5lib"
(inputs
`(("python-setuptools" ,python-setuptools)))
(arguments
`(("pkg-config" ,pkg-config)))
(inputs
`(("python" ,python)
- ("dbus" ,dbus)
- ("dbus-glib" ,dbus-glib)
- ("glib" ,glib)))
+ ("dbus-glib" ,dbus-glib)))
(synopsis "Python bindings for D-bus")
(description "python-dbus provides bindings for libdbus, the reference
implementation of D-Bus.")
(define-public python2-lxml
(package-with-python2 python-lxml))
-(define-public python-pillow
- (package
- (name "python-pillow")
- (version "2.7.0")
- (source
- (origin
- (method url-fetch)
- (uri (string-append
- "https://pypi.python.org/packages/source/P/Pillow/Pillow-"
- version
- ".tar.gz"))
- (sha256
- (base32
- "1y0rysgd7vqpl5lh0lsra7j2k30azwxqlh5jnqk1i0pmfc735s96"))))
- (build-system python-build-system)
- (inputs
- `(("freetype" ,freetype)
- ("lcms" ,lcms)
- ("libjpeg" ,libjpeg)
- ("libtiff" ,libtiff)
- ("openjpeg" ,openjpeg)
- ("python-setuptools" ,python-setuptools)
- ("zlib" ,zlib)))
- (arguments
- `(#:tests? #f)) ; no check target
- (home-page "http://python-pillow.github.io/")
- (synopsis "Pillow fork of Python Imaging Library")
- (description "Pillow is a fork of the Python Imaging Library (PIL).")
- ;; PIL license, see
- ;; http://www.pythonware.com/products/pil/license.htm
- (license (x11-style
- "file://PKG-INFO"
- "See http://www.pythonware.com/products/pil/license.htm"))))
-
-(define-public python2-pillow
- (package-with-python2 python-pillow))
-
(define-public python2-pil
(package
(name "python2-pil")
version ".tar.gz"))
(sha256
(base32
- "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))))
+ "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Adapt to newer freetype. As the package is unmaintained upstream,
+ ;; there is no use in creating a patch and reporting it.
+ '(substitute* "_imagingft.c"
+ (("freetype/")
+ "freetype2/")))))
(build-system python-build-system)
(inputs
`(("freetype" ,freetype)
(arguments
`(#:python ,python-2 ; Otherwise tests fail with a syntax error.
#:tests? #f ; The tests apparently download an external URL.
- #:phases
- (alist-replace
- 'unpack
- (lambda* (#:key source #:allow-other-keys)
- (and (zero? (system* "unzip" source))
- (chdir "cssutils-1.0")))
- %standard-phases)))
+ ))
(home-page "http://cthedot.de/cssutils/")
(synopsis
"CSS Cascading Style Sheets library for Python")
(define-public python2-netifaces
(package-with-python2 python-netifaces))
+
+(define-public python-networkx
+ (package
+ (name "python-networkx")
+ (version "1.9.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/n/networkx/networkx-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
+ (build-system python-build-system)
+ ;; python-decorator is needed at runtime
+ (propagated-inputs
+ `(("python-decorator" ,python-decorator)))
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)
+ ("python-nose" ,python-nose)))
+ (home-page "http://networkx.github.io/")
+ (synopsis "Python module for creating and manipulating graphs and networks")
+ (description
+ "NetworkX is a Python package for the creation, manipulation, and study
+of the structure, dynamics, and functions of complex networks.")
+ (license bsd-3)))
+
+(define-public python2-networkx
+ (package-with-python2 python-networkx))
+
+(define-public snakemake
+ (package
+ (name "snakemake")
+ (version "3.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
+ (build-system python-build-system)
+ (inputs `(("python-setuptools" ,python-setuptools)))
+ (home-page "https://bitbucket.org/johanneskoester/snakemake")
+ (synopsis "Python-based execution environment for make-like workflows")
+ (description
+ "Snakemake aims to reduce the complexity of creating workflows by
+providing a clean and modern domain specific specification language (DSL) in
+Python style, together with a fast and comfortable execution environment.")
+ (license license:expat)))
+
+(define-public python-seaborn
+ (package
+ (name "python-seaborn")
+ (version "0.5.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-pandas" ,python-pandas)
+ ("python-matplotlib" ,python-matplotlib)
+ ("python-scipy" ,python-scipy)))
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
+ (synopsis "Statistical data visualization")
+ (description
+ "Seaborn is a library for making attractive and informative statistical
+graphics in Python. It is built on top of matplotlib and tightly integrated
+with the PyData stack, including support for numpy and pandas data structures
+and statistical routines from scipy and statsmodels.")
+ (license bsd-3)))
+
+(define-public python2-seaborn
+ (let ((seaborn (package-with-python2 python-seaborn)))
+ (package (inherit seaborn)
+ (propagated-inputs
+ `(("python2-pytz" ,python2-pytz)
+ ,@(package-propagated-inputs seaborn))))))
+
+(define-public python-sympy
+ (package
+ (name "python-sympy")
+ (version "0.7.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/sympy/sympy/releases/download/sympy-"
+ version "/sympy-" version ".tar.gz"))
+ (sha256
+ (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "http://www.sympy.org/")
+ (synopsis "Python library for symbolic mathematics")
+ (description
+ "SymPy is a Python library for symbolic mathematics. It aims to become a
+full-featured computer algebra system (CAS) while keeping the code as simple
+as possible in order to be comprehensible and easily extensible.")
+ (license bsd-3)))
+
+(define-public python2-sympy
+ (package-with-python2 python-sympy))
+
+(define-public python-testlib
+ (package
+ (name "python-testlib")
+ (version "0.6.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/t/testlib/testlib-"
+ version ".zip"))
+ (sha256
+ (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (arguments
+ `(#:phases
+ (alist-replace
+ 'unpack
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((unzip (string-append (assoc-ref inputs "unzip")
+ "/bin/unzip"))
+ (source (assoc-ref inputs "source")))
+ (and (zero? (system* unzip source))
+ (chdir (string-append "testlib-" ,version)))))
+ %standard-phases)))
+ (synopsis "Python micro test suite harness")
+ (description "A micro unittest suite harness for Python.")
+ (home-page "https://github.com/trentm/testlib")
+ (license license:expat)))
+
+(define-public python2-testlib
+ (package-with-python2 python-testlib))
+
+(define-public python2-xlib
+ (package
+ (name "python2-xlib")
+ (version "0.14")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/python-xlib/"
+ "python-xlib-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:python ,python-2 ;Python 2 only
+ #:tests? #f)) ;no tests
+ (inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "http://python-xlib.sourceforge.net/")
+ (synopsis "Python X11 client library")
+ (description
+ "The Python X Library is intended to be a fully functional X client
+library for Python programs. It is useful to implement low-level X clients.
+It is written entirely in Python.")
+ (license gpl2+)))
+
+(define-public python-singledispatch
+ (package
+ (name "python-singledispatch")
+ (version "3.4.0.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/s/singledispatch/"
+ "singledispatch-" version ".tar.gz"))
+ (sha256
+ (base32
+ "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (propagated-inputs
+ `(("python-six" ,python-six)))
+ (home-page
+ "http://docs.python.org/3/library/functools.html#functools.singledispatch")
+ (synopsis "Backport of singledispatch feature from Python 3.4")
+ (description
+ "This library brings functools.singledispatch from Python 3.4 to Python
+2.6-3.3.")
+ (license license:expat)))
+
+(define-public python2-singledispatch
+ (package-with-python2 python-singledispatch))
+
+(define-public python-tornado
+ (package
+ (name "python-tornado")
+ (version "4.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/t/tornado/"
+ "tornado-" version ".tar.gz"))
+ (sha256
+ (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python-certifi" ,python-certifi)))
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "https://pypi.python.org/pypi/tornado/4.1")
+ (synopsis "Python web framework and asynchronous networking library")
+ (description
+ "Tornado is a Python web framework and asynchronous networking library,
+originally developed at FriendFeed. By using non-blocking network I/O,
+Tornado can scale to tens of thousands of open connections, making it ideal
+for long polling, WebSockets, and other applications that require a long-lived
+connection to each user.")
+ (license asl2.0)))
+
+(define-public python2-tornado
+ (let ((tornado (package-with-python2 python-tornado)))
+ (package (inherit tornado)
+ (inputs
+ `(("python2-backport-ssl-match-hostname"
+ ,python2-backport-ssl-match-hostname)
+ ,@(package-inputs tornado))))))
+
+(define-public python-waf
+ (package
+ (name "python-waf")
+ (version "1.8.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://waf.io/"
+ "waf-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (zero? (begin
+ (system* "python" "waf-light" "configure")
+ (system* "python" "waf-light" "build")))))
+ (replace 'check
+ (lambda _
+ (zero? (system* "python" "waf" "--version"))))
+ (replace 'install
+ (lambda _
+ (copy-file "waf" %output))))))
+ (home-page "https://waf.io/")
+ (synopsis "Python-based build system")
+ (description
+ "Waf is a Python-based framework for configuring, compiling and installing
+applications.")
+ (license bsd-3)))
+
+(define-public python2-waf
+ (package-with-python2 python-waf))
+
+(define-public python-pyzmq
+ (package
+ (name "python-pyzmq")
+ (version "14.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:configure-flags
+ (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
+ ;; FIXME: You must build pyzmq with 'python setup.py build_ext
+ ;; --inplace' for 'python setup.py test' to work.
+ #:tests? #f))
+ (inputs
+ `(("zeromq" ,zeromq)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("python-nose" ,python-nose)
+ ("python-setuptools" ,python-setuptools)))
+ (home-page "http://github.com/zeromq/pyzmq")
+ (synopsis "Python bindings for 0MQ")
+ (description
+ "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
+ (license bsd-4)))
+
+(define-public python2-pyzmq
+ (package-with-python2 python-pyzmq))