diff options
Diffstat (limited to 'gnu/packages/python-xyz.scm')
| -rw-r--r-- | gnu/packages/python-xyz.scm | 1422 |
1 files changed, 711 insertions, 711 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 37108fa59e..74698c85a0 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> -;;; Copyright © 2013-2024 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013-2025 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2023 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014, 2017, 2021, 2022, 2024 Eric Bavier <bavier@posteo.net> @@ -2184,7 +2184,7 @@ easy logging and rotating to a console or a file.") (build-system pyproject-build-system) (native-inputs (list python-brotli - python-cython-3 + python-cython python-pytest python-setuptools python-wheel)) @@ -2618,6 +2618,39 @@ decorators, including variants of the Python standard library's (sha256 (base32 "1m20wqipm50zvcgs3z2xksb96qwx1xc1jbhvaxcnglkmj6m1qrhs")))))) +(define-public python-colorclass + (package + (name "python-colorclass") + (version "2.2.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/matthewdeanmartin/colorclass") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1ylj167lfh8yzms30qrkiznv6737hdxra5lk8mhijcjm3hi1cl9l")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" "not test_piped") ; Unclear why this test fails. + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'use-poetry-core + (lambda _ + ;; Patch to use the core poetry API. + (substitute* "pyproject.toml" + (("poetry.masonry.api") "poetry.core.masonry.api"))))))) + (native-inputs (list python-poetry-core python-pytest)) + (home-page "https://github.com/matthewdeanmartin/colorclass") + (synopsis "Colorful console applications with Python") + (description + "This package provides an ANSI color text library for Python. It +provides automatic coloring for dark or light terminals.") + (license license:expat))) + (define-public python-colorcet (package (name "python-colorcet") @@ -3375,73 +3408,6 @@ commits.") generator MkDocs.") (license license:expat))) -(define-public python-skranger - (package - (name "python-skranger") - (version "0.8.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/crflynn/skranger") - (commit version) - (recursive? #true))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0njy4xbc98l295k92nyk93njv1348vd1il5pdyrnk8nnzc2anzf0")))) - (build-system pyproject-build-system) - (arguments - (list - #:modules '((guix build pyproject-build-system) - (guix build utils) - (ice-9 match)) - #:test-flags - ;; "from sklearn.datasets import load_boston" fails because it has been - ;; removed from scikit-learn since version 1.2. - '(list "--ignore=tests/conftest.py" - "--ignore=tests/test_tools.py" - "--ignore=tests/tree/test_regressor.py" - "--ignore=tests/ensemble/test_regressor.py" - ;; All tests fail with error: AttributeError: 'super' object has - ;; no attribute '__sklearn_tags__' - "--ignore=tests/tree/test_classifier.py" - "--ignore=tests/ensemble/test_classifier.py") - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'fix-tests - (lambda _ - (substitute* "tests/conftest.py" - (("from sklearn.datasets import load_boston") "") - (("^_boston_X.*") "_boston_X, _boston_Y = (True, True)\n")))) - (add-before 'check 'build-extensions - (lambda _ - ;; Cython extensions have to be built before running the tests. - (invoke "python" "buildpre.py") - (invoke "python" "build.py" "build_ext" "--inplace") - (let ((site (string-append #$output "/lib/python" - #$(version-major+minor - (package-version python)) - "/site-packages/skranger")) - (lib (match (find-files "build" "\\.so") - ((the-lib) the-lib) - (_ (error "could not find .so"))))) - (mkdir-p site) - (install-file lib site))))))) - (propagated-inputs (list python-scikit-learn)) - (native-inputs - (list python-cython - python-matplotlib - python-pandas - python-poetry-core - python-setuptools - python-wheel - python-pytest)) - (home-page "https://github.com/crflynn/skranger") - (synopsis "Python bindings for C++ ranger random forests") - (description "This package provides scikit-learn compatible Python -bindings to the C++ random forest implementation, ranger, using Cython.") - (license license:gpl3+))) - (define-public python-nanobind (package (name "python-nanobind") @@ -4690,8 +4656,8 @@ which is a fork of @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.") ;; Version 0.9.x was called python-hdf4 in PyPI because at that time upstream ;; didn't have access to the pyhdf package in PyPI. For version 0.10.0 and ;; onward, please install pyhdf instead of python-hdf4. -(define-public python-hdf4 - (deprecated-package "python-hdf4" python-pyhdf)) +(define-deprecated-package python-hdf4 + python-pyhdf) (define-public python-h5netcdf (package @@ -5069,7 +5035,7 @@ of the netcdf4 package before.") (setenv "NO_CDL" "1") (invoke "python" "run_all.py")))))))) (native-inputs - (list python-cython-3 + (list python-cython python-setuptools python-wheel)) (propagated-inputs @@ -8106,7 +8072,7 @@ environments and back.") (base32 "0gmwggzm0j0iprx074g5hah91y2f68sfhhldq0f8crddj7ndk16m")))) (build-system pyproject-build-system) (native-inputs - (list python-cython-3 + (list python-cython python-pytest python-setuptools python-wheel)) @@ -9823,8 +9789,8 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") "This package provides a JSON RPC 2.0 server library for Python.") (license license:expat))) -(define-public python-jsonrpc-server - (deprecated-package "python-jsonrpc-server" python-lsp-jsonrpc)) +(define-deprecated-package python-jsonrpc-server + python-lsp-jsonrpc) (define-public python-pydantic (package @@ -10163,8 +10129,8 @@ This tool is used in text editing environments to provide a complete and integrated feature-set for programming Python effectively.") (license license:expat))) -(define-public python-language-server - (deprecated-package "python-language-server" python-lsp-server)) +(define-deprecated-package python-language-server + python-lsp-server) (define-public python-black (package @@ -10452,7 +10418,8 @@ writing C extensions for Python as easy as Python itself.") ;; time of the test suite. (setenv "CFLAGS" "-O0")))))))) -(define-public python-cython-3 python-cython) +;; It may be removed after 2026-01-24. +(define-deprecated/public-alias python-cython-3 python-cython) ;; NOTE: when upgrading numpy please make sure that python-numba, ;; python-pandas and python-scipy still build, as these three packages are @@ -11472,7 +11439,7 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc. (("build_inplace=False") "build_inplace=True"))))))) (native-inputs (list python-covdefaults - python-cython-3 + python-cython python-expandvars python-pytest python-pytest-cov @@ -12514,27 +12481,23 @@ a general image processing tool.") (define-public python-pillow-heif (package (name "python-pillow-heif") - (version "0.22.0") + (version "1.1.1") (source (origin (method url-fetch) (uri (pypi-uri "pillow_heif" version)) (sha256 - (base32 "16mkap63d14f69105b3bm8pi64fvpdznncgn48vhgls0jf977m31")))) + (base32 "1pkbkg88jg6f24xvbg95aq8dm8fa8ffz7zy4rq262m98i658q3pn")))) (build-system pyproject-build-system) (inputs (list libheif)) (propagated-inputs (list python-pillow)) (native-inputs (list opencv ; for opencv-python - python-coverage python-defusedxml python-numpy python-packaging - python-pre-commit - python-pylint python-pympler python-pytest - python-setuptools - python-wheel)) + python-setuptools)) (home-page "https://github.com/bigcat88/pillow_heif") (synopsis "Python interface for libheif library") (description "This package provides Python bindings for the libheif library @@ -13284,7 +13247,7 @@ a front-end for C compilers or analysis tools.") (list meson ninja pkg-config - python-cython-3 + python-cython python-meson-python python-numpy python-pytest)) @@ -16390,8 +16353,8 @@ file (e.g. @file{PKG-INFO}).") (license license:expat))) ;; pep621 was renamed to pyproject-metadata. -(define-public python-pep621 - (deprecated-package "python-pep621" python-pyproject-metadata)) +(define-deprecated-package python-pep621 + python-pyproject-metadata) (define-public python-meson-python (package @@ -17106,8 +17069,9 @@ stdin/stdout/stderr.") (uri (pypi-uri "stopit" version)) (sha256 (base32 "0vcrcvky249q4rbgmwf18mwmnypfk8jpn4h6knyjf86r7xc9rwzp")))) - (build-system python-build-system) - (arguments '(#:tests? #f)) ;there are none + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;there are none + (native-inputs (list python-setuptools)) (home-page "https://pypi.python.org/pypi/stopit") (synopsis "Timeout control decorator and context managers") (description @@ -17397,22 +17361,44 @@ from an XML-based format.") (define-public python-ly (package (name "python-ly") - (version "0.9.5") + (version "0.9.9") (source (origin - (method url-fetch) - (uri (pypi-uri name version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/frescobaldi/python-ly") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl")))) - (build-system python-build-system) + (base32 "1q9jdvc4mrv3xkp7jm4g4kisq1k1d05b5d3wfvhpd85a9yqjrhq8")))) + (build-system pyproject-build-system) (arguments - ;; FIXME: Some tests need network access. - '(#:tests? #f)) + (list + #:phases + (let ((namespace-url "http://www.w3.org/2001/03/xml.xsd") + (xlink-url "http://www.w3.org/XML/2008/06/xlink.xsd")) + #~(modify-phases %standard-phases + (add-after 'unpack 'inject-data + (lambda _ + (substitute* "tests/musicxml.xsd" + (((string-join (string-split #$namespace-url #\.) "\\.")) + #$(origin + (method url-fetch) + (uri namespace-url) + (sha256 (base32 "\ +1j6h0sp0pcqi5dv9m6sxwr8brrb59fyx091ld1x6wlh28js4vn8f")))) + (((string-join (string-split #$xlink-url #\.) "\\.")) + #$(origin + (method url-fetch) + (uri xlink-url) + (sha256 (base32 "\ +0jpjha5iiq4rf4hx3qfnmyya9cf17ysxz0rbhsffn5nwgxnghgf8"))))))))))) + (native-inputs (list python-hatchling python-lxml python-pytest)) (synopsis "Tool and library for manipulating LilyPond files") - (description "This package provides a Python library to parse, manipulate -or create documents in LilyPond format. A command line program ly is also -provided that can be used to do various manipulations with LilyPond files.") + (description + "This package provides a Python library to parse, manipulate or create +documents in LilyPond format. A command line program ly is also provided that +can be used to do various manipulations with LilyPond files.") (home-page "https://pypi.org/project/python-ly/") (license license:gpl2+))) @@ -17459,13 +17445,18 @@ refactoring library.") (package (name "python-gorilla") (version "0.3.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "gorilla" version)) - (sha256 - (base32 - "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy")))) - (build-system python-build-system) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/christophercrouzet/gorilla") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0hm5ynswhz6i763s6cjlh8lv5ai0f3x17mjvlihqs8idlk4vbrn0")))) + (build-system pyproject-build-system) + (arguments (list #:test-backend #~'unittest)) + (native-inputs (list python-setuptools)) (home-page "https://github.com/christophercrouzet/gorilla") (synopsis "Convenient monkey patching with Python") (description @@ -17478,22 +17469,33 @@ third-party code.") (define-public python-llfuse (package (name "python-llfuse") - (version "1.4.4") - (source (origin - (method url-fetch) - (uri (pypi-uri "llfuse" version)) - (sha256 - (base32 - "1jb4c9avvb0v3830xlbj1r9kj05i98vv6nq05105ppg57y7lq14j")))) - (build-system python-build-system) - (inputs - (list fuse-2 attr)) + (version "1.5.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/python-llfuse/python-llfuse") + (commit (string-append "release-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "16wsrg1py4gvcxfgsfkll73lfq62psc0hcqvs73az7s4b1pvyy62")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" "not test_listdir") ; requires /usr/bin access. + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'build-cython + (lambda _ + (invoke "python" "setup.py" "build_cython")))))) + (inputs (list fuse-2 attr)) (native-inputs - (list pkg-config python-pytest)) + (list pkg-config python-cython python-pytest python-setuptools)) (synopsis "Python bindings for FUSE") (description "Python-LLFUSE is a set of Python bindings for the low level FUSE API.") - (home-page "https://bitbucket.org/nikratio/python-llfuse/") + (home-page "https://github.com/python-llfuse/python-llfuse") (license license:lgpl2.0+))) (define-public python-msgpack @@ -18048,19 +18050,19 @@ provides a collection of cache libraries in the same API interface.") (version "1.2.0") (source (origin - (method url-fetch) - (uri (pypi-uri "pylru" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/jlhutch/pylru") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "15yj46307sw703vjfkgnr04dqvaicmfcj0hc6yrciildp55r6bs9")))) - (build-system python-build-system) + (base32 "0sqai530d7fpjzny476f3zqq9mv05xqbyw500jmbhrpj9yy1l9xp")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "python" "test.py"))))))) + (list + #:test-backend #~'custom + #:test-flags #~(list "test.py"))) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/jlhutch/pylru") (synopsis "Least recently used (LRU) cache implementation") (description @@ -18301,74 +18303,64 @@ is binding LibSass.") (version "1.0.1") (source (origin - (method url-fetch) - (uri (pypi-uri "idna-ssl" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/aio-libs/idna-ssl") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj")))) - (build-system python-build-system) - (arguments - `(#:tests? #f)) ;circular dependency with python-aiohttp + (base32 "1fj4zkcnx3mk7kbnf4d6pjgv331n17wzpphpwdnmr498ghbsph9k")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;circular dependency with python-aiohttp + (native-inputs (list python-setuptools)) (propagated-inputs (list python-idna)) (home-page "https://github.com/aio-libs/idna-ssl") - (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support") - (description "Patch @code{ssl.match_hostname} for Unicode(idna) -domains support.") + (synopsis "Support Unicode(idna) domains for Python's @code{ssl} module") + (description + "This package provides Unicode(idna) domains support for Python's +@code{ssl} module. It patches @code{ssl.match_hostname} for that purpose.") (license license:expat))) -;;; Variant used to break a cycle with python-pip-run-bootstrap. -(define-public python-path-bootstrap - (hidden-package - (package - (name "python-path-bootstrap") - (version "17.1.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "path" version)) - (sha256 - (base32 "1scqbwgcbisx8mb28hw789a7np953851wg6z0bbzdm519znha7nl")))) - (build-system pyproject-build-system) - (arguments - (list #:tests? #f)) - (native-inputs (list python-setuptools python-setuptools-scm python-wheel)) - (home-page "https://github.com/jaraco/path") - (synopsis "Object-oriented file system path manipulation library") - (description "@code{path} (formerly @code{path.py}) implements path -objects as first-class entities, allowing common operations on files to be -invoked on those path objects directly.") - (license license:expat)))) - (define-public python-path - (package/inherit python-path-bootstrap + (package (name "python-path") + (version "17.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "path" version)) + (sha256 + (base32 "1scqbwgcbisx8mb28hw789a7np953851wg6z0bbzdm519znha7nl")))) + (build-system pyproject-build-system) (arguments - (substitute-keyword-arguments - (package-arguments python-path-bootstrap) - ((#:tests? _ #f) - (not (%current-target-system))) - ((#:test-flags flags #~'()) - #~(append (list "-k" - (string-append - ;; Do not test the myproject.toml build as it tries - ;; to pull dependencies from the Internet. - "not project " - ;; This tests assumes a root user exists. - "and not test_get_owner")) - #$flags)))) + (list + #:tests? (not (%current-target-system)) + #:test-flags + #~(list "-k" + (string-append + ;; Do not test the myproject.toml build as it tries + ;; to pull dependencies from the Internet. + "not project " + ;; This tests assumes a root user exists. + "and not test_get_owner")))) (native-inputs - (modify-inputs (package-native-inputs python-path-bootstrap) - (append python-appdirs - python-more-itertools - python-packaging - python-pygments - python-pytest))) - (properties (alist-delete 'hidden? - (package-properties - python-path-bootstrap))))) + (list python-appdirs + python-more-itertools + python-packaging + python-pygments + python-pytest + python-setuptools + python-setuptools-scm)) + (home-page "https://github.com/jaraco/path") + (synopsis "Object-oriented file system path manipulation library") + (description "@code{path} (formerly @code{path.py}) implements path +objects as first-class entities, allowing common operations on files to be +invoked on those path objects directly.") + (license license:expat))) -(define-public python-pathpy - (deprecated-package "python-pathpy" python-path)) +;; It may be removed after 2026-01-24. +(define-deprecated/public-alias python-path-bootstrap python-path) +(define-deprecated/public-alias python-pathpy python-path) (define-public python-pretend (package @@ -18396,39 +18388,52 @@ or doubles. Basically, a stub is an object that returns pre-canned responses, rather than doing any computation.") (license license:bsd-3))) -;;; Variant used to break a dependency cycle with -;;; python-pytest-perf-bootstrap. -(define-public python-pip-run-bootstrap - (hidden-package - (package - (name "python-pip-run-bootstrap") - (version "8.8.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/jaraco/pip-run") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0ycrjj3jgqcr9c2k7y8vprq65iblg0q0hvwz8zwi13gmb0ffds0c")))) - (build-system python-build-system) - (arguments - (list - #:tests? #f - #:phases - #~(modify-phases %standard-phases - (add-before 'build 'pretend-version - ;; The version string is usually derived via setuptools-scm, but - ;; without the git metadata available this fails. - (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))))) - (native-inputs (list python-setuptools-scm)) - (propagated-inputs (list python-autocommand python-path-bootstrap - python-packaging)) - (home-page "https://github.com/jaraco/pip-run") - (synopsis "Dynamic dependency loader for Python") - (description "The @command{pip-run} command provides on-demand temporary +(define-public python-pip-run + (package + (name "python-pip-run") + (version "8.8.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jaraco/pip-run") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ycrjj3jgqcr9c2k7y8vprq65iblg0q0hvwz8zwi13gmb0ffds0c")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? (not (%current-target-system)) + #:test-flags + #~(list "-k" (string-append + ;; Do not test the myproject.toml build as it tries + ;; to pull dependencies from the internet. + "not project " + ;; These tests attempt to install dependencies from + ;; the network and fail. + "and not test_pkg_imported " + "and not test_pkg_loaded_from_alternate_index " + "and not test_pkg_loaded_from_url ")) + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'pretend-version + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))))) + (native-inputs + (list python-nbformat + python-pygments + python-pytest + python-setuptools + python-setuptools-scm)) + (propagated-inputs + (list python-autocommand + python-packaging + python-path + python-pip)) + (home-page "https://github.com/jaraco/pip-run") + (synopsis "Dynamic dependency loader for Python") + (description "The @command{pip-run} command provides on-demand temporary package installation for a single interpreter run. It replaces this series of commands: @example @@ -18437,39 +18442,10 @@ $ /tmp/env/bin/pip install pkg1 pkg2 -r reqs.txt $ /tmp/env/bin/python ... $ rm -rf /tmp/env @end example") - (license license:expat)))) + (license license:expat))) -(define-public python-pip-run - (package/inherit python-pip-run-bootstrap - (name "python-pip-run") - (arguments - (substitute-keyword-arguments (package-arguments python-pip-run-bootstrap) - ((#:tests? _ #f) - (not (%current-target-system))) - ((#:phases phases #~%standard-phases) - #~(modify-phases #$phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-k" - (string-append - ;; Do not test the myproject.toml build as it tries - ;; to pull dependencies from the internet. - "not project " - ;; These tests attempt to install dependencies from - ;; the network and fail. - "and not test_pkg_imported " - "and not test_pkg_loaded_from_alternate_index "))))))))) - (propagated-inputs - (modify-inputs (package-propagated-inputs python-pip-run-bootstrap) - (replace "python-path-bootstrap" python-path))) - (native-inputs - (modify-inputs (package-native-inputs python-pip-run-bootstrap) - (append python-nbformat - python-pygments - python-pytest))) - (properties (alist-delete 'hidden? (package-properties - python-pip-run-bootstrap))))) +;; It may be removed after 2026-01-24. +(define-deprecated/public-alias python-pip-run-bootstrap python-pip-run) (define-public python-tlsh (package @@ -18483,7 +18459,7 @@ $ rm -rf /tmp/env (file-name (git-file-name name version)) (sha256 (base32 "1gb5j73nw3nmx030rf8pm75rns5syxhv44zxr6i74kjicyly1i9w")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases @@ -18498,7 +18474,7 @@ $ rm -rf /tmp/env (when tests? (with-directory-excursion "../Testing" (invoke "./python_test.sh")))))))) - (native-inputs (list cmake-minimal)) + (native-inputs (list cmake-minimal python-setuptools)) (synopsis "Fuzzy matching library for Python") (description "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library. @@ -18555,12 +18531,21 @@ a hash value.") (version "3.1.0") (source (origin - (method url-fetch) - (uri (pypi-uri "terminaltables" version)) - (sha256 - (base32 - "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk")))) - (build-system python-build-system) + (method git-fetch) + (uri (git-reference + (url "https://github.com/Robpol86/terminaltables") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 (base32 "1jlm7n6kxypbr8mvwpd7hf9hbfk0a002ad03wqgxlri4aw8pk39a")))) + (build-system pyproject-build-system) + ;; XXX: A lot of test fail with flaky behavior. + (arguments (list #:tests? #f)) + (native-inputs + (list python-colorclass + python-colorama + python-pytest + python-setuptools + python-termcolor)) (home-page "https://github.com/Robpol86/terminaltables") (synopsis "Generate simple tables in terminals from a nested list of strings") @@ -18637,26 +18622,26 @@ Python's @code{ctypes} foreign function interface (FFI).") (define-public python-file (package/inherit file (name "python-file") - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - '(#:tests? #f ;no tests - #:configure-flags '("--single-version-externally-managed" "--root=/") - #:phases (modify-phases %standard-phases - (add-before 'build 'change-directory - (lambda _ - (chdir "python") - #t)) - (add-before 'build 'set-library-file-name - (lambda* (#:key inputs #:allow-other-keys) - (let ((file (assoc-ref inputs "file"))) - (substitute* "magic.py" - (("find_library\\('magic'\\)") - (string-append "'" file "/lib/libmagic.so'"))) - #t)))))) - (inputs `(("file" ,file))) - (native-inputs (if (%current-target-system) - `(("self" ,this-package)) - '())) + (list + #:tests? #f ;no tests + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'change-directory + (lambda _ + (chdir "python"))) + (add-before 'build 'set-library-file-name + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "magic.py" + (("find_library\\('magic'\\)") + (format #f "~s" (search-input-file inputs + "lib/libmagic.so"))))))))) + (inputs (list file)) + (native-inputs (cons* python-setuptools + (if (%current-target-system) + (list this-package) + '()))) (synopsis "Python bindings to the libmagic file type guesser") (description "This package provides Python bindings to the libmagic file type guesser. @@ -18862,9 +18847,9 @@ Python.") (copy-file "lib/debian/_version.py.in" "lib/debian/_version.py") (substitute* "lib/debian/_version.py" (("__CHANGELOG_VERSION__") #$version)))))) - (build-system python-build-system) + (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools)) (propagated-inputs (list python-six python-chardet)) (synopsis "Debian package related modules") @@ -19096,19 +19081,24 @@ functions to find and load entry points.") (define-public python-epc (package (name "python-epc") - (version "0.0.5") + (properties '((commit . "f3673ae5c35f20a0f71546ab34c28e3dde3595c1") + (revision . "0"))) + (version (git-version "0.0.5" + (assoc-ref properties 'revision) + (assoc-ref properties 'commit))) (source (origin - (method url-fetch) - (uri (pypi-uri "epc" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/tkf/python-epc") + (commit (assoc-ref properties 'commit)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1")))) - (build-system python-build-system) - (propagated-inputs - (list python-sexpdata)) - (native-inputs - (list python-nose)) + (base32 "0q27bj49yan2qg6i8m5czs5b5jv26ff42yz7j4r5652s7j3f42mm")))) + (build-system pyproject-build-system) + (arguments (list #:test-backend #~'nose)) + (propagated-inputs (list python-sexpdata)) + (native-inputs (list python-pynose python-setuptools)) (home-page "https://github.com/tkf/python-epc") (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python") (description @@ -19122,17 +19112,17 @@ from elisp.") (version "1.5") (source (origin - (method url-fetch) - (uri (pypi-uri "forex-python" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/MicroPyramid/forex-python") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj")))) - (build-system python-build-system) - (arguments - ;; Tests are not included in the PyPI tarball. Also, the tests in the - ;; repository require online data. - `(#:tests? #f)) - (propagated-inputs - (list python-requests python-simplejson)) + (base32 "0pl5sfd0wkv1a2y324l518h6sing7wkadrbr5xcf6hjykn2mbi5h")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ; Tests require online data. + (native-inputs (list python-setuptools)) + (propagated-inputs (list python-requests python-simplejson)) (home-page "https://github.com/MicroPyramid/forex-python") (synopsis "Foreign exchange rates and currency conversion") (description @@ -19158,11 +19148,15 @@ Features: (version "0.9.12") (source (origin - (method url-fetch) - (uri (pypi-uri "simpleeval" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/danthedeckie/simpleeval") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0diysdzvx865yy2rjfah75ha2qfxaxz7r108kp7j2kkd903ya2ry")))) - (build-system python-build-system) + (base32 "0khgl729q5133fgc00d550f4r77707rkkn7r56az4v8bvx0q8xp4")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/danthedeckie/simpleeval") (synopsis "Simple, safe single expression evaluator library") (description @@ -19421,39 +19415,32 @@ Jupyter kernels such as IJulia and IRKernel.") (define-public python-jsbeautifier (package (name "python-jsbeautifier") - (version "1.10.2") + (version "1.15.3") (home-page "https://github.com/beautify-web/js-beautify") - (source (origin - (method git-fetch) - (uri (git-reference - (url home-page) - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg")))) - (build-system python-build-system) + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zl1g6w5zn2hxk5qq83j52cxa1ig75ryjwsjxv9wiwkar4qq88zg")))) + (build-system pyproject-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'chdir - (lambda _ - ;; The upstream Git repository contains all the code, - ;; but this package only builds the python code. - (chdir "python") - #t)) - (add-after 'unpack 'patch-python-six-requirements - (lambda _ - (substitute* "python/setup.py" - (("six>=1.12.0") - "six>=1.11.0")) - #t))))) - (propagated-inputs - (list python-editorconfig python-six)) - (native-inputs - (list python-pytest)) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "python") + (rename-file "setup-js.py" "setup.py")))))) + (propagated-inputs (list python-editorconfig python-six)) + (native-inputs (list python-pytest python-setuptools)) (synopsis "JavaScript unobfuscator and beautifier") - (description "Beautify, unpack or deobfuscate JavaScript, leveraging -popular online obfuscators.") + (description + "This packages provides tooling to beautify, unpack or deobfuscate +JavaScript, leveraging popular online obfuscators.") (license license:expat))) (define-public python-chardet @@ -19662,38 +19649,45 @@ tutorial.") @code{PythonAnywhere} services.") (license license:expat))) -(define-public python-pythondialog +(define-public python-dialog (package - (name "python-pythondialog") - (version "3.4.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "pythondialog" version)) - (sha256 - (base32 - "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c")))) - (build-system python-build-system) + (name "python-dialog") + (version "3.5.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pythondialog" version)) + (sha256 + (base32 "08v3flvbhpc0p20drniiaalc3ijghlxk9ka5vz5mqqm6y254m8xj")) + (modules '((guix build utils))) + (snippet #~(delete-file-recursively "doc")))) + (build-system pyproject-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-path - (lambda* (#:key inputs #:allow-other-keys) - (let* ((dialog (assoc-ref inputs "dialog"))) - (substitute* "dialog.py" - (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)") (string-append - "os.getenv(\"PATH\") + \":" - dialog - "/bin\""))) - #t)))) - #:tests? #f)) - (propagated-inputs (list dialog)) + (list + ;; XXX: There are no tests, but some examples. However, they need to + ;; be run on a terminal. + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "dialog.py" + (("_path_to_executable\\(dialog\\)") + (format #f "os.path.realpath(~s)" + (search-input-file inputs "bin/dialog"))))))))) + (native-inputs (list python-setuptools)) + (inputs (list dialog)) (home-page "https://pythondialog.sourceforge.net/") (synopsis "Python interface to the UNIX dialog utility") (description - "A Python wrapper for the dialog utility. Its purpose is to -provide an easy to use, pythonic and comprehensive Python interface to dialog. -This allows one to make simple text-mode user interfaces on Unix-like systems") + "A Python wrapper for the dialog utility. Its purpose is to provide an +easy to use, pythonic and comprehensive Python interface to dialog. This +allows one to make simple text-mode user interfaces on Unix-like systems") (license license:lgpl2.1))) +(define-public python-pythondialog + (deprecated-package "python-pythondialog" python-dialog)) + (define-public python-confection (package (name "python-confection") @@ -20784,7 +20778,7 @@ document.") (invoke "nose2" "-v" "symengine.tests")) (format #t "test suite not run~%"))))))) (native-inputs (list cmake-minimal - python-cython-3 + python-cython python-nose2 python-setuptools python-wheel)) @@ -20799,40 +20793,53 @@ manipulation library.") (define-public python-asteval (package (name "python-asteval") - (version "0.9.23") + (version "1.0.6") (source (origin (method url-fetch) (uri (pypi-uri "asteval" version)) (sha256 - (base32 - "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm")))) - (build-system python-build-system) + (base32 "17x1qk07cixj1nn59pp5dzjc9jna92v6kljdss81l5rf9cqfga0s")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest + python-pytest-cov + python-setuptools + python-setuptools-scm)) (home-page "https://github.com/newville/asteval") (synopsis "Minimalistic evaluator of Python expressions") (description "This package provides a minimalistic evaluator of Python expression -using the @code{ast} module") +using the @code{ast} module.") (license license:expat))) (define-public python-lmfit (package (name "python-lmfit") - (version "1.0.2") + (version "1.3.4") (source (origin (method url-fetch) (uri (pypi-uri "lmfit" version)) (sha256 (base32 - "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7")))) - (build-system python-build-system) + "15z4zcyc4crfdw22qnbaq8wrf552jgl83gd3nk2zc5zp8f6c48iw")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; Costly tests that may fail with multiprocessing.context.TimeoutError. + #~(list "--ignore=tests/test_jacobian_pickling.py") + #:phases + #~(modify-phases %standard-phases + ;; XXX: Unclear why, but the phase seems broken. + ;; asteval>=1.0 is not understood correctly. + (delete 'sanity-check)))) (propagated-inputs - (list python-asteval python-numpy python-scipy python-uncertainties)) + (list python-asteval python-dill python-numpy python-scipy + python-uncertainties)) (native-inputs - (list python-pytest)) + (list python-pytest python-pytest-cov python-setuptools)) (home-page "https://lmfit.github.io/lmfit-py/") (synopsis "Least-Squares minimization with bounds and constraints") (description @@ -21038,19 +21045,32 @@ Amazon Web Services (AWS) API.") (define-public python-pyfiglet (package (name "python-pyfiglet") - (version "0.8.post1") + (version "1.0.4") (source (origin - (method url-fetch) - (uri (pypi-uri "pyfiglet" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/pwaller/pyfiglet") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6")))) - (build-system python-build-system) + (base32 "1r1fyphz99jar2xfk761cl740zxk4b0gygajgjfx6i1kf0dxdv40")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fallback-on-default-build + (lambda _ + ;; This pyproject has little value and fails because of the + ;; :__legacy__ suffix. Removing it to rely on defaults. + (delete-file "pyproject.toml")))))) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/pwaller/pyfiglet") (synopsis "Draw ASCII art big letters in Python") - (description "This module lets you draw large letter from ordinary characters -in pure Python.") + (description + "This module lets you draw large letter from ordinary characters in pure + Python.") (license license:expat))) (define-public python-mako @@ -21373,21 +21393,20 @@ synchronously (wait until ready).") (define-public python-translitcodec (package (name "python-translitcodec") - (version "0.4.0") + (version "0.7.0") (source (origin - (method url-fetch) - (uri (pypi-uri "translitcodec" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/claudep/translitcodec") + (commit (string-append "version-" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki")))) - (build-system python-build-system) - (arguments - `(#:tests? #f)) ; no tests provided - (home-page - "https://github.com/claudep/translitcodec") - (synopsis - "Unicode to 8-bit charset transliteration codec") + (base32 "1cj11sa5hy8ga7p0dgwi4g4gv0qx6c1yi2csgnvxiir16ywslhpw")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools)) + (home-page "https://github.com/claudep/translitcodec") + (synopsis "Unicode to 8-bit charset transliteration codec") (description "This package contains codecs for transliterating ISO 10646 texts into best-effort representations using smaller coded character sets (ASCII, @@ -21397,56 +21416,69 @@ ISO 8859, etc.).") (define-public python-anyqt (package (name "python-anyqt") - (version "0.2.0") + (version "0.2.1") (source (origin - (method url-fetch) - (uri (pypi-uri "AnyQt" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/ales-erjavec/anyqt") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0fvnhdk0nzhlm1xydisvdq1w7lwaakdkbwb1rkyz4vd232wji4jb")))) - (build-system python-build-system) + (base32 "0dci4sx53icd3jxv5gm22yr5g4dcyqbyvkkwliqpmbkxxjxj0dc8")))) + (build-system pyproject-build-system) (arguments - `(#:tests? #f ;there are no tests - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'delete-files - ;; Delete files related to other operating systems. - (lambda _ - (delete-file "AnyQt/QtMacExtras.py") - (delete-file "AnyQt/QtWinExtras.py")))))) + (list + ;; XXX: Qt tests require Qt modules, see test/test_import.py. + ;; TODO Add/configure the right Qt inputs. + #:test-flags + #~(list "--ignore-glob=tests/test_q*.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'delete-files + ;; Delete files related to other operating systems. + (lambda _ + (delete-file "AnyQt/QtMacExtras.py") + (delete-file "AnyQt/QtWinExtras.py")))))) + (native-inputs + (list python-pyqt-6 + python-pytest + python-pytest-qt + python-setuptools)) (home-page "https://github.com/ales-erjavec/anyqt") - (synopsis "PyQt4/PyQt5 compatibility layer") - (description "AnyQt is a PyQt4/PyQt5 compatibility layer.") + (synopsis "PyQt compatibility layer") + (description + "This package provides a PyQt/PySide compatibility layer. More precisely, +it provides compatibility for the following modules: PyQt4, PyQt5, PyQt6, +PySide, PySide2.") (license license:gpl3))) (define-public python-qasync (package (name "python-qasync") - (version "0.27.1") + (version "0.28.0") (source (origin - ;; There are no tests in the PyPI tarball. (method git-fetch) (uri (git-reference - (url "https://github.com/CabbageDevelopment/qasync/") - (commit (string-append "v" version)))) + (url "https://github.com/CabbageDevelopment/qasync/") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0j6ksfnq9qfjdfppbkdz7jh6w0gnslwnckhafmlgim29b25g0z51")))) + (base32 "13i5riq7ig4csxlx61fzb8xl12ny0dkwj4h8f8r95xz5rii7a0kr")))) (build-system pyproject-build-system) (arguments - (list #:test-flags - ;; XXX: Added with python@3.11, not fixed upstream. - #~(list "-k" "not test_regression_bug13") - #:phases - #~(modify-phases %standard-phases - (add-before 'check 'set-qpa - (lambda _ - (setenv "QT_QPA_PLATFORM" "offscreen")))))) + (list + #:build-backend "poetry.core.masonry.api" ;XXX: python-uv-build is required + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'set-qpa + (lambda _ + (setenv "QT_QPA_PLATFORM" "offscreen")))))) (native-inputs (list python-poetry-core python-pytest)) (propagated-inputs - (list python-pyqt)) + (list python-pyqt-6)) (home-page "https://github.com/CabbageDevelopment/qasync") (synopsis "Implementation of the PEP 3156 Event-Loop with Qt") (description @@ -21456,40 +21488,44 @@ by providing an implementation of the PEP 3156 event-loop.") (define-public python-editor (package - (name "python-editor") - (version "1.0.4") - (source - (origin - (method url-fetch) - (uri (pypi-uri "python-editor" version)) - (sha256 - (base32 - "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai")))) - (build-system python-build-system) - (arguments - '(#:tests? #f)) ;XXX: needs a TTY and an editor - (home-page "https://github.com/fmoo/python-editor") - (synopsis "Programmatically open an editor, capture the result") - (description - "python-editor is a library that provides the editor module for -programmatically interfacing with your system's $EDITOR.") - (license license:asl2.0))) + (name "python-editor") + (version "1.0.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fmoo/python-editor") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0hm5gcz5117dsq39bqfxpwazk4khqd272ran0n12x0x84mnqvfxa")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;XXX: needs a TTY and an editor + (native-inputs (list python-setuptools)) + (home-page "https://github.com/fmoo/python-editor") + (synopsis "Programmatically open an editor, capture the result") + (description + "This package provides the editor module for programmatically interfacing +with your system's $EDITOR.") + (license license:asl2.0))) (define-public python-multiprocessing-logging (package (name "python-multiprocessing-logging") - (version "0.3.1") + (version "0.3.4") (home-page "https://github.com/jruere/multiprocessing-logging") - (source (origin - (method git-fetch) - (uri (git-reference - (url home-page) - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y")))) - (build-system python-build-system) + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ib1plsyi4g68n0crc2cqhk54fccsmcijzh66g89fd3lgababgxd")))) + (build-system pyproject-build-system) + (arguments (list #:test-backend #~'unittest)) + (native-inputs (list python-setuptools)) (synopsis "Manage logs from multiple processes") (description "This Python module implements a multiprocessing-aware @code{Handler} @@ -21501,33 +21537,27 @@ main process so that they are handled correctly.") (package (name "python-munkres") (version "1.1.4") - (source (origin - (method url-fetch) - (uri (pypi-uri "munkres" version)) - (sha256 - (base32 - "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w")))) + (source + (origin + (method url-fetch) + (uri (pypi-uri "munkres" version)) + (sha256 + (base32 "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w")))) + (build-system pyproject-build-system) (arguments (list - #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'disable-test - (lambda _ - ;; See https://github.com/bmc/munkres/issues/40 - (substitute* "test/test_munkres.py" - (("^def test_profit_float" m) - (string-append "\ -import platform -@pytest.mark.skipif(platform.architecture()[0] == \"32bit\", - reason=\"Fails on 32 bit architectures\") -" m)))))))) - (build-system python-build-system) - (native-inputs (list python-pytest)) + ;; See https://github.com/bmc/munkres/issues/40 + #:test-flags + (if (member (%current-system) %32bit-supported-systems) + #~(list "-k" "not test_profit_float") + #~(list)))) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://software.clapper.org/munkres/") (synopsis "Implementation of the Munkres algorithm") - (description "The Munkres module provides an implementation of the Munkres -algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), -useful for solving the Assignment Problem.") + (description + "The Munkres module provides an implementation of the Munkres algorithm +(also called the Hungarian algorithm or the Kuhn-Munkres algorithm), useful +for solving the Assignment Problem.") (license license:bsd-3))) (define-public python-codespell @@ -21643,37 +21673,39 @@ can also be used to get the exact location, font or color of the text.") (define-public python-rarfile (package (name "python-rarfile") - (version "4.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "rarfile" version)) - (sha256 - (base32 - "1882wv9szcm29mnyhjmspyflyr2l7z73srn14w4dlnww49lqfm37")))) - (build-system python-build-system) + (version "4.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/markokr/rarfile") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1lm4vz4w0hrnzln7w10ijhdiwxy7gz45m44zw4fz7rdnn7c06b36")))) + (build-system pyproject-build-system) (arguments - `(#:tests? #f ;; The bsdtar utility is very limited and most tests fail. - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "rarfile.py" - ;; Disable unrar and unar, which are unavailable on Guix. - (("(unrar|unar)=True" all tool) (string-append tool "=False")) - ;; Hardcode path to bsdtar - (("\"bsdtar\"") - (string-append "\"" (assoc-ref inputs "libarchive") "/bin/bsdtar\""))) - #t)) - (replace 'check - (lambda* (#:key inputs tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) - (native-inputs (list python-pytest)) + (list + #:tests? #f ;The bsdtar utility is very limited and most tests fail. + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "rarfile.py" + ;; Disable unrar and unar, which are unavailable on Guix. + (("(unrar|unar)=True" all tool) + (string-append tool "=False")) + ;; Hardcode path to bsdtar + (("\"bsdtar\"") + (format #f "~s" + (search-input-file inputs "bin/bsdtar"))))))))) + (native-inputs (list python-pytest python-setuptools)) (inputs (list libarchive)) (home-page "https://github.com/markokr/rarfile") (synopsis "RAR archive reader for Python") - (description "This is Python module for RAR archive reading. The interface -is made as zipfile like as possible.") + (description + "This is Python module for RAR archive reading. The interface is made as +zipfile like as possible.") (license license:isc))) (define-public python-slugid @@ -21689,21 +21721,14 @@ is made as zipfile like as possible.") (file-name (git-file-name name version)) (sha256 (base32 "1h64p2jlqv6lsmw8h2j203kx3bhv72cwzpk5gdhsaamw30cp3h1i")))) - (build-system python-build-system) - (native-inputs (list python-nose)) - (arguments - (list #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs tests? #:allow-other-keys) - (when tests? - ;; The project uses tox to run the tests via nose. - (invoke "nosetests" "-v" "test.py"))))))) + (build-system pyproject-build-system) + (arguments (list #:test-backend #~'nose)) + (native-inputs (list python-pynose python-setuptools)) (home-page "http://taskcluster.github.io/slugid.py") (synopsis "Module for Base64 encoded UUID v4 slugs") - (description "This package provides a module for generating v4 -UUIDs and encoding them into 22 character URL-safe base64 slug -representation.") + (description + "This package provides a module for generating v4 UUIDs and encoding them +into 22 character URL-safe base64 slug representation.") (license license:mpl2.0))) (define-public python-rich @@ -21842,49 +21867,40 @@ for Python inspired by modern web development.") (uri (git-reference (url home-page) (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 - "1x11kfn4g244fia9a7y4ly8dqv5zsxfg3l5azc54dl6gkp2bk7vx")) - (modules '((guix build utils))) - ;; Adjust expected output for file@5.45. - (snippet #~(substitute* "test/libmagic_test.py" - (("PDF document, version 1\\.2, 2 pages") - "PDF document, version 1.2, 2 page(s)"))))) - (build-system python-build-system) + (base32 "1x11kfn4g244fia9a7y4ly8dqv5zsxfg3l5azc54dl6gkp2bk7vx")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - ;; Replace a specific method call with a hard-coded - ;; path to the necessary libmagic.so file in the - ;; store. If we don't do this, then the method call - ;; will fail to find the libmagic.so file, which in - ;; turn will cause any application using - ;; python-magic to fail. - (add-before 'build 'hard-code-path-to-libmagic - (lambda* (#:key inputs #:allow-other-keys) - (let ((magic (search-input-file inputs "/lib/libmagic.so"))) - (substitute* "magic/loader.py" - (("find_library\\('magic'\\)") - (string-append "'" magic "'")))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - ;; The test suite mandates this variable. - (setenv "LC_ALL" "C.UTF-8") - (if tests? - (with-directory-excursion "test" - (invoke "python" "./libmagic_test.py")) - (format #t "test suite not run~%"))))))) - (native-inputs - (list which)) + (list + #:test-backend #~'custom + #:test-flags #~(list "test/libmagic_test.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-tests + (lambda _ + ;; Adjust expected output for file@5.45. + (substitute* "test/libmagic_test.py" + (("PDF document, version 1\\.2, 2 pages") + "PDF document, version 1.2, 2 page(s)")))) + ;; Replace a specific method call with a hard-coded path to the + ;; necessary libmagic.so file in the store. + (add-before 'build 'hard-code-path-to-libmagic + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "magic/loader.py" + (("find_library\\('magic'\\)") + (format #f "~s" + (search-input-file inputs "lib/libmagic.so"))))))))) + (native-inputs (list which python-setuptools)) (inputs ;; python-magic needs to be able to find libmagic.so. (list file)) (synopsis "File type identification using libmagic") (description - "This module uses ctypes to access the libmagic file type -identification library. It makes use of the local magic database and -supports both textual and MIME-type output. Note that this module and -the python-file module both provide a \"magic.py\" file; these two -modules, which are different and were developed separately, both serve -the same purpose: to provide Python bindings for libmagic.") + "This module uses ctypes to access the libmagic file type identification +library. It makes use of the local magic database and supports both textual +and MIME-type output. Note that this module and the python-file module both +provide a \"magic.py\" file; these two modules, which are different and were +developed separately, both serve the same purpose: to provide Python bindings +for libmagic.") (license license:expat))) (define-public s3cmd @@ -21986,6 +22002,7 @@ check if a package meets certain version requirements, query CFLAGS and LDFLAGS and parse the output to build extensions with setup.py.") (license license:expat))) +;; This package is unmaintained since 2014, but still used in `khmer'. (define-public python-bz2file (package (name "python-bz2file") @@ -21995,11 +22012,10 @@ LDFLAGS and parse the output to build extensions with setup.py.") (method url-fetch) (uri (pypi-uri "bz2file" version)) (sha256 - (base32 - "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4")))) - (build-system python-build-system) - (arguments - `(#:tests? #f)) ; Tests use deprecated python modules. + (base32 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ; Tests use deprecated python modules. + (native-inputs (list python-setuptools)) (home-page "https://github.com/nvawda/bz2file") (synopsis "Read and write bzip2-compressed files") (description @@ -22063,7 +22079,7 @@ codebase to support both Python 2 and Python 3 with minimal overhead.") (build-system pyproject-build-system) (native-inputs (list meson-python pkg-config - python-cython-3 + python-cython python-pytest python-sphinx)) (home-page "https://github.com/sagemath/cysignals") @@ -22106,34 +22122,35 @@ in strings and comments.") (define-public python-py3status (package (name "python-py3status") - (version "3.50") + (version "3.62") (source (origin - (method url-fetch) - (uri (pypi-uri "py3status" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/ultrabug/py3status") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0j2dx9lzpic15r8p0r0s3jmcskxpacahxl640b4864ldn5rlnh9d")))) - (build-system python-build-system) - (inputs - (list file)) + (base32 "13ggwr35w5isylrg1n7akhycm18r03bxin95hdpcmqg7fvqyfppz")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - ;; 'file' is used for detection of configuration file encoding - ;; let's make link the dependency to particular input - (add-before 'build 'patch-file-path - (lambda* (#:key inputs #:allow-other-keys) - (let ((file-path (assoc-ref inputs "file"))) - (substitute* "py3status/parse_config.py" - (("\\[\"file\", \"-b\"") - (string-append "['" file-path "/bin/file', '-b'"))) - #t)))) - #:tests? #f)) ; TODO: Requires many libraries not in Guix. + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'hardcode-file-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "py3status/parse_config.py" + (("\\[\"file\", \"-b\"") + (format #f "[~s, \"-b\"" + (search-input-file inputs "bin/file"))))))))) + (native-inputs (list python-hatchling python-pytest)) + (inputs (list file)) (home-page "https://github.com/ultrabug/py3status") (synopsis "Extensible i3status wrapper written in Python") - (description "py3status is an i3status wrapper which extends i3status -functionality in a modular way, allowing you to extend your panel with your -own code, responding to click events and updating clock every second.") + (description + "py3status is an i3status wrapper which extends i3status functionality in +a modular way, allowing you to extend your panel with your own code, +responding to click events and updating clock every second.") (license license:bsd-3))) (define-public python-tblib @@ -22177,32 +22194,36 @@ multiple processes (imagine multiprocessing, billiard, futures, celery etc). (define-public python-tftpy (package (name "python-tftpy") - (version "0.8.2") + (version "0.8.6") (source (origin - (method git-fetch) ;no tests in PyPI archive + (method git-fetch) (uri (git-reference (url "https://github.com/msoulier/tftpy") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 - "1gl04ps8h8r7av3h0zbm8gwmkqs9rkk5vf7n8mv2bzrkwvy9hacc")))) - (build-system python-build-system) + (base32 "11cs52skmisg7rlmcxghmpcxfszcwmph6cvmfdn2p0ks6ckfy9q2")))) + (build-system pyproject-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - (when tests? - ;; The default DEBUG logging level is way too verbose. - (substitute* "t/test.py" - (("logging\\.DEBUG") - "logging.INFO")) - (invoke "python" "-m" "unittest" "t/test.py"))))))) + (list + #:test-backend #~'unittest + #:test-flags #~(list "tests/test.py") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'configure-tests + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; The default DEBUG logging level is way too verbose. + (substitute* "tests/test.py" + (("logging\\.DEBUG") + "logging.INFO")))))))) + (native-inputs (list python-setuptools)) (home-page "https://tftpy.sourceforge.net/") (synopsis "Python trivial file transfer protocol (TFTP) library") - (description "TFTPy is a trivial file transfer protocol (TFTP) Python -library. It can be used to act both as a TFTP client or TFTP server.") + (description + "TFTPy is a trivial file transfer protocol (TFTP) Python library. It can +be used to act both as a TFTP client or TFTP server.") (license license:expat))) (define-public python-greenlet @@ -22419,17 +22440,23 @@ graphviz.") (define-public python-fastimport (package (name "python-fastimport") - (version "0.9.9") + (version "0.9.16") (source - (origin - (method url-fetch) - (uri (pypi-uri "fastimport" version)) - (sha256 - (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll")))) - (build-system python-build-system) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jelmer/python-fastimport") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1pbnp9ffjs09ngva9qcizpscxl9s47rmd4dhxl62f5iwl6c46798")))) + (build-system pyproject-build-system) + (arguments (list #:test-backend #~'unittest)) + (native-inputs (list python-setuptools)) (home-page "https://github.com/jelmer/python-fastimport") (synopsis "VCS fastimport parser and generator in Python") - (description "This package provides a parser for and generator of the Git + (description + "This package provides a parser for and generator of the Git @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport} format.") (license license:gpl2+))) @@ -22523,43 +22550,33 @@ focus on event-based network programming and multiprotocol integration.") (define-public python-pika (package (name "python-pika") - (version "1.2.1") + (version "1.3.2") (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/pika/pika") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0sqj3bg6jwign8vwvn337fbwy69sm684ns1vh5kbfnskq4him9i2")))) - (build-system python-build-system) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pika/pika") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0bmp79lds26y2976xrpf53r3acqzpf3wpkprhlh3asqpfv5pwipb")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'disable-live-tests - (lambda _ - ;; Disable tests that require RabbitMQ, which is not - ;; yet available in Guix. - (substitute* "nose2.cfg" - (("tests=tests/unit,tests/acceptance") - "start-dir=tests/unit")) - (with-directory-excursion "tests" - (for-each delete-file - '("unit/base_connection_tests.py" - "unit/threaded_test_wrapper_test.py"))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "PYTHONPATH" (getcwd)) - (invoke "nose2" "-v"))))))) - (native-inputs - (list python-mock - python-nose2 - ;; These are optional at runtime, and provided here for tests. - python-gevent - python-tornado - python-twisted)) + (list + #:test-flags + ;; XXX: These test most likely require a running RabbitMQ server. + #~(list "--ignore=tests/acceptance/blocking_adapter_test.py") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'configure-tests + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "PYTHONPATH" (getcwd)))))))) + (native-inputs (list python-pytest + python-gevent + python-tornado + python-twisted + python-setuptools)) (home-page "https://pika.readthedocs.org") (synopsis "Pure Python AMQP Client Library") (description @@ -23624,24 +23641,26 @@ characters, mouse support, and auto suggestions.") (define-public python-proselint (package (name "python-proselint") - (version "0.13.0") + (version "0.14.0") (source (origin (method url-fetch) (uri (pypi-uri "proselint" version)) (sha256 - (base32 - "0n1ahnq2mkgvh94g05xhc3l1fs3hh0ycskqlqivhhfdaq8ybdlkx")))) - (build-system python-build-system) + (base32 "11hfd207bhsvb0iznlnbr0w7jxihvn3ismpjbmz7c57a5ckn8jb2")))) + (build-system pyproject-build-system) (arguments - `(#:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-home-directory - (lambda _ - (setenv "HOME" "/tmp")))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-home-directory + (lambda _ + (setenv "HOME" "/tmp")))))) + (native-inputs + (list python-poetry-core + python-pytest)) (propagated-inputs - (list python-click python-future python-six)) + (list python-click)) (home-page "http://proselint.com/") (synopsis "Linter for prose") (description "@code{python-proselint} is a linter for English prose, that @@ -24188,8 +24207,8 @@ pytest-fixtures-style dependency injection.") extracting firmware images") (license license:expat))) -(define-public python-binwalk - (deprecated-package "python-binwalk" binwalk)) +(define-deprecated-package python-binwalk + binwalk) (define-public python-bson (package @@ -24765,7 +24784,7 @@ from the header, as well as section details and data available.") (build-system pyproject-build-system) (propagated-inputs (list python-numpy)) (native-inputs - (list python-cython-3 + (list python-cython python-pytest python-setuptools python-setuptools-scm @@ -27070,14 +27089,20 @@ created by running @code{python setup.py develop}).") (define-public python-twine (package (name "python-twine") - (version "6.1.0") + (version "6.2.0") (source (origin (method url-fetch) (uri (pypi-uri "twine" version)) (sha256 - (base32 "1gcd990456sk0g05ln6x6mwn9z1jybnm3wlkxq3ivyggf9i4ycmy")))) + (base32 "1kvm9cdvbnh232wafww1w5scaic9kkrwhlff1mvmk68cswphvvg5")))) (build-system pyproject-build-system) + (arguments + (list + ;; tests: 228 passed, 1 deselected + #:test-flags + ;; Assertion is not equal for one tests. + #~(list "--deselect=tests/test_check.py::test_fails_rst_syntax_error"))) (native-inputs (list python-pretend python-pytest @@ -27183,7 +27208,7 @@ executed more than a given number of times during a given period.") (substitute* "pyproject.toml" ((".*addopts.*") ""))))))) (native-inputs - (list python-cython-3 + (list python-cython python-pytest python-pytest-asyncio python-pytest-timeout @@ -30120,52 +30145,6 @@ a mypy plugin that smooths over some limitations in the basic type hints. ;; Either license applies. (license (list license:expat license:asl2.0)))) -(define-public python-trio-websocket - (package - (name "python-trio-websocket") - (version "0.11.1") - (source - (origin - (method git-fetch) ;no tests in pypi archive - (uri (git-reference - (url "https://github.com/HyperionGray/trio-websocket") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1sw85r8gikd86zc8jaqv0vmgcf2k62v6zjzxiv8xr6zm8ridplkm")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags - '(list "-k" - ;; FIXME: These raise nursery exceptions. Perhaps pytest-trio is - ;; too old? - (string-append "not test_handshake_exception_before_accept" - " and not test_reject_handshake" - " and not test_reject_handshake_invalid_info_status" - " and not test_client_open_timeout" - " and not test_client_close_timeout" - " and not test_client_connect_networking_error" - " and not test_finalization_dropped_exception")))) - (native-inputs - (list python-pytest - python-pytest-trio - python-setuptools - python-trustme - python-wheel)) - (propagated-inputs (list python-async-generator python-trio python-wsproto)) - (home-page "https://github.com/HyperionGray/trio-websocket") - (synopsis "WebSocket library for Trio") - (description "This library implements both server and client aspects of -the @url{https://tools.ietf.org/html/rfc6455, the WebSocket protocol}, -striving for safety, correctness, and ergonomics. It is based on the -@url{https://wsproto.readthedocs.io/en/latest/, wsproto project}, which is a -@url{https://sans-io.readthedocs.io/, Sans-IO} state machine that implements -the majority of the WebSocket protocol, including framing, codecs, and events. -This library handles I/O using @url{https://trio.readthedocs.io/en/latest/, -the Trio framework}.") - (license license:expat))) - (define-public python-humanize (package (name "python-humanize") @@ -34621,18 +34600,39 @@ were local.") (define-public python-nampa (package (name "python-nampa") - (version "0.1.1") + ;; PyPI version is 0.1.1 from 2017. Tag 1.0 on git is from 2020 and still + ;; has 0.1.1 as version. Latest commit is from 2024. + (properties '((commit . "cb6a63aae64324f57bdc296064bc6aa2b99ff99a") + (revision . "0"))) + (version (git-version "1.0.0" + (assoc-ref properties 'revision) + (assoc-ref properties 'commit))) (source (origin - (method url-fetch) - (uri (pypi-uri "nampa" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/thebabush/nampa") + (commit (assoc-ref properties 'commit)))) + (file-name (git-file-name name version)) (sha256 - (base32 "0k6cq2gflpkm40qhgqbbcjmq5lq589c15bmk567qyh3d08062hvd")))) + (base32 "0a3fx0wpch4il1fwv1nan6nsd7bv84b0bs2xxxjacisw3spizlg0")))) (build-system pyproject-build-system) (arguments - (list #:tests? #f)) ;no tests in PyPI archvie, no 0.1.1 tag in Git + (list + #:test-flags + #~(list "-k test_random_values") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-tests + (lambda _ + ;; Unclear why this top-level __init__.py is here. It seems to + ;; setup a plugin for binaryninja, which Guix does not package. + (delete-file "__init__.py") + ;; Yields tests, which is not allowed anymore. + (substitute* "tests/test_crc.py" + (("yield") "#yield"))))))) (propagated-inputs (list python-future)) - (native-inputs (list python-setuptools)) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/thebabush/nampa") (synopsis "Python implementation of IDA Pro's FLIRT technology") (description @@ -35946,8 +35946,8 @@ all the niceties of modern GUI-based debuggers in a more lightweight and keyboard-friendly package.") (license license:expat))) -(define-public pudb - (deprecated-package "pudb" python-pudb)) +(define-deprecated-package pudb + python-pudb) (define-public python-iwlib (package |
