(define-module (gn packages python) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages cran) #:use-module (gnu packages databases) #:use-module (gnu packages fontutils) #:use-module (gnu packages ghostscript) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages jupyter) #:use-module (gnu packages libffi) #:use-module (gnu packages linux) #:use-module (gnu packages maths) #:use-module (gnu packages monitoring) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-compression) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) #:use-module (gnu packages jupyter) #:use-module (gnu packages cran) #:use-module (gnu packages python-xyz) #:use-module (gnu packages rdf) #:use-module (gnu packages readline) #:use-module (gnu packages serialization) #:use-module (gnu packages statistics) #:use-module (gnu packages tcl) #:use-module (gnu packages time) #:use-module (past packages python27) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix hg-download) #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (srfi srfi-1)) (define-public python-subprocess32 ; guix candidate (package (name "python-subprocess32") (version "3.5.3") (source (origin (method url-fetch) (uri (pypi-uri "subprocess32" version)) (sha256 (base32 "1hr5fan8i719hmlmz73hf8rhq74014w07d8ryg7krvvf6692kj3b")))) (build-system python-build-system) (arguments `(#:tests? #f)) ;; No tests. (home-page "https://pypi.python.org/pypi/subprocess32") (synopsis "Python subprocess32.") (description "Python subprocess32.") (license license:gpl2)) ) (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 "2.0.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/srittau/python-htmlgen") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "11hfx5x3jg4hyfxzav6ypsb57mahb5nk6qzg4zn1pyy1lilllqj6")))) (build-system python-build-system) (arguments (list #:tests? #f)) (native-inputs `(("python-asserts" ,python-asserts))) (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))) (define-public python-asserts (package (name "python-asserts") (version "0.10.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/srittau/python-asserts") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "10lzdbhyl1s1fpq34prhi288wcigrk0z4hphql20pyjxx6yla8ya")))) (build-system python-build-system) (arguments (list #:tests? #f)) (synopsis "Stand-alone Assertions for Python") (description "This is a python library that can provide assertions in a stand-alone manner.") (home-page "https://github.com/srittau/python-asserts") (license license:expat))) (define-public python2-pp (package (name "python2-pp") (version "1.6.1") (source (origin (method url-fetch) (uri (string-append "http://www.parallelpython.com/downloads/pp/pp-" version ".zip")) (sha256 (base32 "0qkxcyclz3vgwpl6xvsrg76q59dj0wwy8qx15567bafv659ypyb1")))) (build-system python-build-system) (arguments `(#:python ,python-2 #:use-setuptools? #f #:tests? #f)) ; no tests (native-inputs `(("unzip" ,unzip))) (home-page "http://www.parallelpython.com") (synopsis "Parallel and distributed programming for Python") (description "PP is a python module which provides mechanism for parallel execution of python code on SMP (systems with multiple processors or cores) and clusters (computers connected via network).") (license license:bsd-3))) (define GN1-thirdparty-sources (origin (method url-fetch/tarbomb) (uri "https://files.genenetwork.org/software/thirdparty.tgz") (file-name "GN1-thirdparty") (sha256 (base32 "0nnp6g412hjfrcn3k2yrfb14sxv06k0149whc7qmv678nyj5zhfa")))) (define-public python2-json-GN1 (package (name "python2-json-GN1") (version "GN1") (source GN1-thirdparty-sources) (build-system python-build-system) (arguments `(#:python ,python-2 #:phases (modify-phases %standard-phases (delete 'build) (delete 'check) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (sitedir (string-append out "/lib/python2.7/site-packages/json/"))) (mkdir-p sitedir) (copy-recursively "thirdparty/json" sitedir) #t)))))) (home-page "") (synopsis "") (description "") (license license:lgpl2.1+))) (define-public python2-pyx-GN1 (package (name "python2-pyx-GN1") (version "0.8") (source GN1-thirdparty-sources) (build-system python-build-system) (arguments `(#:python ,python-2 #:phases (modify-phases %standard-phases (delete 'build) (delete 'check) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (sitedir (string-append out "/lib/python2.7/site-packages/pyx/"))) (mkdir-p sitedir) (copy-recursively "thirdparty/pyx" sitedir) #t)))))) (home-page "") (synopsis "") (description "") (license license:gpl2+))) (define-public python2-pyxlwriter (package (name "python2-pyxlwriter") (version "0.4a3") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/pyxlwriter/pyxlwriter/" version "/pyXLWriter-" version ".zip")) (sha256 (base32 "1kfsi6la9y53rwayszgayfmkjfknpp650v69a0hwd1fcfk1df735")))) (build-system python-build-system) (arguments `(#:python ,python-2 #:use-setuptools? #f #:tests? #f)) ; no tests (native-inputs `(("unzip" ,unzip))) (home-page "https://sourceforge.net/projects/pyxlwriter/") (synopsis "Python library for generating Excel compatible spreadsheets") (description "PyXLWriter is a Python library for generating Excel compatible spreadsheets. It's a port of John McNamara's Perl @code{Spreadsheet::WriteExcel} module version 1.01 to Python. It allows writing of Excel compatible spreadsheets without the need for COM objects.") (license license:lgpl2.1+))) (define-public python2-svg-GN1 (package (name "python2-svg-GN1") (version "1.0") (source GN1-thirdparty-sources) (build-system python-build-system) (arguments `(#:python ,python-2 #:phases (modify-phases %standard-phases (delete 'build) (delete 'check) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (sitedir (string-append out "/lib/python2.7/site-packages/svg/"))) (mkdir-p sitedir) (copy-recursively "thirdparty/svg" sitedir) #t)))))) (home-page "") (synopsis "") (description "") (license license:bsd-4))) (define-public python-admiral (package (name "python-admiral") (version "0.2") (source (origin (method url-fetch) (uri (pypi-uri "admiral" version)) (sha256 (base32 "1b2zjgyz94ld5wr7s4cm4x5sxijx3w0dmd7r2cq1s8iqjzz6rd1x")))) (build-system python-build-system) (arguments '(#:tests? #f)) ; No tests (propagated-inputs `(("python-humanfriendly" ,python-humanfriendly))) (home-page "https://github.com/nspies/admiral") (synopsis "Simple python high-performance computing cluster batch submission") (description "Simple python high-performance computing cluster batch submission.") (license #f))) ; No license in repository. (define-public python-py-dateutil (package (name "python-py-dateutil") (version "2.2") (source (origin (method url-fetch) (uri (pypi-uri "py-dateutil" version)) (sha256 (base32 "0j5hyhn2yqwyapbhvdvw14a0ydhdl6ddw95nii091iarf6hjryky")))) (build-system python-build-system) (arguments (list #:tests? #f ; Package is unmaintained since ~2014 #:phases #~(modify-phases %standard-phases (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "python" "test.py"))))))) (propagated-inputs (list python-six)) (home-page "https://bitbucket.org/cld/dateutil") (synopsis "Extensions to the standard Python datetime module") (description "Extensions to the standard Python datetime module") (license license:bsd-3))) (define-public python-sparql-slurper (package (name "python-sparql-slurper") (version "0.3.4") (source (origin (method url-fetch) (uri (pypi-uri "sparql_slurper" version)) (sha256 (base32 "1m9jlck7ny5dyr762l4xrsn7ll4v48fccjkm062ihhvhbsjf0iil")))) (build-system python-build-system) (arguments '(#:tests? #f)) ; Tests require network access. (propagated-inputs `(("python-pbr" ,python-pbr) ("python-rdflib" ,python-rdflib) ("python-sparqlwrapper" ,python-sparqlwrapper))) (home-page "https://github.com/hsolbrig/sparql_slurper") (synopsis "SPARQL Slurper for rdflib") (description "This package provides a SPARQL Slurper for rdflib.") (license license:asl2.0))) (define-public python-pandas-plink (package (name "python-pandas-plink") (version "2.0.5") (source (origin (method url-fetch) (uri (string-append "https://files.pythonhosted.org/packages/6f/de/48ccae952383ff3c9d227e06d6968bbf9923d509e40490f734baf2efb8b5/pandas_plink-" version ".tar.gz")) (sha256 (base32 "08wgrlv38nvsjcaw806fwy6bfl0h9swvr5x8nqx5xcsn8r04lsjq")))) (build-system python-build-system) (arguments '(#:tests? #f)) (propagated-inputs `(("python-cffi" ,python-cffi) ("python-dask" ,python-dask) ("python-deprecated" ,python-deprecated) ("python-numpy" ,python-numpy) ("python-pandas" ,python-pandas) ("python-pytest" ,python-pytest) ("python-pytest-runner" ,python-pytest-runner) ("python-tqdm" ,python-tqdm) ("python-xarray" ,python-xarray) ("python-zstandard" ,python-zstandard))) (home-page "https://github.com/limix/pandas-plink") (synopsis "Read PLINK files into Pandas data frames") (description "Read PLINK files into Pandas data frames") (license license:expat))) (define-public python-pre-commit (package (name "python-pre-commit") (version "2.7.1") (source (origin (method url-fetch) (uri "https://files.pythonhosted.org/packages/bd/b4/e5d78c83533dd116596d05bdc8a82372b44ce7e7bef0ba7f0c6b33307613/pre_commit-2.7.1.tar.gz") (sha256 (base32 "0w2a104yhbw1z92rcwpq0gdjsxvr2bwx5ry5xhlf2psnfkjx6ky5")))) (build-system python-build-system) (propagated-inputs `(("python-cfgv" ,python-cfgv) ("python-identify" ,python-identify) ("python-importlib-metadata" ,python-importlib-metadata) ("python-importlib-resources" ,python-importlib-resources) ("python-nodeenv" ,python-nodeenv) ("python-pyyaml" ,python-pyyaml) ("python-toml" ,python-toml) ("python-virtualenv" ,python-virtualenv))) (arguments `(#:tests? #f ; suprise test failures )) (home-page "https://github.com/pre-commit/pre-commit") (synopsis "A framework for managing and maintaining multi-language pre-commit hooks.") (description "A framework for managing and maintaining multi-language pre-commit hooks.") (license license:expat))) ;; Latest version. Upstream once v2.x.x becomes a stable release candidate (define-public python-mistune-2.0.0a5 (package (inherit python-mistune) (name "python-mistune-2.0.0a5") (version "2.0.0a5") (source (origin (method url-fetch) (uri (pypi-uri "mistune" version)) (sha256 (base32 "1vc0rd50wbny0qdjjc7z14xvjdsfcmzavx3njxpxr2dvhx3b6j79")))))) (define-public python-flask-debugtoolbar (package (name "python-flask-debugtoolbar") (version "0.16.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/pallets-eco/flask-debugtoolbar/archive/refs/tags/" version ".tar.gz")) (sha256 (base32 "1qk8kga6gjlwc0c0hr1i500rhm1qfa4gqq3djy40j95fiz1idkgy")))) (build-system pyproject-build-system) (native-inputs `(("python-pytest" ,python-pytest))) (propagated-inputs `(("python-blinker" ,python-blinker) ("python-flask" ,python-flask) ("python-flit-core" ,python-flit-core) ("python-itsdangerous" ,python-itsdangerous) ("python-flask-sqlalchemy" ,python-flask-sqlalchemy) ("python-werkzeug" ,python-werkzeug))) (home-page "https://flask-debugtoolbar.readthedocs.io/") (synopsis "A toolbar overlay for debugging Flask applications.") (description "This extension adds a toolbar overlay to Flask applications containing useful information for debugging.") (license license:bsd-3))) (define-public python-requirements-parser (package (name "python-requirements-parser") (version "0.2.0") (source (origin (method url-fetch) (uri (pypi-uri "requirements-parser" version)) (sha256 (base32 "1m2fgnyrh4vb5canm7cp30b04f7vh8869z6kb2gsw19dbj4ywqsr")))) (build-system python-build-system) (arguments `(#:tests? #f)) (native-inputs `(("python-coverage" ,python-coverage) ("python-coveralls" ,python-coveralls) ("python-nose" ,python-nose))) (home-page "https://github.com/davidfischer/requirements-parser") (synopsis "Parses Pip requirement files") (description "This is a small Python module for parsing Pip requirement files. The goal of the project is to parse everything in the Pip requirement file format spec.") (license license:bsd-3))) (define-public python-supervisor (package (name "python-supervisor") (version "4.2.4") (source (origin (method url-fetch) (uri (pypi-uri "supervisor" version)) (sha256 (base32 "18lpddhyl8ziy6lc0klassxpd8kdg8c0nhkrvz1k3ipfw4n5ip20")))) (build-system python-build-system) (native-inputs (list python-pytest python-pytest-cov)) (arguments (list #:tests? #f)) ; fixme (home-page "http://supervisord.org/") (synopsis "A system for controlling process state under UNIX") (description "This package provides a system for controlling process state under UNIX") (license ;; https://github.com/Supervisor/supervisor/issues/1364 (license:fsf-free (string-append "https://web.archive.org/web/20190211105114/" "http://www.repoze.org/LICENSE.txt"))))) ;; Note: This package is only needed for rdflib < 6.0; supersede when ;; the above are removed. (define-public python-pillow-9 (package (name "python-pillow-9") (version "9.2.0") (source (origin (method url-fetch) (uri (pypi-uri "Pillow" version)) (sha256 (base32 "011wgm1mssjchpva9wsi2a07im9czyjvik137xlp5f0g7vykdrkm")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "src/thirdparty"))) (patches (search-patches "python-pillow-CVE-2022-45199.patch" ;; Included in 10.1.0. "python-pillow-use-zlib-1.3.patch")))) (build-system python-build-system) (native-inputs (list python-pytest)) (inputs (list freetype lcms libjpeg-turbo libtiff libwebp openjpeg zlib)) (propagated-inputs (list python-olefile)) (arguments `(#:tests? #f #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-ldconfig (lambda _ (substitute* "setup.py" (("\\['/sbin/ldconfig', '-p'\\]") "['true']")))) (replace 'check (lambda* (#:key outputs inputs tests? #:allow-other-keys) (when tests? (setenv "HOME" (getcwd)) (add-installed-pythonpath inputs outputs) (invoke "python" "selftest.py" "--installed") (invoke "python" "-m" "pytest" "-vv"))))))) (home-page "https://python-pillow.org") (synopsis "Fork of the Python Imaging Library") (description "The Python Imaging Library adds image processing capabilities to your Python interpreter. This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities. The core image library is designed for fast access to data stored in a few basic pixel formats. It should provide a solid foundation for a general image processing tool.") (properties `((cpe-name . "pillow"))) (license (license:x11-style "http://www.pythonware.com/products/pil/license.htm" "The PIL Software License")))) (define-public python-misaka (package (name "python-misaka") (version "2.1.1") (source (origin (method url-fetch) (uri (pypi-uri "misaka" version)) (sha256 (base32 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2")))) (build-system python-build-system) (arguments `(;; Line 37 of setup.py calls self.run_command('develop') ;; in the 'check' phase. This command seems to be trying ;; to write to ;; /gnu/store/...-python-/lib/python/site-packages/ ;; for which it does not have the permission to write. #:tests? #f)) (propagated-inputs (list python-cffi)) (home-page "https://github.com/FSX/misaka") (synopsis "Python binding for Hoedown") (description "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing library written in C. It features a fast HTML renderer and functionality to make custom renderers (e.g. man pages or LaTeX).") (license license:expat))) ;; python-jupyter-server removed: version 1.8.0 source gone from PyPI. ;; Use (gnu packages python-science) python-jupyter-server instead.