(define-module (gn packages python) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages attr) #:use-module (gnu packages base) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages fontutils) #:use-module (gnu packages gcc) #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) #:use-module (gnu packages gtk) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages libffi) #:use-module (gnu packages linux) #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) #:use-module (gnu packages networking) #:use-module (gnu packages ncurses) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages python-web) #:use-module (gnu packages pkg-config) #:use-module (gnu packages readline) #:use-module (gnu packages statistics) #:use-module (gnu packages tex) #:use-module (gnu packages texinfo) #:use-module (gnu packages time) #:use-module (gnu packages tls) #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (srfi srfi-1)) (define-public python-pyvcf (package (name "python-pyvcf") (version "0.6.8") (source (origin (method url-fetch) (uri (pypi-uri "pyvcf" version)) (sha256 (base32 "1ngryr12d3izmhmwplc46xhyj9i7yhrpm90xnsd2578p7m8p5n79")))) (build-system python-build-system) (home-page "https://github.com/jamescasbon/PyVCF") (synopsis "Variant Call Format (VCF) parser for Python") (description "Variant Call Format (VCF) parser for Python") (license #f))) (define-public python2-rpy2 (package (name "python2-rpy2") (version "2.7.6") (source (origin (method url-fetch) (uri (pypi-uri "rpy2" version)) (sha256 (base32 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga")))) (build-system python-build-system) (arguments `(#:python ,python-2 ; apparently incompatible with Python 3 #:tests? #f #:phases (modify-phases %standard-phases (delete 'check) (add-after 'install 'check (lambda* (#:key outputs inputs #:allow-other-keys) ;; It's easier to run tests after install. ;; Make installed package available for running the tests (add-installed-pythonpath inputs outputs) (zero? (system* "python" "-m" "rpy2.tests" "-v"))))))) (propagated-inputs `(("python2-six" ,python2-six) ("python2-singledispatch" ,python2-singledispatch) )) (inputs `(("readline" ,readline) ("icu4c" ,icu4c) ("pcre" ,pcre) ("r-minimal" ,r-minimal) ("r-survival" ,r-survival))) (native-inputs `(("zlib" ,zlib))) (home-page "http://rpy.sourceforge.net/") (synopsis "Python interface to the R language") (description "rpy2 is a redesign and rewrite of rpy. It is providing a low-level interface to R from Python, a proposed high-level interface, including wrappers to graphical libraries, as well as R-like structures and functions.") (license license:gpl3+))) (define-public python-plotly ; guix candidate ; python-plotly, python-requests, python-pytz (package (name "python-plotly") (version "2.1.0") (source (origin (method url-fetch) (uri (pypi-uri "plotly" version)) (sha256 (base32 "1r4y9l5z62sqyd2r205vchlvlc1f7dcgjyagjkxiwywh27f9js7z")))) (build-system python-build-system) (arguments `(#:tests? #f)) ;; No tests. (home-page "https://plot.ly/python/") (synopsis "Python plotting library for collaborative, interactive, publication-quality graphs.") (description "Python plotting library for collaborative, interactive, publication-quality graphs.") (license license:expat)) ) (define-public python-inotify ; guix candidate (package (name "python-inotify") (version "0.2.9") (source (origin (method url-fetch) (uri (pypi-uri "inotify" version)) (sha256 (base32 "043sbm9q8ca4fhn19knwpsxgzfgm5ik75m0bl7dp9hjy6p3v3zzn")))) (build-system python-build-system) (propagated-inputs `(("inotify-tools" ,inotify-tools))) (arguments `(#:tests? #f)) ;; No tests. (home-page "https://pypi.python.org/pypi/inotify") (synopsis "Python inotify.") (description "Python inotify.") (license license:gpl2)) ) (define-public python2-inotify (package-with-python2 python-inotify)) (define-public gunicorn ; guix candidate (package (name "gunicorn") (version "19.7.1") (source (origin (method url-fetch) (uri (pypi-uri "gunicorn" version)) (sha256 (base32 "08mnl5l1p47q5wk38d7mafnhsqk50yba0l9kvc2vwrx61jgidqgf")))) (build-system python-build-system) (inputs `(("python2-eventlet" ,python2-eventlet) ("python2-gevent" ,python2-gevent))) (propagated-inputs `(("python2" ,python-2) ("inotify-tools" ,inotify-tools))) (arguments `( #:python ,python-2 ; GN2 is still python2 #:tests? #f)) ;; No tests. (home-page "http://gunicorn.org") (synopsis ".") (description ".") (license license:expat)) ) (define-public python2-flask-sqlalchemy (package-with-python2 python-flask-sqlalchemy)) (define-public python-xlsxwriter ; guix ready (package (name "python-xlsxwriter") (version "0.8.4") (source (origin (method url-fetch) (uri (pypi-uri "XlsxWriter" version)) (sha256 (base32 "0hv6bknnj9mlvvkdnlzycs0s97vrakmyh91ddb7ynjaqp8gl434z")))) (build-system python-build-system) (inputs `(("python-setuptools" ,python-setuptools))) (home-page "https://github.com/jmcnamara/XlsxWriter") (synopsis "A Python module for creating Excel XLSX files.") (description "A Python module for creating Excel XLSX files.") (license license:bsd-3))) (define-public python2-xlsxwriter (package-with-python2 python-xlsxwriter)) (define-public python-rdflib-jsonld ; guix ready (package (name "python-rdflib-jsonld") (version "0.3") (source (origin (method url-fetch) (uri (string-append "https://pypi.python.org/packages/source/r/rdflib-jsonld/rdflib-jsonld-" version ".tar.gz")) (sha256 (base32 "121a876k49xl85jvikyh4hzvm34456ikw66cra5dfyr15br1qjll")))) (build-system python-build-system) (inputs `(("python-setuptools" ,python-setuptools))) (propagated-inputs `(("python-rdflib-4.2" ,python-rdflib-4.2) ("python-pyparsing" ,python-pyparsing) ("python-html5lib" ,python-html5lib) ("python-nose" ,python-nose) )) (home-page "https://github.com/RDFLib/rdflib-jsonld") (synopsis "rdflib extension adding JSON-LD parser and serializer") (description "rdflib extension adding JSON-LD parser and serializer") (license license:bsd-3))) (define-public python2-rdflib-jsonld (package-with-python2 python-rdflib-jsonld)) (define-public python-rdflib-4.2 (package (name "python-rdflib-4.2") (version "4.2.0") (source (origin (method url-fetch) (uri (string-append "https://pypi.python.org/packages/source/r/rdflib/rdflib-" version ".tar.gz")) (patches ;; The patch has no effect under Python 3. (list (search-patch "python2-rdflib-drop-sparqlwrapper.patch"))) (sha256 (base32 "1h3f8yl9frjz8rsykjdjk83qsrcvld3qa7pkzh69s91h97ydl83l")))) (build-system python-build-system) (inputs `(("python-html5lib" ,python-html5lib) ("python-isodate" ,python-isodate) ("python-pyparsing" ,python-pyparsing) ("python-setuptools" ,python-setuptools))) (arguments `(#:tests? #f)) ;; No tests. (home-page "https://github.com/RDFLib/rdflib") (synopsis "Python RDF library") (description "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.") (license (license:non-copyleft "file://LICENSE" "See LICENSE in the distribution.")))) (define-public python2-rdflib-4.2 (let ((base (package-with-python2 python-rdflib-4.2))) (package (inherit base) (inputs (append (package-inputs base) `(("python-nose" ,python-nose)))) (arguments `(#:python ,python-2 #:tests? #f))))) ; 3 tests fail, also outside Guix (define-public python-rserve (package (name "python-rserve") (version "0.91") (source (origin (method url-fetch) ; https://pypi.python.org/packages/27/e8/b23e0e3d38dadc721947bc9f4b6f1b3e5e1e6c26ac67d8ad88376c5555a0/pyRserve-0.9.1.tar.gz#md5=6da1978f908dd7bdc2d22ee5c29238c0 (uri (string-append "https://pypi.python.org/packages/27/e8/b23e0e3d38dadc721947bc9f4b6f1b3e5e1e6c26ac67d8ad88376c5555a0/pyRserve-0.9.1.tar.gz")) (sha256 (base32 "162dg7d0ni035b75qskrjdzd1yyxwnvybcv115aiapcvyfw2vbsm")))) (build-system python-build-system) (propagated-inputs `( ("python-numpy" ,python-numpy) )) (inputs `(("python-setuptools" ,python-setuptools) ("python-pytest" ,python-pytest) )) (home-page "https://pypi.python.org/pypi/pyRserve") (synopsis "RServe.") (description ".") (license license:expat))) (define-public python2-rserve (package-with-python2 python-rserve)) (define-public python-avro ; guix ready - used by CWL (package (name "python-avro") (version "1.7.7") (source (origin (method url-fetch) (uri (string-append "https://pypi.python.org/packages/source/a/avro/avro-" version ".tar.gz")) (sha256 (base32 "0n21lfclah7bmqnnqfqmpsrimz0s86qkxyn972jynq234n1lyynf")))) (build-system python-build-system) (inputs `(("python-setuptools" ,python-setuptools))) (home-page "http://hadoop.apache.org/avro") (synopsis "Avro is a serialization and RPC framework.") (description "Avro is a serialization and RPC framework.") (license #f))) (define-public python2-avro (package-with-python2 python-avro)) (define-public python-shellescape ; guix ready (package (name "python-shellescape") (version "3.4.1") (source (origin (method url-fetch) (uri (string-append "https://pypi.python.org/packages/source/s/shellescape/shellescape-" version ".tar.gz")) (sha256 (base32 "0n5ky1b2vw2y0d4xl3qybyp2rk0gq5frjs8nr8ak6mgj2fyb4676")))) (build-system python-build-system) (inputs `(("python-setuptools" ,python-setuptools))) (home-page "https://github.com/chrissimpkins/shellescape") (synopsis "Shell escape a string to safely use it as a token in a shell command (backport of Python shlex.quote for Python versions 2.x & < 3.3)") (description "Shell escape a string to safely use it as a token in a shell command (backport of Python shlex.quote for Python versions 2.x & < 3.3)") (license expat)) ) (define-public python2-shellescape (package-with-python2 python-shellescape)) (define-public python2-htmlgen-gn ; guix obsolete (package (name "python2-htmlgen-gn") (version "2.2.2") (source (origin (method url-fetch) ;; http://files.genenetwork.org/software/contrib/htmlgen-2.2.2-gn.tar.gz (uri (string-append "http://files.genenetwork.org/software/contrib/htmlgen-" version "-gn.tar.gz")) (sha256 (base32 "1lwsk56rymhrma46cbyh3g64ksmq1vsih3qkrc2vh0lpba825y7r")) ;;(patches (list ;; (search-patch "python2-htmlgen-Applied-Deb-patch.patch") ;; (search-patch "python2-htmlgen-Fix-test-for-random.patch") )) (build-system python-build-system) (outputs '("out")) (native-inputs `(("make" ,gnu-make) )) (propagated-inputs `(("python2" ,python-2))) (arguments `(#:phases (modify-phases %standard-phases (replace 'build (lambda _ (system* "python2" "-m" "compileall" "."))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (include (string-append out "/include")) (lib2 (string-append out "/lib/htmlgen")) (lib (string-append (assoc-ref %outputs "out") "/lib/python2.7/site-packages/htmlgen")) (pkgconfig (string-append out "/lib/pkgconfig")) (doc (string-append out "/share/doc"))) ;; Install libs and headers. ;; (copy-file "HTMLgen.pyc" "HTMLgen2.pyc") (install-file "HTMLgen.pyc" lib) (install-file "HTMLgen2.pyc" lib) (install-file "imgsize.pyc" lib) (install-file "ImageH.pyc" lib) (install-file "ImagePaletteH.pyc" lib) (install-file "__init__.pyc" lib) ))) ; install ) ; phases #:tests? #f)) (home-page "https://packages.debian.org/unstable/python/python-htmlgen") (synopsis "Genenetwork version of Python2 HTMLgen (defunkt project)") (description #f) (license #f))) (define-public python2-pil1 ; guix obsolete (package (name "python2-pil1") (version "1.1.6") (source (origin (method url-fetch) (uri (string-append "http://files.genenetwork.org/software/contrib/Imaging-" version "-gn.tar.gz")) (sha256 (base32 "0jhinbcq2k899c76m1jc5a3z39k6ajghiavpzi6991hbg6xhxdzg")) (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/freetype/"))))) (build-system python-build-system) (inputs `(("freetype" ,freetype) ("libjpeg" ,libjpeg) ("libtiff" ,libtiff) ("python2-setuptools" ,python2-setuptools) ("zlib" ,zlib))) (arguments ;; Only the fork python-pillow works with Python 3. `(#:python ,python-2 #:tests? #f ; no check target #:phases (alist-cons-before 'build 'configure ;; According to README and setup.py, manual configuration is ;; the preferred way of "searching" for inputs. ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter. (lambda* (#:key inputs #:allow-other-keys) (let ((jpeg (assoc-ref inputs "libjpeg")) (zlib (assoc-ref inputs "zlib")) (tiff (assoc-ref inputs "libtiff")) (freetype (assoc-ref inputs "freetype"))) (substitute* "setup.py" (("JPEG_ROOT = None") (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")")) (("ZLIB_ROOT = None") (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")")) (("TIFF_ROOT = None") (string-append "TIFF_ROOT = libinclude(\"" tiff "\")")) (("FREETYPE_ROOT = None") (string-append "FREETYPE_ROOT = libinclude(\"" freetype "\")"))))) %standard-phases))) (home-page "http://www.pythonware.com/products/pil/") (synopsis "Python Imaging Library") (description "The Python Imaging Library (PIL) adds image processing capabilities to the Python interpreter.") (license (license:x11-style "file://README" "See 'README' in the distribution.")))) (define-public python2-piddle-gn ; guix obsolete (package (name "python2-piddle") (version "1.0.15-gn-PIL1") (source (origin (method url-fetch) (uri (string-append "http://files.genenetwork.org/software/contrib/piddle-" version ".tgz")) (sha256 (base32 "1m89xp0d7d5a0nd483qir7zq99ci6wab1r018i698wjdpr8zf86b")))) (build-system python-build-system) (native-inputs `(("python2-setuptools" ,python2-setuptools))) (propagated-inputs `(("python2-pil1" ,python2-pil1))) (arguments `( #:python ,python-2 #:tests? #f ; no 'setup.py test' really! )) (home-page #f) (synopsis "Canvas drawing library for python2 (old!)") (description #f) (license #f))) (define-public python2-parallel ; guix fix number of things (package (name "python2-parallel") (version "1.6.4") (source (origin (method url-fetch) (uri (string-append "http://www.parallelpython.com/downloads/pp/pp-" version ".zip" )) (sha256 (base32 "1bw3j0zn7bj56636vp1vx4m91p2mlp661gn2nfhpbph3prgxzv82")))) (native-inputs `(("unzip" ,unzip))) (build-system python-build-system) ;; (native-inputs ;; `(("python-setuptools" ,python-setuptools))) (arguments `(#:python ,python-2 #:tests? #f )) ; no 'setup.py test' really! (home-page #f) (synopsis "Parallel python lib") (description #f) (license #f))) (define-public python2-numarray ; guix: obsolete lib (package (name "python2-numarray") (version "1.5.2") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/numpy/numarray-" version ".tar.gz" )) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0x1i4j7yni7k4p9kjxs1lgln1psdmyrz65wp2yr35yn292iw2vbg")))) (build-system python-build-system) (native-inputs `(("python2-setuptools" ,python2-setuptools))) (arguments `(#:python ,python-2 #:phases (modify-phases %standard-phases (replace 'build (lambda* (#:key inputs #:allow-other-keys) (zero? (system* "python" "setup.py" "build")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) ;; Build and install the Python bindings. The underlying ;; C++ library is apparently not meant to be installed. (let ((out (assoc-ref outputs "out"))) (system* "python" "setup.py" "install" (string-append "--prefix=" out)))))) #:tests? #f)) ; no 'setup.py test' really! (home-page "http://www.numpy.org/") (synopsis "Numerical library array processing of numbers, strings, records and objects") (description "Numarray is an (OBSOLETE) array processing package designed to efficiently manipulate large multi-dimensional arrays. Numarray is modelled after Numeric and features c-code generated from python template scripts, the capacity to operate directly on arrays in files, and improved type promotions. Numarray provides support for manipulating arrays consisting of numbers, strings, records, or objects using the same basic infrastructure and syntax. Numarray is now part of the numpy package, though some legacy software still uses the older versions.") (license license:gpl2))) ; actualy PyRAF http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE (define-public python-htmlgen (package (name "python-htmlgen") (version "1.0.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/srittau/python-htmlgen/archive/v" version ".tar.gz")) (sha256 (base32 "1rwgqxhmc93l60wf4ay7ph619710kvyp73s22i0snjpm5i0bhc46")))) (build-system python-build-system) (arguments `(#:tests? #f)) (synopsis "Python HTML 5 Generator") (description "This is a python library for generating html from classes.") (home-page "https://github.com/srittau/python-htmlgen") (license license:expat)))