summaryrefslogtreecommitdiff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r--gnu/packages/python.scm337
1 files changed, 279 insertions, 58 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 29b47f357c4..914c2dc23cc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -26,7 +26,7 @@
26 26
27(define-module (gnu packages python) 27(define-module (gnu packages python)
28 #:use-module ((guix licenses) 28 #:use-module ((guix licenses)
29 #:select (asl2.0 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style 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+ 30 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+
31 psfl public-domain x11-style)) 31 psfl public-domain x11-style))
32 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) 32 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
@@ -45,6 +45,7 @@
45 #:use-module (gnu packages libffi) 45 #:use-module (gnu packages libffi)
46 #:use-module (gnu packages maths) 46 #:use-module (gnu packages maths)
47 #:use-module (gnu packages multiprecision) 47 #:use-module (gnu packages multiprecision)
48 #:use-module (gnu packages networking)
48 #:use-module (gnu packages ncurses) 49 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages openssl) 50 #:use-module (gnu packages openssl)
50 #:use-module (gnu packages perl) 51 #:use-module (gnu packages perl)
@@ -628,6 +629,44 @@ datetime module, available in Python 2.3+.")
628 "Parse human-readable date/time text") 629 "Parse human-readable date/time text")
629 (license asl2.0))) 630 (license asl2.0)))
630 631
632(define-public python-pandas
633 (package
634 (name "python-pandas")
635 (version "0.16.0")
636 (source
637 (origin
638 (method url-fetch)
639 (uri (string-append "https://pypi.python.org/packages/source/p/"
640 "pandas/pandas-" version ".tar.gz"))
641 (sha256
642 (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0"))))
643 (build-system python-build-system)
644 (arguments
645 `(;; Three tests fail:
646 ;; - test_read_google
647 ;; - test_read_yahoo
648 ;; - test_month_range_union_tz_dateutil
649 #:tests? #f))
650 (propagated-inputs
651 `(("python-numpy" ,python-numpy)
652 ("python-pytz" ,python-pytz)
653 ("python-dateutil" ,python-dateutil-2)))
654 (native-inputs
655 `(("python-nose" ,python-nose)
656 ("python-setuptools" ,python-setuptools)))
657 (home-page "http://pandas.pydata.org")
658 (synopsis "Data structures for data analysis, time series, and statistics")
659 (description
660 "Pandas is a Python package providing fast, flexible, and expressive data
661structures designed to make working with structured (tabular,
662multidimensional, potentially heterogeneous) and time series data both easy
663and intuitive. It aims to be the fundamental high-level building block for
664doing practical, real world data analysis in Python.")
665 (license bsd-3)))
666
667(define-public python2-pandas
668 (package-with-python2 python-pandas))
669
631(define-public python-tzlocal 670(define-public python-tzlocal
632 (package 671 (package
633 (name "python-tzlocal") 672 (name "python-tzlocal")
@@ -1023,14 +1062,14 @@ syntax.")
1023(define-public scons 1062(define-public scons
1024 (package 1063 (package
1025 (name "scons") 1064 (name "scons")
1026 (version "2.1.0") 1065 (version "2.3.4")
1027 (source (origin 1066 (source (origin
1028 (method url-fetch) 1067 (method url-fetch)
1029 (uri (string-append "mirror://sourceforge/scons/scons-" 1068 (uri (string-append "mirror://sourceforge/scons/scons-"
1030 version ".tar.gz")) 1069 version ".tar.gz"))
1031 (sha256 1070 (sha256
1032 (base32 1071 (base32
1033 "07cjn4afb2cljjrd3cr7xf062qq58z8q96f58z6yplhdyqafsfa1")))) 1072 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1034 (build-system python-build-system) 1073 (build-system python-build-system)
1035 (arguments 1074 (arguments
1036 ;; With Python 3.x, fails to build with a syntax error. 1075 ;; With Python 3.x, fails to build with a syntax error.
@@ -1598,6 +1637,33 @@ is used by the Requests library to verify HTTPS requests.")
1598(define-public python2-certifi 1637(define-public python2-certifi
1599 (package-with-python2 python-certifi)) 1638 (package-with-python2 python-certifi))
1600 1639
1640(define-public python-click
1641 (package
1642 (name "python-click")
1643 (version "4.0")
1644 (source
1645 (origin
1646 (method url-fetch)
1647 (uri (string-append
1648 "https://pypi.python.org/packages/source/c/click/click-"
1649 version ".tar.gz"))
1650 (sha256
1651 (base32 "0294x9g28w6zgswl0rsygkwi0wf6n480gf7fiiw5f9az3xhh77pl"))))
1652 (build-system python-build-system)
1653 (native-inputs
1654 `(("python-setuptools" ,python-setuptools)))
1655 (home-page "http://click.pocoo.org")
1656 (synopsis "Command line library for Python")
1657 (description
1658 "Click is a Python package for creating command line interfaces in a
1659composable way with as little code as necessary. Its name stands for
1660\"Command Line Interface Creation Kit\". It's highly configurable but comes
1661with sensible defaults out of the box.")
1662 (license bsd-3)))
1663
1664(define-public python2-click
1665 (package-with-python2 python-click))
1666
1601(define-public python-requests 1667(define-public python-requests
1602 (package 1668 (package
1603 (name "python-requests") 1669 (name "python-requests")
@@ -2065,6 +2131,101 @@ mining and data analysis.")
2065 (alist-delete 2131 (alist-delete
2066 "python-scipy" (package-propagated-inputs scikit)))))))) 2132 "python-scipy" (package-propagated-inputs scikit))))))))
2067 2133
2134(define-public python-scikit-image
2135 (package
2136 (name "python-scikit-image")
2137 (version "0.11.3")
2138 (source
2139 (origin
2140 (method url-fetch)
2141 (uri (string-append
2142 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2143 version ".tar.gz"))
2144 (sha256
2145 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2146 (build-system python-build-system)
2147 (propagated-inputs
2148 `(("python-matplotlib" ,python-matplotlib)
2149 ("python-networkx" ,python-networkx)
2150 ("python-numpy" ,python-numpy)
2151 ("python-scipy" ,python-scipy)
2152 ("python-six" ,python-six)
2153 ("python-pillow" ,python-pillow)))
2154 (native-inputs
2155 `(("python-cython" ,python-cython)
2156 ("python-setuptools" ,python-setuptools)))
2157 (home-page "http://scikit-image.org/")
2158 (synopsis "Image processing in Python")
2159 (description
2160 "scikit-image is a collection of algorithms for image processing.")
2161 (license bsd-3)))
2162
2163(define-public python2-scikit-image
2164 (let ((scikit-image (package-with-python2 python-scikit-image)))
2165 (package (inherit scikit-image)
2166 (native-inputs
2167 `(("python2-mock" ,python2-mock)
2168 ,@(package-native-inputs scikit-image)))
2169 (propagated-inputs
2170 `(("python2-pytz" ,python2-pytz)
2171 ,@(package-propagated-inputs scikit-image))))))
2172
2173(define-public python-redis
2174 (package
2175 (name "python-redis")
2176 (version "2.10.3")
2177 (source
2178 (origin
2179 (method url-fetch)
2180 (uri (string-append
2181 "https://pypi.python.org/packages/source/r/redis/redis-"
2182 version ".tar.gz"))
2183 (sha256
2184 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2185 (build-system python-build-system)
2186 ;; Tests require a running Redis server
2187 (arguments '(#:tests? #f))
2188 (native-inputs
2189 `(("python-setuptools" ,python-setuptools)
2190 ("python-pytest" ,python-pytest)))
2191 (home-page "https://github.com/andymccurdy/redis-py")
2192 (synopsis "Redis Python client")
2193 (description
2194 "This package provides a Python interface to the Redis key-value store.")
2195 (license license:expat)))
2196
2197(define-public python2-redis
2198 (package-with-python2 python-redis))
2199
2200(define-public python-rq
2201 (package
2202 (name "python-rq")
2203 (version "0.5.2")
2204 (source
2205 (origin
2206 (method url-fetch)
2207 (uri (string-append
2208 "https://pypi.python.org/packages/source/r/rq/rq-"
2209 version ".tar.gz"))
2210 (sha256
2211 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2212 (build-system python-build-system)
2213 (propagated-inputs
2214 `(("python-click" ,python-click)
2215 ("python-redis" ,python-redis)))
2216 (native-inputs
2217 `(("python-setuptools" ,python-setuptools)))
2218 (home-page "http://python-rq.org/")
2219 (synopsis "Simple job queues for Python")
2220 (description
2221 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2222processing them in the background with workers. It is backed by Redis and it
2223is designed to have a low barrier to entry.")
2224 (license bsd-2)))
2225
2226(define-public python2-rq
2227 (package-with-python2 python-rq))
2228
2068(define-public python-cython 2229(define-public python-cython
2069 (package 2230 (package
2070 (name "python-cython") 2231 (name "python-cython")
@@ -2122,7 +2283,7 @@ writing C extensions for Python as easy as Python itself.")
2122 (build-system python-build-system) 2283 (build-system python-build-system)
2123 (inputs 2284 (inputs
2124 `(("python-nose" ,python-nose) 2285 `(("python-nose" ,python-nose)
2125 ("atlas" ,atlas))) 2286 ("openblas" ,openblas)))
2126 (native-inputs 2287 (native-inputs
2127 `(("gfortran" ,gfortran-4.8))) 2288 `(("gfortran" ,gfortran-4.8)))
2128 (arguments 2289 (arguments
@@ -2130,16 +2291,18 @@ writing C extensions for Python as easy as Python itself.")
2130 (alist-cons-before 2291 (alist-cons-before
2131 'build 'set-environment-variables 2292 'build 'set-environment-variables
2132 (lambda* (#:key inputs #:allow-other-keys) 2293 (lambda* (#:key inputs #:allow-other-keys)
2133 (let* ((atlas-threaded 2294 (call-with-output-file "site.cfg"
2134 (string-append (assoc-ref inputs "atlas") 2295 (lambda (port)
2135 "/lib/libtatlas.so")) 2296 (format port "[openblas]
2136 ;; On single core CPUs only the serial library is created. 2297libraries = openblas
2137 (atlas-lib 2298library_dirs = ~a/lib
2138 (if (file-exists? atlas-threaded) 2299include_dirs = ~a/include
2139 atlas-threaded 2300" (assoc-ref inputs "openblas") (assoc-ref inputs "openblas"))))
2140 (string-append (assoc-ref inputs "atlas") 2301 ;; Use "gcc" executable, not "cc".
2141 "/lib/libsatlas.so")))) 2302 (substitute* "numpy/distutils/system_info.py"
2142 (setenv "ATLAS" atlas-lib))) 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')"))
2305 #t)
2143 ;; Tests can only be run after the library has been installed and not 2306 ;; Tests can only be run after the library has been installed and not
2144 ;; within the source directory. 2307 ;; within the source directory.
2145 (alist-cons-after 2308 (alist-cons-after
@@ -2627,7 +2790,7 @@ services for your Python modules and applications.")
2627(define-public python-pillow 2790(define-public python-pillow
2628 (package 2791 (package
2629 (name "python-pillow") 2792 (name "python-pillow")
2630 (version "2.6.1") 2793 (version "2.8.1")
2631 (source 2794 (source
2632 (origin 2795 (origin
2633 (method url-fetch) 2796 (method url-fetch)
@@ -2635,17 +2798,19 @@ services for your Python modules and applications.")
2635 "Pillow/Pillow-" version ".tar.gz")) 2798 "Pillow/Pillow-" version ".tar.gz"))
2636 (sha256 2799 (sha256
2637 (base32 2800 (base32
2638 "0iw36c73wkhz88wa78v6l43llsb080ihw8yq7adhfqxdib7l4hzr")))) 2801 "15n92axxph2s3kvg68bki9gv3nzwgq7130kp7wbblpi1l0cc2q47"))))
2639 (build-system python-build-system) 2802 (build-system python-build-system)
2640 (native-inputs 2803 (native-inputs
2641 `(("python-setuptools" ,python-setuptools) 2804 `(("python-setuptools" ,python-setuptools)
2642 ("python-nose" ,python-nose))) 2805 ("python-nose" ,python-nose)))
2643 (inputs 2806 (inputs
2644 `(("lcms" ,lcms) 2807 `(("freetype" ,freetype)
2808 ("lcms" ,lcms)
2645 ("zlib" ,zlib) 2809 ("zlib" ,zlib)
2646 ("libjpeg" ,libjpeg) 2810 ("libjpeg" ,libjpeg)
2647 ("openjpeg" ,openjpeg) 2811 ("openjpeg" ,openjpeg)
2648 ("libtiff" ,libtiff))) 2812 ("libtiff" ,libtiff)
2813 ("libwebp" ,libwebp)))
2649 (propagated-inputs 2814 (propagated-inputs
2650 `(;; Used at runtime for pkg_resources 2815 `(;; Used at runtime for pkg_resources
2651 ("python-setuptools" ,python-setuptools))) 2816 ("python-setuptools" ,python-setuptools)))
@@ -3113,9 +3278,7 @@ features useful for text console applications.")
3113 `(("pkg-config" ,pkg-config))) 3278 `(("pkg-config" ,pkg-config)))
3114 (inputs 3279 (inputs
3115 `(("python" ,python) 3280 `(("python" ,python)
3116 ("dbus" ,dbus) 3281 ("dbus-glib" ,dbus-glib)))
3117 ("dbus-glib" ,dbus-glib)
3118 ("glib" ,glib)))
3119 (synopsis "Python bindings for D-bus") 3282 (synopsis "Python bindings for D-bus")
3120 (description "python-dbus provides bindings for libdbus, the reference 3283 (description "python-dbus provides bindings for libdbus, the reference
3121implementation of D-Bus.") 3284implementation of D-Bus.")
@@ -3201,43 +3364,6 @@ libxml2 and libxslt.")
3201(define-public python2-lxml 3364(define-public python2-lxml
3202 (package-with-python2 python-lxml)) 3365 (package-with-python2 python-lxml))
3203 3366
3204(define-public python-pillow
3205 (package
3206 (name "python-pillow")
3207 (version "2.7.0")
3208 (source
3209 (origin
3210 (method url-fetch)
3211 (uri (string-append
3212 "https://pypi.python.org/packages/source/P/Pillow/Pillow-"
3213 version
3214 ".tar.gz"))
3215 (sha256
3216 (base32
3217 "1y0rysgd7vqpl5lh0lsra7j2k30azwxqlh5jnqk1i0pmfc735s96"))))
3218 (build-system python-build-system)
3219 (inputs
3220 `(("freetype" ,freetype)
3221 ("lcms" ,lcms)
3222 ("libjpeg" ,libjpeg)
3223 ("libtiff" ,libtiff)
3224 ("openjpeg" ,openjpeg)
3225 ("python-setuptools" ,python-setuptools)
3226 ("zlib" ,zlib)))
3227 (arguments
3228 `(#:tests? #f)) ; no check target
3229 (home-page "http://python-pillow.github.io/")
3230 (synopsis "Pillow fork of Python Imaging Library")
3231 (description "Pillow is a fork of the Python Imaging Library (PIL).")
3232 ;; PIL license, see
3233 ;; http://www.pythonware.com/products/pil/license.htm
3234 (license (x11-style
3235 "file://PKG-INFO"
3236 "See http://www.pythonware.com/products/pil/license.htm"))))
3237
3238(define-public python2-pillow
3239 (package-with-python2 python-pillow))
3240
3241(define-public python2-pil 3367(define-public python2-pil
3242 (package 3368 (package
3243 (name "python2-pil") 3369 (name "python2-pil")
@@ -3446,6 +3572,67 @@ providing a clean and modern domain specific specification language (DSL) in
3446Python style, together with a fast and comfortable execution environment.") 3572Python style, together with a fast and comfortable execution environment.")
3447 (license license:expat))) 3573 (license license:expat)))
3448 3574
3575(define-public python-seaborn
3576 (package
3577 (name "python-seaborn")
3578 (version "0.5.1")
3579 (source
3580 (origin
3581 (method url-fetch)
3582 (uri (string-append
3583 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
3584 version ".tar.gz"))
3585 (sha256
3586 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
3587 (build-system python-build-system)
3588 (propagated-inputs
3589 `(("python-pandas" ,python-pandas)
3590 ("python-matplotlib" ,python-matplotlib)
3591 ("python-scipy" ,python-scipy)))
3592 (native-inputs
3593 `(("python-setuptools" ,python-setuptools)))
3594 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
3595 (synopsis "Statistical data visualization")
3596 (description
3597 "Seaborn is a library for making attractive and informative statistical
3598graphics in Python. It is built on top of matplotlib and tightly integrated
3599with the PyData stack, including support for numpy and pandas data structures
3600and statistical routines from scipy and statsmodels.")
3601 (license bsd-3)))
3602
3603(define-public python2-seaborn
3604 (let ((seaborn (package-with-python2 python-seaborn)))
3605 (package (inherit seaborn)
3606 (propagated-inputs
3607 `(("python2-pytz" ,python2-pytz)
3608 ,@(package-propagated-inputs seaborn))))))
3609
3610(define-public python-sympy
3611 (package
3612 (name "python-sympy")
3613 (version "0.7.6")
3614 (source
3615 (origin
3616 (method url-fetch)
3617 (uri (string-append
3618 "https://github.com/sympy/sympy/releases/download/sympy-"
3619 version "/sympy-" version ".tar.gz"))
3620 (sha256
3621 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
3622 (build-system python-build-system)
3623 (native-inputs
3624 `(("python-setuptools" ,python-setuptools)))
3625 (home-page "http://www.sympy.org/")
3626 (synopsis "Python library for symbolic mathematics")
3627 (description
3628 "SymPy is a Python library for symbolic mathematics. It aims to become a
3629full-featured computer algebra system (CAS) while keeping the code as simple
3630as possible in order to be comprehensible and easily extensible.")
3631 (license bsd-3)))
3632
3633(define-public python2-sympy
3634 (package-with-python2 python-sympy))
3635
3449(define-public python-testlib 3636(define-public python-testlib
3450 (package 3637 (package
3451 (name "python-testlib") 3638 (name "python-testlib")
@@ -3606,3 +3793,37 @@ applications.")
3606 3793
3607(define-public python2-waf 3794(define-public python2-waf
3608 (package-with-python2 python-waf)) 3795 (package-with-python2 python-waf))
3796
3797(define-public python-pyzmq
3798 (package
3799 (name "python-pyzmq")
3800 (version "14.6.0")
3801 (source
3802 (origin
3803 (method url-fetch)
3804 (uri (string-append
3805 "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
3806 version ".tar.gz"))
3807 (sha256
3808 (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
3809 (build-system python-build-system)
3810 (arguments
3811 `(#:configure-flags
3812 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
3813 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
3814 ;; --inplace' for 'python setup.py test' to work.
3815 #:tests? #f))
3816 (inputs
3817 `(("zeromq" ,zeromq)))
3818 (native-inputs
3819 `(("pkg-config" ,pkg-config)
3820 ("python-nose" ,python-nose)
3821 ("python-setuptools" ,python-setuptools)))
3822 (home-page "http://github.com/zeromq/pyzmq")
3823 (synopsis "Python bindings for 0MQ")
3824 (description
3825 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3826 (license bsd-4)))
3827
3828(define-public python2-pyzmq
3829 (package-with-python2 python-pyzmq))