diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-04-19 16:49:36 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-04-19 16:49:36 +0100 |
commit | e417d6fe8182c0b42b113490fec6a0297fd68fed (patch) | |
tree | 7e3f9e650db1976e3fdf857426a428186b755aa9 | |
parent | a6c96cdb7060ccfc2d0fe27a45b9bcc9590aedd6 (diff) | |
parent | 621b018d9936df7e68eb49a34ef28c418d6809e0 (diff) | |
download | guix-e417d6fe8182c0b42b113490fec6a0297fd68fed.tar.gz guix-e417d6fe8182c0b42b113490fec6a0297fd68fed.zip |
Merge remote-tracking branch 'origin/python-team'
Change-Id: I08cf47c4ee8c4019615ba45cef4cca1bd362d31b
73 files changed, 5569 insertions, 3345 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 83df535b4c..adbb893a41 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1927,7 +1927,6 @@ dist_patch_DATA = \ %D%/packages/patches/ocaml-4.09-multiple-definitions.patch \ %D%/packages/patches/omake-fix-non-determinism.patch \ %D%/packages/patches/oneko-remove-nonfree-characters.patch \ - %D%/packages/patches/onionshare-cli-async-mode.patch \ %D%/packages/patches/online-judge-tools.patch \ %D%/packages/patches/onnx-optimizer-system-library.patch \ %D%/packages/patches/onnx-1.13.1-use-system-googletest.patch \ @@ -2006,9 +2005,11 @@ dist_patch_DATA = \ %D%/packages/patches/prusa-slicer-fix-tests.patch \ %D%/packages/patches/prusa-wxwidgets-makefile-fix.patch \ %D%/packages/patches/pthreadpool-system-libraries.patch \ + %D%/packages/patches/python-3.11-fix-tests.patch \ %D%/packages/patches/python-3.12-fix-tests.patch \ %D%/packages/patches/python-accupy-use-matplotx.patch \ %D%/packages/patches/python-accupy-fix-use-of-perfplot.patch \ + %D%/packages/patches/python-bed-reader-use-store-samples.patch \ %D%/packages/patches/python-chai-drop-python2.patch \ %D%/packages/patches/python-clarabel-blas.patch \ %D%/packages/patches/python-docrepr-fix-tests.patch \ @@ -2023,7 +2024,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-sgmllib3k-assertions.patch \ %D%/packages/patches/python-sphobjinv-defer-ssl-import.patch \ %D%/packages/patches/python-sphinx-prompt-docutils-0.19.patch \ - %D%/packages/patches/python-wxwidgets-type-errors.patch \ %D%/packages/patches/qcodeeditor-qt6.patch \ %D%/packages/patches/qtdeclarative-5-disable-qmlcache.patch \ %D%/packages/patches/qtdeclarative-disable-qmlcache.patch \ @@ -2130,6 +2130,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-memcached-syntax-warnings.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-packaging-test-arch.patch \ + %D%/packages/patches/python-property-cached-asyncio-3_11.patch \ %D%/packages/patches/python-pyan3-fix-absolute-path-bug.patch \ %D%/packages/patches/python-pyan3-fix-positional-arguments.patch \ %D%/packages/patches/python-pytorch-fix-codegen.patch \ @@ -2143,6 +2144,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \ %D%/packages/patches/python-unittest2-python3-compat.patch \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ + %D%/packages/patches/python-vaex-core-fix-tsl-use.patch \ %D%/packages/patches/python-vega-datasets-remove-la-riots-code.patch \ %D%/packages/patches/python-versioneer-guix-support.patch \ %D%/packages/patches/python-werkzeug-tests.patch \ @@ -2329,7 +2331,6 @@ dist_patch_DATA = \ %D%/packages/patches/tpetra-remove-duplicate-using.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/transmission-4.0.6-fix-build.patch \ - %D%/packages/patches/trytond-add-egg-modules-to-path.patch \ %D%/packages/patches/trytond-add-guix_trytond_path.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/tup-unbundle-dependencies.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index b5bd560300..8001c2ba8e 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1065,25 +1065,29 @@ memory, disks, network and processes.") (uri (pypi-uri "bpytop" version)) (sha256 (base32 "1clvajbv7pzlya9s1xs6dvjic8rv3kx7aqiwnjxapiypx246gdjk")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f ; No tests in Pypi archive. + #: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")))) + (add-after 'install 'install-themes + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((themes (string-append (site-packages inputs outputs) + "/bpytop-themes"))) + (mkdir-p themes) + (copy-recursively "themes" themes))))))) (inputs (list python-psutil)) - (arguments - `(#:phases - (modify-phases %standard-phases - ;; sanity-check phase fail, but the application seems to be working - (delete 'sanity-check) - (add-after 'install 'install-themes - (lambda* (#:key outputs #:allow-other-keys) - (let ((themes (string-append (assoc-ref outputs "out") - "/lib/python" - ,(version-major+minor - (package-version python)) - "/site-packages/bpytop-themes"))) - (mkdir-p themes) - (copy-recursively "themes" themes))))))) - (home-page - "https://github.com/aristocratos/bpytop") + (native-inputs + (list python-poetry-core)) + (home-page "https://github.com/aristocratos/bpytop") (synopsis "Resource monitor") (description "Resource monitor that shows usage and stats for processor, memory, disks, network and processes. It's a Python port and continuation of @@ -3280,7 +3284,7 @@ provides the following commands: ;; variable in the tests/cpan.scm test. (list (search-path-specification (variable "GUIX_PYTHONPATH") - (files (list "lib/python3.10/site-packages"))))) + (files (list "lib/python3.11/site-packages"))))) (home-page "https://www.ansible.com/") (synopsis "Radically simple IT automation") (description "Ansible aims to be a radically simple IT automation system. diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm index 2ba6e88412..a4816472d7 100644 --- a/gnu/packages/aidc.scm +++ b/gnu/packages/aidc.scm @@ -179,7 +179,7 @@ C/C++ programs to use its capabilities without restrictions or overhead.") (define-public zbar (package (name "zbar") - (version "0.23.92") + (version "0.23.93") (source (origin (method git-fetch) @@ -189,7 +189,7 @@ C/C++ programs to use its capabilities without restrictions or overhead.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0k3g0ql2m4dnflppp9r3k804d927g7zslczblzcrbvhp02g6n5an")))) + (base32 "0x71clkkm4w765c2d5h3svr29w08dj03r6785f9jwqx5r4ral0za")))) (build-system glib-or-gtk-build-system) (arguments (list diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index cb699b06dc..83df9bdfc9 100644 --- a/gnu/packages/android.scm +++ b/gnu/packages/android.scm @@ -738,7 +738,10 @@ file system.") (base32 "11as7n2mj3nbqsqb3ivyv9985n73i022s748qvjg36cs8ig50afx")))) (build-system pyproject-build-system) - (inputs (list python-requests python-argcomplete python-urllib3 gnupg)) + (inputs (list python-requests + python-argcomplete + python-urllib3-1.26 + gnupg)) (native-inputs (list python-setuptools python-wheel)) (arguments (list #:phases #~(modify-phases %standard-phases diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 2d2b2e61ae..69a0d5a583 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -2059,7 +2059,10 @@ simulated Astronomical data in Python.") "--ignore=astroML/density_estimation/tests/test_bayesian_blocks.py" "--ignore=astroML/density_estimation/tests/test_bayesian_blocks.py" "--ignore=astroML/density_estimation/tests/test_hist_binwidth.py" - "--ignore=astroML/density_estimation/tests/test_hist_binwidth.py") + "--ignore=astroML/density_estimation/tests/test_hist_binwidth.py" + ;; Disalbe tests with NumPy, see + ;; <https://github.com/astroML/astroML/issues/281>. + "--ignore=astroML/tests/test_resample.py") #:phases '(modify-phases %standard-phases (add-after 'unpack 'patch-build-system @@ -2085,11 +2088,18 @@ simulated Astronomical data in Python.") ;; Some tests need this (lambda _ (setenv "HOME" "/tmp")))))) - (propagated-inputs (list python-astropy python-matplotlib python-numpy - python-scikit-learn python-scipy)) - (native-inputs (list python-pytest-astropy-header python-pytest-cov - python-pytest-doctestplus python-pytest-remotedata - python-wheel)) + (native-inputs + (list python-pytest-astropy-header + python-pytest-cov + python-pytest-doctestplus + python-pytest-remotedata + python-wheel)) + (propagated-inputs + (list python-astropy + python-matplotlib + python-numpy + python-scikit-learn + python-scipy)) (home-page "https://astroml.org") (synopsis "Tools for machine learning and data mining in astronomy") (description "This package provides tools for machine learning and data @@ -2136,7 +2146,9 @@ mining in astronomy.") "test_table_comp[t16-t26]" ;; UnboundLocalError: local variable 'ihd' ;; referenced before assignment - "test_delay_doc_updates") + "test_delay_doc_updates" + ;; assert 13 == 1 + "test_skip_meta") " and not ")) #:phases #~(modify-phases %standard-phases @@ -2488,6 +2500,46 @@ attempting to maintain ISTP compliance "This package contains a helper functionality to test ROMAN and JWST.") (license license:bsd-3))) +(define-public python-cesium + (package + (name "python-cesium") + (version "0.12.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "cesium" version)) + (sha256 + (base32 + "0jr0ycqz9ns6mcskm4sxx92k40fj3v0x9knjaw5ac9f3mpqxsfbv")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + ;; The installed test files contain the /gnu/store location, not the + ;; location of the discovered test files from the build directory. + ;; The test framework doesn't like this. The easiest way around + ;; this mismatch is to jump to the output directory. + (add-before 'check 'check-chdir + (lambda _ (chdir #$output)))))) + (propagated-inputs + (list python-click ;XXX required by python-dask + python-cloudpickle + python-dask + python-gatspy + python-joblib + python-numpy + python-pandas + python-scikit-learn + python-scipy + python-toolz)) + (native-inputs (list python-cython python-pytest python-setuptools-scm + python-setuptools python-wheel)) + (home-page "https://pypi.org/project/cesium/") + (synopsis "Library for time-series feature extraction and processing") + (description + "Cesium is a library for time-series feature extraction and processing.") + (license license:bsd-3))) + (define-public python-cmyt (package (name "python-cmyt") @@ -3132,7 +3184,9 @@ zooming windows, star catalog access, cuts, star pick/FWHM, thumbnails, etc.") "--ignore=glue_astronomy/io/spectral_cube/tests/test_spectral_cube.py" "--ignore=glue_astronomy/io/spectral_cube/tests/test_spectral_cube.py" "--ignore=glue_astronomy/translators/tests/test_trace.py" - "--ignore=glue_astronomy/translators/tests/test_trace.py"))) + "--ignore=glue_astronomy/translators/tests/test_trace.py" + ;; This is a Numpy DeprecationWarning, remove it on next update. + "-k" "not test_spectral_cube_io"))) (propagated-inputs (list python-astropy python-glue-core diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 50267ee0fe..5756b1c7d1 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -647,17 +647,25 @@ Filter) modules follow the convention of 1V / Octave.") "1npks71ljc48w6858l9bq30kaf5nph8z0v61jkfb70xb9np850nl")))) (build-system waf-build-system) (arguments - `(#:tests? #f ; no check target - #:configure-flags - (list - (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib") - "--enable-fftw3f" - "--enable-jack" - "--enable-sndfile" - "--enable-samplerate" - "--enable-avcodec"))) + (list + #:tests? #f ; no check target + #:configure-flags + #~(list + (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib") + "--enable-fftw3f" + "--enable-jack" + "--enable-sndfile" + "--enable-samplerate" + "--enable-avcodec") + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'python3.11-compatibility + (lambda _ + (substitute* '("waflib/Context.py" + "waflib/ConfigSet.py") + (("'rU'") "'r'"))))))) (inputs - (list jack-1 + (list jack-2 libsndfile libsamplerate ffmpeg-4 ;for libavcodec @@ -2664,7 +2672,13 @@ partial release of the General MIDI sound set.") #:configure-flags #~(list ;; Add the output lib directory to the RUNPATH. - (string-append "--ldflags=-Wl,-rpath=" #$output "/lib")))) + (string-append "--ldflags=-Wl,-rpath=" #$output "/lib")) + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'python3.11-compatibility + (lambda _ + (substitute* "wscript" + (("'rU'") "'r'"))))))) (inputs (list libsndfile boost @@ -2872,6 +2886,14 @@ synchronous execution of all clients, and low latency operation.") #:configure-flags '("--dbus" "--alsa") #:phases (modify-phases %standard-phases + ;; Python 3.11 has removed the 'U' (universal newline) mode. It has + ;; been the default since Python 3.3. + (add-after 'unpack 'python-compatibility + (lambda _ + (substitute* '("waflib/Context.py" + "waflib/ConfigSet.py") + (("m='rU'") "m='r'") + (("read\\('rU'") "read('r'")))) (add-before 'configure 'set-linkflags (lambda _ ;; Ensure -lstdc++ is the tail of LDFLAGS or the simdtests.cpp diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 13c5590f55..cf06f7c1e6 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -1443,7 +1443,9 @@ borgmatic is powered by borg.") python-pytest-mock python-pytest-qt python-pytest-runner - python-setuptools-git)) + python-setuptools + python-setuptools-git + python-wheel)) (inputs (list borg python-appdirs diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index 8743dc66aa..bc630bf723 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -402,7 +402,7 @@ setup against another one.") (define-public python-locust (package (name "python-locust") - (version "2.32.5") + (version "2.33.2") ;; The archive on Pypi has no tests. (source (origin (method git-fetch) @@ -412,7 +412,7 @@ setup against another one.") (file-name (git-file-name name version)) (sha256 (base32 - "0nmhk2k0mbza9slqgms42s6hsfwwmyr275l90an02qaypx066l1n")))) + "055is6plxjajzp7v5q108n90j5mvdaylpna98kw9zsqn7mvfq7ms")))) (build-system pyproject-build-system) (arguments (list @@ -484,10 +484,21 @@ setup against another one.") "not test_ramp_up_from_0_to_100_000_users_with_50_user_classes_and_1000_workers_and_5000_spawn_rate" ;; This test fails with "AssertionError: ;; 'stopped' != 'stopping'". - "not test_distributed_shape") " and ")) + "not test_distributed_shape" + ;; This test fails with AssertionError: + ;; "locust [...] != .locust-real" + "not test_invalid_stop_timeout_string" + ) " and ")) #:phases #~(modify-phases %standard-phases ;; The build system attempts to detect the version by spawning git. + (add-after 'unpack 'pretend-version + (lambda _ + (substitute* "pyproject.toml" + (("^dynamic = \\[\"version\"\\].*$") + (format #f "version = ~s~%" #$version)) + (("^source = \"vcs\".*$") + "source = \"static\"\n")))) (add-after 'unpack 'fix-version (lambda _ (let ((tuple (list @@ -518,9 +529,15 @@ version_tuple = __version_tuple__ "))))) (substitute* "pyproject.toml" - (("setuptools = \">=70.0.0\"") "setuptools = \">=67.0.0\"") - (("^version =.*") (string-append "version = \"" #$version "\"\n")) - (("enable = true") "enable = false")))) + (("\"setuptools>=.*\",") + (string-append "\"setuptools>=" + #$(package-version + (this-package-input "python-setuptools")) + "\",")) + (("^version =.*") + (string-append "version = \"" #$version "\"\n")) + (("enable = true") + "enable = false")))) (add-before 'check 'increase-resource-limits (lambda _ ;; XXX: Copied from ungoogled-chromium. @@ -552,8 +569,8 @@ version_tuple = __version_tuple__ python-werkzeug)) (native-inputs (list nss-certs-for-test - python-poetry-core - python-poetry-dynamic-versioning + python-hatchling + python-hatch-vcs python-pyquery python-pytest python-retry)) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 1aab0de41e..7eec4350ce 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -309,7 +309,7 @@ single executable called @code{bam}.") (define-public bcftools (package (name "bcftools") - (version "1.14") + (version "1.21") (source (origin (method url-fetch) (uri (string-append "https://github.com/samtools/bcftools/" @@ -317,11 +317,11 @@ single executable called @code{bam}.") version "/bcftools-" version ".tar.bz2")) (sha256 (base32 - "1jqrma16fx8kpvb3c0462dg0asvmiv5yi8myqmc5ddgwi6p8ivxp")) + "10p2ligd9pqn8wq6szw2s4zqknlm7hmb4057fpdnhlsmsg0lr2jj")) (modules '((guix build utils))) (snippet '(begin ;; Delete bundled htslib. - (delete-file-recursively "htslib-1.14"))))) + (delete-file-recursively "htslib-1.21"))))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -453,7 +453,7 @@ computational cluster.") (define-public bedtools (package (name "bedtools") - (version "2.30.0") + (version "2.31.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/arq5x/bedtools2/releases/" @@ -461,7 +461,7 @@ computational cluster.") "bedtools-" version ".tar.gz")) (sha256 (base32 - "1f2hh79l7dn147c2xyfgf5wfjvlqfw32kjfnnh2n1qy6rpzx2fik")))) + "15rbfg776pcjxqrsa22dk7sdlmx1lijh3jhap04f1cbr4866czpw")))) (build-system gnu-build-system) (arguments (list @@ -2185,6 +2185,20 @@ Format (GFF) with Biopython integration.") (modify-inputs (package-propagated-inputs python-bcbio-gff) (replace "python-biopython" python-biopython-1.73)))))) +(define bed-sample-files + (let* ((name "bed-sample-files") + (commit "a06dc0450e484090f15656ffd5d317813a5e1e01") + (revision "0") + (version (git-version "0.0.0" revision commit))) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fastlmm/bed-sample-files") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1ldr2lvgbcykxa9i2s2298mhfh0sz96aaxs5dx217aipa9vsrjwk"))))) + (define-public python-bed-reader (package (name "python-bed-reader") @@ -2194,80 +2208,124 @@ Format (GFF) with Biopython integration.") (method url-fetch) (uri (pypi-uri "bed_reader" version)) (sha256 - (base32 "1c8ibwvz3b069w7ffh9aasz16lfkmx4z0249c2v909a21mrkkd6n")))) + (base32 "1c8ibwvz3b069w7ffh9aasz16lfkmx4z0249c2v909a21mrkkd6n")) + (modules '((guix build utils))) + ;; Bundled unused javascript & co. + (snippet #~(delete-file-recursively "_static")) + (patches + (search-patches "python-bed-reader-use-store-samples.patch")))) (build-system cargo-build-system) (arguments (list - ;; Many of the tests (both the Rust tests and the Python tests) require - ;; Internet access to fetch samples. - #:tests? #false #:install-source? #false #:features '(list "extension-module") - #:cargo-test-flags '(list "--features=extension-module") + #:cargo-test-flags + '(list "--features=extension-module" + ;; Skip doc tests. + "--lib" "--bins" "--tests" "--" + ;; This test is the only one not matched by our regexp. + "--skip=http_one" + ;; These test require a 84 GB file. + "--skip=http_two" + "--skip=http_cloud_urls_md_3") #:cargo-inputs - `(("rust-anyinput" ,rust-anyinput-0.1) - ("rust-bytecount" ,rust-bytecount-0.6) - ("rust-byteorder" ,rust-byteorder-1) - ("rust-bytes" ,rust-bytes-1) - ("rust-cloud-file" ,rust-cloud-file-0.2) - ("rust-derive-builder" ,rust-derive-builder-0.20) - ("rust-dpc-pariter" ,rust-dpc-pariter-0.4) - ("rust-fetch-data" ,rust-fetch-data-0.2) - ("rust-futures-util" ,rust-futures-util-0.3) - ("rust-itertools" ,rust-itertools-0.13) - ("rust-ndarray" ,rust-ndarray-0.16) - ("rust-ndarray-npy" ,rust-ndarray-npy-0.9) - ("rust-num-traits" ,rust-num-traits-0.2) - ("rust-numpy" ,rust-numpy-0.22) - ("rust-pyo3" ,rust-pyo3-0.22) - ("rust-pyo3-build-config" ,rust-pyo3-build-config-0.22) - ("rust-rayon" ,rust-rayon-1) - ("rust-statrs" ,rust-statrs-0.17) - ("rust-thiserror" ,rust-thiserror-1) - ("rust-tokio" ,rust-tokio-1)) + (list rust-anyinput-0.1 + rust-bytecount-0.6 + rust-byteorder-1 + rust-bytes-1 + rust-cloud-file-0.2 + rust-derive-builder-0.20 + rust-dpc-pariter-0.4 + rust-fetch-data-0.2 + rust-futures-util-0.3 + rust-itertools-0.13 + rust-ndarray-0.16 + rust-ndarray-npy-0.9 + rust-num-traits-0.2 + rust-numpy-0.22 + rust-pyo3-0.22 + rust-pyo3-build-config-0.22 + rust-rayon-1 + rust-statrs-0.17 + rust-thiserror-1 + rust-tokio-1) #:cargo-development-inputs - `(("rust-anyhow" ,rust-anyhow-1) - ("rust-ndarray-rand" ,rust-ndarray-rand-0.15) - ("rust-rusoto-credential" ,rust-rusoto-credential-0.48) - ("rust-temp-testdir" ,rust-temp-testdir-0.2) - ("rust-thousands" ,rust-thousands-0.2)) + (list rust-anyhow-1 + rust-ndarray-rand-0.15 + rust-rusoto-credential-0.48 + rust-temp-testdir-0.2 + rust-thousands-0.2) #:imported-modules (append %cargo-build-system-modules %pyproject-build-system-modules) #:modules '((guix build cargo-build-system) ((guix build pyproject-build-system) #:prefix py:) - (guix build utils)) + (guix build utils) + (ice-9 match) + (ice-9 rdelim)) #:phases #~(modify-phases %standard-phases + (add-after 'configure 'set-data-path + (lambda _ + ;; This var is still necessary despite the patch-data-path phase. + ;; Otherwise more tests fail with a read-only filesystem error. + (setenv "BED_READER_DATA_DIR" #+bed-sample-files))) + (add-after 'unpack 'patch-data-path + (lambda _ + ;; If BED_READER_DATA_DIR is unset, default to bed-sample-files. + (substitute* "bed_reader/_sample_data.py" + (("os\\.environ\\.get\\(\"BED_READER_DATA_DIR\"" all) + (format #f "~a, ~s" all #+bed-sample-files))) + ;; XXX: More work is necessary to use another + ;; version of sample files with BED_READER_DATA_DIR + ;; Currently, only the hardcoded Guix version is working. + (substitute* '("bed_reader/tests/test_open_bed_cloud.py" + "src/bed_cloud.rs" + "src/lib.rs" + "src/supplemental_documents/cloud_urls_etc.md" + "tests/tests_api_cloud.rs") + (("\ +https://raw\\.githubusercontent\\.com/fastlmm/bed-sample-files/main") + (string-append "file://" #+bed-sample-files))) + (substitute* "src/tests.rs" + (("bed_reader/tests/data") + #+bed-sample-files)))) (add-after 'install 'prepare-python-module (lambda _ - ;; We don't use maturin. - (delete-file "pyproject.toml") - (call-with-output-file "pyproject.toml" - (lambda (port) - (format port "\ + ;; We don't use maturin. Conveniently, what we want to drop + ;; from pyproject.toml is at the end of the file. + (rename-file "pyproject.toml" "pyproject.toml.bak") + (call-with-input-file "pyproject.toml.bak" + (lambda (in) + (call-with-output-file "pyproject.toml" + (lambda (out) + (let loop () + (match (read-line in) + ((? eof-object? eof) + eof) + ("[build-system]" + (and (format out "\ [build-system] build-backend = 'setuptools.build_meta' requires = ['setuptools'] -"))) - (call-with-output-file "setup.cfg" - (lambda (port) - (format port "\ -[metadata] -name = bed-reader -version = ~a - -[options] -packages = find: -[options.packages.find] -exclude = - src - docs - tests - Cargo.toml -" #$version))))) +[tool.setuptools.packages.find] +where = [\".\"] +exclude = [\"src\", \"docs\", \"tests\", \"Cargo.toml\"] +"))) + ("samples = [\"pooch>=1.5.0\"]" + (and (format out "samples = []~%") + (loop))) + ("[project]" + (and (format out "\ +[project] +version = ~s +" #$version) + (loop))) + (line + (and (format out "~a~%" line) + (loop))))))))))) (add-after 'prepare-python-module 'enable-bytecode-determinism (assoc-ref py:%standard-phases 'enable-bytecode-determinism)) (add-after 'enable-bytecode-determinism 'build-python-module @@ -2279,16 +2337,35 @@ exclude = (let ((site (string-append #$output "/lib/python" #$(version-major+minor (package-version python)) - "/site-packages"))) - (mkdir-p site) + "/site-packages/"))) + (mkdir-p (string-append site "bed_reader")) (copy-file "target/release/libbed_reader.so" - (string-append site "/bed_reader/bed_reader.so"))))) + (string-append site "bed_reader/bed_reader.so"))))) (add-after 'install-python-library 'add-install-to-pythonpath (assoc-ref py:%standard-phases 'add-install-to-pythonpath)) (add-after 'add-install-to-pythonpath 'check-python - (lambda* (#:key tests? test-flags #:allow-other-keys) + (lambda* (#:key tests? #:allow-other-keys) (when tests? - (apply invoke "pytest" "-v" #$output test-flags))))))) + (let ((site (string-append #$output "/lib/python" + #$(version-major+minor + (package-version python)) + "/site-packages/")) + (data-dir "bed_reader/tests/data")) + (symlink (canonicalize-path data-dir) + (string-append site data-dir)) + (invoke "pytest" "-v" #$output + ;; These test require a 84 GB file. + "-k" (string-join + (list "not test_http_two" + "test_http_cloud_urls_rst_3" + "test_http_cloud_urls_rst_4" + ;; XXX: python-pooch dependency removed + "test_optional_dependencies") + " and not ")) + (delete-file-recursively + (string-append site "bed_reader/tests")) + (delete-file-recursively + (string-append #$output "/.pytest_cache"))))))))) (native-inputs (list python-pytest python-pytest-cov python-pytest-datadir @@ -2296,7 +2373,7 @@ exclude = python-recommonmark python-sphinx)) (inputs (list python-wrapper)) - (propagated-inputs (list python-numpy python-pandas python-pooch)) + (propagated-inputs (list python-numpy python-pandas python-scipy)) (home-page "https://fastlmm.github.io/") (synopsis "Read and write the PLINK BED format, simply and efficiently") (description @@ -2424,7 +2501,7 @@ to explore and analyze bulk RNA-seq data.") (define-public python-cell2cell (package (name "python-cell2cell") - (version "0.6.8") + (version "0.7.4") (source (origin (method git-fetch) (uri (git-reference @@ -2433,7 +2510,7 @@ to explore and analyze bulk RNA-seq data.") (file-name (git-file-name name version)) (sha256 (base32 - "1hwww0rcv8sc4k312n4d0jhbyix1jjqgv5djg25bw8127q5iym3s")) + "02cqc5rm0qkm0np1k7bim1w7f5qjnwf1jcm5albd9cpvfs4bwgdr")) (modules '((guix build utils))) (snippet '(begin @@ -2449,6 +2526,8 @@ to explore and analyze bulk RNA-seq data.") (("'statannotations',") "") ;; We provide version 1.0.4, which should be fine. (("'gseapy == 1.0.3'") "'gseapy'") + ;; We provide version 0.9.0, which should be fine. + (("'tensorly == 0.8.1'") "'tensorly'") ;; Using matplotlib 3.5.2 leads to this bug: ;; https://github.com/earmingol/cell2cell/issues/19 but we ;; can't package a different minor version of matplotlib @@ -2717,16 +2796,18 @@ parsing of Variant Call Format (VCF) files.") (define-public python-decoupler-py (package (name "python-decoupler-py") - (version "1.6.0") + ;; Upstream places release on a new branch, see + ;; <https://github.com/saezlab/decoupler-py/issues/175>. + (version "1.8.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/saezlab/decoupler-py") - (commit (string-append "v" version)))) + (commit version))) (file-name (git-file-name name version)) (sha256 (base32 - "1mqkp0i8k5hzhfnka4nc2f0phmrs0k404ynbl1lqfjzywx25y75h")))) + "0c3yg7jjb1nxb6hsh9wn7wr8w0ba55gixdbf5fp443nhv1cwlajj")))) (build-system pyproject-build-system) (arguments (list @@ -2742,6 +2823,11 @@ parsing of Variant Call Format (VCF) files.") " and not test_get_collectri")) #:phases '(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "pyproject.toml" + ;; numba = "^0.60.0"; all tests passed. + (("0.60.0") "0.61.0")))) (add-before 'check 'set-home ;; Some tests require a home directory to be set. (lambda _ (setenv "HOME" "/tmp"))) @@ -2763,7 +2849,7 @@ parsing of Variant Call Format (VCF) files.") python-skranger python-tqdm python-typing-extensions)) - (native-inputs (list python-pytest python-wheel)) + (native-inputs (list python-poetry-core python-pytest)) (home-page "https://github.com/saezlab/decoupler-py") (synopsis "Framework for modeling, analyzing and interpreting single-cell RNA-seq data") @@ -3243,6 +3329,8 @@ phylogenetic trees also goes by the name simulationmethods for phylogenetic trees, synthetic data generation, or just phylogenetic tree simulation.") (license license:expat))) +;; XXX: Probably unmaintained, build fails with Python 3.11, see +;; <https://github.com/cancerit/parabam/issues/10>. (define-public python-parabam (package (name "python-parabam") @@ -3302,19 +3390,29 @@ encountered in PDB files prior to simulation tasks.") (define-public python-peaks2utr (package (name "python-peaks2utr") - (version "1.2.0") + (version "1.4.1") (source (origin (method url-fetch) (uri (pypi-uri "peaks2utr" version)) (sha256 (base32 - "1idp9cgwqxvryf4qqrc1xjsamfqn3jmr56kmjp2h1ysmckwmhw4v")))) + "104il0kk61q07b58g9xrss7xflwlbx4kzsmw9iih99lhfsii0wzg")))) (build-system pyproject-build-system) (arguments (list #:test-flags - ;; These two tests fail because file names are not URLs. - '(list "-k" "not test_annotation.py"))) + ;; These tests fail because file names are not URLs. + '(list "-k" (string-join + (list "not test_forward_strand_annotations" + "test_matching_chr" + "test_reverse_strand_annotations") + " and not ")) + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "setup.cfg" + (("==") ">="))))))) (propagated-inputs (list python-asgiref python-gffutils @@ -3339,30 +3437,31 @@ three prime UTR.") (define-public python-pegasusio (package (name "python-pegasusio") - (version "0.7.1") + (version "0.9.1") (source (origin (method url-fetch) (uri (pypi-uri "pegasusio" version)) (sha256 (base32 - "0gqygspdy398vjymdy6756jmk99s7fhwav9rivdx59kpqjcdxaz9")))) + "1vxi6z7jlznp7sgzlbjsl1dzf1h7ypinllnls0lb2773a8vavg5x")))) (build-system pyproject-build-system) ;; There are no tests. (arguments (list #:tests? #false)) (propagated-inputs (list python-anndata + python-cython python-docopt python-h5py - python-importlib-metadata python-loompy python-natsort python-numpy python-pandas python-pillow python-scipy + python-setuptools python-zarr)) - (native-inputs (list python-cython python-setuptools-scm - python-setuptools python-wheel)) + (native-inputs (list python-cython python-setuptools python-setuptools-scm + python-wheel)) (home-page "https://github.com/lilab-bcb/pegasusio") (synopsis "Read or write single-cell genomics data") (description @@ -3641,6 +3740,49 @@ It emphasizes modularity and performance. The API will be immediately familiar to anyone with experience of scikit-learn or scipy.") (license license:asl2.0))) +(define bgen-sample-files + (let* ((name "bgen-sample-files") + (commit "7b1bc74f58b326ca19606fa5f3c6093d48367993") + (revision "0") + (version (git-version "0.0.0" revision commit))) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fastlmm/bgen-sample-files") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1b8jkscccyspfr3y1b66xvwnljcha08r2i24v9d6hcm5zii0l54w"))))) + +(define pynsptools-examples-files + (let* ((name "pysnptools-examples-files") + ;; taken from pysnptools/util/pysnptools.hashdown.json + (commit "ed14e050b2b75e7f4ddb73d512fbe928bbdb2b85") + (revision "0") + (version (git-version "0.0.0" revision commit))) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fastlmm/PySnpTools") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0hznpj15kx2sla16wlmcqz21n2vi2qb1493v30vz75hnm1m4iwm1")) + (modules '((guix build utils) + (ice-9 ftw))) + (snippet + #~(begin + ;; Delete everything except for examples directory: + (define (delete-except exceptions) + (lambda (file) + (unless (member file `("." ".." ,@exceptions)) + (delete-file-recursively file)))) + (for-each (delete-except '("pysnptools" "tests")) (scandir ".")) + (with-directory-excursion "pysnptools" + (for-each (delete-except '("examples")) (scandir "."))) + (with-directory-excursion "tests" + (for-each (delete-except '("datasets")) (scandir ".")))))))) + (define-public python-pysnptools (package (name "python-pysnptools") @@ -3650,12 +3792,39 @@ familiar to anyone with experience of scikit-learn or scipy.") (method url-fetch) (uri (pypi-uri "pysnptools" version)) (sha256 - (base32 - "1babnyky5fk93as1ybdvpz9x3x5099gkgscxflngzfswin23mspk")))) + (base32 "1babnyky5fk93as1ybdvpz9x3x5099gkgscxflngzfswin23mspk")))) (build-system pyproject-build-system) - ;; Tests require test data from python-bed-reader, which fetches data with - ;; python-pooch. - (arguments (list #:tests? #f)) + (arguments + (list + #:test-flags + #~(list + ;; These tests require the bgen feature and an additional input. + "--ignore" "pysnptools/distreader/bgen.py" + "--ignore" "pysnptools/distreader/test_bgen2.py" + "--ignore" "pysnptools/distreader/distreader.py" + "-k" "not pysnptools.distreader.distdata.DistData.val \ +and not pysnptools.distreader.disthdf5.DistHdf5.write \ +and not pysnptools.distreader.distmemmap.DistMemMap.write" + ;; These tests require network connection. + "--ignore" "pysnptools/util/_example_file.py" + "--ignore" "pysnptools/util/filecache/hashdown.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-data-path + (lambda _ + (substitute* "pysnptools/util/pysnptools.hashdown.json" + (("https://github\\.com/fastlmm/PySnpTools/\ +raw/ed14e050b2b75e7f4ddb73d512fbe928bbdb2b85") + (string-append "file://" #+pynsptools-examples-files))) + (substitute* "pysnptools/util/bgen.hashdown.json" + (("https://raw\\.githubusercontent\\.com\ +/fastlmm/bgen-sample-files/7b1bc74f58b326ca19606fa5f3c6093d48367993") + (string-append "file://" #+bgen-sample-files))))) + (add-after 'unpack 'loosen-requirements + (lambda _ + (substitute* "pyproject.toml" + (("(h5py|psutil|wheel)>=[0-9.]*" all target) + target))))))) (propagated-inputs (list python-bed-reader python-cloudpickle @@ -3903,7 +4072,7 @@ use-case, we encourage users to compose functions to achieve their goals.") (define-public python-biom-format (package (name "python-biom-format") - (version "2.1.12") + (version "2.1.16") (source (origin (method git-fetch) @@ -3915,7 +4084,7 @@ use-case, we encourage users to compose functions to achieve their goals.") (file-name (git-file-name name version)) (sha256 (base32 - "06x2d8fv80jp86kd66fm3ragmxrpa2j0lzsbm337ziqjnpsdwc0f")) + "1npxjsi7r0w8diq6s37q21cqgrqifl7f483lfn72bn7qrvkvbpyz")) (modules '((guix build utils))) ;; Delete generated C files. (snippet @@ -4214,21 +4383,30 @@ sequencing.") (define-public python-biopython (package (name "python-biopython") - (version "1.80") + (version "1.85") (source (origin (method url-fetch) ;; use PyPi rather than biopython.org to ease updating (uri (pypi-uri "biopython" version)) (sha256 (base32 - "0hqf3jsxn2sphcx81fx7x3i69sarpjsi70fzw98f8rw7z2d5x02j")))) + "19m03s5rwcyiq5cs1kq9dzj7qvmfvm76idgn967ygr4x0msapbsx")))) (build-system pyproject-build-system) (arguments '(#:phases (modify-phases %standard-phases (add-before 'check 'set-home ;; Some tests require a home directory to be set. - (lambda _ (setenv "HOME" "/tmp")))))) + (lambda _ (setenv "HOME" "/tmp"))) + (add-after 'unpack 'numpy-compatibility + (lambda _ + (substitute* "Bio/Cluster/__init__.py" + (("np.True_") "True")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "Tests" + (invoke "python3" "run_tests.py" "--offline")))))))) (propagated-inputs (list python-numpy)) (native-inputs (list python-setuptools python-wheel)) @@ -4253,7 +4431,87 @@ into separate processes; and more.") (uri (pypi-uri "biopython" version)) (sha256 (base32 - "1q55jhf76z3k6is3psis0ckbki7df26x7dikpcc3vhk1vhkwribh")))))) + "1q55jhf76z3k6is3psis0ckbki7df26x7dikpcc3vhk1vhkwribh")))) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'python3.11-compatibility + (lambda _ + ;; Py_TYPE was changed to an inline static function in Python + ;; 3.11, so it cannot be used on the left-hand side. + (substitute* "Bio/triemodule.c" + (("Py_TYPE\\(&Trie_Type\\) = &PyType_Type;") + "Py_SET_TYPE(&Trie_Type, &PyType_Type);")) + + ;; PY_SSIZE_T_CLEAN must be defined if s# notation is used. + ;; Note that this is no longer needed in Python 3.13. + (substitute* '("Bio/triemodule.c" "Bio/motifs/_pwm.c") + (("#include <Python.h>") + "#define PY_SSIZE_T_CLEAN\n#include <Python.h>") + (("int s;") "Py_ssize_t s;")) + + ;; The U mode is implicit in Python 3.11. + (substitute* '("Tests/test_KGML_nographics.py" + "Tests/test_PDB.py") + (("'rU'") "'r'")) + (substitute* "Bio/SCOP/Cla.py" + (("\"rU\"") "\"r\"")) + + ;; ExactPosition class needs to define __str__. + (substitute* "Bio/SeqFeature.py" + (("class UncertainPosition" m) + (string-append "\ + # Must define this on Python 3.8 onwards because we redefine __repr__ + def __str__(self): + return str(int(self)) + + def __add__(self, offset): + # By default preserve any subclass + return self.__class__(int(self) + offset) +" m))) + ;; This was removed in Python 3.9 already + (substitute* "Bio/KEGG/KGML/KGML_parser.py" + (("self.entry.getchildren\\(\\)") + "list(self.entry)") + (("element.getchildren\\(\\)") + "list(element)")) + (substitute* "Bio/Phylo/NeXMLIO.py" + (("node.getchildren\\(\\)") + "list(node)") + (("edge.getchildren\\(\\)") + "list(edge)")) + (substitute* "Bio/Entrez/Parser.py" + (("child.getiterator\\(\\)") + "list(child.iter())")) + (substitute* "Bio/SeqIO/UniprotIO.py" + (("alt_element.getiterator\\(NS \\+ ('.*')\\)" m something) + (string-append "list(alt_element.iter(NS + " something "))")) + (("link_element.getiterator\\(NS \\+ ('.*')\\)" m something) + (string-append "list(link_element.iter(NS + " something "))")) + (("loc_element.getiterator\\(NS \\+ ('.*')\\)" m something) + (string-append "list(loc_element.iter(NS + " something "))")) + (("element.getiterator\\(NS \\+ ('.*')\\)" m something) + (string-append "list(element.iter(NS + " something "))"))))) + (add-after 'unpack 'numpy-compatibility + (lambda _ + (substitute* '("Bio/Statistics/lowess.py" + "Tests/test_Cluster.py") + (("numpy.float32") "float") + (("numpy.float") "float")))) + (add-before 'check 'set-home + ;; Some tests require a home directory to be set. + (lambda _ (setenv "HOME" "/tmp"))) + (add-before 'check 'build-extensions + (lambda _ + ;; Cython extensions have to be built before running the tests. + (invoke "python3" "setup.py" "build_ext" "--inplace"))) + (add-after 'unpack 'patch-tests + (lambda _ + (substitute* "Tests/run_tests.py" + ;; Do not run doctests. + (("self.tests.append\\(\"doctest\"\\)") "") + (("opt == \"--offline\"") "True"))))))))) (define-public python-fastalite (package @@ -5266,16 +5524,16 @@ off-target reads for a capture method that targets CpG-rich region.") (define-public python-bx-python (package (name "python-bx-python") - (version "0.9.0") + (version "0.13.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/bxlab/bx-python") - (commit "4f4a48d3f227ae390c1b22072867ba86e347bdef"))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "1c914rw8phiw7zwzngz9i9hdciz5lq53drwdbpl2bd2sf5bj2biy")))) + "13318a3lydyg8fxawdb7anrny9a1j1sc1q4nd6pjg8ki5zr9r713")))) (build-system pyproject-build-system) (arguments (list @@ -5473,7 +5731,7 @@ subgroups.") (define-public python-pysam (package (name "python-pysam") - (version "0.20.0") + (version "0.23.0") (source (origin (method git-fetch) ;; Test data is missing on PyPi. @@ -5483,34 +5741,39 @@ subgroups.") (file-name (git-file-name name version)) (sha256 (base32 - "1dq6jwwm98lm30ijdgqc5xz5ppda4nj999y6qs78mhw8x0kij8gg")) + "0hk0ks6kqsm8252d0v1lw2d22x1awmxcr165nnhyacwbqh246skl")) (modules '((guix build utils))) (snippet '(begin ;; FIXME: Unbundle samtools and bcftools. (delete-file-recursively "htslib"))))) (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'build 'set-flags - (lambda* (#:key inputs #:allow-other-keys) - (setenv "HTSLIB_MODE" "external") - (setenv "HTSLIB_LIBRARY_DIR" - (string-append (assoc-ref inputs "htslib") "/lib")) - (setenv "HTSLIB_INCLUDE_DIR" - (string-append (assoc-ref inputs "htslib") "/include")) - (setenv "LDFLAGS" "-lncurses") - (setenv "CFLAGS" "-D_CURSES_LIB=1"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Step out of source dir so python does not import from CWD. - (with-directory-excursion "tests" - (setenv "HOME" "/tmp") - (invoke "make" "-C" "pysam_data") - (invoke "make" "-C" "cbcf_data") - ;; The FileHTTP test requires network access. - (invoke "pytest" "-k" "not FileHTTP")))))))) + (list + #:test-flags + ;; This test requires network access. + '(list "-k" "not FileHTTP" "tests") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-build-system + (lambda _ + (substitute* "pyproject.toml" + ((":__legacy__") "")))) + (add-before 'build 'set-flags + (lambda* (#:key inputs #:allow-other-keys) + (setenv "HTSLIB_MODE" "external") + (setenv "HTSLIB_LIBRARY_DIR" + (string-append (assoc-ref inputs "htslib") "/lib")) + (setenv "HTSLIB_INCLUDE_DIR" + (string-append (assoc-ref inputs "htslib") "/include")) + (setenv "LDFLAGS" "-lncurses") + (setenv "CFLAGS" "-D_CURSES_LIB=1"))) + (add-before 'check 'pre-check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "tests" + (setenv "HOME" "/tmp") + (invoke "make" "-C" "pysam_data") + (invoke "make" "-C" "cbcf_data")))))))) (propagated-inputs (list htslib)) ; Included from installed header files. (inputs @@ -5918,7 +6181,7 @@ time.") (list python-bx-python python-numpy python-pybigwig python-pysam zlib)) (native-inputs - (list python-cython python-nose)) + (list python-cython python-nose python-pyparsing)) (home-page "https://crossmap.sourceforge.net/") (synopsis "Convert genome coordinates between assemblies") (description @@ -6305,78 +6568,6 @@ gkm-SVM.") accessing bigWig files.") (license license:expat))) -(define-public python-pyfasta - ;; The release on pypi does not contain the test data files. - (let ((commit "c2f0611c5311f1b1466f2d56560447898b4a8b03") - (revision "1")) - (package - (name "python-pyfasta") - (version (git-version "0.5.2" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/brentp/pyfasta") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0a189id3fbv88gssyk6adbmz2ll1mqpmyw8vxmx3fi955gvaq9j7")))) - (build-system pyproject-build-system) - (arguments - (list - #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'python3.10-compat - (lambda _ - (substitute* "pyfasta/__init__.py" - (("from fasta import") - "from pyfasta.fasta import") - (("from records import") - "from pyfasta.records import") - (("from split_fasta import") - "from pyfasta.split_fasta import") - (("in f.iteritems") - "in f.items")) - (substitute* "pyfasta/fasta.py" - (("from collections import Mapping") - "from collections.abc import Mapping") - (("from records import") - "from pyfasta.records import")) - (substitute* "pyfasta/records.py" - (("cPickle") "pickle") - (("\\(int, long\\)") - "(int, int)") - ;; XXX: it's not clear if this is really correct. - (("buffer\\(self\\)") - "memoryview(bytes(str(self), encoding='utf-8'))") - (("sys.maxint") "sys.maxsize")) - (substitute* "pyfasta/split_fasta.py" - (("from cStringIO import") - "from io import") - (("in lens.iteritems") "in lens.items")) - (substitute* "tests/test_all.py" - (("f.keys\\(\\)\\) == \\['a-extra'") - "list(f.keys())) == ['a-extra'") - (("f.iterkeys\\(\\)") "iter(f.keys())") - (("tests/data/" m) - (string-append (getcwd) "/" m)))))))) - (propagated-inputs (list python-numpy)) - (native-inputs (list python-nose python-setuptools python-wheel)) - (home-page "https://github.com/brentp/pyfasta/") - (synopsis "Pythonic access to fasta sequence files") - (description - "This library provides fast, memory-efficient, pythonic (and -command-line) access to fasta sequence files. It stores a flattened version -of a fasta sequence file without spaces or headers and uses either a -@code{mmap} in numpy binary format or @code{fseek}/@code{fread} so the -sequence data is never read into memory. It saves a pickle (@code{.gdx}) of -the start and stop (for @code{fseek}/@code{mmap}) locations of each header in -the fasta file for internal use. - -Note that this package has been deprecated in favor of @code{pyfaidx}.") - (license license:expat)))) - (define-public python-schema-salad (package (name "python-schema-salad") @@ -9202,7 +9393,7 @@ performance.") (define-public htscodecs (package (name "htscodecs") - (version "1.6.0") + (version "1.6.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/samtools/htscodecs/" @@ -9210,7 +9401,7 @@ performance.") version "/htscodecs-" version ".tar.gz")) (sha256 (base32 - "1h0827g9svil9jnjbpdlxjbl44rai5b95m61hs9ifbqrz9nvnjjb")))) + "0n962938clim15d5mmggsm7ki2ycyjwqvjgddihjlpdsr5qv28aq")))) (build-system gnu-build-system) (inputs (list bzip2 zlib)) (home-page "https://github.com/samtools/htscodecs") @@ -9228,6 +9419,48 @@ name/ID compression and quality score compression derived from fqzcomp.") (define-public htslib (package (name "htslib") + (version "1.21") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/samtools/htslib/releases/download/" + version "/htslib-" version ".tar.bz2")) + (sha256 + (base32 + "08qq1yn6lqqnww532s11nr6gz0gfpn58rn3gy90kd5pl6pki1dc4")) + (snippet + #~(begin + (use-modules (guix build utils)) + (delete-file-recursively "htscodecs"))))) + (build-system gnu-build-system) + ;; Let htslib translate "gs://" and "s3://" to regular https links with + ;; "--enable-gcs" and "--enable-s3". For these options to work, we also + ;; need to set "--enable-libcurl". + (arguments + `(#:configure-flags '("--enable-gcs" + "--enable-libcurl" + "--enable-s3" + "--with-external-htscodecs"))) + (inputs + (list bzip2 curl openssl xz)) + ;; This is referred to in the pkg-config file as a required library. + (propagated-inputs + (list htscodecs zlib)) + (native-inputs + (list perl)) + (home-page "https://www.htslib.org") + (synopsis "C library for reading/writing high-throughput sequencing data") + (description + "HTSlib is a C library for reading/writing high-throughput sequencing +data. It also provides the @command{bgzip}, @command{htsfile}, and +@command{tabix} utilities.") + ;; Files under cram/ are released under the modified BSD license; + ;; the rest is released under the Expat license + (license (list license:expat license:bsd-3)))) + +(define-public htslib-1.19 + (package + (inherit htslib) (version "1.19") (source (origin (method url-fetch) @@ -9914,6 +10147,8 @@ sequences).") (with-directory-excursion (string-append "demo/" dir) (invoke "bash" script)))) tests)))))))) + (native-inputs + (list python-wheel)) (inputs (list python-numpy python-scipy @@ -10695,13 +10930,16 @@ BAM and Wiggle files in both transcript-coordinate and genomic-coordinate.") (sha256 (base32 "0gbb9iyb7swiv5455fm5rg98r7l6qn27v564yllqjd574hncpx6m")))) - (build-system python-build-system) + (build-system pyproject-build-system) (inputs - (list python-cython - python-bx-python + (list python-bx-python + python-cython + python-numpy python-pybigwig + python-pyparsing python-pysam - python-numpy + python-setuptools + python-wheel zlib)) (native-inputs (list python-nose)) @@ -11925,30 +12163,34 @@ bioinformatics file formats, sequence alignment, and more.") ("bzip2" ,bzip2))))) (define-public seqmagick - (package - (name "seqmagick") - (version "0.8.4") - (source - (origin - (method url-fetch) - (uri (pypi-uri "seqmagick" version)) - (sha256 - (base32 - "0c6skyig8fyylnbj4597pjj9h0dn36rkxrhwd34yrsc6k6f7r8a0")))) - (build-system pyproject-build-system) - (inputs - (list python-biopython python-pygtrie)) - (native-inputs - (list python-pytest python-setuptools python-wheel)) - (home-page "https://github.com/fhcrc/seqmagick") - (synopsis "Tools for converting and modifying sequence files") - (description - "Bioinformaticians often have to convert sequence files between formats + (let ((commit "dee6ab9839cff317142e55678bb12c4c9ab2150f") + (revision "0")) + (package + (name "seqmagick") + (version (git-version "0.8.6" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fhcrc/seqmagick") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0syipb7m44s5bqrhs17bwr28svy2s83j8d93kbazav92jzszzsw4")))) + (build-system pyproject-build-system) + (inputs + (list python-biopython python-pygtrie)) + (native-inputs + (list python-nose python-setuptools python-wheel)) + (home-page "https://github.com/fhcrc/seqmagick") + (synopsis "Tools for converting and modifying sequence files") + (description + "Bioinformaticians often have to convert sequence files between formats and do little manipulations on them, and it's not worth writing scripts for that. Seqmagick is a utility to expose the file format conversion in BioPython in a convenient way. Instead of having a big mess of scripts, there is one that takes arguments.") - (license license:gpl3))) + (license license:gpl3)))) (define-public seqtk (package @@ -12346,7 +12588,7 @@ Cuffdiff or Ballgown programs.") (define-public taxtastic (package (name "taxtastic") - (version "0.9.2") + (version "0.11.1") (source (origin ;; The Pypi version does not include tests. (method git-fetch) @@ -12356,42 +12598,47 @@ Cuffdiff or Ballgown programs.") (file-name (git-file-name name version)) (sha256 (base32 - "1k6wg9ych1j3srnhdny1y4470qlhfg730rb3rm3pq7l7gw62vmgb")))) - (build-system python-build-system) + "18h3vlyx9qp7xymd8ra6jn5h0vzlpzgcd75kslqyv2qcg1a7scc4")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'prepare-directory - (lambda _ - ;; This test fails, but the error is not caught by the test - ;; framework, so the tests fail... - (substitute* "tests/test_taxit.py" - (("self.cmd_fails\\(''\\)") - "self.cmd_fails('nothing')")) - ;; This version file is expected to be created with git describe. - (mkdir-p "taxtastic/data") - (with-output-to-file "taxtastic/data/ver" - (lambda () (display ,version))))) - (replace 'check - ;; Note, this fails to run with "-v" as it tries to write to a - ;; closed output stream. - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "-m" "unittest")))) - ;; This fails because it cannot find psycopg2 even though it is - ;; available. - (delete 'sanity-check)))) + (list + #:test-flags #~(list "-k" "not test_new_nodes02") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'prepare-directory + (lambda _ + ;; This package is unknown to pypi. + (substitute* '("requirements.txt" "setup.py") + ((".*psycopg-binary.*") "")) + ;; This test fails, but the error is not caught by the test + ;; framework, so the tests fail... + (substitute* "tests/test_taxit.py" + (("self.cmd_fails\\(''\\)") + "self.cmd_fails('nothing')")) + ;; This version file is expected to be created with git describe. + (mkdir-p "taxtastic/data") + (with-output-to-file "taxtastic/data/ver" + (lambda () (display #$version))))) + (replace 'check + ;; Note, this fails to run with "-v" as it tries to write to a + ;; closed output stream. + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (apply invoke "python" "-m" "unittest" test-flags))))))) + (native-inputs + (list python-setuptools python-wheel)) (propagated-inputs - (list python-sqlalchemy + (list python-biopython python-decorator - python-biopython - python-pandas - python-psycopg2 + python-dendropy python-fastalite - python-pyyaml - python-six python-jinja2 - python-dendropy)) + python-pandas + python-psycopg + python-psycopg2-binary + python-pyyaml + python-sqlalchemy-2 + python-sqlparse)) (home-page "https://github.com/fhcrc/taxtastic") (synopsis "Tools for taxonomic naming and annotation") (description @@ -14308,6 +14555,7 @@ Needleman-Wunsch).") (lambda _ (chdir "pairadise"))) (add-before 'build '2to3 (lambda _ (invoke "2to3" "--write" "--nobackups" ".")))))) + (native-inputs (list python-setuptools python-wheel)) (inputs (list star)) (propagated-inputs (list python-pysam)) (home-page "https://github.com/Xinglab/PAIRADISE") @@ -17156,31 +17404,21 @@ API services.") (define-public python-mgatk (package (name "python-mgatk") - (version "0.6.7") + (version "0.7.0") (source (origin - (method git-fetch) + (method git-fetch) ; no tests in PyPI archive (uri (git-reference (url "https://github.com/caleblareau/mgatk") - ;; There is no tag for 0.6.7, but this is the commit - ;; corresponding to the version bump. - (commit "2633903acb1fb406bb58c787f320c3641f446ee7"))) + ;; There is no tag for 0.7.0, but this is the commit + ;; corresponding to the version bump, see + ;; <https://github.com/caleblareau/mgatk/issues/101>. + (commit "8ffeac8476564049ef51b4d4d40eed452ae2fc38"))) (file-name (git-file-name name version)) (sha256 (base32 - "19iklfv1brwsfg1l5lrs3z8m343nskkn1998c1fs7fdn0lgrki2p")))) + "1qspzglj487bpyg8wpc29fjr8mj993q8w3jrdhylggiqpjx4l607")))) (build-system pyproject-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - ;; The md5 module has been removed in Python 3 - (add-after 'unpack 'python3-compatibility - (lambda _ - (substitute* "tests/test_cli.py" - (("import md5") "from hashlib import md5") - (("md5.new") "md5") - (("\\.digest") ".hexdigest"))))))) (propagated-inputs (list python-biopython python-click @@ -19548,6 +19786,8 @@ implementation differs in these ways: (add-after 'unpack 'patch-version-check (lambda _ (substitute* "src/scanpy/_utils/__init__.py" + (("Version\\(anndata_version\\) < Version\\(\"0.6.10\"\\):") + "False:") (("Version\\(anndata_version\\) >= Version\\(\"0.10.0\"\\):") "True:")))) (add-after 'unpack 'pretend-version @@ -20317,18 +20557,24 @@ pyGenomeTracks can make plots with or without Hi-C data.") (define-public python-iced (package (name "python-iced") - (version "0.5.8") + (version "0.5.13") (source (origin (method url-fetch) (uri (pypi-uri "iced" version)) (sha256 (base32 - "1avcjmpyyvhgbj5qca4l70ipiz7j3xmcw9p6rd9c06j99faa0r71")))) - (build-system python-build-system) - (arguments `(#:tests? #false)) ; there are none + "1fg6fxg6qhymr5d8drlvaclxgsfay2qcfsvpxkyy0r6cchscnpj5")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (propagated-inputs - (list python-numpy python-pandas python-scipy python-scikit-learn)) + (list python-numpy + python-pandas + python-scipy + python-scikit-learn)) (home-page "https://github.com/hiclib/iced") (synopsis "ICE normalization") (description "This is a package for normalizing Hi-C contact counts @@ -20961,7 +21207,7 @@ polymorphisms) and indels with respect to a reference genome and more.") (define-public cnvkit (package (name "cnvkit") - (version "0.9.10") + (version "0.9.12") (source (origin (method git-fetch) @@ -20970,7 +21216,7 @@ polymorphisms) and indels with respect to a reference genome and more.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0r303pqjg70zpxa564bavbfj99c6di0dafgqqwx2vh4vfsiif94q")))) + (base32 "090yh17symcahddx399kcx0mcw4gdrcc2jil3p8lb92r8c8kglb5")))) (build-system pyproject-build-system) (propagated-inputs (list python-biopython @@ -20987,7 +21233,7 @@ polymorphisms) and indels with respect to a reference genome and more.") ;; R packages r-dnacopy)) (inputs (list r-minimal)) ;for tests - (native-inputs (list python-setuptools python-wheel)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://cnvkit.readthedocs.org/") (synopsis "Copy number variant detection from targeted DNA sequencing") (description @@ -21426,24 +21672,28 @@ throughput chromatin profiles. Typical use cases include: (define-public umi-tools (package (name "umi-tools") - (version "1.0.0") + (version "1.1.6") (source (origin - (method url-fetch) - (uri (pypi-uri "umi_tools" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/CGATOxford/UMI-tools") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "08y3vz1vcx09whmbsn722lcs6jl9wyrh9i4p3k8j4cb1i32bij4a")))) - (build-system python-build-system) + (base32 "1liykfj4msvcgk8an5qq802jcxwlijqxrvijipqj1pwpxqzl9qnh")))) + (build-system pyproject-build-system) (inputs (list python-pandas python-future python-scipy python-matplotlib python-regex + python-pybktree + python-scipy python-pysam)) (native-inputs - (list python-cython)) + (list python-setuptools python-wheel)) (home-page "https://github.com/CGATOxford/UMI-tools") (synopsis "Tools for analyzing unique modular identifiers") (description "This package provides tools for dealing with @dfn{Unique @@ -22021,7 +22271,7 @@ effective when applied to the signal dataset.") (define-public python-ont-fast5-api (package (name "python-ont-fast5-api") - (version "4.0.0") + (version "4.1.3") (source (origin (method git-fetch) @@ -22031,7 +22281,7 @@ effective when applied to the signal dataset.") (file-name (git-file-name name version)) (sha256 (base32 - "01hj4751j424lzic2sc4bz1f8w7i7fpkjpy3rgghdyl5lyfyb4s4")) + "05zwjgdnzdrqfifhgw9rp4s22g8ysvjfhlaq9nb6p68q6mijy098")) (modules '((guix build utils))) (snippet '(delete-file-recursively "ont_fast5_api/vbz_plugin")))) @@ -23107,7 +23357,7 @@ alignments, trees and genomic annotations.") (define-public python-gffutils (package (name "python-gffutils") - (version "0.10.1") + (version "0.13") (source (origin (method git-fetch) @@ -23117,27 +23367,28 @@ alignments, trees and genomic annotations.") (file-name (git-file-name name version)) (sha256 (base32 - "1gkzk7ps6w3ai2r81js9s9bzpba0jmxychnd2da6n9ggdnf2xzqz")))) - (build-system python-build-system) + "148i7bk5bawrz19jp3nl0z859wdlldgrw8f0aw9wsprj8s3d713a")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Tests need to access the HOME directory - (setenv "HOME" "/tmp") - (invoke "nosetests" "-a" "!slow"))))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'set-HOME + (lambda _ + ;; FileNotFoundError: [Errno 2] No such file or directory: + ;; '/homeless-shelter/.gffutils.test' + (setenv "HOME" "/tmp")))))) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (propagated-inputs (list python-argcomplete python-argh python-biopython python-pybedtools python-pyfaidx - python-simplejson - python-six)) - (native-inputs - (list python-nose)) + python-simplejson)) (home-page "https://github.com/daler/gffutils") (synopsis "Tool for manipulation of GFF and GTF files") (description @@ -23843,51 +24094,33 @@ for the analysis and visualization of raw nanopore signal.") ;; Some parts may be BSD-3-licensed. (license license:mpl2.0))) -(define-public python-pyvcf - (let ((commit "476169cd457ba0caa6b998b301a4d91e975251d9") +;; This is a fork of the original unmaintained python-pyvcf. +(define-public python-pyvcf3 + (let ((commit "1fb3789153d1d8e28e2cedf121399f276b5f312a") (revision "0")) (package - (name "python-pyvcf") - (version (git-version "0.6.8" revision commit)) - ;; Use git, because the PyPI tarballs lack test data. + (name "python-pyvcf3") + (version (git-version "1.0.3" revision commit)) (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/jamescasbon/PyVCF.git") - ;; Latest release is not tagged. + (url "https://github.com/dridk/PyVCF3") (commit commit))) (file-name (git-file-name name version)) (sha256 - (base32 - "0qf9lwj7r2hjjp4bd4vc7nayrhblfm4qcqs4dbd43a6p4bj2jv5p")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-sample-script - (lambda _ - ;; Add Python 3 compatibility to this sample script. - (substitute* "scripts/vcf_sample_filter.py" - (("print (.*)\n" _ arg) - (string-append "print(" arg ")\n"))))) - (add-after 'install 'remove-installed-tests - ;; Do not install test files. - (lambda* (#:key inputs outputs #:allow-other-keys) - (delete-file-recursively (string-append - (site-packages inputs outputs) - "/vcf/test"))))))) - (native-inputs - ;; Older setuptools is needed for use_2to3. - (list python-cython python-setuptools-57)) - (propagated-inputs - (list python-pysam python-rpy2)) - (home-page "https://github.com/jamescasbon/PyVCF") + (base32 "0i4j5bq5q32q216ja7yvg0mpww5j0b9p8ky5bya4d31wqmygal8z")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-setuptools)) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/dridk/PyVCF3") (synopsis "Variant Call Format parser for Python") (description "This package provides a @acronym{VCF,Variant Call Format} parser for Python.") (license license:expat)))) +(define-deprecated/public-alias python-pyvcf python-pyvcf3) + (define-public nanosv (package (name "nanosv") @@ -23900,7 +24133,7 @@ parser for Python.") "1wl2daj0bwrl8fx5xi8j8hfs3mp3vg3qycy66538n032v1qkc6xg")))) (build-system python-build-system) (inputs - (list python-configparser python-pysam python-pyvcf)) + (list python-configparser python-pysam python-pyvcf3)) (home-page "https://github.com/mroosmalen/nanosv") (synopsis "Structural variation detection tool for Oxford Nanopore data") (description "NanoSV is a software package that can be used to identify @@ -24153,8 +24386,10 @@ aligner.") (arguments (list #:test-flags - ;; XXX: these two tests fail for unknown reasons - '(list "-k" "not test_perfect_fit and not test_perfect_fit_2d") + '(list "--pyargs" "scvelo/core" + ;; XXX: these two tests fail for unknown reasons + "-k" + "not test_perfect_fit and not test_perfect_fit_2d") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'matplotlib-compatibility @@ -24165,17 +24400,7 @@ aligner.") ;; Numba needs a writable dir to cache functions. (add-before 'check 'set-numba-cache-dir (lambda _ - (setenv "NUMBA_CACHE_DIR" "/tmp"))) - (replace 'check - (lambda* (#:key tests? test-flags #:allow-other-keys) - (when tests? - ;; The discovered test file names must match the names of the - ;; compiled files, so we cannot run the tests from - ;; /tmp/guix-build-*. - (with-directory-excursion - (string-append #$output - "/lib/python3.10/site-packages/scvelo/core/tests/") - (apply invoke "pytest" "-v" test-flags)))))))) + (setenv "NUMBA_CACHE_DIR" "/tmp")))))) (propagated-inputs (list python-anndata python-hnswlib @@ -24249,7 +24474,8 @@ populations.") (substitute* "setup.py" (("'sklearn',") ""))))))) (native-inputs - (list python-cython)) + (list python-cython + python-wheel)) (propagated-inputs (list python-scikit-learn python-scipy diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 6bf0b2ec67..415ddee3e0 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -70,6 +70,7 @@ #: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-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) @@ -79,6 +80,7 @@ #:use-module (gnu packages tls) #:use-module (gnu packages unicode) #:use-module (gnu packages version-control) + #:use-module (gnu packages xml) #:use-module (guix build-system gnu) #:use-module (guix build-system pyproject) #:use-module (guix build-system python)) @@ -436,7 +438,7 @@ other lower-level build files."))) (define-public scons (package (name "scons") - (version "4.4.0") + (version "4.5.0") (source (origin (method git-fetch) (uri (git-reference @@ -446,7 +448,7 @@ other lower-level build files."))) (patches (search-patches "scons-test-environment.patch")) (sha256 (base32 - "1czswx1fj2j48rspkrvarkr43k0vii9rsmz054c9yby1dq362fgr")))) + "1skz1kzhwsp54i71jrsg46rkxwicfici7pq6qmfhlqd5zhrg21zb")))) (build-system python-build-system) (arguments (list @@ -467,7 +469,9 @@ other lower-level build files."))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? - (invoke "python" "runtest.py" "--all" "--unit-only")))) + ;; remove these tests as they require a read/write filesystem + (delete-file "SCons/Variables/PathVariableTests.py") + (invoke "python" "runtest.py" "--all" "--unit-only" )))) (add-after 'install 'move-manuals (lambda _ ;; XXX: For some reason manuals get installed to the top-level @@ -483,7 +487,7 @@ other lower-level build files."))) stray-manuals)))))))) (native-inputs ;; TODO: Add 'fop' when available in Guix to generate manuals. - (list python-wheel + (list python-setuptools python-lxml python-wheel ;;For tests. python-psutil)) (home-page "https://scons.org/") diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index db820766eb..3580841047 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1027,40 +1027,43 @@ definition language, a safe runtime engine for test suites and a powerful report generation engine.") (license license:bsd-3))) -(define-public python-gixy - ;; The 0.1.20 release is missing some important fixes. - ;; XXX: Commit 'e9008dcbd11f43ccac109b0cf2bf98a94e76b449' breaks tests - ;; since it improperly removes an import. - (let ((commit "303eb6887ddecab18138b6e427b04ae77c41d2f1") - (revision "0") - (base-version "0.1.20")) - (package - (name "python-gixy") - (version (git-version base-version revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/yandex/gixy") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0gymjcnvjx9snyrzdbmjnk93ibb161q72xam29vnl3yyac4r1330")))) - (build-system pyproject-build-system) - (native-inputs (list python-nose python-setuptools python-wheel)) - (propagated-inputs - (list python-cached-property python-configargparse - python-jinja2 python-six - ;; XXX: gixy is incompatible with pyparsing >= 3.x. - ;; See <https://github.com/yandex/gixy/pull/132> and - ;; <https://github.com/yandex/gixy/pull/122>. - python-pyparsing-2.4.7)) - (home-page "https://github.com/yandex/gixy") - (synopsis "Static NGINX configuration analyzer") - (description "Gixy is a static analyzer whose main goal is to help +(define-public python-gixy-ng + (package + (name "python-gixy-ng") + (version "0.2.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dvershinin/gixy") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0dipvy8y1nlhpka0cdk6hyv1j2388y7isbajpwskjrgqc5vayqx8")))) + (build-system pyproject-build-system) + ;; This package currently doesn't test properly, but we can't add + ;; pytest because it propagates another version of python-pyparsing + ;; that takes precedence over the right one. + (propagated-inputs (list python-configargparse + python-jinja2 + python-pyparsing-2.4.7 + python-six)) + (native-inputs (list python-cached-property + python-setuptools + python-wheel)) + (home-page "https://github.com/dvershinin/gixy") + (synopsis "Static NGINX configuration analyzer") + (description "Gixy is a static analyzer whose main goal is to help prevent common NGINX misconfigurations. It provides the @command{gixy} -command.") - (license license:mpl2.0)))) +command. + +Note: This is an actively maintained fork of the original @code{python-gixy} +package.") + (license license:mpl2.0))) + +(define-deprecated/public python-gixy python-gixy-ng + (package/inherit python-gixy-ng + (name "python-gixy"))) (define-public googletest (package @@ -1413,24 +1416,32 @@ syntax validation, ... (define-public python-parameterized (package (name "python-parameterized") - (version "0.8.1") + (version "0.9.0") (source (origin (method url-fetch) (uri (pypi-uri "parameterized" version)) (sha256 - (base32 "0p1vhfw552rgd7gb2vy4l4l4k8mnbdz7f3chgzvk0r0qsqvzzfs1")))) - (build-system python-build-system) + (base32 "1c89vc40zj5aj2zvbvw875wqpyf0x6xrqhm3q5jg797g5hkhbjbz")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (invoke "nosetests" "-v") - (format #t "test suite not run~%")) - #t))))) + (list + #:test-flags #~(list "parameterized/test.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-tests + (lambda _ + (substitute* "parameterized/test.py" + ;; It's taken from NixOS package definition. + ;; <https://github.com/wolever/parameterized/issues/167>, + ;; <https://github.com/wolever/parameterized/pull/162>. + (("assert_equal\\(missing, \\[\\])") "") + (("assertRaisesRegexp") "assertRaisesRegex"))))))) (native-inputs - (list python-mock python-nose)) + (list python-pytest + python-mock + python-setuptools + python-wheel)) (home-page "https://github.com/wolever/parameterized") (synopsis "Parameterized testing with any Python test framework") (description @@ -1438,31 +1449,6 @@ syntax validation, ... for every Python test framework. It supports nose, py.test, and unittest.") (license license:bsd-2))) -(define-public python-parameterized-next - (package - (inherit python-parameterized) - (version "0.9.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "parameterized" version)) - (sha256 - (base32 "1c89vc40zj5aj2zvbvw875wqpyf0x6xrqhm3q5jg797g5hkhbjbz")))) - (build-system pyproject-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (substitute* "parameterized/test.py" - (("import mock") "from unittest import mock")) - (invoke "python3" "-m" "unittest"))))))) - (native-inputs - (list python-jinja2 - python-setuptools - python-wheel)))) - (define-public python-minimock (package (name "python-minimock") @@ -2004,35 +1990,29 @@ Python's @code{random.seed}.") (define-public python-pytest-runner (package (name "python-pytest-runner") - (version "6.0.0") + (version "6.0.1") (source (origin (method url-fetch) (uri (pypi-uri "pytest-runner" version)) (sha256 (base32 - "11dnhxnjmh4nf1j8rnvx944ha3wg8ggrgrwdcx4c7d19xmi57n5l")))) + "16zly218ij0n6fxzqsasia3vh9xkzl9w0cs9pwvqy057hnap7m3h")))) (build-system pyproject-build-system) (arguments (list ;; FIXME: The test suite requires 'python-pytest-virtualenv', ;; but that introduces a circular dependency. - #:tests? #f - #:phases - #~(modify-phases %standard-phases - (replace 'build - (lambda _ - (let ((circa-1980 (* 10 366 24 60 60))) - (setenv "SOURCE_DATE_EPOCH" (number->string circa-1980)) - (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) + #:tests? #f)) (native-inputs - (list python-pip python-pypa-build python-pytest - python-setuptools python-setuptools-scm python-wheel)) + (list python-pytest + python-pytest-checkdocs + python-pytest-enabler + ;; python-pytest-virtualenv + python-setuptools + python-setuptools-scm + python-types-setuptools + python-wheel)) (home-page "https://github.com/pytest-dev/pytest-runner") (synopsis "Invoke py.test as a distutils command") (description @@ -2825,13 +2805,13 @@ instantly.") (define-public python-crosshair (package (name "python-crosshair") - (version "0.0.76") + (version "0.0.84") (source (origin (method url-fetch) (uri (pypi-uri "crosshair-tool" version)) (sha256 - (base32 "1yvbhzs7r85gn4d7drl7p7vi1f5cga1xyy3mzxy3fglyf8kxyakh")))) + (base32 "1j6icn5f206yld9871p7a3v45jg8d8v4bhxh09lq3kzi09gr7maz")))) (build-system pyproject-build-system) (arguments (list @@ -2853,7 +2833,7 @@ instantly.") (("typing-inspect>=0.7.1") "typing-inspect>=0.6.0") ;; 'sanity-check fails for z3-solver, although it is ;; included in 'propagated-inputs. - (("z3-solver==4.13.0.0") "")))) + (("z3-solver>=4.13.0.0") "")))) (add-before 'check 'set-test-env (lambda _ (setenv "PYTHONHASHSEED" "0")))))) ;tests rely on this value @@ -2863,10 +2843,16 @@ instantly.") python-mypy python-numpy python-pytest - python-pytest-xdist)) + python-pytest-xdist + python-setuptools + python-wheel)) (propagated-inputs - (list python-typeshed-client + (list python-importlib-metadata + python-packaging + ;; python-pygls + python-typeshed-client python-typing-inspect + python-typing-extensions z3)) (home-page "https://crosshair.readthedocs.io") (synopsis "Analysis tool for Python using symbolic execution") @@ -3132,39 +3118,6 @@ produces a given output. As mypy can be told to display the type of an expression this allows you to check mypys type interference.") (license (list license:expat license:asl2.0)))) -(define-public python-pytest-pep8 - (package - (name "python-pytest-pep8") - (version "1.0.6") - (source (origin - (method url-fetch) - (uri (pypi-uri "pytest-pep8" version)) - (sha256 - (base32 - "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3")))) - (build-system python-build-system) - (arguments - `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12. - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-dependencies - (lambda _ - (substitute* "setup.py" - (("'pytest-cache', ") "")))) ; Included in recent pytest - (replace 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-v"))))))) - (native-inputs - (list python-pytest)) - (propagated-inputs - (list python-pep8)) - (home-page "https://bitbucket.org/pytest-dev/pytest-pep8") - (synopsis "Py.test plugin to check PEP8 requirements") - (description "Pytest plugin for checking PEP8 compliance.") - (license license:expat))) - (define-public python-pytest-perf (package (name "python-pytest-perf") @@ -3231,19 +3184,13 @@ each of the environments.") (sha256 (base32 "0959qfxb4ayvfxvmpargvh4zfhwdq5l77gczhzv33bhmfblk8ccm")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#: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) - (invoke "py.test" "-vv" "-k" "not test_syntax_error")))))) + (list + #:test-flags + '(list "-k" "not test_syntax_error"))) (native-inputs - (list python-coverage python-pytest python-pytest-pep8)) + (list python-coverage python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-pyflakes)) (home-page "https://github.com/fschulze/pytest-flakes") @@ -3485,7 +3432,6 @@ backported from Python 2.7 for Python 2.4+.") (build-system pyproject-build-system) (native-inputs (list python-mock - python-nose python-assertpy python-pathpy python-pyhamcrest @@ -3541,37 +3487,6 @@ tests written in a natural language style, backed up by Python code.") JSON APIs with Behave.") (license license:expat))) -(define-public python-rednose - (package - (name "python-rednose") - (version "1.2.3") - (source - (origin - (method url-fetch) - (uri (pypi-uri "rednose" version)) - (sha256 - (base32 - "11x5nx5b4wdq04s7vj1gcdl07jvvkfb37p0r5lg773gr5rr8mj6h")))) - (build-system python-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-setup.py - (lambda _ - ;; Six is only required for tests and later versions - ;; work fine. - (substitute* "setup.py" - (("six==1.10.0") "six")) - #t))))) - (propagated-inputs - (list python-colorama python-termstyle)) - (native-inputs - (list python-six python-nose)) - (home-page "https://github.com/JBKahn/rednose") - (synopsis "Colored output for Python nosetests") - (description "This package provides colored output for the -@command{nosetests} command of the Python Nose unit test framework.") - (license license:bsd-3))) - (define-public python-nose-exclude (package (name "python-nose-exclude") @@ -3632,30 +3547,6 @@ running your code against a large number of randomly generated input scenarios.") (license license:expat))) -(define-public python-nose-randomly - (package - (name "python-nose-randomly") - (version "1.2.6") - (source - (origin - (method url-fetch) - (uri (pypi-uri "nose-randomly" version)) - (sha256 - (base32 "0z662rqhfk4bjmg806mn4frb8nz4gbh7mrddsrhfffp1g4yklj3y")))) - (build-system python-build-system) - (native-inputs - (list python-nose python-numpy)) - (home-page "https://github.com/adamchainz/nose-randomly") - (synopsis - "Nose plugin to randomly order tests and control random.seed") - (description - "This is a @code{Nose} plugin to randomly order tests which can be quite -powerful in discovering hidden flaws in the tests themselves, while helping to -reduce inter-test dependencies. It also helps in controlling @code{random.seed}, -by resetting it to a repeatable number for each test, enabling the tests to -create data based on random numbers and yet remain repeatable.") - (license license:bsd-3))) - (define-public python-nose-timer (package (name "python-nose-timer") @@ -4398,23 +4289,25 @@ directories and files.") (define-public python-pytest-regressions (package (name "python-pytest-regressions") - (version "2.5.0") + (version "2.7.0") (source (origin (method url-fetch) - (uri (pypi-uri "pytest-regressions" version)) + (uri (pypi-uri "pytest_regressions" version)) (sha256 - (base32 "1nbg20m83jsj9p12fm4qn5b7hc3vqb5h5fzfi6zvmwygq627i341")))) + (base32 "0pph1935rq180ax0szwwf3c6zq2v40snypagr49914i31570cc2c")))) (build-system pyproject-build-system) + (arguments + (list + ;; Do not fail on warning. + ;; DeprecationWarning: module 'sre_constants' is deprecated + #:test-flags #~(list "-W" "ignore::DeprecationWarning"))) (native-inputs - (list python-matplotlib - python-numpy + (list python-numpy python-pandas - python-pillow - python-restructuredtext-lint + python-pytest python-setuptools - python-setuptools-scm - python-pytest)) + python-setuptools-scm)) (propagated-inputs (list python-pytest-datadir python-pyyaml)) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 7c4cf25641..dc819e334c 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl> ;;; Copyright © 2020, 2021 Nicolò Balzarotti <nicolo@nixo.xyz> ;;; Copyright © 2020 Roel Janssen <roel@gnu.org> -;;; Copyright © 2020, 2021, 2023, 2024 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2020, 2021, 2023, 2024, 2025 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2020, 2021, 2022, 2024 Vinicius Monego <monego@posteo.net> ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org> @@ -45,6 +45,7 @@ ;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com> ;;; Copyright © 2025 Sergio Pastor Pérez <sergio.pastorperez@gmail.com> ;;; Copyright © 2025 Ashish SHUKLA <ashish.is@lostca.se> +;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1549,7 +1550,7 @@ tools: ;; header (package (name "cpp-httplib") - (version "0.18.5") + (version "0.20.0") (source (origin (method git-fetch) @@ -1557,7 +1558,7 @@ tools: (url "https://github.com/yhirose/cpp-httplib") (commit (string-append "v" version)))) (sha256 - (base32 "1jc31n4xdrknal4i1dvf8j6j9kafpczi0w5gbbi89xlir9dgm5kp")) + (base32 "0w5klyfsaws793xb0cbkjxg7lwrdm6f3m4z4v7pzkwl957f9q70m")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments @@ -1606,7 +1607,7 @@ library.") (define-public cpplint (package (name "cpplint") - (version "1.5.5") + (version "2.0.0") (source (origin (method git-fetch) @@ -1616,7 +1617,7 @@ library.") (url "https://github.com/cpplint/cpplint") (commit version))) (sha256 - (base32 "13l86aq0h1jga949k79k9x3hw2xqchjc162sclg2f99vz98zcz15")) + (base32 "06km4wh4944az1hk61g5w8pjhbvbccpgarz1dy7vhwkhfvmvggnk")) (file-name (git-file-name name version)))) (build-system pyproject-build-system) (arguments @@ -1625,6 +1626,11 @@ library.") ,@%pyproject-build-system-modules) #:phases #~(modify-phases (@ (guix build pyproject-build-system) %standard-phases) + (add-after 'unpack 'patch-build-system + (lambda _ + (substitute* "pyproject.toml" + (("setuptools\\.build_meta:__legacy__") + "setuptools.build_meta")))) (add-before 'wrap 'reduce-GUIX_PYTHONPATH (lambda _ ;; Hide the transitive native inputs from GUIX_PYTHONPATH @@ -1651,9 +1657,11 @@ library.") (getenv "TMP_PYTHONPATH"))))))) (native-inputs (list python-coverage + python-parameterized python-pytest python-pytest-cov python-pytest-runner + python-pytest-timeout python-setuptools python-testfixtures python-wheel)) @@ -2614,6 +2622,40 @@ union, difference & exclusive-or, and line & polygon offsetting. The library is based on Vatti's clipping algorithm.") (license license:boost1.0))) +(define-public clipper2 + (package + (inherit clipper) + (name "clipper2") + (version "1.5.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AngusJohnson/Clipper2") + (commit (string-append "Clipper2_" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1w8cmx712k45cb8gh9dakmbmybiwdx8c0b45mwpcldywx2lwxi2j")) + (modules '((guix build utils))) + (snippet #~(for-each + delete-file-recursively + '("CSharp" "DLL" "Delphi"))))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list "-DUSE_EXTERNAL_GTEST=ON" + "-DCLIPPER2_EXAMPLES=OFF") + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "CPP")))))) + (native-inputs (list googletest)) + (home-page "https://github.com/AngusJohnson/Clipper2") + (description + (string-append (package-description clipper) "\ +Note: This package is a major update of the original clipper library.")))) + (define-public pcg-cpp (let ((commit "ffd522e7188bef30a00c74dc7eb9de5faff90092") (revision "2")) @@ -3754,6 +3796,26 @@ file name and location, as well as filters with friendly names (such as \"source files\" or \"image files\") where supported.") (license license:zlib))) +(define-public string-view-lite + (package + (name "string-view-lite") + (version "1.8.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/martinmoene/string-view-lite") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1mfp3lmqx7ac0545akxd2v05rrapa3byz8q4gb9rqy94pcqbfyc5")))) + (build-system cmake-build-system) + (home-page "https://github.com/martinmoene/string-view-lite") + (synopsis "C++17 string-view for older C++") + (description "This package provides a compatibility header-only library +for C++17 string-view.") + (license license:boost1.0))) + (define-public tsl-hopscotch-map (package (name "tsl-hopscotch-map") diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 886ae87b83..6c9f571326 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -47545,8 +47545,45 @@ without performing I/O.") ("rust-rustversion" ,rust-rustversion-1) ("rust-tempfile" ,rust-tempfile-3)))))) +(define-public rust-notify-7 + (package + (name "rust-notify") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "notify" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "02a0a1n0raxqslwhfprwmz7w34v54r42006q0m8bmy89jz1v8cy5")))) + (build-system cargo-build-system) + (arguments + (list + #:cargo-inputs (list rust-bitflags-2 + rust-crossbeam-channel-0.5 + rust-filetime-0.2 + rust-fsevent-sys-4 + rust-inotify-0.10 + rust-kqueue-1 + rust-libc-0.2 + rust-log-0.4 + rust-mio-1 + rust-notify-types-1 + rust-walkdir-2 + rust-windows-sys-0.52) + #:cargo-development-inputs (list rust-insta-1 + rust-nix-0.27 + rust-serde-json-1 + rust-tempfile-3))) + (home-page "https://github.com/notify-rs/notify") + (synopsis "Cross-platform filesystem notification library") + (description "This package contains a cross-platform filesystem +notification library.") + (license license:cc0))) + (define-public rust-notify-6 (package + (inherit rust-notify-7) (name "rust-notify") (version "6.1.1") (source @@ -47556,7 +47593,6 @@ without performing I/O.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0bad98r0ilkhhq2jg3zs11zcqasgbvxia8224wpasm74n65vs1b2")))) - (build-system cargo-build-system) (arguments `(#:cargo-inputs (("rust-bitflags" ,rust-bitflags-2) ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5) @@ -47572,12 +47608,7 @@ without performing I/O.") ("rust-windows-sys" ,rust-windows-sys-0.48)) #:cargo-development-inputs (("rust-nix" ,rust-nix-0.23) ("rust-serde-json" ,rust-serde-json-1) - ("rust-tempfile" ,rust-tempfile-3)))) - (home-page "https://github.com/notify-rs/notify") - (synopsis "Cross-platform filesystem notification library") - (description "This package contains a cross-platform filesystem -notification library.") - (license license:cc0))) + ("rust-tempfile" ,rust-tempfile-3)))))) (define-public rust-notify-5 (package @@ -47740,6 +47771,29 @@ client and server") Rust dbus client and server.") (license (list license:expat license:asl2.0)))) +(define-public rust-notify-types-1 + (package + (name "rust-notify-types") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "notify-types" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0x5idrpxzf70ng88rz28dqmgx1jyddf0vxx1x3csw09fw6skqpaq")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-instant" ,rust-instant-0.1) + ("rust-serde" ,rust-serde-1)) + #:cargo-development-inputs (("rust-insta" ,rust-insta-1) + ("rust-rstest" ,rust-rstest-0.21) + ("rust-serde-json" ,rust-serde-json-1)))) + (home-page "https://github.com/notify-rs/notify") + (synopsis "Types used by the notify crate") + (description "This package provides rust types used by the notify crate.") + (license (list license:expat license:asl2.0)))) + (define-public rust-notmuch-0.8 (package (name "rust-notmuch") diff --git a/gnu/packages/cybersecurity.scm b/gnu/packages/cybersecurity.scm index cb03cbd5aa..c66740b744 100644 --- a/gnu/packages/cybersecurity.scm +++ b/gnu/packages/cybersecurity.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2021 c4droid <c4droid@foxmail.com> ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name> +;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,9 +31,11 @@ #:use-module (gnu packages engineering) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages python-xyz) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-compression) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) #:use-module (gnu packages bioinformatics) ;python-intervaltree #:use-module (gnu packages emulators)) @@ -123,24 +126,26 @@ chains of gadgets to execute system calls.") (define-public pwntools (package (name "pwntools") - (version "4.4.0") + (version "4.15.0b1") (source (origin (method url-fetch) (uri (pypi-uri "pwntools" version)) (sha256 (base32 - "1qw7j0wwm1878aia08gyw5xljjr26qsbp45w65n4qff672sha5n5")))) + "091fsk9rvbjkcsp8mmww0ka26dvznmj4pbqwaiygcw90g3v94zgd")))) (build-system python-build-system) (arguments '(#:tests? #f)) ;XXX: needs a specific version of unicorn (propagated-inputs (list capstone + python-colored-traceback python-dateutil python-intervaltree python-mako python-packaging python-paramiko + python-pathlib2 python-psutil python-pyelftools python-pygments @@ -148,9 +153,14 @@ chains of gadgets to execute system calls.") python-pysocks python-requests ropgadget + python-rpyc python-six python-sortedcontainers + python-unix-ar + python-zstandard unicorn)) + (native-inputs + (list python-setuptools python-toml python-wheel)) (home-page "https://github.com/Gallopsled/pwntools") (synopsis "Capture-the-flag (CTF) framework and exploit development library") diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 32973d3896..cc4b39a1bd 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -3371,20 +3371,24 @@ coroutine-specific markup.") (define-public python-asyncpg (package (name "python-asyncpg") - (version "0.25.0") + (version "0.30.0") (source (origin (method url-fetch) (uri (pypi-uri "asyncpg" version)) (sha256 - (base32 "0h1573lp4607nppflnnjrhn7yrfy6i54cm98gi4qbcikjykfdy33")))) - (build-system python-build-system) - (propagated-inputs (list python-typing-extensions)) + (base32 "0lf8xbrsb2ycpqx1vzlb05p48g5sh9zq24a8yh17cw5nia9fjlf5")))) + (build-system pyproject-build-system) (native-inputs (list postgresql python-cython python-pytest - python-uvloop)) + python-uvloop + python-distro + python-setuptools + python-wheel)) + (propagated-inputs + (list python-async-timeout)) (home-page "https://github.com/MagicStack/asyncpg") (synopsis "Fast PostgreSQL database client library for Python") (description "@code{asyncpg} is a database interface library designed @@ -4574,7 +4578,11 @@ reasonable substitute.") "test_tfunction_load_delete" "test_tfunction_list" ;; AssertionError: assert 3 == 2 - "test_acl_list") + "test_acl_list" + ;; XXX: This test occasionally fails on i686-linux + #$@(if (target-x86-32?) + '("test_geopos") + '())) " and not ")) #:phases #~(modify-phases %standard-phases @@ -4608,7 +4616,7 @@ reasonable substitute.") (define-public python-rq (package (name "python-rq") - (version "1.11.1") + (version "2.3.1") (source (origin (method git-fetch) @@ -4617,24 +4625,20 @@ reasonable substitute.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0dnjm2s036l4j4ypq0h903vh132dp2wiwjrn8jicz1nw829dqpzf")))) - (build-system python-build-system) + (base32 "1w9aqvbvh1mfpgng0mdcskxl5y3ybcqqai5dnwgvg18am0xxhya6")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-before 'check 'start-redis - (lambda _ - (invoke "redis-server" "--daemonize" "yes"))) - (replace 'check - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; Drop test that needs the SDK for Sentry.io. - (delete-file "tests/test_sentry.py") - ;; Ensure 'rq' and 'rqworker' ends up on PATH. - (setenv "PATH" (string-append out "/bin:" - (getenv "PATH"))) - (invoke "pytest" "-vv"))))))) + (list + #:phases #~(modify-phases %standard-phases + (add-before 'check 'start-redis + (lambda _ + (invoke "redis-server" "--daemonize" "yes")))))) (native-inputs - (list python-mock python-psutil python-pytest redis)) + (list python-hatchling + python-mock + python-psutil + python-pytest + redis)) (propagated-inputs (list python-click python-redis)) (home-page "https://python-rq.org/") @@ -4648,7 +4652,7 @@ is designed to have a low barrier to entry.") (define-public python-rq-scheduler (package (name "python-rq-scheduler") - (version "0.10.0") + (version "0.14") (home-page "https://github.com/rq/rq-scheduler") (source (origin (method git-fetch) @@ -4658,21 +4662,30 @@ is designed to have a low barrier to entry.") (file-name (git-file-name name version)) (sha256 (base32 - "0xg6yazqs5kbr2ayvhvljs1h5vgx5k5dds613fmhswln7gglf9hk")))) - (build-system python-build-system) + "09fh9m2vcl1jndq35xp1x0j8ih009r71qmhn2pkl93fykrqfavyn")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-before 'check 'start-redis - (lambda _ - (invoke "redis-server" "--daemonize" "yes"))) - (replace 'check - (lambda _ - (substitute* "run_tests.py" - (("/usr/bin/env") - (which "env"))) - (invoke "./run_tests.py")))))) + (list + #:test-flags + #~(list "-k" (string-append "not test_cron" + " and not test_job_creation_with" + " and not test_job_with_crontab")) + #:phases #~(modify-phases %standard-phases + (add-before 'check 'start-redis + (lambda _ + (invoke "redis-server" "--daemonize" "yes"))) + (add-after 'unpack 'loosen-requirements + (lambda _ + (substitute* "setup.py" + (("crontab>=[0-9.]*") + "python-crontab"))))))) (native-inputs - (list redis which)) + (list python-crontab + python-freezegun + python-pytest + python-setuptools + python-wheel + redis)) (propagated-inputs (list python-croniter python-rq)) (synopsis "Job scheduling capabilities for RQ (Redis Queue)") @@ -4724,14 +4737,15 @@ provides support for parsing, splitting and formatting SQL statements.") (define-public python-sql (package (name "python-sql") - (version "1.3.0") + (version "1.5.2") (source (origin (method url-fetch) - (uri (pypi-uri "python-sql" version)) + (uri (pypi-uri "python_sql" version)) (sha256 - (base32 "0xnimfzlxj1ddrb5xj3s4gaii278a0gpxrvwmdmrdxgjfdi3lq4x")))) - (build-system python-build-system) + (base32 "0dnd0vai9z1fjkppv2xv2f4vlwwz0dqa137f39mrbjw744vm4pvk")))) + (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://python-sql.tryton.org/") (synopsis "Library to write SQL queries in a pythonic way") (description "@code{python-sql} is a library to write SQL queries, that @@ -5359,7 +5373,7 @@ other traditional Python scientific computing packages.") (define-public python-fastparquet (package (name "python-fastparquet") - (version "2024.2.0") + (version "2024.11.0") (source (origin ;; Fastparquet uses setuptools-scm to find the current version. This @@ -5372,7 +5386,7 @@ other traditional Python scientific computing packages.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0f32dj1xvd11l0siznqd33dpjlhg9siylcjcfkcdlqfcy45jfj3v")))) + (base32 "0dhmyag06d073g1q58npbcikr9hjd6jgf05721gkl6m1gsprv7hq")))) (build-system pyproject-build-system) (arguments (list @@ -5398,6 +5412,13 @@ other traditional Python scientific computing packages.") ;; Cython extensions need to be built for the check phase. (lambda _ (invoke "python" "setup.py" "build_ext" "--inplace")))))) + (native-inputs + (list python-cython + python-pytest + python-pytest-xdist + python-setuptools + python-setuptools-scm + python-wheel)) (propagated-inputs (list python-cramjam python-fsspec @@ -5405,11 +5426,6 @@ other traditional Python scientific computing packages.") python-numpy python-packaging python-pandas)) - (native-inputs - (list python-cython - python-pytest-runner - python-pytest-xdist - python-setuptools-scm)) (home-page "https://github.com/dask/fastparquet") (synopsis "Python implementation of the Parquet file format") (description diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 8175e0ad6c..f2e7552b9c 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -148,26 +148,10 @@ to the @dfn{don't repeat yourself} (DRY) principle.") ;; This CVE seems fixed since 4.2.1. (lint-hidden-cve . ("CVE-2023-31047")))))) -(define-public python-django-3.2 - (package - (inherit python-django-4.2) - (version "3.2.21") - (source (origin - (method url-fetch) - (uri (pypi-uri "Django" version)) - (sha256 - (base32 - "0g3zm2glh76g31q06g6fwkwvkrphjj3mnap5sgk1hx3v9r44rpm5")))) - (native-search-paths '()) ;no need for TZDIR - (propagated-inputs - (modify-inputs (package-propagated-inputs python-django-4.2) - ;; Django 4.0 deprecated pytz in favor of Pythons built-in zoneinfo. - (append python-pytz))))) - ;; archivebox requires django>=3.1.3,<3.2 (define-public python-django-3.1.14 (package - (inherit python-django-3.2) + (inherit python-django-4.2) (version "3.1.14") (source (origin (method url-fetch) @@ -176,7 +160,7 @@ to the @dfn{don't repeat yourself} (DRY) principle.") (base32 "0ix3v2wlnplv78zxjrlw8z3hiap2d5mxvk0ny2fc65526shsb93j")))) (propagated-inputs - (modify-inputs (package-propagated-inputs python-django-3.2) + (modify-inputs (package-propagated-inputs python-django-4.2) ;; Django 4.0 deprecated pytz in favor of Pythons built-in zoneinfo. (append python-pytz))))) @@ -1055,39 +1039,41 @@ support, and optional data-URI image and font embedding.") (define-public python-django-rq (package (name "python-django-rq") - (version "2.7.0") + (version "3.0.0") (source (origin (method url-fetch) (uri (pypi-uri "django-rq" version)) (sha256 (base32 - "0aw0fi0lg80qgdp9fhjbnlhvfh2p09rgy1nj6hxpyhi37kihni2h")))) + "1b371w4cdjlz83i2sg4gpx0z3svl3bfrn6zfy661374hv62xpnkv")))) (build-system pyproject-build-system) (arguments (list + #:test-flags + #~(list "-k" "not test_scheduled_jobs and not test_started_jobs") #:phases - '(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "redis-server" "--daemonize" "yes") - (invoke "django-admin" "test" "django_rq" - "--settings=django_rq.tests.settings" - "--pythonpath=."))))))) + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "redis-server" "--daemonize" "yes") + (setenv "DJANGO_SETTINGS_MODULE" "django_rq.tests.settings") + (setenv "PYTHONPATH" (getcwd)))))))) (native-inputs (list python-django-redis - python-mock + python-pytest + python-pytest-django python-rq-scheduler python-setuptools python-wheel redis tzdata-for-tests)) (propagated-inputs - (list python-django python-rq)) + (list python-django python-redis python-rq python-pyaml)) (home-page "https://github.com/ui/django-rq") (synopsis "Django integration with RQ") (description - "Django integration with RQ, a Redis based Python queuing library. + "Django integration with RQ, a Redis based Python queuing library. Django-RQ is a simple app that allows you to configure your queues in django's settings.py and easily use them in your project.") (license license:expat))) diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index 21f6df2dcc..fccdc6420c 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -41,6 +41,7 @@ #:use-module (guix build-system copy) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (guix build-system qt) #:use-module (guix deprecation) #:use-module (guix utils) @@ -51,6 +52,7 @@ #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-xyz) #:use-module (gnu packages bison) #:use-module (gnu packages kde-frameworks) @@ -315,6 +317,8 @@ format, and supports the file types JPG, GIF, TIFF, PNG, and PNM for embedded objects.") (license license:artistic2.0))) +;; XXX: This project looks not maintained, and some tests fail to pass, see +;; <https://github.com/spyder-ide/docrepr/issues/49>. (define-public python-docrepr (package (name "python-docrepr") @@ -329,9 +333,10 @@ objects.") (base32 "1ma5gwy93m1djd3zdlnqfrwhgr8ic1qbsz5kkrb9f987ax40lfkd")) (patches (search-patches "python-docrepr-fix-tests.patch")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list + #:tests? #f ; all tests fail #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-sources @@ -344,17 +349,13 @@ objects.") ;; https://github.com/spyder-ide/docrepr/issues/54). (substitute* "docrepr/utils.py" (("except TypeError") - "except (TypeError, shutil.Error)")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-p" "no:warnings" "-vv"))))))) + "except (TypeError, shutil.Error)"))))))) (native-inputs (list python-ipython python-matplotlib python-numpy - python-pytest - python-pytest-asyncio)) + python-setuptools + python-wheel)) (propagated-inputs (list python-docutils python-jinja2 diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index 8200f13554..3d1237a490 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -249,7 +249,7 @@ tags = [\"WS_X11\"]") (string-append "[tool.sip.project] sip-include-dirs = [\"" #$(this-package-input "python-pyqt") - "/lib/python3.10/site-packages/PyQt5/bindings\"]"))) + "/lib/python3.11/site-packages/PyQt5/bindings\"]"))) (substitute* "src/calibre/ebooks/pdf/pdftohtml.py" (("PDFTOHTML = 'pdftohtml'") (string-append "PDFTOHTML = \"" diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index f37b0e3844..f472d1127f 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -3138,7 +3138,9 @@ Microwave engineering.") python-scipy python-sympy python-wheel)) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/mph-/lcapy") (synopsis "Symbolic linear circuit analysis") (description "Lcapy is a Python package for linear circuit analysis. It @@ -5188,22 +5190,23 @@ more.") (package (name "python-asyncua") (version "1.1.5") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/FreeOpcUa/opcua-asyncio.git") - (commit (string-append "v" version)) - (recursive? #t))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0aisj8cpfhq50h4pv2p0c9iw5cqy3hxhn5adp8wd01c46dhg6y2x")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/FreeOpcUa/opcua-asyncio.git") + (commit (string-append "v" version)) + ;; XXX: It clones <https://github.com/OPCFoundation/UA-Nodeset> + ;; submodule, check if it may be unbundled. + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0aisj8cpfhq50h4pv2p0c9iw5cqy3hxhn5adp8wd01c46dhg6y2x")))) (build-system pyproject-build-system) (native-inputs - (list python-asynctest + (list python-pytest python-pytest-asyncio-0.21 python-pytest-mock - python-pytest-runner python-setuptools python-wheel)) (propagated-inputs @@ -5342,7 +5345,7 @@ and mogan.") (("'\" [+] python_path [+]") (string-append "'\" + std::string(\"" (assoc-ref outputs "out") - "/lib/python3.10/site-packages" + "/lib/python3.11/site-packages" "\") +"))))) (add-before 'check 'prepare-checks (lambda _ diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index 44df7aaad2..b7ebf61beb 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -2035,33 +2035,6 @@ compatible directories.") (home-page "https://github.com/trapexit/mergerfs-tools") (license license:isc)))) -(define-public python-dropbox - (package - (name "python-dropbox") - (version "12.0.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "dropbox" version)) - (sha256 - (base32 "0qlrc2ykl7zmv808apqv5ycfzrwnm13ngz1daizh9kszmpapy1ah")) - (snippet - '(begin - (use-modules (guix build utils)) - (substitute* "setup.py" - (("pytest-runner==5\\.2\\.0") "pytest-runner")))))) - (build-system python-build-system) - (arguments '(#:tests? #f)) ; Tests not included in the release tarball. - (native-inputs - (list python-pytest python-pytest-runner)) - (propagated-inputs - (list python-requests python-six python-stone)) - (home-page "https://www.dropbox.com/developers") - (synopsis "Official Dropbox API Client") - (description "This package provides a Python SDK for integrating with the -Dropbox API v2.") - (license license:expat))) - (define-public dbxfs (package (name "dbxfs") diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 8a231cef33..33dbefe2b9 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -1039,15 +1039,23 @@ of Bitcoin BIP-0039.") (package (name "python-u2flib-host") (version "3.0.3") - (source (origin - (method url-fetch) - (uri (pypi-uri "python-u2flib-host" version)) - (sha256 - (base32 - "02pwafd5kyjpc310ys0pgnd0adff1laz18naxxwsfrllqafqnrxb")))) - (build-system python-build-system) + (source + (origin + (method url-fetch) + (uri (pypi-uri "python-u2flib-host" version)) + (sha256 + (base32 "02pwafd5kyjpc310ys0pgnd0adff1laz18naxxwsfrllqafqnrxb")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list + "--deselect=test/test_soft.py::TestSoftU2FDevice::test_registeration" + "--deselect=test/test_reg_auth.py::TestRegister::test_register" "-k" + "not test_forget"))) (propagated-inputs (list python-hidapi python-requests)) - (native-inputs (list python-cryptography)) + (native-inputs (list python-cryptography python-pytest python-setuptools + python-wheel)) (home-page "https://github.com/Yubico/python-u2flib-host") (synopsis "Python based U2F host library") (description @@ -1059,32 +1067,36 @@ of Bitcoin BIP-0039.") (name "python-ledgerblue") (version "0.1.54") (source - (origin - (method url-fetch) - (uri (pypi-uri "ledgerblue" version)) - (sha256 - (base32 - "0ghpvxgih1zarp788qi1xh5xmprv6yhaxglfbix4974i7r4pszqy")))) + (origin + (method url-fetch) + (uri (pypi-uri "ledgerblue" version)) + (sha256 + (base32 "0ghpvxgih1zarp788qi1xh5xmprv6yhaxglfbix4974i7r4pszqy")))) (build-system pyproject-build-system) (arguments - `(#:tests? #f)) ; no tests - (native-inputs - (list python-setuptools python-wheel)) - (propagated-inputs - (list python-bleak - python-pyelftools - python-pycryptodome - python-ecpy - python-future - python-gnupg - python-hidapi - python-nfcpy - python-pillow - python-protobuf - python-pycryptodomex - python-pyscard - python-u2flib-host - python-websocket-client)) + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'pretend-version + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" + #$version)))))) + (native-inputs (list python-setuptools python-setuptools-scm python-wheel)) + (propagated-inputs (list python-bleak + python-pyelftools + python-pycryptodome + python-ecpy + python-future + python-gnupg + python-hidapi + python-nfcpy + python-pillow + python-protobuf + python-pycryptodomex + python-pyscard + python-u2flib-host + python-websocket-client)) (home-page "https://github.com/LedgerHQ/blue-loader-python") (synopsis "Python library to communicate with Ledger Blue/Nano S") (description "@code{ledgerblue} is a Python library to communicate with @@ -1216,9 +1228,11 @@ the KeepKey Hardware Wallet.") (sha256 (base32 "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92")))) - (build-system python-build-system) + (build-system pyproject-build-system) (inputs (list python-ledgerblue python-trezor-agent)) + (native-inputs + (list python-setuptools python-wheel)) (home-page "https://github.com/romanz/trezor-agent") (synopsis "Ledger as hardware SSH/GPG agent") (description "This package allows using Ledger as hardware SSH/GPG agent.") @@ -1414,42 +1428,22 @@ Luhn and family of ISO/IEC 7064 check digit algorithms.") (define-public python-duniterpy (package (name "python-duniterpy") - (version "1.1.1") + (version "1.2.1") (source (origin - (method url-fetch) - (uri (pypi-uri "duniterpy" version)) + (method git-fetch) + (uri (git-reference + (url "https://git.duniter.org/clients/python/duniterpy") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0h0fsawsrjd50lb1bkysb21ph39qlhmiymd3r5vs695qxvbwaqaa")))) + (base32 "1ysh9b5lzg053hv4iw3zbn7hid05qssiwmrl8sir8qlk958r8x60")))) (build-system pyproject-build-system) - (arguments - ;; FIXME: Tests fail with: "TypeError: block_uid() missing 1 required - ;; positional argument: 'value'". - `(#:tests? #f - #:phases (modify-phases %standard-phases - (add-after 'unpack 'loosen-requirements - (lambda _ - (substitute* "pyproject.toml" - (("mnemonic = \"\\^0\\.19") - "mnemonic = \">=0.19") - (("jsonschema = \"\\^3\\.2") - "jsonschema = \">=3.2")))) - (add-after 'unpack 'adjust-for-new-libnacl - (lambda _ - ;; Mimic upstream commit ad8f6a26e9e7067; remove - ;; for newer versions of duniterpy. - (substitute* "pyproject.toml" - (("libnacl = \"1\\.8") - "libnacl = \">=1.9")) - (substitute* "duniterpy/key/ascii_armor.py" - (("from libnacl\\.version import version as libnacl_version") - "import importlib.metadata -libnacl_version = importlib.metadata.version('libnacl')"))))))) (native-inputs - (list python-poetry-core)) + (list python-poetry-core-next + python-pytest)) (propagated-inputs - (list python-attrs - python-base58 + (list python-base58 python-graphql-core python-jsonschema python-libnacl diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 7d101bebff..3beebf1a75 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -505,14 +505,19 @@ subroutinizer for fontTools.") (uri (pypi-uri "cu2qu" version ".zip")) (sha256 (base32 "1x762r7bf39g6aivfvrmq00h6f07abvs9x1xm0fz8l81vq8jz64c")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments + ;; XXX: Try to remove it when updating python-fonttools. + (list #:test-flags #~(list "-k" "not test_ignore_single_points"))) (propagated-inputs (list python-fonttools)) (native-inputs (list python-cython python-defcon python-pytest python-pytest-runner + python-setuptools python-setuptools-scm + python-wheel unzip)) (home-page "https://github.com/googlefonts/cu2qu") (synopsis "Cubic-to-quadratic bezier curve conversion") diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index d0c37d0ba0..de8fb975bc 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -68,6 +68,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system meson) #:use-module (guix build-system perl) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system qt) @@ -128,6 +129,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages polkit) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) @@ -789,7 +791,7 @@ other applications that need to directly deal with input devices.") (define-public libei (package (name "libei") - (version "1.3.0") + (version "1.4.0") (source (origin (method git-fetch) (uri (git-reference @@ -797,7 +799,7 @@ other applications that need to directly deal with input devices.") (commit version))) (sha256 (base32 - "0idbl20ax060s7m435rszfv7c0bvpinjvq45qbqwvcvp0hg8r9y8")) + "04ll43616pyfm7c835azdggx9x3vfykpcg3pzmsfz4f2vl5whalm")) (snippet #~(begin (use-modules (guix build utils)) @@ -819,17 +821,18 @@ other applications that need to directly deal with input devices.") ;; liboeffis-1.0.pc requires.private libelogind (list elogind)) (native-inputs - (list doxygen + (list dbus + doxygen libxml2 munit pkg-config python python-attrs - python-black python-dbusmock python-jinja2 python-pytest python-structlog + python-pyaml valgrind/interactive)) (home-page "https://libinput.pages.freedesktop.org/libei/") (synopsis "Emulated Input protocol implementation") @@ -2872,17 +2875,19 @@ encoding names are iconv-compatible.") (define-public python-cchardet (package (name "python-cchardet") - (version "2.1.7") + (version "2.2.0a2") (source (origin (method url-fetch) (uri (pypi-uri "cchardet" version)) (sha256 (base32 - "1bqfz85cd51sw0bvhvdq9ikccxi2ld7g5jpni4jkq1a5clrvca64")))) - (build-system python-build-system) + "08wq5yfaafbjipabfc6kpyvivkk2394w7isv0mwx5agcf8cbnwnx")))) + (build-system pyproject-build-system) (inputs (list uchardet)) + (native-inputs + (list python-setuptools python-wheel)) (home-page "https://github.com/PyYoshi/cChardet") (synopsis "High-performance character encoding detection for Python") (description "cChardet is a character encoding detector, written in diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm index 8e2ffb49cb..d2483468ab 100644 --- a/gnu/packages/gnome-xyz.scm +++ b/gnu/packages/gnome-xyz.scm @@ -67,10 +67,10 @@ #:use-module (gnu packages ibus) #:use-module (gnu packages inkscape) #:use-module (gnu packages image) + #:use-module (gnu packages maths) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages python-science) #:use-module (gnu packages python-xyz) #:use-module (gnu packages ssh) #:use-module (gnu packages tls) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index d9ecfea832..c6f5fde00f 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -7479,60 +7479,6 @@ almost all of them.") principles are simplicity and standards compliance.") (license license:gpl2+))) -(define-public d-feet - (package - (name "d-feet") - (version "0.3.16") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "1jqw5ndpgyb0zxh0g21ai1911lfrm56vz18xbccfqm4sk95wwcw7")) - (patches - (search-patches "d-feet-drop-unused-meson-argument.patch")))) - (build-system meson-build-system) - (arguments - (list - #:glib-or-gtk? #t - #:phases - #~(modify-phases %standard-phases - (add-before 'check 'pre-check - (lambda _ - ;; The test suite requires a running X server. - (system "Xvfb :1 &") - (setenv "DISPLAY" ":1"))) - (add-before 'install 'disable-gtk-update-icon-cache - (lambda _ - (setenv "DESTDIR" "/"))) - (add-after 'install 'wrap-program - (lambda* (#:key outputs #:allow-other-keys) - (wrap-program (search-input-file outputs "bin/d-feet") - `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))) - `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))) - (native-inputs - (list `(,glib "bin") - intltool - itstool - libxml2 - pkg-config - python-pep8 - xorg-server-for-tests)) - (inputs - (list bash-minimal - gobject-introspection - gtk+ - python-wrapper - python-pygobject)) - (home-page "https://wiki.gnome.org/Apps/DFeet") - (synopsis "D-Bus debugger") - (description - "D-Feet is a D-Bus debugger, which can be used to inspect D-Bus interfaces -of running programs and invoke methods on those interfaces.") - (license license:gpl2+))) - (define-public d-spy (package (name "d-spy") @@ -7574,6 +7520,9 @@ programs via D-Bus. It also ships a library for integration into development environments.") (license license:gpl2+))) +(define-public d-feet + (deprecated-package "d-feet" d-spy)) + (define-public yelp-xsl (package (name "yelp-xsl") diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 08f32f1285..486af36202 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2014, 2015, 2016, 2020 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> ;;; Copyright © 2015-2021, 2024 Efraim Flashner <efraim@flashner.co.il> -;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2015, 2016, 2017, 2019, 2025 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org> ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net> @@ -585,10 +585,17 @@ interface (FFI) of Guile.") "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il")))) (build-system python-build-system) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases (add-before 'build 'set-environment (lambda _ + ;; GPGME is built with large file support, so we need to set + ;; _FILE_OFFSET_BITS to 64 in all users of the GPGME library. + ,@(if (or (target-x86-32?) (target-arm32?)) + `((substitute* "setup.py" + (("extra_macros = dict\\(\\)") + "extra_macros = { \"_FILE_OFFSET_BITS\": 64 }"))) + '()) (substitute* "setup.py" (("cc") (which "gcc"))) #t))) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 78d6151ceb..8ee6d6dfaf 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2017, 2023 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2017, 2018 Nikita <nikita@n0.is> ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2018, 2020 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2018, 2020, 2025 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com> ;;; Copyright © 2020, 2024 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> @@ -142,6 +142,14 @@ "--with-intl-api") #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'python-3.11-compatibility + (lambda _ + (substitute* '("python/mozbuild/mozpack/files.py" + "python/mozbuild/mozbuild/util.py" + "python/mozbuild/mozbuild/action/process_define_files.py" + "python/mozbuild/mozbuild/backend/base.py" + "python/mozbuild/mozbuild/preprocessor.py") + (("\"rU\"") "\"r\"")))) (add-after 'patch-source-shebangs 'patch-cargo-checksums (lambda _ (let ((null-hash @@ -278,6 +286,15 @@ in C/C++.") (substitute-keyword-arguments (package-arguments mozjs) ((#:phases phases) #~(modify-phases #$phases + (add-after 'unpack 'python-3.11-compatibility + (lambda _ + (substitute* '("python/mozbuild/mozpack/files.py" + "python/mozbuild/mozbuild/util.py" + "python/mozbuild/mozbuild/action/process_define_files.py" + "python/mozbuild/mozbuild/backend/base.py" + "python/mozbuild/mozbuild/preprocessor.py" + "python/mozbuild/mozbuild/virtualenv.py") + (("'rU'") "'r'")))) (add-after 'unpack 'patch-for-python-3.10 (lambda _ ;; Some classes were moved from collections to collections.abc @@ -1650,7 +1667,7 @@ their corresponding VERSION, SOURCE and LOCALES variables." (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE" "system") (setenv "GUIX_PYTHONPATH" (string-append (getcwd) - "/obj/_virtualenvs/build/lib/python3.10/site-packages")) + "/obj/_virtualenvs/build/lib/python3.11/site-packages")) (setenv "BUILD_BACKENDS" "FasterMake,RecursiveMake"))) (replace 'build ;build and install data files (lambda* (#:key outputs #:allow-other-keys) diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm index 467a7f661b..9cca8520ba 100644 --- a/gnu/packages/graph.scm +++ b/gnu/packages/graph.scm @@ -389,9 +389,9 @@ subplots, multiple-axes, polar charts, and bubble charts.") (patches (search-patches "python-louvain-fix-test.patch")) (sha256 (base32 "0sx53l555rwq0z7if8agirjgw4ddp8r9b949wwz8vlig03sjvfmp")))) - (build-system python-build-system) + (build-system pyproject-build-system) (native-inputs - (list python-setuptools-57)) ;for use_2to3 support + (list python-setuptools python-wheel)) (propagated-inputs (list python-networkx python-numpy)) (home-page "https://github.com/taynaud/python-louvain") diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm index 6d7f8370dd..cb6d7d82fe 100644 --- a/gnu/packages/graphviz.scm +++ b/gnu/packages/graphviz.scm @@ -209,7 +209,7 @@ structure and layout algorithms.") (define-public python-uqbar (package (name "python-uqbar") - (version "0.6.9") + (version "0.7.2") (source (origin (method git-fetch) @@ -218,27 +218,23 @@ structure and layout algorithms.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "037qj3rymm6xzdpklddfhmfp2p1bq9fi3jrvxj6gmharphd5z869")))) + (base32 "1limp2m2smg0l3v6vn2fwhjcw1d8gakw5v0q7krb03q539qiql87")))) (build-system pyproject-build-system) - (arguments ; XXX: Disable failing tests. - (list #:test-flags '(list "tests" "-k" "not test_find_executable \ -and not test_sphinx_book_text_broken_strict"))) + (arguments + (list + #:test-flags #~(list "--pyargs" "uqbar"))) (native-inputs (list graphviz - python-flake8 - python-isort - python-mypy + python-defusedxml python-pytest python-pytest-cov python-setuptools + python-typing-extensions python-wheel)) (propagated-inputs - (list python-black python-sphinx-5 python-unidecode - (package/inherit python-sphinx-rtd-theme - (propagated-inputs - (modify-inputs - (package-propagated-inputs python-sphinx-rtd-theme) - (replace "python-sphinx" python-sphinx-5)))))) + (list python-black + python-sphinx + python-unidecode)) (home-page "https://github.com/josiah-wolf-oberholtzer/uqbar") (synopsis "Tools for building documentation with Sphinx, Graphviz and LaTeX") (description diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm index 03efb66680..5a3e6f69ef 100644 --- a/gnu/packages/image-processing.scm +++ b/gnu/packages/image-processing.scm @@ -1812,63 +1812,55 @@ processing pipelines.") (define-public labelme (package (name "labelme") - (version "4.5.13") + ;; It's the latest available version which does not require not packaged + ;; <https://github.com/wkentaro/osam>. + (version "5.2.1") (source (origin ;; PyPi tarball lacks tests. (method git-fetch) (uri (git-reference - (url "https://github.com/wkentaro/labelme.git") + (url "https://github.com/wkentaro/labelme") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0cmi2xb4dgh7738l259rgwhn9l134f0vnaaqc2gflc5yr3lqhrv2")))) - (build-system python-build-system) + (base32 "1xpyad6rlkxyx51jaai4xhdy15k1gvm62xnkjn152hc1vj1c77sr")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'loosen-requirements - (lambda _ - ;; Don't require an outdated version of matplotlib. - (substitute* "setup.py" - (("matplotlib<3\\.3") - "matplotlib")))) - (add-before 'check 'start-xserver - (lambda* (#:key inputs #:allow-other-keys) - (let ((xorg-server (assoc-ref inputs "xorg-server"))) - ;; Options taken from CI workflow. - (system (string-append xorg-server "/bin/Xvfb :99 -screen 0 " - "1920x1200x24 -ac +extension GLX +render " - "-noreset &")) - (setenv "DISPLAY" ":99.0")))) - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - ;; Fails when invoking help2man for unknown reason. - (delete-file "tests/docs_tests/man_tests/test_labelme_1.py") - ;; One test hangs. - (delete-file "tests/labelme_tests/widgets_tests/test_label_dialog.py") - ;; Calls incompatible function signatures. - (delete-file "tests/labelme_tests/widgets_tests/test_label_list_widget.py") - (setenv "MPLBACKEND" "agg") - (invoke "pytest" "-v" "tests" "-m" "not gpu"))))))) - (propagated-inputs - (list python-imgviz - python-matplotlib - python-numpy - python-pillow - python-pyyaml - python-qtpy - python-termcolor)) + (list + #:test-flags + #~(list "-m" "not gpu" + ;; Fails when invoking help2man for unknown reason. + "--ignore=tests/docs_tests/man_tests/test_labelme_1.py") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'start-xserver + (lambda* (#:key inputs #:allow-other-keys) + (let ((xorg-server #$(this-package-native-input "xorg-server"))) + ;; Options taken from CI workflow. + (system (string-append xorg-server "/bin/Xvfb :99 -screen 0 " + "1920x1200x24 -ac +extension GLX +render " + "-noreset &")) + (setenv "DISPLAY" ":99.0"))))))) (native-inputs - (list python-pytest python-pytest-qt xorg-server-for-tests)) + (list python-pytest + python-pytest-qt + xorg-server-for-tests + python-wheel)) + (propagated-inputs + (list python-imgviz + python-matplotlib + python-natsort + python-numpy + python-pillow + python-pyyaml + python-qtpy + python-termcolor)) (home-page "https://github.com/wkentaro/labelme") - (synopsis - "Image Polygonal Annotation") + (synopsis "Image Polygonal Annotation") (description - "Image and video labeling tool supporting different shapes like -polygons, rectangles, circles, lines, points and VOC/COCO export.") + "Image and video labeling tool supporting different shapes like polygons, +rectangles, circles, lines, points and VOC/COCO export.") (license license:gpl3+))) (define-public charls diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 0270346f47..6773366a49 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -2761,6 +2761,10 @@ GIF, TIFF, WEBP, BMP, PNG, XPM formats.") (guix build utils)) #:phases (modify-phases %standard-phases + (add-after 'unpack 'python3.11-compatibility + (lambda _ + (substitute* "setup.py" + (("\"rU\"") "\"r\"")))) (add-after 'install 'glib-or-gtk-wrap (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)) (add-after 'install 'wrap-program diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm index 4404c099e4..572f5851cb 100644 --- a/gnu/packages/irc.scm +++ b/gnu/packages/irc.scm @@ -919,7 +919,7 @@ parsers") ;; unmaintained clone of <https://github.com/ircdocs/parser-tests> ;; which is packed in Guix as python-irc-parser-tests. Tests data ;; (YAML files) are distributed as Python package and located in - ;; <lib/python3.10/site-packages/parser_tests/data/>. + ;; <lib/python3.11/site-packages/parser_tests/data/>. (add-before 'check 'install-testcases-data (lambda* (#:key import-path #:allow-other-keys) (with-directory-excursion (string-append "src/" import-path) diff --git a/gnu/packages/iso-codes.scm b/gnu/packages/iso-codes.scm index fd04d13a9f..ad9b90a564 100644 --- a/gnu/packages/iso-codes.scm +++ b/gnu/packages/iso-codes.scm @@ -122,7 +122,8 @@ information.") (build-system pyproject-build-system) (native-inputs (list python-pytest - python-setuptools)) + python-setuptools + python-wheel)) (propagated-inputs (list python-pandas)) (home-page "https://github.com/IndEcol/country_converter") diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm index d4a9b9e82b..778bb01bd8 100644 --- a/gnu/packages/jupyter.scm +++ b/gnu/packages/jupyter.scm @@ -64,13 +64,6 @@ (sha256 (base32 "1qrhzazq10dz64y9mawr3ns595fsdhrj1wvbb42xhmcl66r1xq8a")))) (build-system pyproject-build-system) - (arguments - (list - #:phases - ;; Because python-jsonschema has an old python-webcolor. Remove this - ;; when python-team branch is merged. - '(modify-phases %standard-phases - (delete 'sanity-check)))) (propagated-inputs (list python-argon2-cffi python-ipykernel python-ipython-genutils @@ -96,7 +89,7 @@ python-pytest-jupyter python-pytest-tornasync python-requests - python-requests-unixsocket + python-requests-unixsocket2 python-testpath)) (home-page "https://github.com/jupyter/nbclassic") (synopsis "Jupyter Notebook as a Jupyter Server extension") @@ -601,7 +594,7 @@ JavaScript build steps.") (setenv "PATH" (string-append #$output "/bin:" (getenv "PATH")))))))) (propagated-inputs - (list python-anyio/without-dataclasses + (list python-anyio python-argon2-cffi python-jinja2 python-jupyter-client @@ -1062,13 +1055,13 @@ a notebook.") (define-public python-ipympl (package (name "python-ipympl") - (version "0.9.1") + (version "0.9.2") (source (origin (method url-fetch) (uri (pypi-uri "ipympl" version)) (sha256 - (base32 "11rppjdqzgs4pfiq8gww5xkpbk21fp86vvv839v56b9rqq06j2b4")))) + (base32 "12qgiy08klqb5gipm23yzh09p5g2k8ihcq2bprprdya84acw2rf8")))) (build-system python-build-system) (propagated-inputs (list python-ipython @@ -1079,7 +1072,7 @@ a notebook.") python-pillow python-traitlets)) (native-inputs - (list python-jupyter-packaging)) + (list python-hatchling python-jupyter-packaging)) (home-page "https://matplotlib.org/ipympl/") (synopsis "Matplotlib Jupyter Extension") (description "Leveraging the Jupyter interactive widgets framework, ipympl diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index c0b2eec3ca..a0f47447be 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -663,7 +663,7 @@ output), and Binutils.") (rename-file (string-append #$output "/share/opt-viewer") opt-viewer-share)))) ;; The build daemon goes OOM on i686-linux on this phase. - #$@(if (and (version>=? version "16.0") + #$@(if (and (version>=? version "15.0") (target-x86-32?)) #~((delete 'make-dynamic-linker-cache)) #~())))) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 4da7d2478d..d379a73ccb 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -234,8 +234,16 @@ family of functions.") (sha256 (base32 "0cgysij0dix0fikyz2x4f8jvaskm5s5a04s07chzaz2dw1fpxdq8")))) (build-system pyproject-build-system) - (arguments ; disable flaky test - (list #:test-flags '(list "-k" "not test_integrate_variable[x23-i]"))) + (arguments + (list + #:test-flags + '(list "-k" + (string-append + ;; Disable flaky test + "not test_integrate_variable[x23-i]" + ;; XXX This test fails because the length of arguments + ;; is longer than the length of inputs. + " and not test_function_of_numeric_array")))) (propagated-inputs (list python-makefun python-multipledispatch python-numpy python-opt-einsum python-typing-extensions)) @@ -423,33 +431,25 @@ machine learning algorithms based on GPs.") (define-public python-ml-collections (package (name "python-ml-collections") - (version "0.1.1") + (version "1.0.0") (source (origin - (method url-fetch) - (uri (pypi-uri "ml_collections" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/ml_collections") + (commit (string-append "v" version)))) (sha256 - (base32 "1k38psfzqsqnl99fl578bd07zdmvfkja61r3sgjs2fj3xircrvrz")))) + (base32 "1f3rwbgnnvgh2jgnkwxfjdw18yly41hlx9fy56h0x36zyy8p0j21")))) (build-system pyproject-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; TODO: we can't seem to run the config_flags tests, because - ;; the installed Python files conflict with those from the - ;; source directory, resulting in constants to be defined more - ;; than once. - (invoke "pytest" "ml_collections/config_dict/tests" - ;; This one fails because we're testing the __main__ - ;; class, not config_dict_test. - "-k" "not testJSONConversionBestEffort"))))))) + #:test-flags '(list "--pyargs" "ml_collections/config_dict/tests"))) (propagated-inputs - (list python-absl-py python-contextlib2 python-pyyaml python-six)) - (native-inputs (list python-mock python-pytest python-setuptools - python-wheel)) + (list python-absl-py python-pyyaml)) + (native-inputs (list python-pylint + python-pytest + python-pytest-xdist + python-flit-core)) (home-page "https://github.com/google/ml_collections") (synopsis "Python collections designed for Machine Learning usecases") (description @@ -1843,7 +1843,7 @@ in terms of new algorithms.") pybind11 python-coverage python-fb-re2 - python-parameterized-next + python-parameterized python-pytest python-pytest-runner python-setuptools @@ -2553,7 +2553,7 @@ standard feature selection algorithms.") (define-public python-cleanlab (package (name "python-cleanlab") - (version "2.7.0") + (version "2.7.1") ;; The version on pypi does not come with tests. (source (origin (method git-fetch) @@ -2563,7 +2563,7 @@ standard feature selection algorithms.") (file-name (git-file-name name version)) (sha256 (base32 - "0f8v5246nzy22r7zswv9vbpxc7wxaqjwry9iq0fqjp2ffch88h6j")))) + "073w45azq496x4bhrh8mdywcrg3gk33n13w1pqh1kiykw826ld9b")))) (build-system pyproject-build-system) (arguments (list @@ -2681,37 +2681,37 @@ Covariance Matrix Adaptation Evolution Strategy (CMA-ES) for Python.") (license license:expat))) (define-public python-autograd - (let* ((commit "c6d81ce7eede6db801d4e9a92b27ec5d409d0eab") - (revision "0") - (version (git-version "1.5" revision commit))) - (package - (name "python-autograd") - (home-page "https://github.com/HIPS/autograd") - (source (origin - (method git-fetch) - (uri (git-reference - (url home-page) - (commit commit))) - (sha256 - (base32 - "04kljgydng42xlg044h6nbzxpban1ivd6jzb8ydkngfq88ppipfk")) - (file-name (git-file-name name version)))) - (version version) - (build-system pyproject-build-system) - (native-inputs - (list python-nose python-pytest python-setuptools python-wheel)) - (propagated-inputs - (list python-future python-numpy)) - (synopsis "Efficiently computes derivatives of NumPy code") - (description "Autograd can automatically differentiate native Python and -NumPy code. It can handle a large subset of Python's features, including loops, -ifs, recursion and closures, and it can even take derivatives of derivatives -of derivatives. It supports reverse-mode differentiation + (package + (name "python-autograd") + (version "1.7.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/HIPS/autograd") + (commit (string-append "v" version)))) + (sha256 + (base32 "1fpnmm3mzw355iq7w751j4mjfcr0yh324cxidba1l22652gg8r8m")) + (file-name (git-file-name name version)))) + (build-system pyproject-build-system) + (native-inputs + (list python-hatchling + python-pytest)) + (propagated-inputs + (list python-future + python-numpy)) + (home-page "https://github.com/HIPS/autograd") + (synopsis "Efficiently computes derivatives of NumPy code") + (description + "Autograd can automatically differentiate native Python and NumPy code. +It can handle a large subset of Python's features, including loops, ifs, +recursion and closures, and it can even take derivatives of derivatives of +derivatives. It supports reverse-mode differentiation (a.k.a. backpropagation), which means it can efficiently take gradients of scalar-valued functions with respect to array-valued arguments, as well as forward-mode differentiation, and the two can be composed arbitrarily. The main intended application of Autograd is gradient-based optimization.") - (license license:expat)))) + (license license:expat))) (define-public lightgbm (package @@ -3370,8 +3370,14 @@ Python.") ;; SOURCE_DATE_EPOCH is respected, which we set to some time in ;; 1980. (lambda _ (setenv "SOURCE_DATE_EPOCH" "315532800"))) - (add-after 'unpack 'python3.10-compatibility + (add-after 'unpack 'python3.11-compatibility (lambda _ + ;; Py_TYPE was changed to an inline static function in Python + ;; 3.11, so it cannot be used on the left-hand side. + (substitute* "tensorflow/python/lib/core/bfloat16.cc" + (("Py_TYPE\\(&NPyBfloat16_Descr\\) = &PyArrayDescr_Type;") + "Py_SET_TYPE(&NPyBfloat16_Descr, &PyArrayDescr_Type);")) + ;; See https://github.com/tensorflow/tensorflow/issues/20517#issuecomment-406373913 (substitute* '("tensorflow/python/eager/pywrap_tfe_src.cc" "tensorflow/python/lib/core/ndarray_tensor.cc" @@ -3421,6 +3427,16 @@ Python.") (string-append m " and not isinstance(existing, type(object.__or__))"))) + ;; ArgSpec has been replaced with FullArgSpec. + (substitute* "tensorflow/python/util/tf_inspect.py" + (("ArgSpec = _inspect.ArgSpec") "\ +ArgSpec = namedtuple('ArgSpec', [ 'args', 'varargs', 'keywords', 'defaults' ]) +def makeargspec(s): + return ArgSpec(args=s.args, varargs=s.varargs, keywords=s.varkw, defaults=s.defaults) +") + (("_inspect.getargspec\\((.*)\\)" m target) + (string-append "makeargspec(_inspect.getfullargspec(" target "))"))) + ;; Fix the build with numpy >= 1.19. ;; Suggested in https://github.com/tensorflow/tensorflow/issues/41086#issuecomment-656833081 (substitute* "tensorflow/python/lib/core/bfloat16.cc" @@ -3441,7 +3457,22 @@ Python.") (substitute* '("tensorflow/python/framework/fast_tensor_util.pyx" "tensorflow/python/estimator/canned/linear_testing_utils.py") (("np.asscalar") "np.ndarray.item")))) - (add-after 'python3.10-compatibility 'chdir + (add-after 'python3.11-compatibility 'numpy-compatibility + (lambda _ + (substitute* (cons* "tensorflow/compiler/xla/python/xla_client.py" + "tensorflow/contrib/layers/python/ops/sparse_ops_test.py" + (find-files "tensorflow/python/" "\\.py$")) + (("np.object") "object")) + (substitute* (append + '("tensorflow/compiler/tests/unary_ops_test.py" + "tensorflow/compiler/xla/python/xla_client.py" + "tensorflow/compiler/xla/python/xla_client_test.py") + (find-files "tensorflow/python/" "\\.py$") + (find-files "tensorflow/contrib/" "\\.py$")) + (("np.bool,") "bool,") + (("np.bool\\)") "bool)") + (("np.bool:") "bool:")))) + (add-after 'numpy-compatibility 'chdir (lambda _ (chdir "tensorflow/contrib/cmake"))) (add-after 'chdir 'disable-downloads (lambda* (#:key inputs #:allow-other-keys) @@ -4169,7 +4200,7 @@ project, and it will potentially also do the same for the Lime project.") (propagated-inputs (list python-h5py python-numpy)) (native-inputs - (list python-pytest python-pytest-cov python-pytest-pep8 + (list python-pytest python-pytest-cov python-pytest-xdist)) (home-page "https://github.com/keras-team/keras-applications") (synopsis "Reference implementations of popular deep learning models") @@ -4339,7 +4370,6 @@ with image data, text data, and sequence data.") python-pandas python-pytest python-pytest-cov - python-pytest-pep8 python-pytest-timeout python-pytest-xdist python-pyux @@ -5558,7 +5588,10 @@ Note: currently this package does not provide GPU support.") ;; These refuse to be run on CPU and really want a GPU " and not test_add_random_walk_pe" " and not test_asap" - " and not test_two_hop")) + " and not test_two_hop" + ;; Failed when switched to python@3.11 + ;; typing module internals + " and not test_type_repr")) #:phases '(modify-phases %standard-phases (add-after 'unpack 'delete-top-level-directories @@ -6315,7 +6348,7 @@ tokenizers, @code{rust-tokenizers}.") python-tokenizers python-tqdm)) (native-inputs - (list python-parameterized-next + (list python-parameterized python-pytest python-setuptools python-wheel)) (home-page "https://github.com/huggingface/transformers") (synopsis "Machine Learning for PyTorch and TensorFlow") @@ -6459,34 +6492,33 @@ of Hidden Markov Models.") (define-public python-lap (package (name "python-lap") - (version "0.4.0") + (version "0.5.12") (source (origin (method url-fetch) (uri (pypi-uri "lap" version)) (sha256 (base32 - "0fqfxpq4jg9h4wxjw540gjmvfg1ccc1nssk7i9njg7qfdybxknn4")))) - (build-system python-build-system) + "1za4mf5nd7vzwd24sy2mfxrk8mnwq7d8rv6h96yh8v5flx7422sp")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'build - (lambda* (#:key inputs #:allow-other-keys) - (invoke "python" "setup.py" "build" - "--cpu-baseline=sse2"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; The tests must be run from elsewhere. - (mkdir-p "/tmp/test") - (copy-recursively "lap/tests" "/tmp/test") - (with-directory-excursion "/tmp/test" - (invoke "pytest" "-vv")))))))) + (list + #:test-flags #~(list "-v" #$output) + #:phases + #~(modify-phases %standard-phases + (add-after 'check 'check-cleanup + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (for-each + delete-file-recursively + (find-files #$output + (lambda (file stat) + (or (member (basename file) + '("tests" ".pytest_cache")))) + #:directories? #t)))))))) (propagated-inputs - (list python-numpy - python-scipy)) + (list python-numpy)) (native-inputs - (list python-cython python-pytest)) + (list python-cython python-pytest python-setuptools python-wheel)) (home-page "https://github.com/gatagat/lap") (synopsis "Linear Assignment Problem solver (LAPJV/LAPMOD)") (description "Lap is a linear assignment problem solver using Jonker-Volgenant @@ -6581,24 +6613,23 @@ inference.") (define-public python-linear-operator (package (name "python-linear-operator") - (version "0.5.2") + (version "0.6") (source (origin (method url-fetch) (uri (pypi-uri "linear_operator" version)) (sha256 (base32 - "03drb4hn9nn8jrqd9vbalihhahgpdm956hbs05bix7svradhknaw")))) + "0m56f3zrm8xh1bpwh4g7jfc79rf4j94g6zmz663b58pig4w6dqm9")))) (build-system pyproject-build-system) (propagated-inputs (list python-jaxtyping + python-mpmath python-pytorch - python-scipy - python-typeguard)) - (native-inputs (list python-flake8 - python-flake8-print - python-pytest + python-scipy)) + (native-inputs (list python-pytest python-setuptools python-setuptools-scm - python-twine)) + python-typeguard + python-wheel)) (home-page "https://github.com/cornellius-gp/linear_operator/") (synopsis "Linear operator implementation") (description "LinearOperator is a PyTorch package for abstracting away the @@ -6608,29 +6639,34 @@ linear algebra routines needed for structured matrices (or operators).") (define-public python-gpytorch (package (name "python-gpytorch") - (version "1.12") + (version "1.14") (source (origin (method url-fetch) (uri (pypi-uri "gpytorch" version)) (sha256 (base32 - "1pwsccll1hrgkifdmlxzcn6cvnwvyq2cimqzbfgihr13yw51cb6w")))) + "13cs6dx8qa5j4ygji9w5xbmaqc68ihqyzz33fyyf9qa6d8gc2b03")))) (build-system pyproject-build-system) (arguments (list #:test-flags - ;; test_deprecated_methods fails with an AssertionError. - #~(list "-k" (string-append "not test_deprecated_methods")))) - (propagated-inputs (list python-linear-operator + #~(list "-k" (string-append + ;; test_deprecated_methods fails with an AssertionError. + "not test_deprecated_methods" + ;; This test is flaky: Expects gradients of 0 exactly, + ;; can get negligible ones (e-10 to e-16). + " and not test_optimization_optimal_error") + ;; Ignore lenghty tests of little relevance. + "--ignore=test/examples/"))) + (propagated-inputs (list python-jaxtyping + python-linear-operator python-mpmath python-scikit-learn python-scipy)) - (native-inputs (list python-coverage - python-flake8 - python-flake8-print - python-nbval + (native-inputs (list python-nbval python-pytest python-setuptools - python-twine)) + python-setuptools-scm + python-wheel)) (home-page "https://gpytorch.ai") (synopsis "Implementation of Gaussian Processes in PyTorch") (description @@ -6640,7 +6676,7 @@ linear algebra routines needed for structured matrices (or operators).") (define-public python-botorch (package (name "python-botorch") - (version "0.11.3") + (version "0.13.0") (source (origin (method git-fetch) ;no tests in PyPI (uri (git-reference @@ -6649,7 +6685,7 @@ linear algebra routines needed for structured matrices (or operators).") (file-name (git-file-name name version)) (sha256 (base32 - "0nf9zrg1khvckb8kdpffqc3bnlhc0x03jd1560qmjamwl3j59m02")))) + "1sxgxdq892vg5xj30kb86003b9rwsipc95c7p1zdv865y4f38a8y")))) (build-system pyproject-build-system) (arguments (list #:test-flags #~(list "-k" "not test_all_cases_covered") @@ -6668,9 +6704,12 @@ linear algebra routines needed for structured matrices (or operators).") python-pyro-ppl python-pytorch python-scipy)) - (native-inputs (list python-pytest + (native-inputs (list python-pyre-extensions + python-pytest python-pytest-cov - python-setuptools-scm)) + python-setuptools + python-setuptools-scm + python-wheel)) (home-page "https://botorch.org") (synopsis "Bayesian Optimization in PyTorch") (description @@ -6779,7 +6818,7 @@ simple speech recognition.") "library_dirs=[" "'" #$vosk-api "/lib'" "],\n\t" - "libraries=['vosk', 'python3.10'],\n\t" + "libraries=['vosk', 'python3.11'],\n\t" "include_dirs=[" "'" #$vosk-api "/src'" "])"))) (substitute* "vosk/__init__.py" diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 9df9c63aa0..9f88bbf70d 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -3588,14 +3588,17 @@ an SMTP transaction before a message is committed to queue.") (define-public mailman (package (name "mailman") - (version "3.3.2") + (version "3.3.10") (source (origin (method url-fetch) (uri (pypi-uri "mailman" version)) (sha256 - (base32 "0a5ckbf8hc3y28b7p5psp0d4bxk601jlr5pd3hhh545xd8d9f0dg")))) - (build-system python-build-system) + (base32 "0cjn8karkgrapgiv3ra6ddcngkf5c5779hrq369mvwi6ygy7ir0d")))) + (build-system pyproject-build-system) + (arguments + ;; XXX: Too much failing tests to try and isolate them. + (list #:tests? #f)) (propagated-inputs (list gunicorn python-aiosmtpd @@ -3620,7 +3623,7 @@ an SMTP transaction before a message is committed to queue.") python-zope-event python-zope-interface)) (native-inputs - (list python-nose)) + (list python-pytest python-pdm-backend)) (home-page "https://www.list.org") (synopsis "Mailing list manager") (description @@ -3755,21 +3758,17 @@ interfaces interacting with Mailman.") (define-public python-mailman-hyperkitty (package (name "python-mailman-hyperkitty") - (version "1.2.0") + (version "1.2.1") (source - (origin - (method url-fetch) - (uri (pypi-uri "mailman-hyperkitty" version)) - (sha256 - (base32 - "1ni6vf1yi14c0l895fk278x4na7ymhpkl1q0vnpzbkzplpa7200i")))) - (build-system python-build-system) - (propagated-inputs - (list python-requests python-zope-interface)) - (inputs - (list mailman)) - (native-inputs - (list python-mock python-nose python-nose2)) + (origin + (method url-fetch) + (uri (pypi-uri "mailman-hyperkitty" version)) + (sha256 + (base32 "0f6c1fs28w3r9k9mbg7gsv6pa45aayaadaa0dn4q5dfcqvxrvmpq")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-requests python-zope-interface)) + (inputs (list mailman)) + (native-inputs (list python-nose2 python-setuptools python-wheel)) (home-page "https://gitlab.com/mailman/mailman-hyperkitty/") (synopsis "Mailman archiver plugin for HyperKitty") (description @@ -4681,18 +4680,20 @@ the RFC 8617 Authenticated Received Chain (ARC) protocol.") (define-public python-authheaders (package (name "python-authheaders") - (version "0.13.0") + (version "0.16.3") (source (origin (method url-fetch) (uri (pypi-uri "authheaders" version)) (sha256 (base32 - "14k6i72k5f8dyvps8vc0aq0cczc8lvqpgjfjzsy6qqychjvjcmwk")))) - (build-system python-build-system) + "12hl93336w64iyqalpv4rma2ijigav68qy1xmgziibdi7inxr3hi")))) + (build-system pyproject-build-system) (propagated-inputs (list python-authres python-dkimpy python-dnspython python-publicsuffix2)) + (native-inputs + (list python-setuptools python-wheel)) (home-page "https://github.com/ValiMail/authentication-headers") (synopsis "Library wrapping email authentication header verification and generation") (description @@ -4707,30 +4708,27 @@ DKIM and ARC sign messages and output the corresponding signature headers.") (define-public python-aiosmtpd (package (name "python-aiosmtpd") - (version "1.2.2") + (version "1.4.6") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/aio-libs/aiosmtpd") - (commit version))) + (commit (string-append "v" version)))) (sha256 - (base32 "0083d6nf75xv8nq1il6jabz36v6c452svy4p402csxwwih5pw6sk")) + (base32 "0b5y94zc8pq75sjwsifblzgjnliyclkwypi68b2zffrxcdnz27r2")) (file-name (git-file-name name version)))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'delete-failing-tests - (lambda _ - ;; This test uses an expired certificate. - (delete-file "aiosmtpd/tests/test_smtps.py") - #t)) - (replace 'check - (lambda _ - (invoke "python" "-m" "nose2" "-v")))))) + ;; This QA test requires git. + (list #:test-flags ''("-k" "not test_ge_master"))) (native-inputs - (list python-flufl-testing python-nose2)) + (list python-pytest + python-pytest-asyncio + python-pytest-cov + python-pytest-mock + python-setuptools + python-wheel)) (propagated-inputs (list python-atpublic)) (home-page "https://aiosmtpd.readthedocs.io/") diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 4be9e71320..b0c5b8685c 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -108,6 +108,7 @@ #:use-module (guix build-system python) #:use-module (guix build-system ruby) #:use-module (gnu packages algebra) + #:use-module (gnu packages astronomy) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) @@ -3551,46 +3552,51 @@ ASCII text files using Gmsh's own scripting language.") (define-public veusz (package (name "veusz") - (version "3.3.1") + (version "3.6.2") (source (origin (method url-fetch) (uri (pypi-uri "veusz" version)) (sha256 - (base32 "1q7hi1qwwg4pgiz62isvv1pia85m13bspdpp1q3mrnwl11in0ag0")))) - (build-system python-build-system) + (base32 "1lcmcfr0dcam8g1fp5qip8jnxglxx7i62ln3ix6l4c2bbv21l5y2")))) + (build-system pyproject-build-system) (arguments - `(;; Tests will fail because they depend on optional packages like - ;; python-astropy, which is not packaged. - #:tests? #f - #:phases - (modify-phases %standard-phases - ;; Veusz will append 'PyQt5' to sip_dir by default. That is not how - ;; the path is defined in Guix, therefore we have to change it. - (add-after 'unpack 'fix-sip-dir - (lambda _ - (substitute* "pyqtdistutils.py" - (("os.path.join\\(sip_dir, 'PyQt5'\\)") "sip_dir")))) - ;; Now we have to pass the correct sip_dir to setup.py. - (replace 'build - (lambda* (#:key inputs #:allow-other-keys) - ;; We need to tell setup.py where to locate QtCoremod.sip - ((@@ (guix build python-build-system) call-setuppy) - "build_ext" - (list (string-append "--sip-dir=" - (search-input-directory inputs "share/sip")))))) - ;; Ensure that icons are found at runtime. - (add-after 'install 'wrap-executable - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (wrap-program (string-append out "/bin/veusz") - `("QT_PLUGIN_PATH" prefix - ,(list (string-append (assoc-ref inputs "qtsvg") - "/lib/qt5/plugins/")))))))))) + (list + ;; Tests currently fail with exception TypeError: + ;; calling <function version ...> returned 3.6.2, not a test + #:tests? #f + #:phases + #~(modify-phases %standard-phases + ;; Veusz uses python's site-packages to look for pyqt5_include_dir. + (add-after 'unpack 'fix-pyqt5-include-dir + (lambda _ + (substitute* "pyqt_setuptools.py" + (("get_path\\('platlib'\\)") + (format #f "~s" + (string-append + #$(this-package-input "python-pyqt") + "/lib/python" + #$(version-major+minor + (package-version python-wrapper)) + "/site-packages")))))) + ;; Ensure that icons are found at runtime. + (add-after 'wrap 'wrap-executable + (lambda* (#:key inputs #:allow-other-keys) + (wrap-program (string-append #$output "/bin/veusz") + `("QT_PLUGIN_PATH" prefix + ,(list (string-append + (string-join + (list #$(this-package-input "qtbase") + #$(this-package-input "qtsvg") + #$(this-package-input "qtwayland")) + "/lib/qt5/plugins:") + "/lib/qt5/plugins"))))))))) (native-inputs (list pkg-config - ;;("python-astropy" ,python-astropy) ;; FIXME: Package this. - qttools-5 python-sip-4)) + python-astropy + python-setuptools + python-wheel + qttools-5)) (inputs (list bash-minimal ghostscript ;optional, for EPS/PS output @@ -3598,7 +3604,8 @@ ASCII text files using Gmsh's own scripting language.") python-h5py ;optional, for HDF5 data python-pyqt qtbase-5 - qtsvg-5)) + qtsvg-5 + qtwayland-5)) (propagated-inputs (list python-numpy)) (home-page "https://veusz.github.io/") @@ -4346,7 +4353,15 @@ recurrence relations.") ;; These tests fails with unexpected keyword arguments ;; in calls to cplot. #~(list "--deselect" "tests/test_u3.py::test_write_single" - "--deselect" "tests/test_u3.py::test_write_tree"))) + "--deselect" "tests/test_u3.py::test_write_tree" + "-k" (string-join + ;; Tests fail in arrays comprising. + (list "not test_chebyshev1_p11[2-y2]" + "test_chebyshev1_p11[4-y4]" + "test_eval[1-ref1]" + "test_eval[t2-ref2]" + "test_eval[t3-ref3]") + " and not ")))) (native-inputs (list python-matplotx python-meshio @@ -4437,6 +4452,35 @@ bindings to almost all functions of PETSc.") ;; <https://github.com/dimpase/primecountpy/issues/16>. (license license:gpl2+))) +(define-public python-pyglm + (package + (name "python-pyglm") + (version "2.8.1") + (source + (origin + ;; Test files are not included in the archive in pypi. + (method git-fetch) + (uri (git-reference + (url "https://github.com/Zuzu-Typ/PyGLM") + (commit version) + ;; XXX: Attempt to use Guix's glm@1.0.1 failed, try to figure out + ;; how to fix it. + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ra54m0pb5aca7q6ymappjsyxdzdy17yz8rrhlql04k0p9lnf1v8")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (home-page "https://github.com/Zuzu-Typ/PyGLM") + (synopsis "OpenGL Mathematics library for Python") + (description "PyGLM is a Python extension library which brings the OpenGL +Mathematics (GLM) library to Python.") + (license license:zlib))) + (define-public python-quadpy (package (name "python-quadpy") @@ -4454,6 +4498,12 @@ bindings to almost all functions of PETSc.") (base32 "1f989dipv7lqxvalfrvvlmhlxyl67a87lavyyqrr1mh88glhl592")))) (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; AssertionError: Lebedev(047) -- observed: 41, expected: 47 (max err: + ;; 4.910e-15). + #~(list "--deselect=tests/test_u3.py::test_scheme_spherical[lebedev_047]"))) (native-inputs (list python-accupy python-pytest @@ -7171,50 +7221,39 @@ with C89.") (define-public glm (package (name "glm") - (version "0.9.9.8") + (version "1.0.1") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/g-truc/glm/releases/download/" - version "/glm-" version ".zip")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/g-truc/glm") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0k6yk9v46h690rshdx49x98y5qspkzibld1wb51jwcm35vba7qip")))) + (base32 "0890rvv3czi3nqj11dc2m3wcdfv0dm0nr63wfcpfikk9sk6b4w8s")))) (build-system cmake-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-before 'configure 'set-environment - (lambda _ - ;; Pass "-fno-ipa-modref" flag to the compiler to work - ;; around a test failure with GCC 11. This is a - ;; header-only library so these flags only affect tests. - ;; See <https://github.com/g-truc/glm/pull/1087>. - (setenv "CXXFLAGS" "-O2 -g -fno-ipa-modref"))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - ;; Since version 0.9.9.6, 'make install' is not supported - ;; and we have to do it "manually". Upstream discussion: - ;; <https://github.com/g-truc/glm/pull/968>. - (let* ((source (string-append "../glm")) - (out (assoc-ref outputs "out")) - (inc (string-append out "/include")) - (lib (string-append out "/lib")) - (pkgconfig (string-append lib "/pkgconfig"))) - (with-directory-excursion source - (mkdir-p inc) - (mkdir-p pkgconfig) - (copy-recursively "glm" (string-append inc "/glm")) - (copy-recursively "cmake" (string-append lib "/cmake")) - (call-with-output-file (string-append pkgconfig "/glm.pc") - (lambda (port) - (format port - "prefix=~a + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'post-install + (lambda _ + (let* ((doc (string-append #$output "/share/doc/glm")) + (pkgconfig (string-append #$output "/lib/pkgconfig"))) + (mkdir-p doc) + (mkdir-p pkgconfig) + (copy-recursively "../source/doc/api" (string-append doc "/html")) + (install-file "../source/doc/manual.pdf" doc) + (call-with-output-file (string-append pkgconfig "/glm.pc") + (lambda (port) + (format port + "prefix=~a includedir=${prefix}/include Name: GLM Description: OpenGL Mathematics Version: ~a -Cflags: -I${includedir}~%" out ,(version-prefix version 3))))) - #t)))))) +Cflags: -I${includedir}~%" #$output #$version))))))))) (native-inputs (list unzip)) (home-page "https://glm.g-truc.net/") @@ -11079,7 +11118,7 @@ Mathics3.") (propagated-inputs (list python-django-4.2 python-mathics-scanner python-mathics-core - python-networkx-next + python-networkx python-pygments python-requests)) (native-inputs (list python-pytest python-setuptools python-wheel)) diff --git a/gnu/packages/medical.scm b/gnu/packages/medical.scm index c755508db9..25e769c576 100644 --- a/gnu/packages/medical.scm +++ b/gnu/packages/medical.scm @@ -19,6 +19,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages medical) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix build-system qt) #:use-module (guix download) @@ -29,6 +30,7 @@ #:use-module (gnu packages databases) #:use-module (gnu packages kde-frameworks) ; kirigami #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) @@ -93,18 +95,26 @@ Health Federation.") ".tar.gz")) (sha256 (base32 "09vrfqn511vswnj2q9m7srlwdgz066qvqpmja6sg1yl1ibh3cbpr")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:use-setuptools? #f - #:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-/usr - (lambda* (#:key outputs #:allow-other-keys) - (substitute* '("setup.py" - "src/openmolar/settings/localsettings.py") - (("/usr") - (assoc-ref outputs "out"))) #t))))) - (inputs (list python-pyqtwebengine python-pyqt+qscintilla - python-mysqlclient qscintilla)) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-/usr + (lambda* (#:key outputs #:allow-other-keys) + (substitute* '("setup.py" + "src/openmolar/settings/localsettings.py") + (("/usr") #$output)))) + (add-after 'unpack 'set-acceptable-version + (lambda _ + (substitute* "src/openmolar/settings/version.py" + ((#$version) "1.1.6"))))))) + (native-inputs + (list python-setuptools python-wheel)) + (inputs (list python-pyqtwebengine + python-pyqt+qscintilla + python-mysqlclient + qscintilla)) (propagated-inputs (list qtwebengine-5)) (home-page "https://openmolar.com/om1") (synopsis "Dental practice management software") diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index 9813b5ca67..1009c32783 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2022 ( <paren@disroot.org> ;;; Copyright © 2022 Mathieu Laparie <mlaparie@disr.it> +;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -68,6 +69,7 @@ #:use-module (gnu packages prometheus) #:use-module (gnu packages python) #:use-module (gnu packages python-build) + #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages rrdtool) @@ -433,23 +435,24 @@ historical data.") (define-public python-carbon (package (name "python-carbon") - (version "1.1.8") + (version "1.1.10") (source (origin (method url-fetch) (uri (pypi-uri "carbon" version)) (sha256 (base32 - "1wb91fipk1niciffq5xwqbh8g7rl7ghdam4m97cjbig12i5qr4cm")))) - (build-system python-build-system) + "0p6yjxif5ly5wkllnaw41w2zy9y0nffgfk91v861fn6c26lmnfy1")))) + (build-system pyproject-build-system) (arguments `(#:phases (modify-phases %standard-phases ;; Don't install to /opt (add-after 'unpack 'do-not-install-to-/opt (lambda _ (setenv "GRAPHITE_NO_PREFIX" "1") #t))))) + (native-inputs (list python-setuptools python-wheel)) (propagated-inputs - (list python-cachetools python-txamqp python-urllib3 python-whisper)) + (list python-cachetools python-twisted python-txamqp python-urllib3)) (home-page "https://graphiteapp.org/") (synopsis "Backend data caching and persistence daemon for Graphite") (description "Carbon is a backend data caching and persistence daemon for @@ -459,45 +462,69 @@ and persisting them to disk using the Whisper time-series library.") (license license:asl2.0))) (define-public graphite-web - (package - (name "graphite-web") - (version "1.1.10") - (source - (origin - (method url-fetch) - (uri (pypi-uri "graphite-web" version)) - (sha256 - (base32 - "0nnk3kwn0b6bq9xnmv9bac6hpcbdgpgwf283c1ck5nm80panh61z")))) - (build-system python-build-system) - (arguments - `(#:tests? #f ;XXX: not in PyPI release & requires database - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'relax-requirements - (lambda _ - (substitute* "setup.py" - ;; Allow newer versions of django-tagging. - (("django-tagging==") "django-tagging>=") - ;; And Django. - (("Django>=1\\.8,<3\\.1") "Django>=1.8,<4")))) - ;; Don't install to /opt - (add-after 'unpack 'do-not-install-to-/opt - (lambda _ (setenv "GRAPHITE_NO_PREFIX" "1") #t))))) - (propagated-inputs - (list python-cairocffi - python-django-3.2 - python-django-tagging - python-pyparsing - python-pytz - python-six - python-urllib3)) - (home-page "https://graphiteapp.org/") - (synopsis "Scalable realtime graphing system") - (description "Graphite is a scalable real-time graphing system that does + (let ((commit "49c28e2015d605ad9ec93524f7076dd924a4731a") + (revision "2")) + (package + (name "graphite-web") + (version (git-version "1.1.10" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/graphite-project/graphite-web") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0bcc6jh7gyp8f54dzy4zza1z46gk3530r952pi86irf834z106sg")))) + (build-system pyproject-build-system) + (arguments + `(#:tests? #f ;XXX: Requires database, unable to run now + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "setup.py" + ;; Allow newer versions of django-tagging. + (("django-tagging==") "django-tagging>=") + ;; And Django. + (("Django>=3\\.2,<4") "Django>=4,<5")))) + ;; Don't install to /opt + (add-after 'unpack 'do-not-install-to-/opt + (lambda _ (setenv "GRAPHITE_NO_PREFIX" "1"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (mkdir-p "storage/log/webapp") + (with-directory-excursion "webapp" + (invoke "./manage.py" "test" "--pythonpath=." "tests" + "-k" (string-join + (list + "not test_dashboard_save_temporary_xss_key" + "test_dashboard_save_temporary_xss_name") + " and not "))))))))) + (native-inputs + (list python-carbon + python-mock + python-pytest + python-rrdtool + python-setuptools + python-tzdata + python-wheel + python-whisper)) + (propagated-inputs + (list python-cairocffi + python-django-4.2 + python-django-tagging + python-pyparsing + python-pytz + python-six + python-urllib3)) + (home-page "https://graphiteapp.org/") + (synopsis "Scalable realtime graphing system") + (description "Graphite is a scalable real-time graphing system that does two things: store numeric time-series data, and render graphs of this data on demand.") - (license license:asl2.0))) + (license license:asl2.0)))) (define-public python-prometheus-client (package @@ -838,6 +865,25 @@ display resumes. @end itemize") (license license:bsd-2))) +(define-public python-rrdtool + (package + (name "python-rrdtool") + (version "0.1.16") + (source + (origin + (method url-fetch) + (uri (pypi-uri "rrdtool" version)) + (sha256 + (base32 "0l8lbarzfwbwnq9jm9gv4mmrxgjlb9hbz27sa8b703qa7s5zy2jz")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ; No tests in pypi archive + (inputs (list rrdtool)) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/commx/python-rrdtool") + (synopsis "Python bindings for rrdtool") + (description "This package provides Python bindings for rrdtool.") + (license license:lgpl2.1))) + (define-public python-statsd (package (name "python-statsd") diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 0759c3d3c1..8a6783005e 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -1858,7 +1858,11 @@ typographic detail of symbols on the page.") (base32 "1y8s55b4mlsigm0xkk6qjpp08c75rv0swvjp0lj3cs6lgqdjxdjl")))) (build-system pyproject-build-system) (native-inputs - (list lilypond python-pytest python-setuptools python-wheel)) + (list lilypond + python-pytest + python-pytest-cov + python-setuptools + python-wheel)) (propagated-inputs (list abjad)) (home-page "https://abjad.github.io") @@ -3809,8 +3813,14 @@ follows a traditional multi-track tape recorder control paradigm.") (base32 "1lz2mvk4gqsyf92yxd3aaldx0d0qi28h4rnnvsaz4ls0ccqm80nk")))) (build-system waf-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'python3.11-compatibility + (lambda _ + (substitute* '("waflib/Context.py" + "waflib/ConfigSet.py") + (("'rU'") "'r'")))) (add-after 'unpack 'remove-sse-flags (lambda* (#:key system #:allow-other-keys) (unless (or (string-prefix? "x86_64" system) @@ -4617,8 +4627,8 @@ standard MIDI file with the csvmidi program.") (license license:public-domain))) (define-public mididings - (let ((commit "d98265be8afe7da20a5c7cfd0515f0d5fae5c53a") - (revision "1")) + (let ((commit "bc71ea9c86bdc0b02364b11ab7331e8b3a86bb4f") + (revision "2")) (package (name "mididings") (version (git-version "0" revision commit)) @@ -4630,8 +4640,8 @@ standard MIDI file with the csvmidi program.") (file-name (git-file-name name version)) (sha256 (base32 - "1a8i4yac5jjkq0vh73nwkv0j7vnvfwbzzagam4xdl1gpnc26n5xi")))) - (build-system pyproject-build-system) + "1f0f8bpqbc1av0ggv6wjicymc2klliwdl1m5blmjcvy39q3cwd59")))) + (build-system meson-build-system) (arguments (list #:phases @@ -4647,6 +4657,7 @@ standard MIDI file with the csvmidi program.") (list alsa-lib boost jack-2 + python `(,python "tk") python-dbus python-decorator diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 51e9c9c94f..bc1118ea63 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2017, 2018, 2021 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2024 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2024, 2025 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015, 2016, 2017, 2021 Stefan Reichör <stefan@xsteve.at> ;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com> @@ -911,80 +911,80 @@ systems with no further dependencies.") (define-public blueman (package (name "blueman") - (version "2.3.4") + (version "2.4.4") (source (origin (method url-fetch) (uri (string-append "https://github.com/blueman-project/blueman/releases" "/download/" version "/blueman-" version ".tar.xz")) (sha256 - (base32 "0lh1aqpdq6vi4agrgmm7fifjbxz2s5qcs3hr7nfjrwrp2j1361n2")))) + (base32 "1w45dr2cmy32cvxwqaybf5m2ziraj929f4lxcwapv266r1a92kyk")))) (build-system glib-or-gtk-build-system) (arguments - `(#:configure-flags (list "--enable-polkit" + (list + #:configure-flags '(list "--enable-polkit" "--without-systemdsystemunitdir" ; Not required "--without-systemduserunitdir") ; Not required - #:phases - (modify-phases %standard-phases - ;; Python references are not being patched in patch-phase of build, - ;; despite using python-wrapper as input. So we patch them manually. - (add-after 'unpack 'patch-python-references - (lambda* (#:key inputs #:allow-other-keys) - (with-directory-excursion "apps" - (substitute* '("blueman-adapters.in" "blueman-applet.in" - "blueman-manager.in" "blueman-mechanism.in" - "blueman-rfcomm-watcher.in" "blueman-sendto.in" - "blueman-services.in" "blueman-tray.in") - (("@PYTHON@") - (search-input-file inputs - (string-append - "/bin/python" - ,(version-major+minor - (package-version python))))))))) - ;; Fix loading of external programs. - (add-after 'unpack 'patch-external-programs - (lambda* (#:key inputs #:allow-other-keys) - (substitute* '("blueman/main/NetConf.py" - "blueman/main/PPPConnection.py") - (("/usr/sbin/bluetoothd") - (search-input-directory inputs - "/libexec/bluetooth/bluetoothd")) - (("/sbin/iptables") - (search-input-file inputs "/sbin/iptables")) - (("/usr/sbin/pppd") - (search-input-file inputs "/sbin/pppd"))))) - ;; Fix loading of pulseaudio libraries. - (add-after 'unpack 'patch-pulseaudio-libraries - (lambda* (#:key inputs #:allow-other-keys) - (let* ((pulseaudio (assoc-ref inputs "pulseaudio")) - (pulse (string-append pulseaudio "/lib/libpulse.so.0")) - (pulse-glib (string-append pulseaudio - "/lib/libpulse-mainloop-glib.so.0"))) - (with-directory-excursion "blueman/main" - (substitute* "PulseAudioUtils.py" - (("libpulse.so.0") pulse) - (("libpulse-mainloop-glib.so.0") pulse-glib)))))) - ;; Fix running of blueman programs. - (add-after 'glib-or-gtk-wrap 'wrap-blueman-progs - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin/blueman-")) - (libexec (string-append out "/libexec/blueman-")) - (lib (string-append out "/lib/python" - ,(version-major+minor - (package-version python)) - "/site-packages"))) - (for-each - (lambda (program) - (wrap-program program - `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,lib)) - `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))) - (append - (map (lambda (prog) (string-append bin prog)) - '("adapters" "applet" "manager" - "sendto" "services" "tray")) - (map (lambda (prog) (string-append libexec prog)) - '("mechanism" "rfcomm-watcher")))))))))) + #:phases + #~(modify-phases %standard-phases + ;; Python references are not being patched in patch-phase of build, + ;; despite using python-wrapper as input. So we patch them manually. + (add-after 'unpack 'patch-python-references + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "apps" + (substitute* '("blueman-adapters.in" "blueman-applet.in" + "blueman-manager.in" "blueman-mechanism.in" + "blueman-rfcomm-watcher.in" "blueman-sendto.in" + "blueman-services.in" "blueman-tray.in") + (("@PYTHON@") + (search-input-file inputs + (string-append + "/bin/python" + #$(version-major+minor + (package-version (this-package-input "python-wrapper")))))))))) + ;; Fix loading of external programs. + (add-after 'unpack 'patch-external-programs + (lambda* (#:key inputs #:allow-other-keys) + (substitute* '("blueman/main/NetConf.py" + "blueman/main/PPPConnection.py") + (("/usr/sbin/bluetoothd") + (search-input-directory inputs + "/libexec/bluetooth/bluetoothd")) + (("/sbin/iptables") + (search-input-file inputs "/sbin/iptables")) + (("/usr/sbin/pppd") + (search-input-file inputs "/sbin/pppd"))))) + ;; Fix loading of pulseaudio libraries. + (add-after 'unpack 'patch-pulseaudio-libraries + (lambda* (#:key inputs #:allow-other-keys) + (let* ((pulseaudio #$(this-package-input "pulseaudio")) + (pulse (string-append pulseaudio "/lib/libpulse.so.0")) + (pulse-glib (string-append pulseaudio + "/lib/libpulse-mainloop-glib.so.0"))) + (with-directory-excursion "blueman/main" + (substitute* "PulseAudioUtils.py" + (("libpulse.so.0") pulse) + (("libpulse-mainloop-glib.so.0") pulse-glib)))))) + ;; Fix running of blueman programs. + (add-after 'glib-or-gtk-wrap 'wrap-blueman-progs + (lambda* (#:key outputs #:allow-other-keys) + (let* ((bin (string-append #$output "/bin/blueman-")) + (libexec (string-append #$output "/libexec/blueman-")) + (lib (string-append #$output "/lib/python" + #$(version-major+minor + (package-version (this-package-input "python-wrapper"))) + "/site-packages"))) + (for-each + (lambda (program) + (wrap-program program + `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,lib)) + `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))) + (append + (map (lambda (prog) (string-append bin prog)) + '("adapters" "applet" "manager" + "sendto" "services" "tray")) + (map (lambda (prog) (string-append libexec prog)) + '("mechanism" "rfcomm-watcher")))))))))) (native-inputs (list python-cython `(,glib "bin") diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm index ac283bd019..e78a1f614f 100644 --- a/gnu/packages/openstack.scm +++ b/gnu/packages/openstack.scm @@ -115,20 +115,30 @@ formatters, and other extensions.") (define-public python-debtcollector (package (name "python-debtcollector") - (version "1.19.0") + (version "3.0.0") (source (origin (method url-fetch) (uri (pypi-uri "debtcollector" version)) (sha256 - (base32 - "06c7vyn184y9f0lsrwaz13aq63hdz5fjrd191b8nifx6acsni42f")))) - (build-system python-build-system) + (base32 "0vzarkvjclci98d8lvkix6qj59f7rxp1qg2x6q6is7qfbg91g29a")) + (modules '((guix build utils))) + (snippet #~(begin + (substitute* "test-requirements.txt" + (("^(coverage|hacking|pre-commit).*") + "")))))) + (build-system pyproject-build-system) (propagated-inputs - (list python-pbr python-six python-wrapt)) + (list python-pbr python-wrapt)) (native-inputs - (list ;; Tests. - python-subunit python-testrepository python-testtools)) + (list python-doc8 + python-fixtures + python-openstackdocstheme + python-reno + python-setuptools + python-stestr + python-testtools + python-wheel)) (home-page "https://www.openstack.org/") (synopsis "Find deprecated patterns and strategies in Python code") @@ -386,11 +396,11 @@ extensions.") python-fixtures python-jsonschema python-netaddr - python-oslo.concurrency - python-oslo.config - python-oslo.log - python-oslo.serialization - python-oslo.utils + python-oslo-concurrency + python-oslo-config + python-oslo-log + python-oslo-serialization + python-oslo-utils python-paramiko python-prettytable python-pyyaml @@ -437,7 +447,7 @@ OpenStack deployment.") python-httplib2 python-iso8601 python-jsonschema - python-oslo.log + python-oslo-log python-paramiko python-six)) (native-inputs @@ -455,9 +465,9 @@ common features used in Tempest.") ;;; Packages from the Oslo library ;;; -(define-public python-oslo.concurrency +(define-public python-oslo-concurrency (package - (name "python-oslo.concurrency") + (name "python-oslo-concurrency") (version "5.0.0") (source (origin (method url-fetch) @@ -490,8 +500,8 @@ common features used in Tempest.") python-fixtures python-stestr python-eventlet)) - (propagated-inputs (list python-fasteners python-oslo.config - python-oslo.i18n python-oslo.utils)) + (propagated-inputs (list python-fasteners python-oslo-config + python-oslo-i18n python-oslo-utils)) (home-page "https://docs.openstack.org/oslo.concurrency/latest/") (synopsis "Oslo Concurrency library") (description "The Oslo Concurrency Library provides utilities for safely @@ -499,9 +509,9 @@ running multi-thread, multi-process applications using locking mechanisms and for running external processes.") (license asl2.0))) -(define-public python-oslo.config +(define-public python-oslo-config (package - (name "python-oslo.config") + (name "python-oslo-config") (version "8.7.1") (source (origin @@ -515,7 +525,7 @@ for running external processes.") (propagated-inputs (list python-debtcollector python-netaddr - python-oslo.i18n + python-oslo-i18n python-rfc3986 python-requests python-stevedore @@ -527,9 +537,9 @@ for running external processes.") .ini style configuration files.") (license asl2.0))) -(define-public python-oslo.context +(define-public python-oslo-context (package - (name "python-oslo.context") + (name "python-oslo-context") (version "5.0.0") (source (origin @@ -566,9 +576,9 @@ about a request context. The request context is usually populated in the WSGI pipeline and used by various modules such as logging.") (license asl2.0))) -(define-public python-oslo.i18n +(define-public python-oslo-i18n (package - (name "python-oslo.i18n") + (name "python-oslo-i18n") (version "3.20.0") (source (origin @@ -592,9 +602,9 @@ internationalization (i18n) features, especially translation for text strings in an application or library.") (license asl2.0))) -(define-public python-oslo.log +(define-public python-oslo-log (package - (name "python-oslo.log") + (name "python-oslo-log") (version "5.0.0") (source (origin @@ -612,11 +622,11 @@ in an application or library.") (propagated-inputs (list python-dateutil python-debtcollector - python-oslo.config - python-oslo.context - python-oslo.i18n - python-oslo.utils - python-oslo.serialization + python-oslo-config + python-oslo-context + python-oslo-i18n + python-oslo-utils + python-oslo-serialization python-pyinotify)) (native-inputs (list python-fixtures python-oslotest python-stestr python-testtools @@ -629,9 +639,9 @@ configuration for all OpenStack projects. It also provides custom formatters, handlers and support for context specific logging (like resource id’s etc).") (license asl2.0))) -(define-public python-oslo.serialization +(define-public python-oslo-serialization (package - (name "python-oslo.serialization") + (name "python-oslo-serialization") (version "4.2.0") (source (origin @@ -647,10 +657,10 @@ handlers and support for context specific logging (like resource id’s etc).") (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "stestr" "run"))))))) (propagated-inputs - (list python-msgpack python-oslo.utils python-pbr python-pytz)) + (list python-msgpack python-oslo-utils python-pbr python-pytz)) (native-inputs ;; For tests. - (list python-netaddr python-oslo.i18n python-oslotest python-stestr)) + (list python-netaddr python-oslo-i18n python-oslotest python-stestr)) (home-page "https://launchpad.net/oslo") (synopsis "Oslo serialization library") (description @@ -757,9 +767,9 @@ documentation from the OpenStack project.") for debugging, and better support for mocking results.") (license asl2.0))) -(define-public python-oslo.utils +(define-public python-oslo-utils (package - (name "python-oslo.utils") + (name "python-oslo-utils") (version "4.12.0") (source (origin @@ -776,7 +786,7 @@ for debugging, and better support for mocking results.") (when tests? (invoke "stestr" "run"))))))) (propagated-inputs (list python-debtcollector - python-oslo.i18n + python-oslo-i18n python-iso8601 python-netaddr python-netifaces @@ -843,8 +853,8 @@ handling.") python-hacking python-lxml python-oauthlib - python-oslo.config - python-oslo.utils + python-oslo-config + python-oslo-utils python-oslotest python-pbr python-pyyaml @@ -907,10 +917,10 @@ process of writing new clients.") python-iso8601 python-keystoneauth1 python-netaddr - python-oslo.config - python-oslo.i18n - python-oslo.serialization - python-oslo.utils + python-oslo-config + python-oslo-i18n + python-oslo-serialization + python-oslo-utils python-prettytable python-requests python-six @@ -1071,7 +1081,7 @@ regardless of whether they are bundled or not.") python-statsd python-stestr python-testscenarios - python-oslo.config + python-oslo-config python-oslotest)) (propagated-inputs (list python-appdirs python-cryptography diff --git a/gnu/packages/orange.scm b/gnu/packages/orange.scm index 9cc1f29767..3240ede663 100644 --- a/gnu/packages/orange.scm +++ b/gnu/packages/orange.scm @@ -31,6 +31,7 @@ #:use-module (gnu packages graph) #:use-module (gnu packages machine-learning) #:use-module (gnu packages python-build) + #:use-module (gnu packages python-check) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) @@ -59,24 +60,42 @@ "test_copy_cut_paste" ;; AttributeError: 'NoneType' object has no attribute ;; 'isEnabled' - "test_item_context_menu") + "test_item_context_menu" + ;; Tests fail with error: Failed: CALL ERROR: Exceptions + ;; caught in Qt event loop. + "test_create_new_window" + "test_new_window" + "test_dont_load_swp_on_new_window" + "test_toolbox" + "test_widgettoolgrid" + "test_editlinksnode" + "test_links_edit" + "test_links_edit_widget" + "test_flattened" + "test_tooltree_registry") " and not ")) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'relax-requirements - (lambda _ - (substitute* "setup.py" - ;; Relax hard requirment of PIP. - ((".*pip>=18.0.*") "")))) + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "setup.py" + ;; Relax hard requirment of PIP. + ((".*pip>=18.0.*") "")))) (add-before 'check 'pre-check (lambda _ (setenv "HOME" "/tmp") + (setenv "QT_PLUGIN_PATH" + (string-append #$(this-package-input "qtbase") "/lib/qt6/plugins:" + (getenv "QT_PLUGIN_PATH"))) (setenv "QT_QPA_PLATFORM" "offscreen")))))) (native-inputs (list python-pytest + python-pytest-qt python-setuptools python-trubar python-wheel)) + (inputs + (list qtbase)) (propagated-inputs (list python-anyqt python-cachecontrol diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index e6a616fe00..f0a9b39e25 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -1123,6 +1123,34 @@ Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and environments.") (license license:bsd-3))) +(define-public python-conda-inject + (package + (name "python-conda-inject") + (version "1.3.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/koesterlab/conda-inject") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1aig9l676wc2sjb20y7rdqf0hfcfjhh92yfiy82mf7kfnv7rp3rk")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ; tests require setting up Conda + (native-inputs + (list python-poetry-core)) + (propagated-inputs + (list python-pyyaml)) + (home-page "https://github.com/koesterlab/conda-inject") + (synopsis "Inject a conda environment into the current python environment") + (description + "This package provides helper functions for injecting a conda +environment into the current python environment (by modifying @code{sys.path}, +without actually changing the current python environment).") + (license license:expat))) + (define-public python-conda-package-handling (package (name "python-conda-package-handling") @@ -1315,7 +1343,7 @@ written entirely in Python.") (define-public conan (package (name "conan") - (version "2.0.9") + (version "2.7.1") (source (origin (method git-fetch) ; no tests in PyPI archive @@ -1324,13 +1352,74 @@ written entirely in Python.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1ykfj7c3i0b57s7ql3p2lawxdzd2cn36f3k8p64lyzla8rwv4xdx")))) - (build-system python-build-system) + (base32 "00mrx1ighvf6r6fy2iqxr286w3jfd0gwlzcqsw15cm9axblx5av9")))) + (build-system pyproject-build-system) (arguments (list - #:modules '((guix build python-build-system) + #:modules '((guix build pyproject-build-system) (guix build utils) (ice-9 format)) + #:test-flags + (let ((system (or (%current-target-system) + (%current-system)))) + #~(list "-n" (number->string (parallel-job-count)) + "-m" "not slow" + "--ignore=test/performance/" + ;; E ModuleNotFoundError: No module named 'docker' + "--ignore=test/functional/command/runner_test.py" + ;; Disable problematic tests. + "-k" + (string-append + ;; These tests rely on networking. + "not download_retries_errors " + "and not ftp " + ;; These tests are for old versions of cmake. + "and not test_custom_cmake_3_16 " + "and not test_custom_cmake_3_17 " + "and not test_custom_cmake_3_19 " + ;; Guix sets PKG_CONFIG_PATH itself, which is not + ;; expected by the following test. + "and not pkg_config_path " + "and not compare " ;caused by newer node-semver? + ;; This test hard-codes a compiler version. + "and not test_toolchain " + ;; The 'test_list' tests may fail + ;; non-deterministically (see: + ;; https://github.com/conan-io/conan/issues/13583). + "and not test_list " + ;; These tests fail when Autoconf attempt to load a + ;; shared library in the same directory (see: + ;; https://github.com/conan-io/conan/issues/13577). + "and not test_other_client_can_link_autotools " + "and not test_autotools_lib_template " + ;; Sometimes fail: https://github.com/conan-io/conan/issues/15936 + "and not test_basic_parallel_install " + ;; These tests require additional build tools + "and not test_premake " + "and not test_sconsdeps " + ;; Unclear why libc is not found properly + "and not test_profile_detect_libc " + #$(if (not (string-prefix? "x86_64" system)) + ;; These tests either assume the machine is + ;; x86_64, or require a cross-compiler to target + ;; it. + (string-append + "and not cpp_package " + "and not exclude_code_analysis " + "and not cmakedeps_multi " + "and not locally_build_linux " + "and not custom_configuration " + "and not package_from_system " + "and not cross_build_command " + "and not test_package " + "and not test_same ") + "") + #$(if (not (or (string-prefix? "x86_64" system) + (string-prefix? "i686" system))) + ;; This test only works with default arch "x86", + ;; "x86_64", "sparc" or "sparcv9". + "and not settings_as_a_dict_conanfile " + "")))) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-paths @@ -1345,21 +1434,22 @@ written entirely in Python.") ;; The test suite expects GCC 9 to be used (see: ;; https://github.com/conan-io/conan/issues/13575). Render the ;; check version agnostic. - (substitute* "conans/test/functional/toolchains/meson/_base.py" + (substitute* "test/functional/toolchains/meson/_base.py" (("__GNUC__9") "__GNUC__")))) (add-after 'unpack 'use-current-cmake-for-tests (lambda _ - (substitute* (find-files "conans/test" "\\.py$") - (("@pytest.mark.tool\\(\"cmake\", \"3.23\")") + (substitute* (find-files "test" "\\.py$") + (("@pytest.mark.tool\\(\"cmake\", \".*\")") "@pytest.mark.tool(\"cmake\")")))) (add-before 'check 'configure-tests (lambda _ (let* ((cmake-version #$(version-major+minor - (package-version cmake))) + (package-version + (this-package-native-input "cmake")))) (pkg-config-version #$(version-major+minor (package-version pkg-config)))) - (call-with-output-file "conans/test/conftest_user.py" + (call-with-output-file "test/conftest_user.py" (lambda (port) (format port "\ tools_locations = { @@ -1378,61 +1468,12 @@ tools_locations = { (add-before 'check 'set-home (lambda _ (setenv "HOME" "/tmp"))) - (replace 'check - (lambda* (#:key tests? outputs #:allow-other-keys) - (define system #$(or (%current-target-system) - (%current-system))) + (add-before 'check 'configure-tests + (lambda* (#:key tests? #:allow-other-keys) (when tests? (setenv "CONFIG_SHELL" (which "sh")) (setenv "PATH" (string-append (getenv "PATH") ":" - #$output "/bin")) - (invoke "python" "-m" "pytest" "-vv" - "-n" (number->string (parallel-job-count)) - "-m" "not slow" - ;; Disable problematic tests. - "-k" - (string-append - ;; These tests rely on networking. - "not download_retries_errors " - "and not ftp " - ;; Guix sets PKG_CONFIG_PATH itself, which is not - ;; expected by the following test. - "and not pkg_config_path " - "and not compare " ;caused by newer node-semver? - ;; This test hard-codes a compiler version. - "and not test_toolchain " - ;; The 'test_list' tests may fail - ;; non-deterministically (see: - ;; https://github.com/conan-io/conan/issues/13583). - "and not test_list " - ;; These tests fail when Autoconf attempt to load a - ;; shared library in the same directory (see: - ;; https://github.com/conan-io/conan/issues/13577). - "and not test_other_client_can_link_autotools " - "and not test_autotools_lib_template " - ;; Sometimes fail: https://github.com/conan-io/conan/issues/15936 - "and not test_basic_parallel_install " - (if (not (string-prefix? "x86_64" system)) - ;; These tests either assume the machine is - ;; x86_64, or require a cross-compiler to target - ;; it. - (string-append - "and not cpp_package " - "and not exclude_code_analysis " - "and not cmakedeps_multi " - "and not locally_build_linux " - "and not custom_configuration " - "and not package_from_system " - "and not cross_build_command " - "and not test_package " - "and not test_same ") - "") - (if (not (or (string-prefix? "x86_64" system) - (string-prefix? "i686" system))) - ;; This test only works with default arch "x86", - ;; "x86_64", "sparc" or "sparcv9". - "and not settings_as_a_dict_conanfile " - ""))))))))) + #$output "/bin")))))))) (propagated-inputs (list python-bottle python-colorama @@ -1450,7 +1491,7 @@ tools_locations = { python-requests python-six python-tqdm - python-urllib3)) + python-urllib3-1.26)) (inputs (list coreutils)) ;for printenv (native-inputs @@ -1467,7 +1508,9 @@ tools_locations = { python-parameterized python-pytest python-pytest-xdist + python-setuptools python-webtest + python-wheel which)) (home-page "https://conan.io") (synopsis "Decentralized C/C++ package manager") diff --git a/gnu/packages/patches/onionshare-cli-async-mode.patch b/gnu/packages/patches/onionshare-cli-async-mode.patch deleted file mode 100644 index b71b56046d..0000000000 --- a/gnu/packages/patches/onionshare-cli-async-mode.patch +++ /dev/null @@ -1,25 +0,0 @@ -Specifying the `async_mode` parameter seems to have been a workaround for -packaging on Windows and macOS. If not given, flask_socketio.SocketIO will -probe for an available asynchronous model, e.g. `eventlet`, and otherwise gets -stuck if `gevent-socketio` is not available. - -c.f. https://github.com/onionshare/onionshare/commit/ec7fa4ef16c9e1ba6028ee927c23f76c399a17a6 -and https://github.com/onionshare/onionshare/issues/1510 - -diff --git a/cli/onionshare_cli/web/web.py b/cli/onionshare_cli/web/web.py -index 64844b5..7e1b095 100644 ---- a/cli/onionshare_cli/web/web.py -+++ b/cli/onionshare_cli/web/web.py -@@ -164,10 +164,10 @@ class Web: - elif self.mode == "chat": - if self.common.verbose: - self.socketio = SocketIO( -- async_mode="gevent", logger=True, engineio_logger=True -+ logger=True, engineio_logger=True - ) - else: -- self.socketio = SocketIO(async_mode="gevent") -+ self.socketio = SocketIO() - self.socketio.init_app(self.app) - self.chat_mode = ChatModeWeb(self.common, self) - diff --git a/gnu/packages/patches/python-3.11-fix-tests.patch b/gnu/packages/patches/python-3.11-fix-tests.patch new file mode 100644 index 0000000000..1385203a05 --- /dev/null +++ b/gnu/packages/patches/python-3.11-fix-tests.patch @@ -0,0 +1,430 @@ +From f0698133e7d6c353a3e6ae0fc62e57ba558a9bc0 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer <maxim.cournoyer@gmail.com> +Date: Wed, 28 Oct 2020 22:55:05 -0400 +Subject: [PATCH] Skip problematic Python 3 tests in Guix. + +A subset of the hunks in this patch is tracked upstream at +https://bugs.python.org/issue38845, which was contributed by Tanguy Le +Carrour <tanguy@bioneland.org>. +--- + Lib/ctypes/test/test_callbacks.py | 3 +++ + Lib/ctypes/test/test_find.py | 1 + + Lib/ctypes/test/test_libc.py | 3 +++ + Lib/distutils/tests/test_archive_util.py | 2 ++ + Lib/distutils/tests/test_sdist.py | 1 + + Lib/test/_test_multiprocessing.py | 2 ++ + Lib/test/test_asyncio/test_base_events.py | 2 ++ + Lib/test/test_generators.py | 1 + + Lib/test/test_pathlib.py | 3 +-- + Lib/test/test_pdb.py | 4 ++-- + Lib/test/test_regrtest.py | 2 ++ + Lib/test/test_resource.py | 1 + + Lib/test/test_shutil.py | 2 ++ + Lib/test/test_signal.py | 4 ++++ + Lib/test/test_socket.py | 8 ++++++++ + Lib/test/test_spwd.py | 6 ++---- + Lib/test/test_tarfile.py | 9 ++++++--- + Lib/test/test_threading.py | 3 +++ + Lib/test/test_unicodedata.py | 1 + + Tools/scripts/run_tests.py | 2 +- + 20 files changed, 48 insertions(+), 12 deletions(-) + +diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.py +index d8e9c5a760..94fc5929c9 100644 +--- a/Lib/ctypes/test/test_callbacks.py ++++ b/Lib/ctypes/test/test_callbacks.py +@@ -5,6 +5,7 @@ from test import support + from ctypes import * + from ctypes.test import need_symbol + import _ctypes_test ++import platform + + class Callbacks(unittest.TestCase): + functype = CFUNCTYPE +@@ -178,6 +179,8 @@ class SampleCallbacksTestCase(unittest.TestCase): + + self.assertLess(diff, 0.01, "%s not less than 0.01" % diff) + ++ @unittest.skipIf(platform.machine() in ['mips64'], ++ "This test fails on this platform") + def test_issue_8959_a(self): + from ctypes.util import find_library + libc_path = find_library("c") +diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py +index 92ac1840ad..c8eb75dedd 100644 +--- a/Lib/ctypes/test/test_find.py ++++ b/Lib/ctypes/test/test_find.py +@@ -116,6 +116,7 @@ class FindLibraryLinux(unittest.TestCase): + with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None): + self.assertNotEqual(find_library('c'), None) + ++ @unittest.skipIf(True, "ldconfig is not used on Guix") + def test_find_library_with_ld(self): + with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \ + unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None): +diff --git a/Lib/ctypes/test/test_libc.py b/Lib/ctypes/test/test_libc.py +index 56285b5ff8..c088ab3db8 100644 +--- a/Lib/ctypes/test/test_libc.py ++++ b/Lib/ctypes/test/test_libc.py +@@ -2,6 +2,7 @@ import unittest + + from ctypes import * + import _ctypes_test ++import platform + + lib = CDLL(_ctypes_test.__file__) + +@@ -17,6 +18,8 @@ class LibTest(unittest.TestCase): + import math + self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0)) + ++ @unittest.skipIf(platform.machine() in ['mips64'], ++ "This test fails on this platform") + def test_qsort(self): + comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char)) + lib.my_qsort.argtypes = c_void_p, c_size_t, c_size_t, comparefunc +diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py +index e9aad0e40f..8bbaa51ee5 100644 +--- a/Lib/distutils/tests/test_archive_util.py ++++ b/Lib/distutils/tests/test_archive_util.py +@@ -333,6 +333,7 @@ class ArchiveUtilTestCase(support.TempdirManager, + self.assertEqual(os.path.basename(res), 'archive.tar.xz') + self.assertEqual(self._tarinfo(res), self._created_files) + ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support +@@ -362,6 +363,7 @@ class ArchiveUtilTestCase(support.TempdirManager, + + @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_tarfile_root_owner(self): + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') +diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py +index 23db126959..6e2329df7d 100644 +--- a/Lib/distutils/tests/test_sdist.py ++++ b/Lib/distutils/tests/test_sdist.py +@@ -443,6 +443,7 @@ class SDistTestCase(BasePyPIRCCommandTestCase): + "The tar command is not found") + @unittest.skipIf(find_executable('gzip') is None, + "The gzip command is not found") ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_distribution_owner_group(self): + # now building a sdist + dist, cmd = self.get_cmd() +diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py +index e47905c863..31a5a9c308 100644 +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -1577,6 +1577,7 @@ class _TestCondition(BaseTestCase): + if pid is not None: + os.kill(pid, signal.SIGINT) + ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_wait_result(self): + if isinstance(self, ProcessesMixin) and sys.platform != 'win32': + pid = os.getpid() +@@ -3905,6 +3906,7 @@ class _TestSharedMemory(BaseTestCase): + sms.close() + + @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_shared_memory_SharedMemoryServer_ignores_sigint(self): + # bpo-36368: protect SharedMemoryManager server process from + # KeyboardInterrupt signals. +diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py +index 533d5cc7f5..c4f860cc3b 100644 +--- a/Lib/test/test_asyncio/test_base_events.py ++++ b/Lib/test/test_asyncio/test_base_events.py +@@ -1341,6 +1341,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase): + self._test_create_connection_ip_addr(m_socket, False) + + @patch_socket ++ @unittest.skipUnless(support.is_resource_enabled('network'), ++ 'network is not enabled') + def test_create_connection_service_name(self, m_socket): + m_socket.getaddrinfo = socket.getaddrinfo + sock = m_socket.socket.return_value +diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py +index 3bf1522808..04bac8a7db 100644 +--- a/Lib/test/test_generators.py ++++ b/Lib/test/test_generators.py +@@ -33,6 +33,7 @@ class SignalAndYieldFromTest(unittest.TestCase): + else: + return "FAILED" + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment') + def test_raise_and_yield_from(self): + gen = self.generator1() + gen.send(None) +diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py +index 3da35710b9..5404f9193d 100644 +--- a/Lib/test/test_pathlib.py ++++ b/Lib/test/test_pathlib.py +@@ -2408,10 +2408,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase): + self.assertEqual(given, expect) + self.assertEqual(set(p.rglob("FILEd*")), set()) + +- @unittest.skipUnless(hasattr(pwd, 'getpwall'), +- 'pwd module does not expose getpwall()') +- @unittest.skipIf(sys.platform == "vxworks", +- "no home directory on VxWorks") ++ @unittest.skipIf(True, "Guix builder home is '/' which causes trouble for these tests") + def test_expanduser(self): + P = self.cls + support.import_module('pwd') +diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py +index 8016f81e5a..10190486b4 100644 +--- a/Lib/test/test_pdb.py ++++ b/Lib/test/test_pdb.py +@@ -1219,11 +1219,11 @@ def test_pdb_issue_20766(): + > <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function() + -> print('pdb %d: %s' % (i, sess._previous_sigint_handler)) + (Pdb) continue +- pdb 1: <built-in function default_int_handler> ++ pdb 1: 1 + > <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function() + -> print('pdb %d: %s' % (i, sess._previous_sigint_handler)) + (Pdb) continue +- pdb 2: <built-in function default_int_handler> ++ pdb 2: 1 + """ + + +diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py +index a77638b10a..2069b349a8 100644 +--- a/Lib/test/test_regrtest.py ++++ b/Lib/test/test_regrtest.py +@@ -811,6 +811,7 @@ class ArgsTestCase(BaseTestCase): + output = self.run_tests('--fromfile', filename) + self.check_executed_tests(output, tests) + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.') + def test_interrupted(self): + code = TEST_INTERRUPTED + test = self.create_test('sigint', code=code) +@@ -828,6 +829,7 @@ class ArgsTestCase(BaseTestCase): + % (self.TESTNAME_REGEX, len(tests))) + self.check_line(output, regex) + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.') + def test_slowest_interrupted(self): + # Issue #25373: test --slowest with an interrupted test + code = TEST_INTERRUPTED +diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py +index e5ece5284c..5299e54507 100644 +--- a/Lib/test/test_resource.py ++++ b/Lib/test/test_resource.py +@@ -148,6 +148,7 @@ class ResourceTest(unittest.TestCase): + + @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit') + @support.requires_linux_version(2, 6, 36) ++ @unittest.skipIf(True, "Bug: the PermissionError is not raised") + def test_prlimit(self): + self.assertRaises(TypeError, resource.prlimit) + self.assertRaises(ProcessLookupError, resource.prlimit, +diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py +index e19af64be0..1b893df6fa 100644 +--- a/Lib/test/test_shutil.py ++++ b/Lib/test/test_shutil.py +@@ -1427,6 +1427,7 @@ class TestArchives(BaseTest, unittest.TestCase): + base_name = os.path.join(tmpdir, 'archive') + self.assertRaises(ValueError, make_archive, base_name, 'xxx') + ++ @unittest.skipIf(True, "The Guix build container has no root user") + @support.requires_zlib() + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations +@@ -1455,6 +1456,7 @@ class TestArchives(BaseTest, unittest.TestCase): + self.assertTrue(os.path.isfile(res)) + + ++ @unittest.skipIf(True, "The Guix build container has no root user") + @support.requires_zlib() + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") + def test_tarfile_root_owner(self): +diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py +index 45553a6a42..55623f01a3 100644 +--- a/Lib/test/test_signal.py ++++ b/Lib/test/test_signal.py +@@ -78,7 +78,8 @@ class PosixTests(unittest.TestCase): + self.assertLess(len(s), signal.NSIG) + + @unittest.skipUnless(sys.executable, "sys.executable required.") + @support.requires_subprocess() ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers exit via SIGINT.""" + process = subprocess.run( +@@ -128,7 +129,8 @@ class WindowsSignalTests(unittest.TestCase): + signal.signal(7, handler) + + @unittest.skipUnless(sys.executable, "sys.executable required.") + @support.requires_subprocess() ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT.""" + # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here +@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase): + + class RaiseSignalTest(unittest.TestCase): + ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_sigint(self): + with self.assertRaises(KeyboardInterrupt): + signal.raise_signal(signal.SIGINT) +@@ -1275,6 +1278,7 @@ class RaiseSignalTest(unittest.TestCase): + + class PidfdSignalTest(unittest.TestCase): + ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + @unittest.skipUnless( + hasattr(signal, "pidfd_send_signal"), + "pidfd support not built in", +diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py +index aefba4f397..6c89f558d5 100755 +--- a/Lib/test/test_socket.py ++++ b/Lib/test/test_socket.py +@@ -1009,6 +1009,8 @@ class GeneralModuleTests(unittest.TestCase): + if not fqhn in all_host_names: + self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names))) + ++ @unittest.skipUnless(support.is_resource_enabled('network'), ++ 'network is not enabled') + def test_host_resolution(self): + for addr in [socket_helper.HOSTv4, '10.0.0.1', '255.255.255.255']: + self.assertEqual(socket.gethostbyname(addr), addr) +@@ -1140,6 +1142,8 @@ class GeneralModuleTests(unittest.TestCase): + self.assertWarns(DeprecationWarning, socket.ntohs, k) + self.assertWarns(DeprecationWarning, socket.htons, k) + ++ @unittest.skipUnless(os.path.exists("/etc/services"), ++ "getservbyname uses /etc/services, which is not in the chroot") + def testGetServBy(self): + eq = self.assertEqual + # Find one service that exists, then check all the related interfaces. +@@ -1489,6 +1493,8 @@ class GeneralModuleTests(unittest.TestCase): + raise + self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None) + ++ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), ++ "getaddrinfo() will fail") + def testGetaddrinfo(self): + try: + socket.getaddrinfo('localhost', 80) +@@ -1571,6 +1577,8 @@ class GeneralModuleTests(unittest.TestCase): + # only IP addresses are allowed + self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0) + ++ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), ++ "getaddrinfo() will fail") + @unittest.skipUnless(support.is_resource_enabled('network'), + 'network is not enabled') + def test_idna(self): +diff --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py +index 07793c84c8..fec672bcbe 100644 +--- a/Lib/test/test_spwd.py ++++ b/Lib/test/test_spwd.py +@@ -5,8 +5,7 @@ from test import support + spwd = support.import_module('spwd') + + +-@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0, +- 'root privileges required') ++@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow') + class TestSpwdRoot(unittest.TestCase): + + def test_getspall(self): +@@ -56,8 +55,7 @@ class TestSpwdRoot(unittest.TestCase): + self.assertRaises(TypeError, spwd.getspnam, bytes_name) + + +-@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() != 0, +- 'non-root user required') ++@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow') + class TestSpwdNonRoot(unittest.TestCase): + + def test_getspnam_exception(self): +diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py +index 29cde91bf7..8d0f20e8bf 100644 +--- a/Lib/test/test_tarfile.py ++++ b/Lib/test/test_tarfile.py +@@ -2607,9 +2607,12 @@ def root_is_uid_gid_0(): + import pwd, grp + except ImportError: + return False +- if pwd.getpwuid(0)[0] != 'root': +- return False +- if grp.getgrgid(0)[0] != 'root': ++ try: ++ if pwd.getpwuid(0)[0] != 'root': ++ return False ++ if grp.getgrgid(0)[0] != 'root': ++ return False ++ except KeyError: + return False + return True + +diff --git a/Lib/test/test_tools/test_freeze.py b/Lib/test/test_tools/test_freeze.py +index 0e7ed67de7..6539a2983b 100644 +--- a/Lib/test/test_tools/test_freeze.py ++++ b/Lib/test/test_tools/test_freeze.py +@@ -23,6 +23,7 @@ + 'test is too slow with PGO') + class TestFreeze(unittest.TestCase): + ++ @unittest.skipIf(True, 'Fails on Guix.') + @support.requires_resource('cpu') # Building Python is slow + def test_freeze_simple_script(self): + script = textwrap.dedent(""" +diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py +index c21cdf8eb7..6c9d575032 100644 +--- a/Lib/test/test_threading.py ++++ b/Lib/test/test_threading.py +@@ -1398,5 +1398,6 @@ class MiscTestCase(unittest.TestCase): + signal.signal(signum, handler) + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build container.') + def test_interrupt_main_subthread(self): + # Calling start_new_thread with a function that executes interrupt_main + # should raise KeyboardInterrupt upon completion. +@@ -1409,6 +1410,8 @@ class InterruptMainTests(unittest.TestCase): + t.join() + t.join() + ++ ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build container.') + def test_interrupt_main_mainthread(self): + # Make sure that if interrupt_main is called in main thread that + # KeyboardInterrupt is raised instantly. +diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py +index b552d2bd17..28b1144e15 100644 +--- a/Lib/test/test_unicodedata.py ++++ b/Lib/test/test_unicodedata.py +@@ -309,6 +309,7 @@ class UnicodeMiscTest(UnicodeDatabaseTest): + self.assertEqual(len(lines), 1, + r"\u%.4x should not be a linebreak" % i) + ++@requires_resource('network') + class NormalizationTest(unittest.TestCase): + @staticmethod + def check_version(testfile): +diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py +index bcfa5e943b..1f2484971b 100644 +--- a/Tools/scripts/run_tests.py ++++ b/Tools/scripts/run_tests.py +@@ -41,7 +41,7 @@ def main(regrtest_args): + else: + args.extend(['-j', '0']) # Use all CPU cores + if not any(is_resource_use_flag(arg) for arg in regrtest_args): +- args.extend(['-u', 'all,-largefile,-audio,-gui']) ++ args.extend(['-u', 'all,-largefile,-audio,-gui,-network']) + + if cross_compile and hostrunner: + # If HOSTRUNNER is set and -p/--python option is not given, then +-- +2.29.2 + diff --git a/gnu/packages/patches/python-bed-reader-use-store-samples.patch b/gnu/packages/patches/python-bed-reader-use-store-samples.patch new file mode 100644 index 0000000000..813f155225 --- /dev/null +++ b/gnu/packages/patches/python-bed-reader-use-store-samples.patch @@ -0,0 +1,147 @@ +From 7e6bcdfeed54500ca533d2f0eb12078248c43c77 Mon Sep 17 00:00:00 2001 +Message-ID: <7e6bcdfeed54500ca533d2f0eb12078248c43c77.1743682382.git.ngraves@ngraves.fr> +From: Nicolas Graves <ngraves@ngraves.fr> +Date: Thu, 3 Apr 2025 11:33:58 +0200 +Subject: [PATCH] samples: Use deterministic samples in Guix. + +--- + bed_reader/_sample_data.py | 86 +++++++++----------------------------- + 1 file changed, 19 insertions(+), 67 deletions(-) + +diff --git a/bed_reader/_sample_data.py b/bed_reader/_sample_data.py +index 6ca4cc0..6a1146e 100644 +--- a/bed_reader/_sample_data.py ++++ b/bed_reader/_sample_data.py +@@ -1,33 +1,8 @@ ++import os + import tempfile + from pathlib import Path, PurePath + from typing import Union + +-try: +- import pooch +- +- """ +- Load sample data. +- """ +- +- POOCH = pooch.create( +- # Use the default cache folder for the OS +- path=pooch.os_cache("bed_reader"), +- # The remote data is on Github +- base_url="https://raw.githubusercontent.com/" +- + "fastlmm/bed-sample-files/main/", +- # If this is a development version, get the data from the master branch +- version_dev="main", +- # The registry specifies the files that can be fetched +- env="BED_READER_DATA_DIR", +- ) +- +- # Get registry file from package_data +- registry_file = Path(__file__).parent / "tests/registry.txt" +- # Load this registry file +- POOCH.load_registry(registry_file) +-except ImportError: +- pooch = None +- + + def sample_file(filepath: Union[str, Path]) -> str: + """Retrieve a sample .bed file. (Also retrieves associated .fam and .bim files). +@@ -40,50 +15,41 @@ def sample_file(filepath: Union[str, Path]) -> str: + Returns + ------- + str +- Local name of sample .bed file. +- +- +- .. note:: +- This function requires the :mod:`pooch` package. Install `pooch` with: +- +- .. code-block:: bash +- +- pip install --upgrade bed-reader[samples] +- +- +- By default this function puts files under the user's cache directory. +- Override this by setting +- the `BED_READER_DATA_DIR` environment variable. ++ Local path of sample .bed file. + + Example + -------- + + .. doctest:: + +- >>> # pip install bed-reader[samples] # if needed + >>> from bed_reader import sample_file + >>> + >>> file_name = sample_file("small.bed") + >>> print(f"The local file name is '{file_name}'") + The local file name is '...small.bed' +- + """ +- if pooch is None: +- raise ImportError( +- "The function sample_file() requires pooch. " +- + "Install it with 'pip install --upgrade bed-reader[samples]'.", ++ filepath = Path(filepath) ++ sample_dir = os.environ.get("BED_READER_DATA_DIR") ++ if sample_dir is None: ++ raise EnvironmentError( ++ "BED_READER_DATA_DIR environment variable is not set. " ++ "This should point to the directory containing the sample files." + ) + +- filepath = Path(filepath) +- file_string = str(filepath) +- if file_string.lower().endswith(".bed"): +- POOCH.fetch(file_string[:-4] + ".fam") +- POOCH.fetch(file_string[:-4] + ".bim") +- return POOCH.fetch(file_string) ++ file_path = Path(sample_dir) / filepath ++ ++ # Check if file exists ++ if not file_path.exists(): ++ raise FileNotFoundError( ++ f"Sample file '{filepath}' not found in {sample_dir}. " ++ f"Make sure you're using the latest samples in BED_READER_DATA_DIR." ++ ) ++ ++ return str(file_path) + + + def sample_url(filepath: Union[str, Path]) -> str: +- """Retrieve a URL to a sample .bed file. (Also makes ready associated .fam and .bim files). ++ """Retrieve a URL to a sample .bed file. + + Parameters + ---------- +@@ -95,25 +61,11 @@ def sample_url(filepath: Union[str, Path]) -> str: + str + URL to sample .bed file. + +- +- .. note:: +- This function requires the :mod:`pooch` package. Install `pooch` with: +- +- .. code-block:: bash +- +- pip install --upgrade bed-reader[samples] +- +- +- By default this function puts files under the user's cache directory. +- Override this by setting +- the `BED_READER_DATA_DIR` environment variable. +- + Example + -------- + + .. doctest:: + +- >>> # pip install bed-reader[samples] # if needed + >>> from bed_reader import sample_url + >>> + >>> url = sample_url("small.bed") +-- +2.49.0 + diff --git a/gnu/packages/patches/python-property-cached-asyncio-3_11.patch b/gnu/packages/patches/python-property-cached-asyncio-3_11.patch new file mode 100644 index 0000000000..21c176947e --- /dev/null +++ b/gnu/packages/patches/python-property-cached-asyncio-3_11.patch @@ -0,0 +1,201 @@ +From d89186b47dc25c5ef5907c146edf3f792d50774b Mon Sep 17 00:00:00 2001 +Message-ID: <d89186b47dc25c5ef5907c146edf3f792d50774b.1743608515.git.ngraves@ngraves.fr> +From: Nicolas Graves <ngraves@ngraves.fr> +Date: Wed, 2 Apr 2025 17:29:45 +0200 +Subject: [PATCH] Update to python 3.11 + +--- + property_cached/__init__.py | 21 +++------- + tests/test_async_cached_property.py | 3 +- + tests/test_coroutine_cached_property.py | 51 ++++++++++--------------- + 3 files changed, 27 insertions(+), 48 deletions(-) + +diff --git a/property_cached/__init__.py b/property_cached/__init__.py +index 3353048..c033542 100644 +--- a/property_cached/__init__.py ++++ b/property_cached/__init__.py +@@ -3,6 +3,7 @@ import functools + import pkg_resources + import threading + import weakref ++from inspect import iscoroutinefunction + from time import time + + +@@ -31,12 +32,12 @@ class cached_property(property): + if obj is None: + return self + +- if asyncio and asyncio.iscoroutinefunction(self.func): +- return self._wrap_in_coroutine(obj) +- + value = self.cache.get(obj, self._sentinel) + if value is self._sentinel: +- value = self.cache[obj] = self.func(obj) ++ if iscoroutinefunction(self.func): ++ self.cache[obj] = value = asyncio.ensure_future(self.func(obj)) ++ else: ++ self.cache[obj] = value = self.func(obj) + + return value + +@@ -49,18 +50,6 @@ class cached_property(property): + def __delete__(self, obj): + del self.cache[obj] + +- def _wrap_in_coroutine(self, obj): +- +- @functools.wraps(obj) +- @asyncio.coroutine +- def wrapper(): +- value = self.cache.get(obj, self._sentinel) +- if value is self._sentinel: +- self.cache[obj] = value = asyncio.ensure_future(self.func(obj)) +- return value +- +- return wrapper() +- + + class threaded_cached_property(cached_property): + """ +diff --git a/tests/test_async_cached_property.py b/tests/test_async_cached_property.py +index 1af139d..32b3410 100644 +--- a/tests/test_async_cached_property.py ++++ b/tests/test_async_cached_property.py +@@ -9,8 +9,7 @@ import property_cached as cached_property + + def unittest_run_loop(f): + def wrapper(*args, **kwargs): +- coro = asyncio.coroutine(f) +- future = coro(*args, **kwargs) ++ future = f(*args, **kwargs) + loop = asyncio.get_event_loop() + loop.run_until_complete(future) + +diff --git a/tests/test_coroutine_cached_property.py b/tests/test_coroutine_cached_property.py +index 40e443b..5864301 100644 +--- a/tests/test_coroutine_cached_property.py ++++ b/tests/test_coroutine_cached_property.py +@@ -14,8 +14,7 @@ import property_cached as cached_property + + def unittest_run_loop(f): + def wrapper(*args, **kwargs): +- coro = asyncio.coroutine(f) +- future = coro(*args, **kwargs) ++ future = f(*args, **kwargs) + loop = asyncio.get_event_loop() + loop.run_until_complete(future) + +@@ -33,14 +32,12 @@ def CheckFactory(cached_property_decorator): + self.control_total = 0 + self.cached_total = 0 + +- @asyncio.coroutine +- def add_control(self): ++ async def add_control(self): + self.control_total += 1 + return self.control_total + + @cached_property_decorator +- @asyncio.coroutine +- def add_cached(self): ++ async def add_cached(self): + self.cached_total += 1 + return self.cached_total + +@@ -52,74 +49,68 @@ class TestCachedProperty(unittest.TestCase): + + cached_property_factory = cached_property.cached_property + +- @asyncio.coroutine +- def assert_control(self, check, expected): ++ async def assert_control(self, check, expected): + """ + Assert that both `add_control` and 'control_total` equal `expected` + """ +- value = yield from check.add_control() ++ value = await check.add_control() + self.assertEqual(value, expected) + self.assertEqual(check.control_total, expected) + +- @asyncio.coroutine +- def assert_cached(self, check, expected): ++ async def assert_cached(self, check, expected): + """ + Assert that both `add_cached` and 'cached_total` equal `expected` + """ + print("assert_cached", check.add_cached) +- value = yield from check.add_cached ++ value = await check.add_cached + self.assertEqual(value, expected) + self.assertEqual(check.cached_total, expected) + + @unittest_run_loop +- @asyncio.coroutine +- def test_cached_property(self): ++ async def test_cached_property(self): + Check = CheckFactory(self.cached_property_factory) + check = Check() + + # The control shows that we can continue to add 1 +- yield from self.assert_control(check, 1) +- yield from self.assert_control(check, 2) ++ await self.assert_control(check, 1) ++ await self.assert_control(check, 2) + + # The cached version demonstrates how nothing is added after the first +- yield from self.assert_cached(check, 1) +- yield from self.assert_cached(check, 1) ++ await self.assert_cached(check, 1) ++ await self.assert_cached(check, 1) + + # The cache does not expire + with freeze_time("9999-01-01"): +- yield from self.assert_cached(check, 1) ++ await self.assert_cached(check, 1) + + # Typically descriptors return themselves if accessed though the class + # rather than through an instance. + self.assertTrue(isinstance(Check.add_cached, self.cached_property_factory)) + + @unittest_run_loop +- @asyncio.coroutine +- def test_reset_cached_property(self): ++ async def test_reset_cached_property(self): + Check = CheckFactory(self.cached_property_factory) + check = Check() + + # Run standard cache assertion +- yield from self.assert_cached(check, 1) +- yield from self.assert_cached(check, 1) ++ await self.assert_cached(check, 1) ++ await self.assert_cached(check, 1) + + # Clear the cache + del check.add_cached + + # Value is cached again after the next access +- yield from self.assert_cached(check, 2) +- yield from self.assert_cached(check, 2) ++ await self.assert_cached(check, 2) ++ await self.assert_cached(check, 2) + + @unittest_run_loop +- @asyncio.coroutine +- def test_none_cached_property(self): ++ async def test_none_cached_property(self): + class Check(object): + def __init__(self): + self.cached_total = None + + @self.cached_property_factory +- @asyncio.coroutine +- def add_cached(self): ++ async def add_cached(self): + return self.cached_total + +- yield from self.assert_cached(Check(), None) ++ await self.assert_cached(Check(), None) +-- +2.49.0 + diff --git a/gnu/packages/patches/python-sip-include-dirs.patch b/gnu/packages/patches/python-sip-include-dirs.patch index f2ef8fc1b2..e5626030b6 100644 --- a/gnu/packages/patches/python-sip-include-dirs.patch +++ b/gnu/packages/patches/python-sip-include-dirs.patch @@ -5,16 +5,15 @@ It seems that we cannot easily change the destination folder of these files though, so this variable must be set on a per-package basis (and non through search-path). ---- sip/sipbuild/builder.py 2023-03-22 09:06:37.588792878 +0100 -+++ sip/sipbuild/builder.py 2023-03-22 09:10:35.830181134 +0100 -@@ -254,6 +254,10 @@ +--- sip/sipbuild/builder.py ++++ sip/sipbuild/builder.py +@@ -227,5 +227,9 @@ os.path.join(project.target_dir, project.get_bindings_dir())) -+ # Add extra bindings from environment for GNU Guix. -+ if 'SIP_INCLUDE_DIRS' in os.environ: -+ sip_include_dirs.extend(os.environ['SIP_INCLUDE_DIRS'].split(os.pathsep)) ++ # Add extra bindings from environment for GNU Guix ++ if 'SIP_INCLUDE_DIRS' in os.environ: ++ sip_include_dirs.extend(os.environ['SIP_INCLUDE_DIRS'].split(os.pathsep)) + - # Generate the sip.h file for the shared sip module. - copy_sip_h(abi_major_version, project.build_dir, - project.sip_module, version_info=project.version_info) + # Generate the code for each set of bindings. + api_files = [] diff --git a/gnu/packages/patches/python-vaex-core-fix-tsl-use.patch b/gnu/packages/patches/python-vaex-core-fix-tsl-use.patch new file mode 100644 index 0000000000..f4f6fc1c48 --- /dev/null +++ b/gnu/packages/patches/python-vaex-core-fix-tsl-use.patch @@ -0,0 +1,67 @@ +From 8cb8808b3ceccf4ab3ac542739ef490abe7e76b3 Mon Sep 17 00:00:00 2001 +Message-ID: <8cb8808b3ceccf4ab3ac542739ef490abe7e76b3.1743597010.git.ngraves@ngraves.fr> +From: Nicolas Graves <ngraves@ngraves.fr> +Date: Wed, 2 Apr 2025 14:29:40 +0200 +Subject: [PATCH] Fix tsl map use + +--- + packages/vaex-core/src/hash_string.hpp | 25 ++++++++++++++++--------- + 1 file changed, 16 insertions(+), 9 deletions(-) + +diff --git a/packages/vaex-core/src/hash_string.hpp b/packages/vaex-core/src/hash_string.hpp +index d3b60199..0ed69d1c 100644 +--- a/packages/vaex-core/src/hash_string.hpp ++++ b/packages/vaex-core/src/hash_string.hpp +@@ -39,13 +39,15 @@ class hash_base : public hash_common<Derived, T, hashmap<T, int64_t>> { + for (int i = 0; i < nmaps; i++) { + string_arrays.emplace_back(std::make_shared<StringList64>()); + StringList64 *strings = string_arrays[i].get(); +- // equal_to<string_ref>& eq = this->maps[i].key_eq(); +- this->maps[i].m_ht.strings_equals = strings; +- this->maps[i].m_ht.strings_hash = strings; ++ equal_to<key_type> eq; ++ eq.strings_equals = strings; ++ hash<key_type> h; ++ h.strings_hash = strings; ++ this->maps[i] = hashmap_type(8, h, eq); + } + }; + +- virtual std::string _get(hashmap_type &map, typename hashmap_type::key_type key) override { return map.m_ht.strings_equals->get(key.index); }; ++ virtual std::string _get(hashmap_type &map, typename hashmap_type::key_type key) override { return string_arrays[0]->get(key.index); }; + + size_t bytes_used() const { + int64_t buffer_size = 0; // collect buffer size +@@ -391,9 +393,12 @@ class ordered_set : public hash_base<ordered_set<T>, T, T, V> { + template <class SL> + static ordered_set *create(std::shared_ptr<SL> keys, int64_t null_value, int64_t nan_count, int64_t null_count, std::string *fingerprint) { + ordered_set *set = new ordered_set(1); +- set->maps[0].m_ht.strings_equals = keys.get(); +- set->maps[0].m_ht.strings_hash = keys.get(); + set->string_arrays[0] = keys; ++ equal_to<key_type> eq; ++ eq.strings_equals = keys.get(); ++ hash<key_type> h; ++ h.strings_hash = keys.get(); ++ set->maps[0] = hashmap_type(keys->length, h, eq); + { + size_t size = keys->length; + set->maps[0].reserve(size); +@@ -701,9 +706,11 @@ class index_hash : public hash_base<index_hash<T>, T, T, V> { + // string_arrays_overflow.emplace_back(std::make_shared<StringList64>()); + // for each key in overflow, it should be present in the main string array + StringList64 *strings = this->string_arrays[i].get(); +- // equal_to<string_ref>& eq = this->maps[i].key_eq(); +- overflows[i].m_ht.strings_equals = strings; +- overflows[i].m_ht.strings_hash = strings; ++ equal_to<key_type> eq; ++ eq.strings_equals = strings; ++ hash<key_type> h; ++ h.strings_hash = strings; ++ overflows[i] = overflow_type(8, h, eq); + } + } + +-- +2.49.0 + diff --git a/gnu/packages/patches/python-wxwidgets-type-errors.patch b/gnu/packages/patches/python-wxwidgets-type-errors.patch deleted file mode 100644 index 53e48c0886..0000000000 --- a/gnu/packages/patches/python-wxwidgets-type-errors.patch +++ /dev/null @@ -1,42 +0,0 @@ -Merged upstream but not yet released (see: -https://github.com/wxWidgets/Phoenix/pull/2387/commits/5d9f7aa185cd18da3e93ae1d0033fb9172d7a714). - -From 5d9f7aa185cd18da3e93ae1d0033fb9172d7a714 Mon Sep 17 00:00:00 2001 -From: Maxim Cournoyer <maxim.cournoyer@gmail.com> -Date: Mon, 1 May 2023 13:53:55 -0400 -Subject: [PATCH] agw: Fix TypeError caused by floats with Python 3.10 - extensions. - -This fixes the following error: - - File "/lib/python3.10/site-packages/wx/lib/agw/pygauge.py", line 380, in OnPaint - dc.DrawText(drawString, textXPos, textYPos) - TypeError: DC.DrawText(): arguments did not match any overloaded call: - overload 1: argument 2 has unexpected type 'float' - overload 2: argument 2 has unexpected type 'float' - TimeLeft: 3.0 - -Visible when using Python 3.10 or newer. ---- - wx/lib/agw/pygauge.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/wx/lib/agw/pygauge.py b/wx/lib/agw/pygauge.py -index b8654436a..da42e6f61 100644 ---- a/wx/lib/agw/pygauge.py -+++ b/wx/lib/agw/pygauge.py -@@ -367,12 +367,12 @@ def OnPaint(self, event): - drawString = self._drawIndicatorText_formatString.format(drawValue) - rect = self.GetClientRect() - (textWidth, textHeight, descent, extraLeading) = dc.GetFullTextExtent(drawString) -- textYPos = (rect.height-textHeight)/2 -+ textYPos = (rect.height-textHeight)//2 - - if textHeight > rect.height: - textYPos = 0-descent+extraLeading - -- textXPos = (rect.width-textWidth)/2 -+ textXPos = (rect.width-textWidth)//2 - - if textWidth>rect.width: - textXPos = 0 diff --git a/gnu/packages/patches/trytond-add-egg-modules-to-path.patch b/gnu/packages/patches/trytond-add-egg-modules-to-path.patch deleted file mode 100644 index 1baccfee1c..0000000000 --- a/gnu/packages/patches/trytond-add-egg-modules-to-path.patch +++ /dev/null @@ -1,22 +0,0 @@ -Work around trytond.module not being a real namespace module. - -Solution is to add all trytond module's locations to -trytond.modules._path__. This will make trytond.module behave much -like a namespace module. -Adding to __path__ is done in update_egg_modules() to ensure __path__ -is updated whenever the list of egg modules is updated. - -*** a/trytond/modules/__init__.py 1970-01-01 01:00:01.000000000 +0100 ---- b/trytond/modules/__init__.py 2021-12-02 18:12:15.385101986 +0100 -*************** -*** 38,43 **** ---- 38,46 ---- - import pkg_resources - for ep in pkg_resources.iter_entry_points('trytond.modules'): - EGG_MODULES[ep.name] = ep -+ path = os.path.join(ep.dist.location, 'trytond', 'modules') -+ if not path in __path__ and os.path.isdir(path): -+ __path__.append(path) - except ImportError: - pass - diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index da1364cbb5..511f8bfead 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -366,7 +366,7 @@ you to figure out what is going on in that merge you keep avoiding.") (define-public patchwork (package (name "patchwork") - (version "3.1.1") + (version "3.2.1") (source (origin (method git-fetch) (uri (git-reference @@ -375,7 +375,7 @@ you to figure out what is going on in that merge you keep avoiding.") (file-name (git-file-name name version)) (sha256 (base32 - "0is9d4gf93jcbyshyj2k3kjyrjnvimrm6bai6dbcx630md222j5w")))) + "04ikawdyhjwspxvhazbp5f5vym672y0jcw8rd2m75h9ipcpnyxim")))) (build-system python-build-system) (arguments `(;; TODO: Tests require a running database @@ -499,7 +499,7 @@ if __name__ == \"__main__\": (inputs (list python-wrapper)) (propagated-inputs - (list python-django-3.2 + (list python-django ;; TODO: Make this configurable python-psycopg2 python-mysqlclient diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm index d4b48e585b..9d81b1c508 100644 --- a/gnu/packages/protobuf.scm +++ b/gnu/packages/protobuf.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014, 2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org> ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> -;;; Copyright © 2017, 2018, 2019, 2022, 2023 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2017-2019, 2022-2025 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net> @@ -175,7 +175,7 @@ internal RPC protocols and file formats.") (package (inherit protobuf) (name "protobuf") - (version "3.20.2") + (version "3.20.3") (source (origin (method url-fetch) (uri (string-append @@ -186,7 +186,7 @@ internal RPC protocols and file formats.") (snippet '(delete-file-recursively "third_party")) (sha256 (base32 - "1hsscx9jm8qv3afgwc764rx9sx1ylkrr54xw1wc0mfjbl8mpw5m0")))) + "0ggyfrfal7wms4n8pba224jwpjxn19rigd5y90m3x2bg97ych775")))) (build-system gnu-build-system) (arguments (substitute-keyword-arguments (package-arguments protobuf) ;; XXX: insists on using bundled googletest @@ -467,21 +467,18 @@ mechanism for serializing structured data.") (define-public python-protobuf (package (name "python-protobuf") - (version "3.20.2") + (version "3.20.3") (source (origin (method url-fetch) (uri (pypi-uri "protobuf" version)) (sha256 (base32 - "0l0p2lczs5iahgkhzm3298pjl49bk9iiwngkglg7ll7fkqqwlbbi")))) + "1wh5f4rnzbv46xy1rx62cprhg5hqf2py06s9b7rfpzwwki12fd1f")))) (build-system python-build-system) - (inputs (list protobuf)) - (arguments - `(;; Favor C++ implementation from protobuf over the native Python - ;; implementation. The additional dependency yields significant - ;; performance improvements for some workloads. - #:configure-flags '("--cpp_implementation"))) + ;; The C++ implementation is not compatible with Python 3.11, so we cannot + ;; pass --cpp_implementation any more. + (inputs (list protobuf-3.20)) (home-page "https://github.com/google/protobuf") (synopsis "Protocol buffers is a data interchange format") (description diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm index 375896a76a..c77e36b4b4 100644 --- a/gnu/packages/python-build.scm +++ b/gnu/packages/python-build.scm @@ -344,18 +344,6 @@ facilitate packaging Python projects, where packaging includes: license:asl2.0 ;packaging is dual ASL2/BSD-2 license:bsd-2)))) -;; This is the last version with use_2to3 support. -(define-public python-setuptools-57 - (package - (inherit python-setuptools) - (version "57.5.0") - (source (origin - (inherit (package-source python-setuptools)) - (uri (pypi-uri "setuptools" version)) - (sha256 - (base32 - "091sp8lrin7qllrhhx7y0iiv5gdb1d3l8a1ip5knk77ma1njdlyr")))))) - (define-public python-wheel (package (name "python-wheel") @@ -412,14 +400,14 @@ installed with a newer @code{pip} or with wheel's own command line utility.") (define-public python-pyparsing (package (name "python-pyparsing") - (version "3.0.6") + (version "3.2.1") (source (origin (method url-fetch) (uri (pypi-uri "pyparsing" version)) (sha256 - (base32 "109b9r802wb472hgmxclljprh5cid0w3p6mk9alba7pg2c0frgfr")))) - (build-system python-build-system) + (base32 "02jz5rv3vx46xvjszda467l269jz9narlrwd0a83mpk6zma0i631")))) + (build-system pyproject-build-system) (outputs '("out" "doc")) (arguments `(#:tests? #f ;no test target @@ -440,6 +428,7 @@ installed with a newer @code{pip} or with wheel's own command line utility.") (find-files dir ".*"))) (list "docs" "htmldoc" "examples") (list doc html-doc examples)))))))) + (native-inputs (list python-flit-core)) (home-page "https://github.com/pyparsing/pyparsing") (synopsis "Python parsing class library") (description @@ -459,7 +448,8 @@ that client code uses to construct the grammar directly in Python code.") (method url-fetch) (uri (pypi-uri "pyparsing" version)) (sha256 - (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2")))))) + (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2")))) + (native-inputs (list python-setuptools python-wheel)))) (define-public python-packaging-bootstrap (package @@ -569,6 +559,16 @@ a light weight, fully compliant, self-contained package allowing PEP 517 compatible build front-ends to build Poetry managed projects.") (license license:expat))) +(define-public python-poetry-core-next + (package/inherit python-poetry-core + (version "2.1.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "poetry_core" version)) + (sha256 + (base32 "015a0802radb2x5wsbywm4fggv4s1srh8zyml5v58xgrxg8bpnzr")))))) + ;;; This package exists to bootstrap python-tomli. (define-public python-flit-core-bootstrap (package diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index ada814b86a..df585f20a6 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -288,27 +288,70 @@ Avocado machine readable outputs this one is streamlined (per test results). @end table") (license license:gpl2))) ;some files are under GPLv2 only +(define-public python-pytest-black + (package + (name "python-pytest-black") + (version "0.6.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest_black" version)) + (sha256 + (base32 + "04dmhv8dzh356qdxz6hrwfz3nk3mlc9shicgpns5r03rydap9dzc")))) + (build-system pyproject-build-system) + (native-inputs + (list python-setuptools + python-wheel)) + (propagated-inputs + (list python-black + python-pytest + python-toml)) + ;; Project maintenance has been changed, see + ;; <https://github.com/shopkeep/pytest-black/issues/70>. + (home-page "https://github.com/coherent-oss/pytest-black") + (synopsis "Pytest plugin to enable format checking with black") + (description + "This package provides a pytest plugin to enable format checking with the +Python code formatter \"black\".") + (license license:expat))) + +(define-public python-pytest-freezer + (package + (name "python-pytest-freezer") + (version "0.4.9") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest_freezer" version)) + (sha256 + (base32 "0an8y6ri3bhij4137gphdw2yg6rq7if4nb1qjj7zjsy4kjy1dgr1")))) + (build-system pyproject-build-system) + (native-inputs + (list python-flit-core)) + (propagated-inputs + (list python-freezegun + python-pytest)) + (home-page "https://github.com/pytest-dev/pytest-freezer/") + (synopsis "Pytest plugin providing a fixture interface for spulec/freezegun") + (description + "Pytest plugin providing a fixture interface for +@url{https://github.com/spulec/freezegun, freezegun}.") + (license license:expat))) + (define-public python-beartype (package (name "python-beartype") - (version "0.10.4") + (version "0.19.0") (source (origin (method url-fetch) (uri (pypi-uri "beartype" version)) (sha256 - (base32 "0amzckgw9c93bl4jf0q6322j9wyyf3i8vl03yixfkrpllzv6kv14")))) + (base32 "0wv598iv9c2s6ivfiara9pnkdlnas8xjw063wvyi0dswpb0xyhny")))) (build-system pyproject-build-system) - (arguments - (list - #:test-flags - #~(list - "beartype_test" - ;; These tests rely on git through the "get_main_readme_file" helper. - "-k" (string-append "not test_doc_readme " - "and not test_sphinx " - "and not test_pep561_mypy")))) - (native-inputs (list python-pytest python-setuptools python-wheel)) + (native-inputs + (list python-hatchling python-numpy python-pygments python-pytest)) (home-page "https://github.com/beartype/beartype") (synopsis "Fast runtime type checking for Python") (description "Beartype aims to be a very fast runtime type checking tool @@ -2628,6 +2671,8 @@ them using any Python VM with basically no runtime overhead.") (list #:test-flags #~(list + ;; This one started failing with the last update of Numpy. + "--ignore=tests/test_beartype.py" ;; Multiple failures due to undefined names (typing package must be ;; too outdated, or perhaps they use a newer pandas). "--ignore=tests/test_mypy.py" @@ -2846,7 +2891,7 @@ help in debugging failures and optimizing the scheduler to improve speed.") (define-public python-pytest-subprocess (package (name "python-pytest-subprocess") - (version "1.5.2") + (version "1.5.3") (source (origin (method git-fetch) ;no tests in PyPI archive @@ -2856,17 +2901,17 @@ help in debugging failures and optimizing the scheduler to improve speed.") (file-name (git-file-name name version)) (sha256 (base32 - "1mncfyn0vkbf7d03zc8wmv7nl354ck5i9gfblp9220ihc52whhy0")))) + "1yb5y6dqzf6k5a07yzdpw8w50bm7zbsdvv06ii7c7vyg9wx5iw6y")))) (build-system pyproject-build-system) - (native-inputs (list python-anyio - python-coverage - python-docutils - python-nox - python-pygments - python-pytest - python-pytest-asyncio - python-pytest-rerunfailures - python-wheel)) + (native-inputs + (list python-anyio + python-docutils + python-pygments + python-pytest + python-pytest-asyncio + python-pytest-rerunfailures + python-setuptools + python-wheel)) (home-page "https://github.com/aklajnert/pytest-subprocess") (synopsis "Fake subprocess for Pytest") (description @@ -2950,25 +2995,6 @@ __version_tuple__ = version_tuple = (~a)~%" version version-tuple))))))))) in an opinionated way.") (license license:expat))) -(define-public python-parameterizedtestcase - (package - (name "python-parameterizedtestcase") - (version "0.1.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "parameterizedtestcase" version)) - (sha256 - (base32 "0zhjmsd16xacg4vd7zb75kw8q9khn52wvad634v1bvz7swaivk2c")))) - (build-system python-build-system) - (native-inputs (list python-setuptools-57)) ;for use_2to3 - (home-page - "https://github.com/msabramo/python_unittest_parameterized_test_case") - (synopsis "Parameterized tests for Python's unittest module") - (description "This package provides parameterized tests for Python's -@code{unittest} module taking inspiration from pytest.") - (license license:expat))) - (define-public python-pytest-rerunfailures (package (name "python-pytest-rerunfailures") @@ -3271,13 +3297,13 @@ attachments). (define-public python-vcrpy (package (name "python-vcrpy") - (version "6.0.2") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "vcrpy" version)) (sha256 - (base32 "02fwmmc33qqybzbj1lvdz458g1fffm5cgnqihj4larw4268kvqc8")))) + (base32 "0l1sdfc51024jclqv9104nagpirxx8w0gcn5h0bdxv950jnr2qqp")))) (build-system pyproject-build-system) (arguments (list @@ -3290,22 +3316,23 @@ attachments). "test_testcase_playback") " and not ")))) (native-inputs - (list nss-certs-for-test - python-flask + (list python-aiohttp + python-boto3 python-httplib2 - python-ipaddress - python-mock + python-httpx python-pytest python-pytest-cov + python-pytest-aiohttp + python-pytest-asyncio python-pytest-httpbin + python-requests python-setuptools + python-tornado python-urllib3 + python-werkzeug python-wheel)) (propagated-inputs - (list python-pyyaml - python-six - python-wrapt - python-yarl)) + (list python-pyyaml python-wrapt python-yarl)) (home-page "https://github.com/kevin1024/vcrpy") (synopsis "Automatically mock your HTTP interactions") (description diff --git a/gnu/packages/python-compression.scm b/gnu/packages/python-compression.scm index 5b994d408f..6892b9253c 100644 --- a/gnu/packages/python-compression.scm +++ b/gnu/packages/python-compression.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2024 TakeV <takev@disroot.org> ;;; Copyright © 2023 Ivan Vilata i Balaguer <ivan@selidor.net> ;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -764,6 +765,33 @@ install: libbitshuffle.so (inputs '()) (native-inputs '()))) +(define-public python-unix-ar + (package + (name "python-unix-ar") + (version "0.2.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "unix_ar" version)) + (sha256 + (base32 "0kicwxsh28x8r34a7cgzv2i65gsd4qjw2vf29pwq4fpsf3n2i4xz")))) + (build-system pyproject-build-system) + (arguments + ;; These tests have timestamp-related issues. + (list #:test-flags + #~(list "-m" "unittest" "-k" "not test_add and not test_addfile") + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (apply invoke "python" test-flags)))))) + (native-inputs (list python-pytest python-setuptools python-wheel)) + (home-page "https://github.com/getninjas/unix_ar") + (synopsis "AR file handling in Python") + (description "This package provides utilities to handle AR files in +Python.") + (license license:bsd-3))) + (define-public python-zipp (package (name "python-zipp") diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 846427ba6d..fc57afb862 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2015, 2016, 2017, 2019, 2022, 2024 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2015, 2016, 2017, 2019, 2022, 2024, 2025 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; Copyright © 2016, 2017, 2020 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au> @@ -57,6 +57,7 @@ #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages certs) #:use-module (gnu packages check) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-tls) @@ -141,17 +142,19 @@ Password Scheme\"} by Niels Provos and David Mazieres.") (uri (pypi-uri "passlib" version)) (sha256 (base32 "015y5qaw9qnxr29lg60dml1g5rbqd4586wy5n8m41ib55gvm1zfy")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'set-PYTHON_EGG_CACHE + ;; Some tests require access to "$HOME/.cython". + (lambda _ + (setenv "PYTHON_EGG_CACHE" "/tmp")))))) (native-inputs - (list python-nose)) + (list python-nose python-setuptools python-wheel)) (propagated-inputs - (list python-bcrypt)) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'set-PYTHON_EGG_CACHE - ;; Some tests require access to "$HOME/.cython". - (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp")))))) + (list python-argon2-cffi python-bcrypt python-cryptography)) (home-page "https://bitbucket.org/ecollins/passlib") (synopsis "Comprehensive password hashing framework") (description @@ -162,32 +165,6 @@ useful for a wide range of tasks, from verifying a hash found in /etc/shadow, to providing full-strength password hashing for multi-user application.") (license license:bsd-3))) -(define-public python-pyblake2 - (package - (name "python-pyblake2") - (version "1.1.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pyblake2" version)) - (sha256 - (base32 - "0gz9hgznv5zw4qjq43xa56y0yikimx30gffvibxzm0nv5sq7xk2w")))) - (build-system python-build-system) - (home-page "https://github.com/dchest/pyblake2") - (synopsis "BLAKE2 hash function for Python") - (description "BLAKE2 is a cryptographic hash function, which offers -stronger security while being as fast as MD5 or SHA-1, and comes in two -flavors: @code{BLAKE2b}, optimized for 64-bit platforms and produces digests -of any size between 1 and 64 bytes, and @code{BLAKE2s}, optimized for 8- to -32-bit platforms and produces digests of any size between 1 and 32 bytes. - -This package provides a Python interface for BLAKE2.") - ;; The COPYING file declares it as public domain, with the option to - ;; alternatively use and redistribute it under a variety of permissive - ;; licenses. cc0 is explicitly mentioned in setup.py and pyblake2module.c. - (license (list license:public-domain license:cc0)))) - (define-public python-paramiko (package (name "python-paramiko") @@ -455,13 +432,7 @@ blake3, a cryptographic hash function.") ;; Those tests uses PKCS12, which has been removed in ;; pyopenssl 23.3.0: "not test_custom_not_before_not_after" - "test_ca_cert_in_mem" - ;; Those tests try to download certificates: - "test_file_wildcard" - "test_file_wildcard_subdomains" - "test_in_mem_parent_wildcard_cert" - "test_in_mem_parent_wildcard_cert_at_tld" - "test_in_mem_parent_wildcard_cert_2") + "test_ca_cert_in_mem") " and not ")) #:phases #~(modify-phases %standard-phases @@ -474,7 +445,7 @@ blake3, a cryptographic hash function.") (propagated-inputs (list python-pyopenssl python-tldextract)) (native-inputs - (list python-pytest-cov python-setuptools python-wheel)) + (list nss-certs-for-test python-pytest-cov python-setuptools python-wheel)) (home-page "https://github.com/ikreymer/certauth") (synopsis "Certificate authority creation tool") (description "This package provides a small library, built on top of @@ -658,7 +629,13 @@ ciphers, message digests and key derivation functions.") ;; PyOpenSSL runs tests against a certificate with a fixed ;; expiry time. To ensure successful builds in the future, ;; set the time to roughly the release date. - (invoke "faketime" "2024-07-20" "pytest" "-vv" "-k" + (invoke "faketime" "2024-07-20" "pytest" "-vv" + "--deselect" + ;; This test seems to fail when using faketime, at + ;; least on aarch64-linux with OSError: [Errno 22] + ;; Invalid argument + "tests/test_ssl.py::TestDTLS::test_timeout" + "-k" ;; This test tries to look up certificates from ;; the compiled-in default path in OpenSSL, which ;; does not exist in the build environment. @@ -1657,17 +1634,14 @@ signatures.") (uri (pypi-uri "PGPy" version)) (sha256 (base32 "10w3h934fi1ijx72ppn67a50yhkf8n1db6xx02gk2fjc7wsjx717")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest"))))))) + (list #:test-flags + ;; All broken tests are in this file. + ;; They fail with ValueError: key_size must be at least 1024-bits. + #~(list "--ignore" "tests/test_10_exceptions.py"))) (native-inputs - (list python-pytest - python-wheel)) + (list python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-cryptography python-pyasn1)) (home-page "https://github.com/SecurityInnovation/PGPy") (synopsis "Python implementation of OpenPGP") diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index e5fc58ef95..3cecd7fb94 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -27,6 +27,7 @@ ;;; Copyright © 2024 Marco Baggio <marco.baggio@mdc-berlin.de> ;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr> ;;; Copyright © 2024 Rick Huijzer <ikbenrickhuyzer@gmail.com> +;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -67,6 +68,7 @@ #:use-module (gnu packages maths) #:use-module (gnu packages mpi) #:use-module (gnu packages pcre) + #:use-module (gnu packages package-management) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -82,6 +84,7 @@ #:use-module (gnu packages ssh) #:use-module (gnu packages statistics) #:use-module (gnu packages time) + #:use-module (gnu packages version-control) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -372,7 +375,21 @@ Features: (build-system pyproject-build-system) (arguments (list - #:test-flags #~(list "--pyargs" "numdifftools") + #:test-flags + #~(list "--pyargs" "numdifftools" + "-k" (string-join + ;; Tests failing with error: TypeError: a must be an array + ;; of real numbers, see + ;; <https://github.com/pbrod/numdifftools/issues/72>. + (list "not test_high_order_derivative" + "test_low_order_derivative_on_example_functions" + "test_sinx_div_x" + "test_complex_hessian_issue_35" + + "numdifftools.fornberg.Taylor" + "numdifftools.fornberg.derivative" + "numdifftools.fornberg.taylor") + " and not ")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'relax-requirements @@ -1052,6 +1069,172 @@ utilizing the power of scikit-learn, e.g., for pre-processing or doing cross-validation.") (license license:gpl3+)))) +(define-public python-snakemake-interface-common + (package + (name "python-snakemake-interface-common") + (version "1.17.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/snakemake/snakemake-interface-common") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "19fyqs048zdvrmq5sdayzch850kwsyv2x6xn57cjjzcm4zpjrh9w")))) + (build-system pyproject-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python3" "tests/tests.py"))))))) + (native-inputs (list python-poetry-core python-pytest)) + (propagated-inputs (list python-argparse-dataclass python-configargparse)) + (home-page "https://github.com/snakemake/snakemake-interface-common") + (synopsis "Common functions and classes for Snakemake and its plugins") + (description "This package provides common functions and classes +for Snakemake and its plugins.") + (license license:expat))) + +(define-public python-snakemake-interface-executor-plugins + (package + (name "python-snakemake-interface-executor-plugins") + (version "9.3.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://github.com/snakemake/" + "snakemake-interface-executor-plugins")) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1kjjcgkk1rbavb687x5ayw35ayhsnhpg9262k317x911wqpsj2fm")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python3" "tests/tests.py"))))))) + (propagated-inputs (list python-argparse-dataclass + python-snakemake-interface-common + python-throttler)) + (native-inputs (list python-poetry-core python-pytest)) + (home-page (string-append "https://github.com/snakemake/" + "python-snakemake-interface-executor-plugins")) + (synopsis "Interface for Snakemake executor plugins") + (description + "This package provides a stable interface for interactions between Snakemake and +its executor plugins.") + (license license:expat))) + +(define-public python-snakemake-interface-report-plugins + (package + (name "python-snakemake-interface-report-plugins") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://github.com/snakemake/" + "snakemake-interface-report-plugins")) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0i6z9vk6nv2m3jsym0glrb7h9isdlfza2yq14vbqcslybdi9ykfa")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f ;circular dependency on snakemake + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python3" "tests/tests.py"))))))) + (propagated-inputs (list python-snakemake-interface-common python-pytest)) + (native-inputs (list python-poetry-core)) + (home-page (string-append "https://github.com/snakemake/" + "python-snakemake-interface-report-plugins")) + (synopsis "Interface for Snakemake report plugins") + (description "This package provides a stable interface for interactions +between Snakemake and its report plugins.") + (license license:expat))) + +(define-public python-snakemake-interface-software-deployment-plugins + (package + (name "python-snakemake-interface-software-deployment-plugins") + (version "0.6.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://github.com/snakemake/" + "snakemake-interface-software-deployment-plugins")) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0b4kkznfyfck9f92pkimhyl13ljisfn67rsilm1a5inq2ywpmxba")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python3" "tests/tests.py"))))))) + (propagated-inputs (list python-argparse-dataclass + python-snakemake-interface-common)) + (native-inputs (list python-poetry-core)) + (home-page (string-append "https://github.com/snakemake/" + "snakemake-interface-software-deployment-plugins")) + (synopsis "Interface for Snakemake software deployment plugins") + (description + "This package provides a stable interface for interactions between Snakemake and +its software deployment plugins.") + (license license:expat))) + +(define-public python-snakemake-interface-storage-plugins + (package + (name "python-snakemake-interface-storage-plugins") + (version "3.3.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://github.com/snakemake/" + "snakemake-interface-storage-plugins")) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "05n5xgwagb01nyzi8xfvp0nvdfl24lxidgksm7k86p68n1rijd5a")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f ;circular dependency on snakemake + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python3" "tests/tests.py"))))))) + (propagated-inputs (list python-reretry python-snakemake-interface-common + python-throttler python-wrapt)) + (native-inputs (list python-poetry-core python-pytest)) + (home-page (string-append "https://github.com/snakemake/" + "snakemake-interface-storage-plugins")) + (synopsis "Interface for Snakemake storage plugins") + (description + "This package provides a stable interface for interactions between +Snakemake and its storage plugins.") + (license license:expat))) + (define-public python-tdda (package (name "python-tdda") @@ -1643,7 +1826,7 @@ doing practical, real world data analysis in Python.") (lambda _ (copy-recursively (string-append #$output - "/lib/python3.10/site-packages/pandas/_libs") + "/lib/python3.11/site-packages/pandas/_libs") "pandas/_libs")))))) (propagated-inputs (list python-dateutil @@ -2465,7 +2648,7 @@ objects.") (define-public python-pytensor (package (name "python-pytensor") - (version "2.18.1") + (version "2.28.3") ; the minimal version supporting SciPy 1.12.0 (source (origin (method git-fetch) (uri (git-reference @@ -2474,52 +2657,65 @@ objects.") (file-name (git-file-name name version)) (sha256 (base32 - "0qa0y13xfm6w7ry7gp0lv84c8blyg34a9ns7ynwqyhf9majq08s5")))) + "1yz1yslms6kdmy4sgnvbnghhclcpkc80z3vaw9c2y3b3j1fs9b4v")))) (build-system pyproject-build-system) (arguments (list + #:test-flags + ;; XXX: Full test suite takes about 20-30min to complete in single + ;; thread, attempt to run tests in parallel with pytest-xdist fails even + ;; so upstream provides a support for that, try to figure out how to + ;; improve it. + ;; + ;; Upstream implements a script, showing slow tests which may be used to + ;; exclude even more hanging/slow ones, see + ;; <scripts/slowest_tests/extract-slow-tests.py>. + ;; + ;; Skip computationally intensive tests. + #~(list "--ignore" "tests/scan/" + "--ignore" "tests/tensor/" + "--ignore" "tests/sandbox/" + "--ignore" "tests/sparse/sandbox/" + ;; Tests hang while running from these files. + "--ignore" "tests/compile/test_compilelock.py" + "--ignore" "tests/link/jax/test_tensor_basic.py" + ;; XXX: Tests finish with error in these files, check why. + "--ignore" "tests/compile/function/test_types.py" + "--ignore" "tests/link/numba/test_basic.py" + "--ignore" "tests/link/numba/test_blockwise.py" + "--ignore" "tests/link/numba/test_elemwise.py" + "-k" (string-join + ;; Skip benchmark tests. + (list "not test_elemwise_speed" + "test_logsumexp_benchmark" + "test_fused_elemwise_benchmark" + "test_scan_multiple_output" + "test_vector_taps_benchmark" + "test_cython_performance" + ;; Assertion fails in tests. + "test_choose_signature" + "test_fgraph_to_python_names") + " and not ") + ;; Tests collection selects pytensor, which does not contain + ;; tests and fails to pass; manually provide a test directory + ;; instead. + "tests") #:phases #~(modify-phases %standard-phases ;; Replace version manually because pytensor uses ;; versioneer, which requires git metadata. (add-after 'unpack 'versioneer (lambda _ - (with-output-to-file "setup.cfg" - (lambda () - (display "\ -[versioneer] -VCS = git -style = pep440 -versionfile_source = pytensor/_version.py -versionfile_build = pytensor/_version.py -tag_prefix = -parentdir_prefix = pytensor- -"))) (invoke "versioneer" "install") (substitute* "setup.py" - (("versioneer.get_version\\(\\)") - (string-append "\"" #$version "\""))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "HOME" "/tmp") ; required for most tests - ;; Test discovery fails, have to call pytest by hand. - ;; test_tensor_basic.py file requires JAX. - (invoke "python" "-m" "pytest" "-vv" - "--ignore" "tests/link/jax/test_tensor_basic.py" - ;; Skip benchmark tests. - "-k" (string-append - "not test_elemwise_speed" - " and not test_logsumexp_benchmark" - " and not test_fused_elemwise_benchmark" - " and not test_scan_multiple_output" - " and not test_vector_taps_benchmark" - " and not test_cython_performance") - ;; Skip computationally intensive tests. - "--ignore" "tests/scan/" - "--ignore" "tests/tensor/" - "--ignore" "tests/sandbox/" - "--ignore" "tests/sparse/sandbox/"))))))) + (("version=versioneer.get_version\\(),") + (format #f "version=~s," #$version))))) + (add-before 'check 'pre-check + (lambda _ + ;; It is required for most tests. + (setenv "HOME" "/tmp") + ;; Cython extensions have to be built before running the tests. + (invoke "python" "setup.py" "build_ext" "--inplace")))))) (native-inputs (list python-cython python-pytest python-pytest-mock @@ -2663,6 +2859,9 @@ annotations on an existing boxplots and barplots generated by seaborn.") (sha256 (base32 "0jrq2vhan2h280h6cw1sm5hys2nzmf19w4py64k3nrkc320z9mni")))) (build-system pyproject-build-system) + (arguments + ;; This is a Numpy DeprecationWarning, remove it on next update. + (list #:test-flags ''("-k" "not test_h5_io"))) ;; Pint is optional, but we do not propagate it due to its size. (native-inputs (list python-pint @@ -2878,32 +3077,6 @@ and more @end itemize") (license license:gpl3))) -(define-public python-pyglm - (package - (name "python-pyglm") - (version "2.5.7") - (source - (origin - ;; Test files are not included in the archive in pypi. - (method git-fetch) - (uri (git-reference - (url "https://github.com/Zuzu-Typ/PyGLM") - (commit version) - ;; Checkout the bundled `glm` submodule. PyGLM uses the - ;; currently unreleased GLM_EXT_matrix_integer feature. Can - ;; maybe unbundle once glm@0.9.9.9 is released. - (recursive? #t))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "08v0cgkwsf8rxscx5g9c5p1dy38rvak2fy3q6hg985if1nj6d9ks")))) - (build-system python-build-system) - (home-page "https://github.com/Zuzu-Typ/PyGLM") - (synopsis "OpenGL Mathematics library for Python") - (description "PyGLM is a Python extension library which brings the OpenGL -Mathematics (GLM) library to Python.") - (license license:zlib))) - (define-public python-dask-expr (package (name "python-dask-expr") @@ -3794,18 +3967,37 @@ it can be used for displaying many qualitatively different samples.") (package (name "python-paramz") (version "0.9.6") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/sods/paramz") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1ywc2jzj40m6wmq227j3snxvp4434s0m1xk1abg6v6mr87pv2sa9")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sods/paramz") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1ywc2jzj40m6wmq227j3snxvp4434s0m1xk1abg6v6mr87pv2sa9")))) (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" + ;; Two tests fail with error: TypeError: arrays to stack must be + ;; passed as a "sequence" type such as list or tuple. + (string-append "not test_raveled_index" + " and not test_regular_expression_misc") + "paramz/tests/array_core_tests.py" + "paramz/tests/cacher_tests.py" + "paramz/tests/examples_tests.py" + "paramz/tests/index_operations_tests.py" + "paramz/tests/init_tests.py" + "paramz/tests/lists_and_dicts_tests.py" + "paramz/tests/model_tests.py" + "paramz/tests/observable_tests.py" + "paramz/tests/parameterized_tests.py" + "paramz/tests/pickle_tests.py" + "paramz/tests/verbose_optimize_tests.py"))) (native-inputs - (list python-nose + (list python-pytest python-setuptools python-wheel)) (propagated-inputs @@ -4055,16 +4247,10 @@ numerical computation.") (sha256 (base32 "0jb5lia0q742d1713jk33vlj41y61sf52j6pgk7pvhxvfxglgxjr")))) - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) + (build-system pyproject-build-system) (propagated-inputs (list python-numpy)) - (native-inputs (list python-pytest python-pytest-cov python-pytest-pep8)) + (native-inputs + (list python-pytest python-pytest-cov python-setuptools python-wheel)) (home-page "https://github.com/dgasmith/opt_einsum") (synopsis "Optimizing numpys einsum function") (description @@ -4080,24 +4266,44 @@ documentation for more information.") (define-public python-vaex-core (package (name "python-vaex-core") - (version "4.17.1") + (version "4.18.1") (source (origin - (method url-fetch) - (uri (pypi-uri "vaex-core" version)) + (method git-fetch) + (uri (git-reference + (url "https://www.github.com/maartenbreddels/vaex") + (commit (string-append "core-v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "1rzx5px3fwi5mh1z8y91brvffk7dkhj287lnmqp8zp6836kkqhya")) - (modules '((guix build utils))) + (base32 "1sp096msbzgjlwi8c1ink2bp4pjff9pvikqz1y1li8d3in4gpgdr")) + (patches + (search-patches "python-vaex-core-fix-tsl-use.patch")) + (modules '((guix build utils) + (ice-9 ftw))) (snippet - ;; Remove bundled libraries - '(for-each delete-file-recursively - (list "vendor/boost" - "vendor/pcre" - "vendor/pybind11"))))) + #~(begin + ;; Delete everything except for vaex-core itself: + (define (delete-except exception) + (lambda (file) + (unless (member file `("." ".." ,exception)) + (delete-file-recursively file)))) + (for-each (delete-except "packages") (scandir ".")) + (with-directory-excursion "packages" + (for-each (delete-except "vaex-core") (scandir "."))) + (for-each (lambda (file) + (unless (member file '("." "..")) + (rename-file + (string-append "packages/vaex-core/" file) + file))) + (scandir "packages/vaex-core")) + (delete-file-recursively "packages") + (delete-file-recursively "vendor"))))) (build-system pyproject-build-system) - (arguments (list #:tests? #false)) ;require vaex.server and others, which require vaex-core. + (arguments + ;; require vaex.server and others, which require vaex-core. + (list #:tests? #false)) (inputs - (list boost pcre pybind11-2.3)) + (list boost pcre pybind11 string-view-lite tsl-hopscotch-map)) (propagated-inputs (list python-aplus python-blake3 @@ -4321,6 +4527,125 @@ compagnies.") neuronal models") (license license:bsd-3))) +(define-public snakemake + (package + (name "snakemake") + (version "8.29.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "snakemake" version)) + (sha256 + (base32 "1ilpmrjmnc529p4gw2x23ik1d8b5pm6k1dhq08dknvfjsf3vgyjr")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list + ;; XXX: Unclear why these tests fail. + "--ignore=tests/test_report_href/test_script.py" + "--ignore=tests/test_script_py/scripts/test_explicit_import.py" + "--ignore=tests/test_output_index.py" + ;; We don't care about testing old python@3.7 on Guix. + "--ignore=tests/test_conda_python_3_7_script/test_script.py" + ;; Those require additional snakemake plugins. + "--ignore=tests/test_api.py" + "--ignore=tests/test_executor_test_suite.py" + ;; We don't care about lints. + "--ignore=tests/test_linting.py" + ;; These tests attempt to change S3 buckets on AWS and fail + ;; because there are no AWS credentials. + "--ignore=tests/test_tibanna" + ;; It's a similar story with this test, which requires access + ;; to the Google Storage service. + "--ignore=tests/test_google_lifesciences") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'avoid-assets-download + (lambda _ + (substitute* "setup.py" + (("^from assets import Assets") "") + (("^Assets\\.deploy\\(\\)") "")))) + ;; For cluster execution Snakemake will call Python. Since there is + ;; no suitable GUIX_PYTHONPATH set, cluster execution will fail. We + ;; fix this by calling the snakemake wrapper instead. + (add-after 'unpack 'call-wrapper-not-wrapped-snakemake + (lambda _ + (substitute* "snakemake/executors/__init__.py" + (("self\\.get_python_executable\\(\\),") + "") + (("\"-m snakemake\"") + (string-append "\"" #$output + "/bin/snakemake" "\"")) + ;; The snakemake command produced by format_job_exec contains + ;; references to /gnu/store. Prior to patching above that's + ;; just a reference to Python; after patching it's a reference + ;; to the snakemake executable. + ;; + ;; In Tibanna execution mode Snakemake arranges for a certain + ;; Docker image to be deployed to AWS. It then passes its own + ;; command line to Tibanna. This is misguided because it only + ;; ever works if the local Snakemake command was run inside + ;; the same Docker image. In the case of using Guix this is + ;; never correct, so we need to replace the store reference. + (("tibanna_args.command = command") + (string-append + "tibanna_args.command = command.replace('" + #$output "/bin/snakemake', 'python3 -m snakemake')"))))) + (add-after 'unpack 'patch-version + (lambda _ + (substitute* "setup.py" + (("version=versioneer.get_version\\(\\)") + (format #f "version=~s" #$version))) + (substitute* '("snakemake/_version.py" + "versioneer.py") + (("0\\+unknown") #$version)))) + (add-before 'check 'pre-check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "HOME" "/tmp"))))))) + (propagated-inputs + (list python-appdirs + python-conda-inject + python-configargparse + python-connection-pool + python-dpath + python-gitpython + python-humanfriendly + python-immutables + python-jinja2 + python-jsonschema + python-nbformat + python-packaging + python-psutil + python-pulp + python-pyyaml + python-requests + python-reretry + python-smart-open + python-snakemake-interface-common + python-snakemake-interface-executor-plugins + python-snakemake-interface-report-plugins + python-snakemake-interface-storage-plugins + python-tabulate + python-throttler + python-wrapt + python-yte)) + (native-inputs + (list python-docutils + python-numpy + python-pandas + python-setuptools + python-tomli + python-wheel)) + (home-page "https://snakemake.readthedocs.io") + (synopsis "Python-based execution environment for make-like workflows") + (description + "Snakemake aims to reduce the complexity of creating workflows by +providing a clean and modern domain specific specification language (DSL) in +Python style, together with a fast and comfortable execution environment.") + (license license:expat))) + ;;; ;;; Avoid adding new packages to the end of this file. To reduce the chances ;;; of a merge conflict, place them above by existing packages with similar diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 52e1eafc97..8fe9f58978 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -54,7 +54,7 @@ ;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io> ;;; Copyright © 2022 Antero Mejr <antero@mailbox.org> ;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com> -;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr> +;;; Copyright © 2022, 2025 Nicolas Graves <ngraves@ngraves.fr> ;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl> ;;; Copyright © 2022 msimonin <matthieu.simonin@inria.fr> ;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de> @@ -392,17 +392,88 @@ Async mode for @url{https://domainconnect.org/, Domain Connect protocol}.") @url{https://www.domainconnect.org/, Domain Connect} protocol.") (license license:expat))) +(define-public python-dropbox + (package + (name "python-dropbox") + (version "12.0.2") + (source + (origin + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/dropbox/dropbox-sdk-python") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0pyvi2mbibah42kq8804d98ghypm46wr8swqr34apnvnlp9j2nzl")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" (string-join + ;; Network access is required. + (list "not test_bad_auth" + "test_app_auth" + "test_bad_pins" + "test_bad_pins_session" + "test_downscope" + "test_multi_auth" + "test_path_root" + "test_path_root_err" + "test_refresh" + "test_rpc" + "test_team" + "test_upload_download" + "test_versioned_route") + " and not ")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "setup.py" + ;; 'stone>=2,<3.3.3', + ((">=2,<3.3.3") ">=2,<3.4.0")))) + (add-before 'check 'pre-check + (lambda _ + ;; Otherwise tests setup erroring. + (setenv "LEGACY_USER_DROPBOX_TOKEN" "guix") + (setenv "LEGACY_USER_CLIENT_ID" "guix") + (setenv "LEGACY_USER_CLIENT_SECRET" "guix") + (setenv "LEGACY_USER_REFRESH_TOKEN" "guix") + (setenv "SCOPED_USER_DROPBOX_TOKEN" "guix") + (setenv "SCOPED_USER_CLIENT_ID" "guix") + (setenv "SCOPED_USER_CLIENT_SECRET" "guix") + (setenv "SCOPED_USER_REFRESH_TOKEN" "guix") + (setenv "SCOPED_TEAM_DROPBOX_TOKEN" "guix") + (setenv "SCOPED_TEAM_CLIENT_ID" "guix") + (setenv "SCOPED_TEAM_CLIENT_SECRET" "guix") + (setenv "SCOPED_TEAM_REFRESH_TOKEN" "guix") + (setenv "DROPBOX_SHARED_LINK" "guix")))))) + (native-inputs + (list nss-certs-for-test + python-mock + python-pytest + python-pytest-mock + python-setuptools + python-wheel)) + (propagated-inputs + (list python-requests python-six python-stone)) + (home-page "https://www.dropbox.com/developers") + (synopsis "Official Dropbox API Client") + (description "This package provides a Python SDK for integrating with the +Dropbox API v2.") + (license license:expat))) + (define-public python-eventlet (package (name "python-eventlet") - (version "0.38.2") + (version "0.39.1") (source (origin (method url-fetch) (uri (pypi-uri "eventlet" version)) (sha256 (base32 - "1b7dhy3pyp3nfv0zzjrs7i3kam40cl1nh3acy2fd59ywy4x84ika")))) + "04051hmlq49kvdymf56hp08vjc6251937fh6vvnj2h1d51sn92ja")))) (build-system pyproject-build-system) (arguments (list @@ -794,22 +865,19 @@ API rules.") (define-public python-frozenlist (package (name "python-frozenlist") - (version "1.2.0") + ;; XXX: Any newer versions fail to build, check why. + (version "1.3.3") (source (origin (method url-fetch) (uri (pypi-uri "frozenlist" version)) (sha256 - (base32 "1pkr23by7pk9lsmsh0wiqirpkq3f1f08b0615nbzysn51bk1n838")))) - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "tests"))))))) - (native-inputs (list python-pytest)) + (base32 "0sispcpras096fxrd0i35qs25fqy4r0x8v1d6f40pag845bwbg2q")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/aio-libs/frozenlist") (synopsis "List-like data structure for Python") (description "@code{frozenlist.FrozenList} is a list-like structure which @@ -1663,7 +1731,7 @@ decode and default on encode. (define-public python-cfn-lint (package (name "python-cfn-lint") - (version "1.22.1") + (version "1.28.0") (source (origin (method git-fetch) (uri (git-reference @@ -1672,7 +1740,7 @@ decode and default on encode. (file-name (git-file-name name version)) (sha256 (base32 - "1zz121r9yv1irwdbk07s7958fh43h3r3q39qcj0gv4kpgb0vdf32")))) + "0n1v05516s0zy64v1a7f7pj5h9lscvbkkwnlgmys7g8lydlgf0v4")))) (build-system pyproject-build-system) (arguments (list @@ -1945,19 +2013,23 @@ over a different origin than that of the web application.") (define-public python-furl (package (name "python-furl") - (version "2.1.3") + (version "2.1.4") (source (origin (method url-fetch) (uri (pypi-uri "furl" version)) (sha256 - (base32 - "0knc76pm8pzigs3bpx9fccfsfxqrgblqphar46hq9i364vz8hqas")))) - (build-system python-build-system) + (base32 "05b058xisv8kghvcpaxvssml2jjkh1cmzyrrjwk2kjb62985fxl7")))) + (build-system pyproject-build-system) + (arguments + (list #:test-flags + #~(list "-k" (string-append "not test_hosts" + " and not test_netloc" + " and not test_odd_urls")))) (propagated-inputs - (list python-six python-orderedmultidict)) + (list python-orderedmultidict python-six)) (native-inputs - (list python-flake8)) + (list python-flake8 python-pytest python-setuptools python-wheel)) (home-page "https://github.com/gruns/furl") (synopsis "URL manipulation in Python") (description "Furl provides an easy-to-use alternative to the @@ -2055,7 +2127,7 @@ other HTTP libraries.") python-pytest-mock python-requests python-requests-toolbelt - python-requests-unixsocket + python-requests-unixsocket2 python-setuptools python-setuptools-scm python-trustme @@ -2476,23 +2548,39 @@ and that could be anything you want.") (uri (pypi-uri "h2" version)) (sha256 (base32 "1fraip114fm1ha5w37pdc0sk8dn9pb0ck267zrwwpap7zc4clfm8")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "python" "-m" "pytest" "-vv" "test" - ;; This test exceededs the Hypothesis deadline. - ,@(if (target-riscv64?) - `("-k" "not test_changing_max_frame_size") - '())))))))) + (list + ;; AssertionError: assert '<RemoteSettingsChanged + ;; changed_settings:{ChangedSetting(setting=4, original_value=65536, + ;; new_value=32768)}>' == '<RemoteSettingsChanged + ;; changed_settings:{ChangedSetting(setting=SettingCodes.INITIAL_WINDOW_SIZE, + ;; original_value=65536, new_value=32768)}>' + #:test-flags + #~(list "-k" + (string-join + (list "not test_remotesettingschanged_repr" + ;; This test exceededs the Hypothesis deadline. + #$@(if (target-riscv64?) + #~("test_changing_max_frame_size") + #~()) + "test_streamreset_repr" + "test_settingsacknowledged_repr" + "test_connectionterminated_repr[None-None]" + "test_connectionterminated_repr[some" + "test_remotesettingschanged_repr" + "test_streamreset_repr" + "test_settingsacknowledged_repr" + "test_connectionterminated_repr[None-None]" + "test_connectionterminated_repr[some") + " and not ")))) (native-inputs - (list python-hypothesis python-pytest)) + (list python-pytest + python-setuptools + python-wheel)) (propagated-inputs - (list python-hpack python-hyperframe)) + (list python-hpack + python-hyperframe)) (home-page "https://github.com/python-hyper/h2") (synopsis "HTTP/2 State-Machine based protocol implementation") (description @@ -3206,7 +3294,6 @@ compliance with the specification.") (propagated-inputs (list python-attrs python-aiohttp - python-dictpath python-isodate python-jsonschema python-lazy-object-proxy @@ -3305,13 +3392,13 @@ options.") (package (inherit python-cssutils) (name "python-css-parser") - (version "1.0.7") + (version "1.0.10") (source (origin (method url-fetch) - (uri (pypi-uri "css-parser" version ".tar.gz")) + (uri (pypi-uri "css-parser" version)) (sha256 - (base32 "1ldv9s3an4pgk7b5x6z07rw9b5fdrasdldnf22829pb26b39dq15")))) + (base32 "0qs375slcwqd7slizh6hzkwxx7cdj36v8kwn0qrfji1kscm9f7mz")))) (home-page "https://github.com/ebook-utils/css-parser") (synopsis "Fork of cssutils modified for parsing ebooks") (description @@ -3351,7 +3438,7 @@ another XPath engine to find the matching elements in an XML or HTML document.") (define-public python-databricks-cli (package (name "python-databricks-cli") - (version "0.17.0") + (version "0.18.0") (home-page "https://github.com/databricks/databricks-cli") (source (origin (method git-fetch) @@ -3359,19 +3446,21 @@ another XPath engine to find the matching elements in an XML or HTML document.") (file-name (git-file-name name version)) (sha256 (base32 - "1qwbxnx64kw7lrzlyx3hfbnjxpc19cqvvj0gcrkqpyjsgd08vja0")))) - (build-system python-build-system) + "1avag4kwqk2f24r5i0vcmhm6s1gsw6maykhlyj2ixz0qc05pjzvl")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "pytest" "tests" "-vv")))))) + (list #:phases #~(modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest" "tests" "-vv")))))) (native-inputs ;; For tests. (list python-decorator python-mock python-pytest - python-requests-mock)) + python-requests-mock + python-setuptools + python-wheel)) (propagated-inputs (list python-click python-oauthlib @@ -3981,19 +4070,22 @@ that have uses outside of the Zope framework.") (define-public python-zope-testing (package (name "python-zope-testing") - (version "4.7") + (version "5.0.1") (source (origin (method url-fetch) (uri (pypi-uri "zope.testing" version)) (sha256 - (base32 - "1sh3c3i0m8n8fnhqiry0bk3rr356i56ry7calmn57s1pvv8yhsyn")))) - (build-system python-build-system) - (home-page "https://pypi.org/project/zope.testing/") + (base32 "0jfnycp9kzmmkk0rard8chd81v5yp6vnm09ky7d3qmv6svcd0z78")))) + (build-system pyproject-build-system) + (native-inputs + (list python-setuptools + python-wheel)) + (home-page "https://zopetesting.readthedocs.io/") (synopsis "Zope testing helpers") - (description "Zope.testing provides a number of testing utilities for HTML -forms, HTTP servers, regular expressions, and more.") + (description + "Zope.testing provides a number of testing utilities for HTML forms, HTTP +servers, regular expressions, and more.") (license license:zpl2.1))) (define-public python-zope-testrunner @@ -4382,6 +4474,28 @@ verification of the SSL peer.") (home-page "https://github.com/cedadev/ndg_httpsclient/") (license license:bsd-3))) +(define-public python-netaddr + (package + (name "python-netaddr") + (version "1.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "netaddr" version)) + (sha256 + (base32 "12p4ysgawhgkka0sz1dkwgwc2za80dxdp9wvfxivfldmjnc3sg2w")))) + (build-system pyproject-build-system) + (native-inputs (list python-poetry-core + python-pytest + python-setuptools + python-wheel)) + (home-page "https://netaddr.readthedocs.io") + (synopsis "Pythonic manipulation of network addresses") + (description + "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI +and MAC network addresses.") + (license license:bsd-3))) + (define-public python-nh3 (package (name "python-nh3") @@ -4628,58 +4742,33 @@ than Python’s urllib2 library.") python-requests.") (license license:isc))) -(define-public python-requests-unixsocket +(define-public python-requests-unixsocket2 (package - (name "python-requests-unixsocket") - (version "0.2.0") + (name "python-requests-unixsocket2") + (version "0.4.2") (source (origin - (method url-fetch) - (uri (pypi-uri "requests-unixsocket" version)) + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/thelabnyc/requests-unixsocket2") + (commit (string-append "v" version)))) (sha256 - (base32 "1sn12y4fw1qki5gxy9wg45gmdrxhrndwfndfjxhpiky3mwh1lp4y")))) + (base32 "0vy0c1xwwmm6xqabhl2j7zqgsldvcs8ar547nk5r9l2yb7gngzjk")))) (build-system pyproject-build-system) - (arguments - (list - #:test-flags - ;; TypeError: HTTPConnection.request() got an unexpected keyword - ;; argument 'chunked' - #~(list "-k" (string-append "not test_unix_domain_adapter_ok" - " and not test_unix_domain_adapter_url_with_query_params" - " and not test_unix_domain_adapter_connection_error" - " and not test_unix_domain_adapter_monkeypatch")) - #:phases - #~(modify-phases %standard-phases - (add-before 'check 'skip-pep8 - (lambda _ - (substitute* "pytest.ini" - (("--pep8") ""))))))) (native-inputs - (list python-apipkg - python-appdirs - python-execnet - python-packaging - python-pep8 - python-py - python-pyparsing - python-pytest - python-pytest-cache - python-pytest-pep8 - python-setuptools - python-six - python-waitress - python-wheel)) + (list python-poetry-core python-pytest python-waitress)) (propagated-inputs - (list python-pbr - python-requests - python-urllib3)) - (home-page "https://github.com/msabramo/requests-unixsocket") + (list python-pbr python-requests)) + (home-page "https://gitlab.com/thelabnyc/requests-unixsocket2") (synopsis "Talk HTTP via a UNIX domain socket") (description "This Python package lets you use the @code{requests} library to talk HTTP via a UNIX domain socket.") (license license:asl2.0))) +(define-public python-requests-unixsocket + (deprecated-package "python-requests-unixsocket" python-requests-unixsocket2)) + (define-public python-requests_ntlm (package (name "python-requests_ntlm") @@ -5037,7 +5126,22 @@ supports url redirection and retries, and also gzip and deflate decoding.") (define-public python-urllib3-next (package - (name "python-urllib3") + (inherit python-urllib3) + (version "2.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "urllib3" version)) + (sha256 + (base32 + "0k90y2bbmw87b9wx7lf0ps0wjpjbnk3h61byrrwid1ph7jdl9igq")))) + (native-inputs + (list python-hatchling + python-hatch-vcs)))) + +(define-public python-urllib3-1.26 + (package + (inherit python-urllib3) (version "1.26.17") (source (origin @@ -5046,29 +5150,9 @@ supports url redirection and retries, and also gzip and deflate decoding.") (sha256 (base32 "08fzhaf77kbjj5abpl9xag6fpfxkdp1k5s7sqd3ayacdq91a5mi4")))) - (build-system python-build-system) - (arguments `(#:tests? #f)) - (propagated-inputs - (append - ;; These 5 inputs are used to build urrlib3[secure] - (list python-certifi) - (if (member (%current-system) - (package-transitive-supported-systems python-cryptography)) - (list python-cryptography) - '()) - (list python-idna) - (if (member (%current-system) - (package-transitive-supported-systems python-pyopenssl)) - (list python-pyopenssl) - '()) - (list python-pysocks))) - (home-page "https://urllib3.readthedocs.io/") - (synopsis "HTTP library with thread-safe connection pooling") - (description - "Urllib3 supports features left out of urllib and urllib2 libraries. It -can reuse the same socket connection for multiple requests, it can POST files, -supports url redirection and retries, and also gzip and deflate decoding.") - (license license:expat))) + (native-inputs + (list python-setuptools + python-wheel)))) (define-public python-awscrt (package @@ -5212,7 +5296,7 @@ opt.override_default_trust_store_from_path(None, os.getenv('SSL_CERT_FILE')) if (list groff-minimal python-botocore python-colorama - python-docutils-0.15 + python-docutils-0.16 python-pyyaml python-rsa python-s3transfer)) @@ -5450,13 +5534,13 @@ headers required for a compressed response and compresses the response data.") (define-public python-flask-seasurf (package (name "python-flask-seasurf") - (version "1.1.1") + (version "2.0.0") (source (origin (method url-fetch) (uri (pypi-uri "Flask-SeaSurf" version)) (sha256 (base32 - "1aaib4n27q0f2alp87mhv3f79vg7qckp71rphbd0mb39qw470lsl")))) + "0g5dsm2ikv8q4qcrb2446pbs972l5wkxyfmxsriqdsl02nz06h4f")))) (build-system pyproject-build-system) (arguments (list #:tests? #false)) ;there are none @@ -5513,28 +5597,6 @@ upload, and reCAPTCHA.") for overriding static files.") (license license:gpl3+))) -(define-public python-cookies - (package - (name "python-cookies") - (version "2.2.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "cookies" version)) - (sha256 - (base32 - "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn")))) - (build-system python-build-system) - (arguments - `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3 - #:tests? #f)) - (native-inputs - (list python-pytest)) - (synopsis "HTTP cookie parser and renderer") - (description "A RFC 6265-compliant HTTP cookie parser and renderer in -Python.") - (home-page "https://gitlab.com/sashahart/cookies") - (license license:expat))) - (define-public python-responses (package (name "python-responses") @@ -5668,6 +5730,39 @@ for the basic TCP/IP protocols.") concurrent HTTP client library for python using @code{gevent}.") (license license:expat))) +(define-public python-gevent-websocket + (package + (name "python-gevent-websocket") + (version "0.10.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "gevent-websocket" version)) + (sha256 + (base32 "1c2zv2rahp1gil3cj66hfsqgy0n35hz9fny3ywhr2319d0lz7bky")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ; no tests in PyPI or git + (native-inputs + (list python-setuptools + python-wheel)) + (propagated-inputs + (list python-gevent)) + (home-page "https://gitlab.com/noppo/gevent-websocket") + (synopsis "Websocket handler for the gevent pywsgi server") + (description + "Websocket handler for the gevent pywsgi server, a Python network +library. + +Features include: +@itemize +@item integration on both socket level or using an abstract interface +@item RPC and PubSub framework using @acronym{WebSocket Application Messaging +Protocol, WAMP} +@item easily extendible using a simple WebSocket protocol plugin API +@end itemize") + (license license:asl2.0))) + (define-public python-requests-oauthlib (package (name "python-requests-oauthlib") @@ -6114,30 +6209,56 @@ users' sessions over extended periods of time.") library for Python") (license license:asl2.0))) +(define-public python-authlib + (package + (name "python-authlib") + (version "1.5.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "authlib" version)) + (sha256 + (base32 "0blpvz2v2r8yvsgm1yr3n61mhwxvh1b0kyf2rp0i4wv6n3n8bg2w")))) + (build-system pyproject-build-system) + ;; No tests target. + (arguments (list #:tests? #false)) + (propagated-inputs + (list python-cryptography + python-django + python-flask + python-httpx + python-requests + python-sqlalchemy-2 + python-starlette + python-werkzeug)) + (native-inputs (list python-pytest python-setuptools python-wheel)) + (home-page "https://pypi.org/project/Authlib/1") + (synopsis "Build OAuth and OpenID Connect servers and clients") + (description + "This is a Python library for building OAuth and OpenID Connect servers +and clients.") + (license license:bsd-3))) + (define-public python-flask-oidc (package (name "python-flask-oidc") - (version "1.4.0") + (version "2.3.1") (source (origin (method url-fetch) - (uri (pypi-uri "flask-oidc" version)) + (uri (pypi-uri "flask_oidc" version)) (sha256 (base32 - "0klgwpn2iy5y7011xh2c8zkryxdwkpxh7qjs3hp5cynl748ia4hc")))) - (build-system python-build-system) - (arguments - (list #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "nosetests"))))))) + "1200xhqiqlqfmrq54v2p6cf3nny86njjw8r7sk5j59hlk9a683zk")))) + (build-system pyproject-build-system) (propagated-inputs - (list python-flask python-itsdangerous python-oauth2client - python-six)) + (list python-authlib + python-blinker + python-flask + python-requests + python-responses)) (native-inputs - (list python-nose python-mock)) + (list python-pytest python-poetry-core)) (home-page "https://github.com/puiterwijk/flask-oidc") (synopsis "OpenID Connect extension for Flask") (description "@code{python-flask-oidc} provides an OpenID Connect extension @@ -6237,7 +6358,7 @@ CSS tidy. Also supports URL rewriting in CSS files.") python-wheel)) (propagated-inputs (list python-certifi - python-urllib3-next)) + python-urllib3-1.26)) (home-page "https://github.com/elastic/elasticsearch-py") (synopsis "Low-level client for Elasticsearch") (description "Official low-level client for Elasticsearch. Its goal is to @@ -6521,13 +6642,13 @@ addon modules.") "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c")) (patches (search-patches "python-werkzeug-tests.patch")))) (arguments - '(#:phases - (modify-phases %standard-phases - (delete 'check) - (add-after 'install 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (invoke "python" "-m" "pytest")))))) + (list + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'ignore-warnings + (lambda _ + (substitute* "setup.cfg" + ((" error.*") ""))))))) (propagated-inputs (list python-requests)) (native-inputs @@ -6765,7 +6886,7 @@ for URL parsing and changing.") (propagated-inputs (list python-arrow python-pytz python-requests)) (native-inputs (list python-requests-mock python-setuptools - python-urllib3-next + python-urllib3-1.26 python-wheel)) (home-page "https://github.com/ucfopen/canvasapi") (synopsis "API wrapper for the Canvas LMS") @@ -7275,61 +7396,65 @@ hard or impossible to fix in cssselect.") (sha256 (base32 "1qq46ym3ymzfn4j6fnykfmr1f4qnb7x7p15dlw37hi38v87jpw9v")) (modules '((guix build utils))) - (snippet - '(begin (delete-file-recursively "vendor") - (delete-file "uvloop/loop.c"))))) + (snippet + '(begin (delete-file-recursively "vendor") + (delete-file "uvloop/loop.c"))))) (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'preparations - (lambda _ - ;; Use packaged libuv. - (substitute* "setup.py" (("self.use_system_libuv = False") - "self.use_system_libuv = True")) - ;; Replace hardcoded shell command. - (substitute* "uvloop/loop.pyx" - (("b'/bin/sh'") (string-append "b'" (which "sh") "'"))) - #t)) - ,@(if (target-riscv64?) - `((add-after 'unpack 'adjust-test-timeouts - (lambda _ - (substitute* '("tests/test_tcp.py" - "tests/test_unix.py") - (("SSL_HANDSHAKE_TIMEOUT = 15\\.0") - "SSL_HANDSHAKE_TIMEOUT = 30.0"))))) - '()) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Remove Python module, which conflicts with the installed version, - ;; but lacks the built C module. - (delete-file-recursively "uvloop") - ;; The tests are prone to get stuck. Use pytest-timeout’s --timeout - ;; flag to get a meaningful idea about where. - (invoke "pytest" "-vv" "--timeout=300" - "--timeout-method=thread" - "-k" (string-append - ;; Timeout, because SIGINT cannot be sent to child. - "not test_signals_sigint_pycode_continue " - "and not test_signals_sigint_pycode_stop " - "and not test_signals_sigint_uvcode " - "and not test_signals_sigint_uvcode_two_loop_runs " - ;; This test is racy and prone to get stuck on - ;; various platforms, possibly a aiohttp issue: - ;; https://github.com/MagicStack/uvloop/issues/412 - "and not test_remote_shutdown_receives_trailing_data " - ;; It looks like pytest is preventing - ;; custom stdout/stderr redirection, - ;; even with -s. - "and not test_process_streams_redirect " - ;; FileNotFoundError: [Errno 2] No such file or - ;; directory - "and not test_process_env_2" - ,@(if (target-riscv64?) - `(" and not test_renegotiation" - " and not test_getaddrinfo_21") - `()))))))))) + (list + #:test-flags + ;; The tests are prone to get stuck. Use pytest-timeout’s --timeout flag + ;; to get a meaningful idea about where. + #~(list "--timeout=300" + "--timeout-method=thread" + "-k" (string-join + (list + ;; Timeout, because SIGINT cannot be sent to child. + "not test_signals_sigint_pycode_continue" + "test_signals_sigint_pycode_stop" + "test_signals_sigint_uvcode" + "test_signals_sigint_uvcode_two_loop_runs" + ;; This test is racy and prone to get stuck on + ;; various platforms, possibly a aiohttp issue: + ;; https://github.com/MagicStack/uvloop/issues/412 + "test_remote_shutdown_receives_trailing_data" + ;; It looks like pytest is preventing + ;; custom stdout/stderr redirection, + ;; even with -s. + "test_process_streams_redirect" + ;; FileNotFoundError: [Errno 2] No such file or + ;; directory + "test_process_env_2" + ;; socket.gaierror: [Errno -2] Name or service not known + "test_getaddrinfo_21" + #$@(if (target-riscv64?) + `("test_renegotiation") + `())) + " and not ")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'preparations + (lambda _ + ;; Use packaged libuv. + (substitute* "setup.py" (("self.use_system_libuv = False") + "self.use_system_libuv = True")) + ;; Replace hardcoded shell command. + (substitute* "uvloop/loop.pyx" + (("b'/bin/sh'") (string-append "b'" (which "sh") "'"))))) + #$@(if (target-riscv64?) + `((add-after 'unpack 'adjust-test-timeouts + (lambda _ + (substitute* '("tests/test_tcp.py" + "tests/test_unix.py") + (("SSL_HANDSHAKE_TIMEOUT = 15\\.0") + "SSL_HANDSHAKE_TIMEOUT = 30.0"))))) + '()) + (add-before 'check 'pre-check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Remove Python module, which conflicts with the installed + ;; version, but lacks the built C module. + (delete-file-recursively "uvloop"))))))) (native-inputs (list python-aiohttp python-cython-3 @@ -7361,72 +7486,75 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (outputs '("out" "doc")) (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'build 'build-doc - (lambda _ - (invoke "make" "-C" "docs" "PAPER=a4" "html" "info") - (delete-file "docs/build/texinfo/Makefile") - (delete-file "docs/build/texinfo/Gunicorn.texi"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (begin - (invoke "pytest" "-vv" - ;; Disable the geventlet tests because eventlet uses - ;; dnspython, which does not work in the build - ;; container due to lack of /etc/resolv.conf, etc. - "--ignore=tests/workers/test_geventlet.py")) - (format #t "test suite not run~%")))) - (add-after 'install 'install-doc - (lambda* (#:key outputs #:allow-other-keys) - (let* ((doc (string-append (assoc-ref outputs "doc") - "/share/doc/" ,name "-" ,version)) - (html (string-append doc "/html")) - (info (string-append doc "/info")) - (examples (string-append doc "/examples"))) - (mkdir-p html) - (mkdir-p info) - (mkdir-p examples) - (copy-recursively "docs/build/html" html) - (copy-recursively "docs/build/texinfo" info) - (copy-recursively "examples" examples) - (for-each (lambda (file) - (copy-file file (string-append doc "/" file))) - '("README.rst" "NOTICE" "LICENSE" "THANKS"))))) - ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see - ;; <https://bugs.gnu.org/25235>), leading to an inflated closure - ;; size. Override it to only add the essential entries. - (replace 'wrap - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (python (assoc-ref (or native-inputs inputs) "python")) - (sitedir (string-append "/lib/python" - (python-version python) - "/site-packages"))) - (wrap-program (string-append out "/bin/gunicorn") - `("PYTHONPATH" ":" prefix - ,(map (lambda (output) - (string-append output sitedir)) - (list python out)))))))))) + `(#:test-flags + ;; Disable the geventlet tests because eventlet uses dnspython, which + ;; does not work in the build container due to lack of /etc/resolv.conf + '("--ignore=tests/workers/test_geventlet.py") + #:phases (modify-phases %standard-phases + (add-after 'build 'build-doc + (lambda _ + (invoke "make" + "-C" + "docs" + "PAPER=a4" + "html" + "info") + (delete-file "docs/build/texinfo/Makefile") + (delete-file "docs/build/texinfo/Gunicorn.texi"))) + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((doc (string-append (assoc-ref outputs "doc") + "/share/doc/" + ,name "-" + ,version)) + (html (string-append doc "/html")) + (info (string-append doc "/info")) + (examples (string-append doc "/examples"))) + (mkdir-p html) + (mkdir-p info) + (mkdir-p examples) + (copy-recursively "docs/build/html" html) + (copy-recursively "docs/build/texinfo" info) + (copy-recursively "examples" examples) + (for-each (lambda (file) + (copy-file file + (string-append doc "/" file))) + '("README.rst" "NOTICE" "LICENSE" "THANKS"))))) + ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see + ;; <https://bugs.gnu.org/25235>), leading to an inflated closure + ;; size. Override it to only add the essential entries. + (replace 'wrap + (lambda* (#:key native-inputs inputs outputs + #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python (assoc-ref (or native-inputs inputs) + "python")) + (sitedir (string-append "/lib/python" + (python-version python) + "/site-packages"))) + (wrap-program (string-append out "/bin/gunicorn") + `("PYTHONPATH" ":" prefix + ,(map (lambda (output) + (string-append output sitedir)) + (list python out)))))))))) (inputs (list bash-minimal)) - (native-inputs - (list binutils ;; for ctypes.util.find_library() - python-aiohttp - python-gevent - python-pytest - python-pytest-cov - python-sphinx - texinfo)) + (native-inputs (list binutils ;for ctypes.util.find_library() + python-aiohttp + python-gevent + python-pytest + python-pytest-cov + python-sphinx + texinfo)) (propagated-inputs (list python-packaging python-setuptools python-wheel)) (home-page "https://gunicorn.org/") (synopsis "Python WSGI HTTP Server for UNIX") - (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP + (description + "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP Server for UNIX. It’s a pre-fork worker model ported from Ruby’s Unicorn project. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resources, and fairly speedy.") - (license license:expat))) + (license license:expat))) (define-public gunicorn-next (package @@ -7544,13 +7672,14 @@ and fairly speedy.") python-trustme python-wsproto)) (propagated-inputs - (list python-click + (list python-a2wsgi + python-click python-dotenv python-h11 python-httptools python-pyyaml python-uvloop - python-watchgod + python-watchfiles python-websockets)) (home-page "https://github.com/encode/uvicorn") (synopsis "Fast ASGI server implementation") @@ -7642,71 +7771,76 @@ with GitLab instances through their API.") interfaces, inferring which argument is the path, and which is the address.") (license license:expat))) +;; XXX: This project missed maintainer upstream, see +;; <https://github.com/joeyespo/grip/issues/387>. +;; Consider to remove if it keeps failing to build. (define-public grip (package (name "grip") (version "4.6.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/joeyespo/grip") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0vhimd99zw7s1fihwr6yfij6ywahv9gdrfcf5qljvzh75mvzcwh8")))) - (build-system python-build-system) - (propagated-inputs (list python-docopt - python-flask - python-markdown - python-path-and-address - python-pygments - python-requests)) - (native-inputs (list python-pytest python-responses)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/joeyespo/grip") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0vhimd99zw7s1fihwr6yfij6ywahv9gdrfcf5qljvzh75mvzcwh8")))) + (build-system pyproject-build-system) (arguments - (list #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (setenv "PATH" - (string-append (getenv "PATH") ":" - #$output "/bin")) - (invoke "py.test" "-m" "not assumption"))))))) + (list + #:test-flags + ;; All tests fail requiring network access, ignore the whole file. + #~(list "--ignore=tests/test_github.py") + #:phases + #~(modify-phases %standard-phases + ;; This fixes the removal of `charset` attribute of requests from + ;; Werkzeug 2.3.0. + ;; Fixed in grip's commit <2784eb2c1515f1cdb1554d049d48b3bff0f42085>. + (add-after 'unpack 'fix-response-encoding + (lambda _ + (substitute* "grip/app.py" + (("response.charset") + "getattr(response, 'charset', 'utf-8')"))))))) + (native-inputs + (list nss-certs-for-test + python-pytest + python-responses + python-setuptools + python-wheel)) + (propagated-inputs + (list python-docopt + python-flask + python-markdown + python-path-and-address + python-pygments + python-requests)) (home-page "https://github.com/joeyespo/grip") (synopsis "Preview Markdown files using the GitHub API") (description - "Grip is a command-line server application written in Python -that uses the GitHub Markdown API to render a local Markdown file. The styles -and rendering come directly from GitHub, so you'll know exactly how it will -appear. Changes you make to the file will be instantly reflected in the browser -without requiring a page refresh.") + "Grip is a command-line server application written in Python that uses +the GitHub Markdown API to render a local Markdown file. The styles and +rendering come directly from GitHub, so you'll know exactly how it will +appear. Changes you make to the file will be instantly reflected in the +browser without requiring a page refresh.") (license license:expat))) (define-public python-port-for (package (name "python-port-for") - (version "0.4") + (version "0.7.4") (source (origin (method url-fetch) - (uri (pypi-uri "port-for" version)) + (uri (pypi-uri "port_for" version)) (sha256 - (base32 - "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'use-urllib3 - (lambda _ - (substitute* "port_for/_download_ranges.py" - (("urllib2") "urllib3"))))))) + (base32 "13826s2d4hzzmv69wws6a7ryhminclv2bqaw6cpl929gnbki6xzw")))) + (build-system pyproject-build-system) (propagated-inputs (list python-urllib3)) (native-inputs - (list python-mock)) + (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/kmike/port-for/") (synopsis "TCP localhost port finder and association manager") (description @@ -8423,19 +8557,19 @@ Swagger.") (define-public python-manuel (package (name "python-manuel") - (version "1.10.1") + (version "1.13.0") (source (origin (method url-fetch) (uri (pypi-uri "manuel" version)) (sha256 (base32 - "1bdzay7j70fly5fy6wbdi8fbrxjrrlxnxnw226rwry1c8a351rpy")))) - (build-system python-build-system) + "0nl8psji3fizbxw34gdg22dndlg9lf5f56mnh1vr4vgsx06i4qsx")))) + (build-system pyproject-build-system) (propagated-inputs - (list python-six)) + (list python-setuptools)) (native-inputs - (list python-zope-testing)) + (list python-setuptools python-wheel python-zope-testing)) (home-page "https://pypi.org/project/manuel/") (synopsis "Build tested documentation") (description @@ -8445,7 +8579,7 @@ Swagger.") (define-public python-pecan (package (name "python-pecan") - (version "1.4.1") + (version "1.6.1") (source (origin (method git-fetch) ;no tests in pypi release @@ -8455,28 +8589,17 @@ Swagger.") (file-name (git-file-name name version)) (sha256 (base32 - "10lz0cqafx3j24m52vv9ph0bxrzyx6wv2dgz7g9kfm60lhaskqkh")))) - (build-system python-build-system) + "1ybjvpws741bvxd7aq5hh8gv5sk9836hb9afgalqsm0lxsq0li3a")))) + (build-system pyproject-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'relax-requirements - (lambda _ - (substitute* "test-requirements.txt" - ;; Drop extraneous virtualenv requirement. - ((".*virtualenv.*") "")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "pecan"))))))) + #:test-flags '(list "--pyargs" "pecan"))) (native-inputs (list gunicorn python-genshi python-jinja2 python-pytest - python-sqlalchemy - uwsgi)) + python-sqlalchemy)) (propagated-inputs (list python-logutils python-mako @@ -8656,17 +8779,24 @@ esprima.js)") (define-public python-js2py (package (name "python-js2py") - (version "0.71") + (version "0.74") (source (origin (method url-fetch) (uri (pypi-uri "Js2Py" version)) (sha256 - (base32 "1kkzkys6dfcbdv51vqxr9cmak350ab4mmykb8dysx60lvl4i06x4")))) - (build-system python-build-system) - (arguments '(#:tests? #false)) ; none included + (base32 "0bwpp23qpx9amzqisiqvzlr17hr7vxqp4ry8lgxhw639hjmadwrr")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ; tests require Node + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (propagated-inputs - (list python-pyjsparser python-six python-tzlocal)) + (list python-numpy + python-pyjsparser + python-tzlocal)) (home-page "https://github.com/PiotrDabkowski/Js2Py") (synopsis "JavaScript to Python translator") (description @@ -8970,19 +9100,29 @@ applications.") (define-public python-sanic (package (name "python-sanic") - (version "23.12.1") + (version "25.3.0") (source (origin (method url-fetch) (uri (pypi-uri "sanic" version)) (sha256 - (base32 - "115vnir4qijv89139g5h0i4l0n4w3bgh1ickgnk8xidxsa0wla15")))) + (base32 "1fv9wgsj54scbr7qhmwdgc4zqnqpwacpakcfxhsg10gc04h54pbp")) + ;; Loosen requirements for both python-sanic and python-sanic-bootstrap. + (modules '((guix build utils))) + (snippet #~(substitute* "setup.py" + (("setuptools>=[0-9.]*") + "setuptools"))))) (build-system pyproject-build-system) (arguments - (list - #:test-flags - '(list "-k" + (list + #:test-flags + #~(list "--asyncio-mode=auto" + "--ignore=tests/benchmark/" + "--ignore=tests/typing/test_typing.py" + ;; Most tests hang or fail + "--ignore=tests/test_cli.py" + "--ignore=tests/worker/test_worker_serve.py" + "-k" (string-append ;; PyPi sources lack examples module. "not test_gunicorn_" @@ -8994,6 +9134,8 @@ applications.") " and not test_listeners_triggered" " and not test_keep_alive_connection_context" " and not test_keep_alive_client_timeout" + " and not test_conflicting_body_methods_overload" + " and not test_unix_connection" ;; Unclear why they fail since core-updates merge. " and not test_missing_sni" " and not test_no_matching_cert" @@ -9005,14 +9147,9 @@ applications.") " and not test_setup_and_teardown_unix" " and not test_configure_socket" ;; Freezes - " and not test_server_run_with_repl")) - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? test-flags #:allow-other-keys) - (when tests? - (apply invoke "pytest" "-vv" "./tests" - test-flags))))))) + " and not test_server_run_with_repl" + " and not test_server_run" + " and not test_no_workers")))) (propagated-inputs (list python-aiofiles python-aioquic @@ -9026,22 +9163,20 @@ applications.") python-uvloop python-websockets)) (native-inputs - (list python-bandit - python-beautifulsoup4 + (list python-beautifulsoup4 python-chardet - python-coverage python-cryptography python-docutils python-mypy python-pygments python-pytest + python-pytest-asyncio python-pytest-benchmark python-pytest-sanic python-sanic-testing python-setuptools python-slotscheck python-towncrier - python-tox python-types-ujson python-uvicorn python-wheel)) @@ -9712,38 +9847,6 @@ Only the RGB colorspace is supported. Conversion to/from the HSL colorspace can be handled by the @code{colorsys} module in the Python standard library.") (license license:bsd-3))) -(define-public python-webcolors-24 - (package - (inherit python-webcolors) - (name "python-webcolors") - (version "24.11.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "webcolors" version)) - (sha256 - (base32 "1xl0vn4xa03vjwx6fj19q9kgb94g65gvdf3p0ivsy0i2ydldgczc")))) - (build-system pyproject-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-build-error - (lambda _ - ;; pdm wants optional-dependencies instead of dependency-groups. - ;; See <https://pdm-project.org/en/latest/usage/dependency/>. - (substitute* "pyproject.toml" - (("\\[dependency-groups\\]") - "[project.optional-dependencies]")))) - (replace 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - ;; Our python-nox version is incompatible, - ;; so use pytest instead. - (invoke "pytest"))))))) - (native-inputs (list python-pdm-backend python-pytest)) - (license license:bsd-3))) - (define-public python-woob (package (name "python-woob") @@ -10071,8 +10174,9 @@ regular expressions.") (build-system pyproject-build-system) (arguments (list #:test-flags - ;; Tests requiring a display. - #~(list "-k" (string-append + #~(list "--numprocesses" (number->string (parallel-job-count)) + ;; Tests requiring a display. + "-k" (string-append "not " (string-join (list "test_pformat" "test_pformat_old_windows" @@ -10081,7 +10185,9 @@ regular expressions.") "test_persist") " and not ")) ;; Connection refused to some local FTP server. - "--ignore=tests/test_feedexport.py") + "--ignore=tests/test_feedexport.py" + ;; Skip documentation testing. + "--ignore=docs") #:phases #~(modify-phases %standard-phases (add-before 'check 'prepare-test-environment diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ef67fd7e4d..7f539634d1 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -185,7 +185,6 @@ #:use-module (gnu packages adns) #:use-module (gnu packages aidc) #:use-module (gnu packages algebra) - #:use-module (gnu packages astronomy) #:use-module (gnu packages attr) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) @@ -232,6 +231,7 @@ #:use-module (gnu packages gsasl) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) + #:use-module (gnu packages guile-xyz) #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) @@ -309,6 +309,7 @@ #:use-module (guix build-system meson) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) + #:use-module (guix deprecation) #:use-module (guix download) #:use-module (guix hg-download) #:use-module (guix git-download) @@ -320,44 +321,41 @@ (define-public python-apprise (package (name "python-apprise") - (version "1.9.2") + (version "1.9.3") (source (origin (method url-fetch) (uri (pypi-uri "apprise" version)) (sha256 - (base32 "1a3kzpjdp29l4ryafd36gs8apg61f16ljw93h1051p98f0hv23i9")))) + (base32 "19k51ici58134m61f6di0m36mbqgdyr6r31i8v6rk22vldz6d0zm")))) (build-system pyproject-build-system) (arguments (list #:test-flags #~(list "--numprocesses" (number->string (parallel-job-count)) "--ignore=test/test_plugin_macosx.py" - "-k" (string-append "not test_plugin_mqtt_tls_connect_success" - " and not test_plugin_mqtt_tls_no_verify_success" - ;; AssertionError: assert False - " and not test_plugin_wxpusher_edge_cases")))) - (propagated-inputs (list python-certifi - python-click - python-markdown - python-pyyaml - python-requests - python-requests-oauthlib)) + ;; AssertionError + "--deselect=test/test_plugin_wxpusher.py::test_plugin_wxpusher_urls"))) (native-inputs (list python-babel python-pytest - python-pytest-cov python-pytest-mock python-pytest-xdist python-setuptools python-wheel)) + (propagated-inputs + (list python-certifi + python-click + python-markdown + python-pyyaml + python-requests + python-requests-oauthlib)) (home-page "https://github.com/caronc/apprise") - (synopsis - "Push notification Python library that works with many platforms") + (synopsis "Push notification library") (description - "Apprise is a Python library that allows sending push notifications to a broad -range of notification services, such as Telegram, Discord, Slack, Amazon SNS, -Gotify, etc.") + "Apprise is a Python library that allows sending push notifications to a +broad range of notification services, such as Telegram, Discord, Slack, Amazon +SNS, Gotify, etc.") (license license:bsd-2))) (define-public python-archspec @@ -1863,6 +1861,34 @@ formatting in the terminal. It comes with a collection of color codes and names for 256 color terminal setups.") (license license:expat))) +(define-public python-colored-traceback + ;; No tags in upstream repository. + (let ((commit "98e6dea7111f7681db823c518f18026374a832b9") + (revision "0")) + (package + (name "python-colored-traceback") + (version (git-version "0.4.2" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/staticshock/colored-traceback.py") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "19d5mpwk7398b8fjh6abnr96wz70vf5vb4p207r8sny748rwx451")))) + (build-system pyproject-build-system) + (arguments + ;; Tests are incompatible with current python version. + (list #:tests? #f)) + (propagated-inputs (list python-colorama python-pygments)) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/staticshock/colored-traceback.py") + (synopsis "Automatically color uncaught exception tracebacks") + (description "This package provides python utilities to automatically +color uncaught exception tracebacks.") + (license license:isc)))) + (define-public python-colorful (package (name "python-colorful") @@ -3186,7 +3212,9 @@ simple function calls.") (native-inputs (list python-pytest python-pytest-cov + python-setuptools python-setuptools-scm + python-wheel xorg-server-for-tests)) (home-page "https://github.com/glue-viz/echo") (synopsis "Callback Properties in Python") @@ -3509,17 +3537,17 @@ planar geometric objects. It is based on the @code{GEOS} library.") (define-public python-shortuuid (package (name "python-shortuuid") - (version "0.5.0") + (version "1.0.13") (source (origin (method url-fetch) (uri (pypi-uri "shortuuid" version)) (sha256 (base32 - "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh")))) - (build-system python-build-system) + "0wjygiwk07irgqmr29bv7rvq9pc71ff3jinzn620a9h6yq3wzf9v")))) + (build-system pyproject-build-system) (native-inputs - (list python-pep8)) + (list python-poetry-core python-pytest)) (home-page "https://github.com/skorokithakis/shortuuid") (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs") (description @@ -4013,23 +4041,30 @@ Unicode-to-LaTeX conversion.") (define-public python-cftime (package (name "python-cftime") - (version "1.6.2") + (version "1.6.4") (source (origin (method url-fetch) (uri (pypi-uri "cftime" version)) (sha256 - (base32 "1lp6jrjjgl18csn4bcnphn0l16ag4aynvn7x0kins155p07w0546")))) + (base32 "1p5fw25hjqpzwxw3662f72ga30kpf8pbbph8fgb7x2kmjdhl09g3")))) (build-system pyproject-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-unwanted-pytest-options + (lambda _ + (substitute* "setup.cfg" + (("doctest_optionflags.*") + "") + (("--cov.*") + ""))))))) (propagated-inputs (list python-numpy)) (native-inputs - (list python-check-manifest - python-coverage - python-coveralls - python-cython - python-pytest-cov - python-sphinx + (list python-cython + python-pytest + python-setuptools python-twine python-wheel)) (home-page "https://unidata.github.io/cftime/") @@ -4112,14 +4147,24 @@ protocol.") (define-public python-ncls (package (name "python-ncls") - (version "0.0.65") + (version "0.0.68") (source (origin (method url-fetch) (uri (pypi-uri "ncls" version)) (sha256 (base32 - "1wx06xqknd2r98w8z93f47g5dpxzn92kamhj8vkq0nj569hf7cg1")))) - (build-system python-build-system) + "14xsnzr34xa4rwfcdjry9aqjs8i03s9fzy6jgrwj3fr3n6msbal1")))) + (build-system pyproject-build-system) + (arguments + ;; Those tests fail with warnings (not errors) for the Numpy update. + ;; Remove it at next python-team iteration. + (list #:test-flags ''("--ignore=examples/test_all_overlaps_both.py" + "--ignore=examples/test_find_overlap_list.py"))) + (native-inputs (list python-cython + python-pandas + python-pytest + python-setuptools + python-wheel)) (propagated-inputs (list python-numpy)) (home-page "https://github.com/endrebak/ncls") (synopsis "Nested containment list data structure") @@ -4332,16 +4377,16 @@ version identifier.") (define-public python-serpent (package (name "python-serpent") - (version "1.28") + (version "1.41") (source (origin (method url-fetch) (uri (pypi-uri "serpent" version)) (sha256 - (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk")))) - (build-system python-build-system) + (base32 "15bhxpihxvbphsvp4wyh2kwfz7xasmki9zwcsj3l6r66wdgh61q4")))) + (build-system pyproject-build-system) (native-inputs - (list python-attrs python-pytz)) + (list python-attrs python-pytz python-setuptools python-wheel)) (home-page "https://github.com/irmen/Serpent") (synopsis "Serializer for literal Python expressions") (description @@ -4495,43 +4540,55 @@ helpers.") language. It aims to be fast.") (license license:expat))) +;; XXX: The project might be abandoned and this package has no users in Guix, +;; consider to remove if it keeps failing. +;; See: <https://github.com/ethanfurman/aenum/issues/45>, +;; <https://github.com/ethanfurman/aenum/issues/44>, +;; <https://github.com/ethanfurman/aenum/issues/27>. (define-public python-aenum (package (name "python-aenum") - (version "3.1.12") + (version "3.1.15") (source (origin (method url-fetch) (uri (pypi-uri "aenum" version)) (sha256 - (base32 "1w1ffkcxgnimi5w8802qk6w2qxz9k8hpvsg6yy2zi08ahs8iqlry")) + (base32 "0ncmbdblqhqyb2mg73d5663vx3q2xb9q8hmj77zp1y64336pdgcc")) (modules '((guix build utils))) (snippet ;; Delete the Python 2 specific files which won't compile ;; in Python 3. '(for-each delete-file (find-files "." "_py2.py$"))))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - ;; We must run the test suite module directly, as it - ;; fails to define the 'tempdir' variable in scope for - ;; the tests otherwise - ;; (see:https://bitbucket.org/stoneleaf/aenum/\ - ;; issues/32/running-tests-with-python-setuppy-test). - (invoke "python3" "aenum/test.py") - ;; This one fails with "NameError: name - ;; 'test_pickle_dump_load' is not defined" (see: - ;; https://bitbucket.org/stoneleaf/aenum/issues/33 - ;; /error-running-the-test_v3py-test-suite). - ;; (invoke "python3" "aenum/test_v3.py") - #t))))) - (home-page "https://bitbucket.org/stoneleaf/aenum") + (list + #:test-flags + ;; These tests are defined in "aenum/test_v3.py" and require a function + ;; "test_pickle_dump_load" from "aenum/test.py" which is not imported + ;; into the module's scope. + #~(list "-k" (string-join + (list "not test_pickle_enum_function_with_qualname" + "test_class_nested_enum_and_pickle_protocol_four" + "test_subclasses_with_getnewargs_ex") + " and not ")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-tests + (lambda _ + (substitute* "aenum/test_v3.py" + ;; tempdir variable is not defined in the module. + (("import tempfile.*") + (format #f "import tempfile~%tempdir = tempfile.mkdtemp()~%")))))))) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (home-page "https://github.com/ethanfurman/aenum") (synopsis "Advanced enumerations, namedtuples and constants for Python") - (description "The aenum library includes an @code{Enum} base class, a -metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant} -class.") + (description + "The aenum library includes an @code{Enum} base class, a metaclass-based +@code{NamedTuple} implementation and a @code{NamedConstant} class.") (license license:bsd-3))) (define-public python-calver @@ -4667,43 +4724,6 @@ Pythonic interface. It is mainly targeted for testing and automation tasks rather than a standard compliant master implementation.") (license license:expat))) -(define-public python-caniusepython3 - (package - (name "python-caniusepython3") - (version "7.2.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "caniusepython3" version)) - (sha256 - (base32 - "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28")))) - (build-system python-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'relax-requirements - (lambda _ - (substitute* "setup.py" - ;; These are for compatibility with Python 2. - ((".*'argparse', 'backports.functools_lru_cache',.*") - "")) - (substitute* "dev_requirements.txt" - ((".*pylint.*") "")) ;not actually required - #t)) - (replace 'check - (lambda _ - (invoke "py.test" "-k" "not NetworkTests")))))) - (propagated-inputs - (list python-distlib python-packaging python-requests)) - (native-inputs - (list python-mock python-pytest)) - (home-page "https://github.com/brettcannon/caniusepython3") - (synopsis "Check for Python 3-incompatible Python libraries") - (description "The @command{caniusepython3} command scans your project and -reports the Python 3-incompatible libraries it found. It can also be used as -a library.") - (license license:asl2.0))) - (define-public python-diskcache (package (name "python-diskcache") @@ -5344,15 +5364,33 @@ lossless but can be tweaked for more aggressive cleaning.") (define-public python-mechanize (package (name "python-mechanize") - (version "0.4.7") + (version "0.4.10") (source (origin (method url-fetch) (uri (pypi-uri "mechanize" version)) (sha256 - (base32 - "02b845y85ka5sl2cj93lll3v326d8bww07bq1q0y1643h7sshwqp")))) - (build-system python-build-system) + (base32 "1pvxjnhqi6iq7nnjksnfvyzxcibbwfjc9fzp22v0msp7kdzr9shx")))) + (build-system pyproject-build-system) + (arguments + ;; XXX: Unclear why tests are failing. + (list #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'configure-tests + (lambda _ + (setenv "GUIX_PYTHONPATH" + (string-append (getcwd) "/test-tools:" + (getenv "GUIX_PYTHONPATH")))))))) + (native-inputs + (list python-html5-parser + python-html5lib + python-lxml + python-service-identity + python-setuptools + python-six + python-twisted + python-wheel)) (propagated-inputs (list python-html5lib)) (home-page "https://github.com/python-mechanize/mechanize") @@ -5479,40 +5517,26 @@ Python.") (define-public python-jsonargparse (package (name "python-jsonargparse") - (version "4.21.1") + (version "4.37.0") (source (origin (method url-fetch) (uri (pypi-uri "jsonargparse" version)) (sha256 (base32 - "1k3b60x0zf86fh50y2jyby30gksqriyvvpfnf5mqq0qn7jih01y7")))) + "1b9w9j27phj5j00pmhp11lzf53yc4dnwknhxacv2bfyiiaq0af2s")))) (build-system pyproject-build-system) (arguments - (list - #:test-flags - '(list "-k" (string-append "not test_env_prefix" - " and not test_basemodel" - " and not test_field_default_factory" - " and not test_field_description" - " and not test_get_param_relative_import_from_init" - ;; Strangely, the arguments are interpreted - ;; as arguments to pytest. - " and not test_pydantic_types")))) + (list #:test-flags + '(list "-k" "not test_env_prefix"))) (propagated-inputs - (list python-contextvars - python-docstring-parser - python-pyyaml - python-typeshed-client)) + (list python-pyyaml)) (native-inputs (list python-attrs - python-coverage - python-pycodestyle + python-pypa-build python-pydantic python-pytest python-pytest-subtests python-responses - python-tox - python-types-requests python-setuptools python-wheel)) (home-page "https://github.com/omni-us/jsonargparse/") @@ -5884,15 +5908,12 @@ a certain expected condition.") ;; Delete generated Cython C files. (snippet '(for-each delete-file (find-files "." "\\.c$"))))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list - #:phases - '(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "setup.py" "test"))))))) + ;; XXX: Update to python@3.11 broke some python-nose functionality. + ;; Tests are broken but the package itself is most likely fine. + #:tests? #f)) (propagated-inputs (list python-joblib python-networkx @@ -5901,8 +5922,9 @@ a certain expected condition.") python-scipy)) (native-inputs (list python-cython - python-nose - python-pandas)) + python-pandas + python-setuptools + python-wheel)) (home-page "https://pypi.python.org/pypi/pomegranate/") (synopsis "Graphical models library for Python") (description @@ -6719,24 +6741,38 @@ between Julian dates and Gregorian dates.") (define-public python-jsondiff (package - (name "python-jsondiff") - (version "1.2.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "jsondiff" version)) - (sha256 - (base32 - "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l")))) - (build-system python-build-system) - (native-inputs - (list python-nose python-nose-random)) - (home-page - "https://github.com/fzumstein/jsondiff") - (synopsis "Compare JSON and JSON-like structures in Python") - (description "@code{jsondiff} is a Python library which lets you -compare, diff, and patch JSON and JSON-like structures in Python.") - (license license:expat))) + (name "python-jsondiff") + (version "2.2.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "jsondiff" version)) + (sha256 + (base32 + "1zpp8l2ii9ic1sk6kdcqxk0v5q9pgdmdhg1h4vg8dfl6i8n1d3b5")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'set-version + (lambda _ + (substitute* "pyproject.toml" + (("^version_file.*") "") + (("dynamic = \\[\"version\"\\]") + (string-append "version = \"" #$version "\"")))))))) + (propagated-inputs (list python-pyyaml)) + (native-inputs + (list python-hypothesis + python-pytest + python-setuptools + python-setuptools-scm + python-wheel)) + (home-page "https://github.com/fzumstein/jsondiff") + (synopsis "Compare JSON and JSON-like structures in Python") + (description "@code{jsondiff} is a Python library which lets you compare, +diff, and patch JSON and JSON-like structures in Python.") + (license license:expat))) (define-public python-ddlparse (package @@ -6802,7 +6838,7 @@ and convert DDL to BigQuery JSON schema.") python-referencing-bootstrap python-rpds-py python-uri-template - python-webcolors-24)) + python-webcolors)) (home-page "https://github.com/Julian/jsonschema") (synopsis "Implementation of JSON Schema for Python") (description @@ -7111,27 +7147,25 @@ JavaScript-like message boxes. Types of dialog boxes include: (define-public python-pympler (package (name "python-pympler") - (home-page "https://pythonhosted.org/Pympler/") - (version "1.0.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "Pympler" version)) - (sha256 - (base32 - "1ynkqpv2akldmvkll5vh5zhwj433s1d59iv0f76lygyak4silgwr")))) - (build-system python-build-system) + (version "1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pympler" version)) + (sha256 + (base32 "090403k1wvqyddjwbla4843dylysrkd8yw7i62222b4rp1y8dahy")))) + (build-system pyproject-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'skip-broken-test - (lambda _ - ;; FIXME: This test fails for no good reason: - ;; https://github.com/pympler/pympler/issues/153 - (substitute* "test/muppy/test_tracker.py" - (("^([[:blank:]]+)def test_stracker_create_summary" all indent) - (string-append indent "@unittest.skipIf(True, \ -'Fails on Guix too for unknown reasons')\n" all)))))))) + ;; One test fails with error: 'function (test.muppy.test_summary.func)' + ;; != 'function (muppy.test_summary.func)'. + ;; See <https://github.com/pympler/pympler/issues/134>. + #:test-flags #~(list "-k" "not test_repr_function"))) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (home-page "https://pythonhosted.org/Pympler/") (synopsis "Measure, monitor and analyze memory behavior") (description "Pympler is a development tool to measure, monitor and analyze @@ -7239,33 +7273,44 @@ e.g. filters, callbacks and errbacks can all be promises.") (define-public python-virtualenv (package (name "python-virtualenv") - (version "20.28.0") + (version "20.29.1") (source (origin (method url-fetch) (uri (pypi-uri "virtualenv" version)) (sha256 (base32 - "1aj980vffl4mpq4j67f7a0j07rlm8jp5yw8xh3m8fywfpdi3571c")))) + "0dfwnn8i1y33kgxhi4xyhsj4yr5vsin7zf9c343bcbyk700rgf5q")))) (build-system pyproject-build-system) (arguments - ;; These tests require Internet access. - (list #:test-flags '(list "-k" "not test_seed_link_via_app_data"))) + (list + #:test-flags + #~(list "-k" (string-join + (list + ;; These tests require Internet access. + "not test_seed_link_via_app_data" + ;; AssertionError: assert 'python' in ['python3', + ;; 'python3.11']. + ;; + ;; PythonInfo() returns: 'system_executable': + ;; '/gnu/store/...-python-wrapper-3.11.11/bin/python' + "test_fallback_existent_system_executable") + " and not ")))) (native-inputs - (list python-covdefaults - python-coverage - python-flaky + (list python-flaky python-hatch-vcs python-hatchling python-packaging python-pytest python-pytest-env + python-pytest-freezer python-pytest-mock python-pytest-timeout python-setuptools python-time-machine)) (propagated-inputs - (list python-distlib python-filelock python-importlib-metadata + (list python-distlib + python-filelock python-platformdirs)) (home-page "https://virtualenv.pypa.io/") (synopsis "Virtual Python environment builder") @@ -7875,7 +7920,11 @@ structure for Python.") (setenv "LANG" "") ;; required for tests/test_configmanager.py (setenv "HOME" "/tmp")))))) - (native-inputs (list python-pytest python-pytest-cov python-pyhamcrest)) + (native-inputs + (list python-pytest + python-pytest-cov + python-pyhamcrest + python-wheel)) (inputs (list bash-minimal ; for wrap-program gtksourceview-3 @@ -8081,21 +8130,21 @@ via commands such as @command{rst2man}, as well as supporting Python code.") ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses. (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+)))) -;; awscli refuses to be built with docutils < 0.16. -(define-public python-docutils-0.15 +;; awscli refuses to be built with docutils < 0.17. +(define-public python-docutils-0.16 (package (inherit python-docutils) - (version "0.15") + (version "0.16") (source (origin (method url-fetch) (uri (pypi-uri "docutils" version)) (sha256 (base32 - "0ja8q6mdj6xv62jjw3phv8j5nfqi5x8hnfy4pqfcjcgz4b34k8sl")))) + "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2")))) ;; tests contain Python 2 syntax. (arguments '(#:tests? #false)) (native-inputs - (list python-setuptools-57)))) + (list python-setuptools)))) (define-public python-docx (package @@ -8141,6 +8190,26 @@ Microsoft Word (.docx) documents.") "This package provides a tiny LRU cache implementation and decorator.") (license license:bsd-4))) +(define-public python-reretry + (package + (name "python-reretry") + (version "0.11.8") + (source + (origin + (method url-fetch) + (uri (pypi-uri "reretry" version)) + (sha256 + (base32 "1qrjsjzah8gw1bciqn8bhrj80fjjg13qg8jks7qs4bjipv71yygj")))) + (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/leshchenko1979/reretry") + (synopsis "Functional decorator for retrying on exceptions") + (description + "This package is a fork from the retry package, but with some of added +community-sourced features. It provides an easy to use, but functional +decorator for retrying on exceptions.") + (license license:asl2.0))) + (define-public python-restructuredtext-lint (package (name "python-restructuredtext-lint") @@ -8869,15 +8938,31 @@ or for visual regression testing purposes.") (define-public python-rstr (package (name "python-rstr") - (version "2.2.6") + (version "3.2.2") (source (origin - (method url-fetch) - (uri (pypi-uri "rstr" version)) - (sha256 - (base32 - "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx")))) - (build-system python-build-system) + (method git-fetch) + (uri (git-reference + (url "https://github.com/leapfrogonline/rstr") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1z9d660jnv72jn8qzpa9hddpv5f953js8i75hfhkcw68vmdfndnr")))) + (build-system pyproject-build-system) + (arguments + (list + #: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, the version string is set to + ;; '0.0.0'. + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))))) + (native-inputs (list python-pytest + python-setuptools + python-setuptools-scm + python-wheel)) (home-page "https://github.com/leapfrogonline/rstr") (synopsis "Generate random strings in Python") (description "This package provides a python module for generating @@ -9713,11 +9798,15 @@ writing C extensions for Python as easy as Python itself.") (define-public python-numpy (package (name "python-numpy") - ;; XXX: Any other versions up to 1.26.4 failed to build with error similar - ;; to: 'fenv_t' has not been declared in '::' 58 | using ::fenv_t; - ;; See <https://github.com/numpy/numpy/issues/21075#issuecomment-1047976197>, - ;; <https://github.com/numpy/numpy/issues/24318>. - (version "1.24.4") + ;; XXX: Starting from v1.26.0 the project includes a vendored-meson which + ;; is needed for SIMD and BLAS/LAPACK features that are not yet available + ;; in upstream Meson. + ;; + ;; See: + ;; - URL <https://raw.githubusercontent.com/numpy/numpy> + ;; - commit :: 2f3549c9d7c5048621568e431c86bc7530742723 + ;; - file <doc/source/building/understanding_meson.rst> + (version "1.26.2") (source (origin (method url-fetch) @@ -9726,7 +9815,7 @@ writing C extensions for Python as easy as Python itself.") version "/numpy-" version ".tar.gz")) (sha256 (base32 - "0qwldmkq5bns561ppkz7psphc4jqfj5j1x4dhq0i8r4qwjjf7xc0")))) + "1snknqb4hmv6b720nsaz21g7h6z1ikdvnsqyy5vmgavnfr23hmzn")))) (build-system pyproject-build-system) (arguments (list @@ -9735,6 +9824,18 @@ writing C extensions for Python as easy as Python itself.") (ice-9 format)) #:phases #~(modify-phases %standard-phases + ;; XXX: It fails with an issue "'fenv_t' has not been declared..." + ;; when the gfortran header is used. Remove gfortran from + ;; CPLUS_INCLUDE_PATH as a workaround. Taken from + ;; <https://issues.guix.gnu.org/73439#45>. + (add-after 'set-paths 'hide-gfortran + (lambda* (#:key inputs #:allow-other-keys) + (let ((gfortran (assoc-ref inputs "gfortran"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gfortran "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":"))))) (add-before 'build 'parallelize-build (lambda _ (setenv "NPY_NUM_BUILD_JOBS" @@ -9802,6 +9903,12 @@ include_dirs = ~:*~a/include~%" `(" and not test_identityless_reduction_huge_array" " and not (TestKind and test_all)") '()) + ;; This test fails with a Fortran failure (16 + ;; expected but got -1), due to the fact that it + ;; requires a 64-bit system. + #$@(if (or (target-x86-32?) (target-arm32?)) + `(" and not test_int") + '()) ;; These tests fail when building from aarch64-linux. #$@(if (target-arm32?) `(" and not test_features" @@ -9818,7 +9925,6 @@ include_dirs = ~:*~a/include~%" (list gfortran meson-python pkg-config - python-cython ;; overwrite Cython from meson-python python-hypothesis python-mypy python-pytest @@ -9916,6 +10022,16 @@ include_dirs = ~:*~a/include~%" #$(this-package-input "openblas"))))))))) #:tests? #f ;we're only generating the documentation #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'avoid-external-deps + (lambda _ + ;; XXX: Avoid theme-switcher to avoid sphinx error + ;; TemplateNotFound('theme-switcher.html') + ;; XXX: Avoid version-switcher because it depends on the value + ;; of external https://numpy.org/doc/_static/versions.json + (substitute* "doc/source/conf.py" + (("\ +\"navbar_end\": \\[\"theme-switcher\", \"version-switcher\", ") + "\"navbar_end\": [")))) (add-before 'build 'add-gnu-freefont-to-texmf (lambda _ ;; XXX: The Sphinx-generated tex output specifies the GNU @@ -9961,6 +10077,7 @@ include_dirs = ~:*~a/include~%" #$(this-package-input "openblas"))))))))) (("\"contents\"") "'index'") ;; Disable Sphinx extensions that produce broken Texinfo. ((".*'numpydoc'.*") "") + ((".*'sphinx.ext.autodoc'.*") "") ((".*'sphinx.ext.autosummary'.*") "")) (invoke "make" "info" sphinxopts) ;; Install the HTML documentation. @@ -9984,13 +10101,15 @@ include_dirs = ~:*~a/include~%" #$(this-package-input "openblas"))))))))) python-pandas python-pydata-sphinx-theme python-scipy ;used by matplotlib - python-sphinx-4 + python-sphinx + python-sphinx-design python-sphinx-panels texinfo (texlive-updmap.cfg (list texlive-cbfonts texlive-cm-super texlive-expdlist + texlive-fandol texlive-greek-fontenc texlive-latexmk texlive-polyglossia @@ -10478,7 +10597,7 @@ semantic version parser for Node.js.") (define-public python-patch-ng (package (name "python-patch-ng") - (version "1.17.4") + (version "1.18.1") (source (origin (method git-fetch) ;no tests in PyPI archive @@ -10488,7 +10607,7 @@ semantic version parser for Node.js.") (file-name (git-file-name name version)) (sha256 (base32 - "0qxn4ss2s54qy87xrpcybz26kp2fwlaq41x4k9jcmp6d7p0w569m")))) + "1kr3h0bkcr02zyfsmwmxfv5b4b9vf3bhsvrlwp6cwrfy3q3qnyq8")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -11108,16 +11227,16 @@ the results.") (define-public python-pykdtree (package (name "python-pykdtree") - (version "1.3.4") + (version "1.3.9") (source (origin (method url-fetch) (uri (pypi-uri "pykdtree" version)) (sha256 - (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy")))) + (base32 "0q4zrqdn8ad6f710yggkhvx4avf2h1hsbg9qa7ghly54v4vhpgd7")))) (build-system python-build-system) (native-inputs - (list python-nose)) + (list python-cython python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-numpy)) (home-page "https://github.com/storpipfugl/pykdtree") @@ -11576,7 +11695,9 @@ the OleFileIO module from PIL, the Python Image Library.") (method url-fetch) (uri (pypi-uri "property-cached" version ".zip")) (sha256 - (base32 "0wxv5sdx1p7ils36j6j6hfscz8v2vzbq212i8y8r0lrnxpqlx71y")))) + (base32 "0wxv5sdx1p7ils36j6j6hfscz8v2vzbq212i8y8r0lrnxpqlx71y")) + (patches + (search-patches "python-property-cached-asyncio-3_11.patch")))) (build-system pyproject-build-system) (arguments (list @@ -11755,17 +11876,10 @@ a general image processing tool.") (arguments (list #:test-flags - #~(list "-k" ; XXX: 10/12 bit tests fail + #~(list "-k" (string-append - "not test_save_bgr_16bit_to_10_12_bit" - " and not test_save_bgra_16bit_to_10_12_bit" - " and not test_open_heif_compare_non_standard_modes_data" - " and not test_open_save_disable_16bit" - " and not test_heif_read_images[image_path16]" - " and not test_heif_read_images[image_path43]" - " and not test_premultiplied_alpha" - " and not test_hdr_save" - " and not test_I_color_modes_to_10_12_bit")))) + "not test_heif_read_images[image_path25]" + " and not test_heif_read_images[image_path49]")))) (inputs (list libheif)) (propagated-inputs (list python-pillow)) (native-inputs (list opencv ; for opencv-python @@ -11774,7 +11888,6 @@ a general image processing tool.") python-numpy python-packaging python-pre-commit - python-pylint python-pympler python-setuptools python-pytest @@ -12516,46 +12629,36 @@ formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.") (define-public python-pywavelets (package (name "python-pywavelets") - (version "1.2.0") + (version "1.8.0") (home-page "https://github.com/PyWavelets/pywt") (source (origin (method url-fetch) - (uri (pypi-uri "PyWavelets" version)) + (uri (pypi-uri "pywavelets" version)) (sha256 (base32 - "13csbr6ls9q9ww53z2xwwsj0hpsz88rj2iwp623h0kmv8yq6kgbc")) - (snippet - #~(begin - (use-modules ((guix build utils))) - (for-each delete-file - (list - "pywt/_extensions/_cwt.c" - "pywt/_extensions/_dwt.c" - "pywt/_extensions/_pywt.c" - "pywt/_extensions/_pywt.h" - "pywt/_extensions/_swt.c")))))) - (build-system python-build-system) + "1aimbjxvflmx4qrl17bfzy64pz5ql4s9bhnb8g0ssh28fm2h507k")))) + (build-system pyproject-build-system) (arguments - '(#:modules ((ice-9 ftw) - (srfi srfi-1) - (srfi srfi-26) - (guix build utils) - (guix build python-build-system)) - #:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (let ((cwd (getcwd)) - (libdir (find (cut string-prefix? "lib." <>) - (scandir "build")))) - (with-directory-excursion (string-append cwd "/build/" libdir) - (invoke "pytest" "-vv")))))))) + (list + #:test-flags '(list "--pyargs" "pywt") + #:phases + #~(modify-phases %standard-phases + ;; The compiled libraries are only in the output at this point, + ;; but they are needed to run tests. + ;; FIXME: This should be handled by the pyargs pytest argument, + ;; but is not for some reason. + (add-before 'check 'pre-check + (lambda _ (chdir #$output)))))) (native-inputs - (list python-cython - python-matplotlib ;for tests + (list meson + ninja + pkg-config + python-cython-3 + python-meson-python + python-numpy python-pytest)) (propagated-inputs - (list python-numpy)) + (list python-numpy python-scipy)) (synopsis "Wavelet transforms in Python") (description "PyWavelets is a library for wavelet transforms in Python. Wavelets are @@ -13206,7 +13309,7 @@ def get_requires_for_build_sdist(config_settings=None): python-pytest-enabler python-pytest-flake8 python-pytest-mypy - python-setuptools-57 + python-setuptools python-setuptools-scm)) (propagated-inputs (list python-zipp)) @@ -13891,7 +13994,7 @@ without using the configuration machinery.") python-setuptools python-wheel cmake-minimal - pybind11-2.13)) + pybind11)) (home-page "https://github.com/metaopt/optree") (synopsis "Optimized PyTree Utilities") (description "This package contains operations on PyTrees (a tree made of @@ -14969,19 +15072,6 @@ interfaces in an easy and portable manner.") of the structure, dynamics, and functions of complex networks.") (license license:bsd-3))) -(define-public python-networkx-next - (package - (inherit python-networkx) - (name "python-networkx") - (version "3.4.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "networkx" version)) - (sha256 - (base32 "1qaks3c3h5qlw25z949q3plw8iwgm9h152kwnam64lwc89lkcz1h")))) - (build-system pyproject-build-system))) - (define-public python-datrie (package (name "python-datrie") @@ -15095,15 +15185,23 @@ GA4GH Task Execution API.") (define-public python-toposort (package (name "python-toposort") - (version "1.6") + (version "1.10") (source (origin (method url-fetch) (uri (pypi-uri "toposort" version)) (sha256 (base32 - "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7")))) - (build-system python-build-system) + "1gd66z5dy6j7qs5qkj1pg0vb15rwd571yq02fkm9d9nhaff4gfxz")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + '(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (invoke "python3" "-m" "test.test_toposort")))))) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://gitlab.com/ericvsmith/toposort") (synopsis "Topological sort algorithm") (description @@ -15162,7 +15260,34 @@ character level, as opposed to most VCS systems, which opt for a line-based approach.") (license license:expat))) -(define-public snakemake +(define-public python-throttler + (package + (name "python-throttler") + (version "1.2.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/uburuntu/throttler") + (commit (string-append "v" version)))) + (sha256 + (base32 "1gn21x0zkm7rr7qijlz7nvw7z0mm1j2r0r2lslg7wln1z36gjkbw")))) + (build-system pyproject-build-system) + (native-inputs (list python-aiohttp + python-codecov + python-flake8 + python-pytest + python-pytest-asyncio + python-pytest-cov + python-setuptools + python-wheel)) + (home-page "https://github.com/uburuntu/throttler") + (synopsis "Throttling with asyncio support") + (description + "This is a Python package for easy throttling with asyncio support.") + (license license:expat))) + +(define-public snakemake-5 (package (name "snakemake") (version "5.32.2") @@ -15187,7 +15312,9 @@ approach.") "--ignore=tests/test_tibanna.py" ;; It's a similar story with this test, which requires access ;; to the Google Storage service. - "--ignore=tests/test_google_lifesciences.py") + "--ignore=tests/test_google_lifesciences.py" + ;; Unclear failure. + "-k" "not test_lint[long_run-positive]") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'tabulate-compatibility @@ -15248,7 +15375,7 @@ Python style, together with a fast and comfortable execution environment.") (define-public snakemake-6 (package - (inherit snakemake) + (inherit snakemake-5) (name "snakemake") (version "6.15.5") (source @@ -15263,6 +15390,13 @@ Python style, together with a fast and comfortable execution environment.") (build-system pyproject-build-system) (arguments (list + #:test-flags + '(list + ;; This test attempts to change S3 buckets on AWS and fails + ;; because there are no AWS credentials. + "--ignore=tests/test_tibanna.py" + ;; Unclear failure. + "-k" "not test_lint[long_run-positive]") #:phases #~(modify-phases %standard-phases ;; For cluster execution Snakemake will call Python. Since there is @@ -15289,14 +15423,8 @@ Python style, together with a fast and comfortable execution environment.") (substitute* '("snakemake/_version.py" "versioneer.py") (("0\\+unknown") #$version)))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "HOME" "/tmp") - ;; This test attempts to change S3 buckets on AWS and fails - ;; because there are no AWS credentials. - (delete-file "tests/test_tibanna.py") - (invoke "pytest"))))))) + (add-before 'check 'pre-check + (lambda _ (setenv "HOME" "/tmp")))))) (propagated-inputs (list python-appdirs python-configargparse @@ -15333,7 +15461,7 @@ Python style, together with a fast and comfortable execution environment.") (package (inherit snakemake-6) (name "snakemake") - (version "7.7.0") + (version "7.32.4") (source (origin (method git-fetch) @@ -15342,10 +15470,20 @@ Python style, together with a fast and comfortable execution environment.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1qrqbmx4cbis0wxr6dl2rdjv9v627sbirsz6v5c31vlbqwkvs04q")))) + (base32 "1d5hizai89k1glfqfkvf1ghj0l7wm8il6gl5pfwk2gkza87yka6d")))) (build-system pyproject-build-system) (arguments (list + #:test-flags + ;; This test attempts to change S3 buckets on AWS and fails + ;; because there are no AWS credentials. + '(list "--ignore=tests/test_tibanna.py" + ;; It's a similar story with this test, which requires access to + ;; the Google Storage service. + "--ignore=tests/test_google_lifesciences.py" + "--ignore-glob=tests/test_conda_python_3_7_script/*" + ;; We don't have a slurm installation in the build environment + "--ignore=tests/test_slurm.py") #:phases #~(modify-phases %standard-phases ;; For cluster execution Snakemake will call Python. Since there is @@ -15374,12 +15512,6 @@ Python style, together with a fast and comfortable execution environment.") (string-append "tibanna_args.command = command.replace('" #$output "/bin/snakemake', 'python3 -m snakemake')"))))) - ;; No longer needed with 7.15.2+ - (add-after 'unpack 'tabulate-compatibility - (lambda _ - (substitute* "snakemake/dag.py" - (("\"job\": rule,") - "\"job\": rule.name,")))) (add-after 'unpack 'patch-version (lambda _ (substitute* "setup.py" @@ -15388,17 +15520,8 @@ Python style, together with a fast and comfortable execution environment.") (substitute* '("snakemake/_version.py" "versioneer.py") (("0\\+unknown") #$version)))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "HOME" "/tmp") - ;; This test attempts to change S3 buckets on AWS and fails - ;; because there are no AWS credentials. - (delete-file "tests/test_tibanna.py") - ;; It's a similar story with this test, which requires access - ;; to the Google Storage service. - (delete-file "tests/test_google_lifesciences.py") - (invoke "pytest"))))))) + (add-before 'check 'pre-check + (lambda _ (setenv "HOME" "/tmp")))))) (propagated-inputs (list python-appdirs python-configargparse @@ -15407,6 +15530,7 @@ Python style, together with a fast and comfortable execution environment.") python-docutils python-filelock python-gitpython + python-humanfriendly python-jinja2 python-jsonschema python-nbformat @@ -15415,12 +15539,13 @@ Python style, together with a fast and comfortable execution environment.") python-pulp python-pyyaml python-py-tes - python-ratelimiter python-requests python-retry + python-reretry python-smart-open python-stopit python-tabulate + python-throttler python-toposort python-wrapt python-yte)) @@ -15612,20 +15737,29 @@ function signatures.") (define-public python-yte (package (name "python-yte") - (version "1.2.0") + (version "1.7.0") (source (origin - (method url-fetch) - (uri (pypi-uri "yte" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/koesterlab/yte") + (commit (string-append "v" version)))) (sha256 - (base32 "07hm1warpqi4ifqgkaz5sg887x4a44yhxafmpf835ywnpchg4s03")))) - (build-system python-build-system) + (base32 "01hxl47bfb0jp2rh6qb6wrm6m8p5rfk21gksqb8qxxv9a037dnsv")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases + (list + #:phases + '(modify-phases %standard-phases (add-after 'unpack 'set-HOME - (lambda _ (setenv "HOME" "/tmp")))))) - (propagated-inputs (list python-plac python-pyyaml)) + (lambda _ (setenv "HOME" "/tmp"))) + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (apply invoke "pytest" + (append test-flags (list "tests.py"))))))))) + (propagated-inputs (list python-dpath python-plac python-pyyaml)) + (native-inputs (list python-numpy python-poetry-core python-pytest)) (home-page "https://github.com/koesterlab/yte") (synopsis "YAML template engine with Python expressions") (description @@ -16144,29 +16278,6 @@ you do not want to store entirely on disk or on memory.") application monitoring and error tracking software.") (license license:bsd-2))) -(define-public python-pep8 - ;; This package has been renamed to ‘pycodestyle’ and is no longer updated. - ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking - ;; some dependents' test suites, and nothing more. - (package - (name "python-pep8") - (version "1.7.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pep8" version)) - (sha256 - (base32 - "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1")) - (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch")))) - (build-system python-build-system) - (home-page "https://pep8.readthedocs.org/") - (synopsis "Python style guide checker") - (description - "This tools checks Python code against some of the style conventions in -PEP 8.") - (license license:expat))) - (define-public python-pep8-naming (package (name "python-pep8-naming") @@ -16586,41 +16697,6 @@ expressions after the entire file has been read. This enables support for first-class forward references that stub files use.") (license license:expat))) -;; XXX: Deprecated in upstream: This repository has been archived by the owner -;; on Nov 30, 2024. It is now read-only. -;; Consider to remove when nothing is depend on it. -(define-public python-flake8-pie - (package - (name "python-flake8-pie") - (version "0.16.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "flake8-pie" version)) - (sha256 - (base32 "1fhmwm8blimnfmi1cj8q0kqd77vskgjb794jbp837yh64ywvgp5q")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags - #~(list "-k" "not test_examples and not test_prefer_simple_any_all") - #: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/sbdchd/flake8-pie") - (synopsis "Flake8 extension that implements lints") - (description - "This package provides a flake8 extension that implements miscellaneous -lints.") - (license license:bsd-2))) - (define-public python-flake8-quotes (package (name "python-flake8-quotes") @@ -17192,6 +17268,7 @@ number of lines in the contained files easily.") (license license:expat))) ;;; Tests are left out in the main package to avoid cycles. +;; XXX: When updating, solve comment in python-cu2qu. (define-public python-fonttools-minimal (hidden-package (package @@ -17424,26 +17501,6 @@ reading and writing MessagePack data.") ((".fromstring\\(") ".frombytes(")) #t)))))))) -(define-public python-netaddr - (package - (name "python-netaddr") - (version "0.8.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "netaddr" version)) - (sha256 - (base32 - "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n")))) - (build-system python-build-system) - (arguments `(#:tests? #f)) ;; No tests. - (home-page "https://github.com/drkjam/netaddr/") - (synopsis "Pythonic manipulation of network addresses") - (description - "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI -and MAC network addresses.") - (license license:bsd-3))) - (define-public python-openstep-plist (package (name "python-openstep-plist") @@ -17892,29 +17949,6 @@ asyncio.") (description "Snuggs are S-expressions for Numpy.") (license license:expat))) -(define-public python-pytest-black - (package - (name "python-pytest-black") - (version "0.3.12") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pytest-black" version)) - (sha256 - (base32 - "19bmbcnaq02md8nnj6pywri3vps8sxnhysbfy386qkbn9w09ncqx")))) - (build-system python-build-system) - (propagated-inputs - (list python-pytest python-black python-toml)) - (native-inputs - (list python-setuptools-scm)) - (home-page "https://github.com/shopkeep/pytest-black") - (synopsis "Pytest plugin to enable format checking with black") - (description - "This package provides a pytest plugin to enable format checking with the -Python code formatter \"black\".") - (license license:expat))) - (define-public python-geojson (package (name "python-geojson") @@ -18238,16 +18272,37 @@ implementations of ASN.1-based codecs and protocols.") (define-public python-asn1tools (package (name "python-asn1tools") - (version "0.166.0") + (version "0.167.0") (source (origin (method url-fetch) (uri (pypi-uri "asn1tools" version)) (sha256 - (base32 "1hragm8dsm10rlyz67xslj01bycprlnimdmq1i2acns6kl6difpn")))) - (build-system python-build-system) + (base32 "1cpm6m3znagc553bc5l0rhwg2fccrl0k8m1pbvn6x2kqdmpkzmfa")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" (string-join + ;; Tests fail with error: IndexError: string index out of + ;; range. It may be some incompatability wit pyparsing, + ;; see <https://github.com/eerimoq/asn1tools/issues/167>. + (list "not test_c_source" + "test_command_line_generate_c_source_oer" + "test_command_line_generate_c_source_uper" + "test_command_line_generate_rust_source_uper" + "test_missing_parameterized_value" + "test_c_source" + "test_parse_parameterization") + " and not ")))) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (propagated-inputs - (list python-bitstruct python-diskcache python-prompt-toolkit + (list python-bitstruct + python-diskcache + python-prompt-toolkit python-pyparsing)) (home-page "https://github.com/eerimoq/asn1tools") (synopsis "ASN.1 parsing, encoding and decoding") @@ -18748,20 +18803,26 @@ libmagic."))) #~(list "-n" (number->string (parallel-job-count)) "-m" "not flaky" "-k" - (string-append - ;; The two "break_01" tests have been failing on - ;; Python 3.10: - ;; <https://github.com/fabioz/PyDev.Debugger/issues/222>. - "not test_set_pydevd_break_01 " - ;; the GUI event loop requires an X server. - "and not test_gui_event_loop_custom " - ;; This test validates that 'pydevd' is not in the - ;; exception message, but it is due to being part - ;; of the build file name present in the message. - "and not test_evaluate_exception_trace " - ;; This test fail with TimeoutError, no message on stderr. - "and not test_soft_terminate " - "and not test_debugger_case_deadlock_interrupt_thread")) + (string-join + (list + ;; The two "break_01" tests have been failing on + ;; Python 3.10: + ;; <https://github.com/fabioz/PyDev.Debugger/issues/222>. + "not test_set_pydevd_break_01 " + ;; the GUI event loop requires an X server. + "test_gui_event_loop_custom" + ;; This test validates that 'pydevd' is not in the + ;; exception message, but it is due to being part + ;; of the build file name present in the message. + "test_evaluate_exception_trace" + ;; This test fail with TimeoutError, no message on stderr. + "test_soft_terminate" + "test_debugger_case_deadlock_interrupt_thread" + ;; subprocess.CalledProcessError + ;; Python 3.11/3.12 specific issue: + ;; <https://github.com/fabioz/PyDev.Debugger/issues/284>. + "test_find_main_thread_id") + " and not ")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'fix-tests @@ -19469,7 +19530,7 @@ convert an @code{.ipynb} notebook file into various static formats including: python-pytest python-pytest-cov python-requests - python-requests-unixsocket + python-requests-unixsocket2 python-setuptools python-wheel)) (home-page "https://jupyter.org/") @@ -20021,6 +20082,25 @@ be set via config files and/or environment variables.") connection pool.") (license license:expat))) +(define-public python-argparse-dataclass + (package + (name "python-argparse-dataclass") + (version "2.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "argparse_dataclass" version)) + (sha256 + (base32 "0zr9r4n00x2wi5kyzw3bxvrdp5k113jw7f9p4f414bsaj4f69aq9")))) + (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/mivade/argparse_dataclass") + (synopsis "Declarative command-line interfaces using argparse and dataclasses") + (description + "This package provides declarative command-line interfaces using argparse +and dataclasses.") + (license license:expat))) + (define-public python-argparse-manpage (package (name "python-argparse-manpage") @@ -20043,27 +20123,6 @@ connection pool.") @code{ArgumentParser} object.") (license license:asl2.0))) -(define-public python-contextlib2 - (package - (name "python-contextlib2") - (version "0.6.0.post1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "contextlib2" version)) - (sha256 - (base32 - "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01")))) - (build-system python-build-system) - (home-page "https://contextlib2.readthedocs.org/") - (synopsis "Tools for decorators and context managers") - (description "This module is primarily a backport of the Python -3.2 contextlib to earlier Python versions. Like contextlib, it -provides utilities for common tasks involving decorators and context -managers. It also contains additional features that are not part of -the standard library.") - (license license:psfl))) - (define-public python-contexttimer (package (name "python-contexttimer") @@ -21394,19 +21453,28 @@ project template.") (define-public python-pyquery (package (name "python-pyquery") - (version "1.2.17") + (version "2.0.1") (source (origin (method url-fetch) (uri (pypi-uri "pyquery" version)) (sha256 (base32 - "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a")))) - (build-system python-build-system) + "1brg6aawb9m5mdfmc6g7v5r6pczbx67r4l9cn5yh6bdi0qkvp501")))) + (build-system pyproject-build-system) + (arguments + ;; This test requires network access. + (list #:test-flags #~(list "-k" "not test_get"))) (native-inputs - (list python-webob python-webtest)) + (list python-pytest + python-pytest-cov + python-requests + python-setuptools + python-webob + python-webtest + python-wheel)) (propagated-inputs - (list python-lxml python-cssselect)) + (list python-cssselect python-lxml)) (home-page "https://github.com/gawel/pyquery") (synopsis "Make jQuery-like queries on xml documents") (description "pyquery allows you to make jQuery queries on xml documents. @@ -21414,34 +21482,6 @@ The API is as much as possible the similar to jQuery. pyquery uses lxml for fast xml and html manipulation.") (license license:bsd-3))) -(define-public python-anyjson - (package - (name "python-anyjson") - (version "0.3.3") - (source - (origin - (method url-fetch) - (uri (pypi-uri "anyjson" version)) - (sha256 - (base32 - "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p")))) - (build-system python-build-system) - (arguments - `(;; We could possibly get tests working, but on Python 3 it's not so easy. - ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or - ;; whatever) so this transformation needs to be done before the tests - ;; can be run. Maybe we could add a build step to transform beforehand - ;; but it could be annoying/difficult. - #:tests? #f)) - (native-inputs (list python-setuptools-57)) ;for use_2to3 support - (home-page "https://bitbucket.org/runeh/anyjson/") - (synopsis - "Wraps best available JSON implementation in a common interface") - (description - "Anyjson loads whichever is the fastest JSON module installed -and provides a uniform API regardless of which JSON implementation is used.") - (license license:bsd-3))) - (define-public python-amqp (package (name "python-amqp") @@ -21664,46 +21704,6 @@ Eventlet, or gevent. Tasks can execute asynchronously (in the background) or synchronously (wait until ready).") (license license:bsd-3))) -(define-public python-cesium - (package - (name "python-cesium") - (version "0.12.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "cesium" version)) - (sha256 - (base32 - "0jr0ycqz9ns6mcskm4sxx92k40fj3v0x9knjaw5ac9f3mpqxsfbv")))) - (build-system pyproject-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - ;; The installed test files contain the /gnu/store location, not the - ;; location of the discovered test files from the build directory. - ;; The test framework doesn't like this. The easiest way around - ;; this mismatch is to jump to the output directory. - (add-before 'check 'check-chdir - (lambda _ (chdir #$output)))))) - (propagated-inputs - (list python-click ;XXX required by python-dask - python-cloudpickle - python-dask - python-gatspy - python-joblib - python-numpy - python-pandas - python-scikit-learn - python-scipy - python-toolz)) - (native-inputs (list python-cython python-pytest python-setuptools-scm - python-setuptools python-wheel)) - (home-page "https://pypi.org/project/cesium/") - (synopsis "Library for time-series feature extraction and processing") - (description - "Cesium is a library for time-series feature extraction and processing.") - (license license:bsd-3))) - (define-public python-translitcodec (package (name "python-translitcodec") @@ -21805,7 +21805,10 @@ applications.") (base32 "0j6ksfnq9qfjdfppbkdz7jh6w0gnslwnckhafmlgim29b25g0z51")))) (build-system pyproject-build-system) (arguments - (list #:phases + (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 _ @@ -22535,22 +22538,18 @@ own code, responding to click events and updating clock every second.") (define-public python-tblib (package (name "python-tblib") - (version "1.6.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "tblib" version)) - (sha256 - (base32 - "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "py.test" "-vv" "tests" "README.rst")))))) + (version "2.0.0") ; XXX: higher versions fail on 'check phase + (source + (origin + (method url-fetch) + (uri (pypi-uri "tblib" version)) + (sha256 + (base32 "1mzcf0fp7267yya9ni5qlr8dj190hsnmyxz0cszgi2y0fbr31px6")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest python-six)) + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/ionelmc/python-tblib") (synopsis "Traceback serialization library") (description @@ -22651,19 +22650,28 @@ are synchronized with data exchanges on \"channels\".") (define-public python-objgraph (package (name "python-objgraph") - (version "3.4.1") + (version "3.6.2") (source (origin (method url-fetch) (uri (pypi-uri "objgraph" version)) (sha256 - (base32 - "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz")))) - (build-system python-build-system) + (base32 "1n0swlq11w36r2p6x7b4y0zz10dgzpdc8qasyk3y68kl1zsg5f80")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "tests.py" + ;; AssertionError: [0, 1, 2] not found in [[], [], [], [], [], + ;; [], [], [], [], [], [], [], ... + "-k" "not test_at_addrs"))) + (native-inputs + (list graphviz + python-pytest + python-setuptools + python-wheel)) (propagated-inputs (list python-graphviz)) - (native-inputs - (list python-mock graphviz)) (home-page "https://mg.pov.lt/objgraph/") (synopsis "Draw Python object reference graphs with graphviz") (description @@ -23039,14 +23047,18 @@ are optionally backed by a C extension built on librdkafka.") (define-public python-wcwidth (package (name "python-wcwidth") - (version "0.1.8") + (version "0.2.13") (source (origin (method url-fetch) (uri (pypi-uri "wcwidth" version)) (sha256 (base32 - "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj")))) - (build-system python-build-system) + "1dbj74q1iz349sdkxrkc90f7xd4y7a9bdvgxg3cqdcly7430rskj")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest + python-pytest-cov + python-setuptools + python-wheel)) (home-page "https://github.com/jquast/wcwidth") (synopsis "Measure number of terminal column cells of wide-character codes") (description "Wcwidth measures the number of terminal column cells of @@ -23404,6 +23416,9 @@ strings require only one extra byte in addition to the strings themselves.") "test_omit_default_roundtrip" "test_optional_field_roundtrip" "test_renaming" + ;; 'utf-8' codec can't encode character '\ud800' in + ;; position 0: surrogates not allowed + "test_simple_classes" ;; This test fails with an assertion error on the build ;; farm, but not on my laptop. "test_nodefs_generated_unstructuring_cl" @@ -24393,30 +24408,23 @@ etc.") (define-public python-stem (package (name "python-stem") - (version "1.8.0") + (version "1.8.2") (source (origin (method url-fetch) (uri (pypi-uri "stem" version)) (sha256 (base32 - "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50")))) - (build-system python-build-system) + "10mm9qw4xv7d18086ivy38iaz04z72018186q03j5y69skzikyw3")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-tests - ;; See https://github.com/torproject/stem/issues/56 - (lambda _ - (substitute* "run_tests.py" - (("test\\.task\\.MOCK_VERSION,") - "")))) - (replace 'check - (lambda _ - (invoke "./run_tests.py" "--unit") - #t))))) + (list + #:phases #~(modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "./run_tests.py" "--unit")))))) (native-inputs - (list python-mock python-pycodestyle python-pyflakes)) + (list python-setuptools python-wheel)) (home-page "https://stem.torproject.org/") (synopsis "Python controller library that allows applications to interact with Tor") @@ -24497,7 +24505,7 @@ client.") (define-public python-pymodbus (package (name "python-pymodbus") - (version "2.5.3") + (version "3.8.6") (source (origin (method git-fetch) @@ -24506,46 +24514,41 @@ client.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 - "0kjjrx7xrlx0pf3y67hhr4xvqrly3xzmvf6ic5as61m6z19m7zd5")))) - (build-system python-build-system) + (base32 "1sncllh01c6vqq4fh9k3yg9fchmmw661rcp0066l7fis6sp4yw82")))) + (build-system pyproject-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'disable-problematic-tests - (lambda _ - ;; The following test modules rely on Python's own - ;; 'test' module, which is not distributed in the Python - ;; package of Guix. - (delete-file "test/test_client_async_asyncio.py") - (delete-file "test/test_client_sync_diag.py") - ;; The following test module requires the asynctest - ;; library, abandoned without support for Python 3.9+ - ;; (see: - ;; https://github.com/riptideio/pymodbus/issues/681). - (delete-file "test/test_server_asyncio.py"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "-m" "pytest"))))))) - (native-inputs - (list python-mock - python-pytest - python-redis - python-sqlalchemy - python-tornado - python-twisted)) - (propagated-inputs - (list python-pyserial - python-six - ;; For the REPL. - python-aiohttp - python-click - python-prompt-toolkit - python-pygments - python-pyserial-asyncio)) + (list + #:test-flags + #~(list "--ignore" + "test/server/test_simulator_api.py" + ;; These tests require the presence of a certificate. + "--ignore-glob" + "test/examples/*" + "--ignore" + "test/client/test_client.py"))) + (native-inputs (list python-mock + python-pytest + python-pytest-asyncio + python-pytest-cov + python-pytest-xdist + python-redis + python-setuptools + python-sqlalchemy + python-tornado + python-twisted + python-wheel)) + (propagated-inputs (list python-pyserial + python-six + ;; For the REPL. + python-aiohttp + python-click + python-prompt-toolkit + python-pygments + python-pyserial-asyncio)) (home-page "https://github.com/riptideio/pymodbus/") (synopsis "Modbus protocol stack in Python") - (description "Pymodbus is a full Modbus protocol implementation using + (description + "Pymodbus is a full Modbus protocol implementation using @code{asyncio}, @code{tornado} or @code{twisted} for its asynchronous communications core. It includes the following @emph{client} features: @itemize @@ -24843,35 +24846,6 @@ callback-heavy mode of interaction typical in some Kivy applications.") without requiring an event loop, useful for creative responsive GUIs.") (license license:expat))) -(define-public python-asynctest - (package - (name "python-asynctest") - (version "0.13.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "asynctest" version)) - (sha256 - (base32 - "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62")))) - (build-system python-build-system) - (arguments - ;; The test suite appears to be incompatible with Python 3.9+, completes - ;; with 25 failures and 41 errors out of 220 tests (see: - ;; https://github.com/Martiusweb/asynctest/issues/149). - (list #:tests? #f - #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "-m" "unittest" "test"))))))) - (home-page "https://github.com/Martiusweb/asynctest/") - (synopsis "Unittest extensions for testing asyncio libraries") - (description - "The @code{asynctest} Python package is built on top of the standard -@code{unittest} module and cuts down boilerplate code when testing libraries -for @code{asyncio}.") - (license license:asl2.0))) - (define-public python-binaryornot (package (name "python-binaryornot") @@ -25453,6 +25427,32 @@ working with Portable Executable (PE) files. It makes to most information from the header, as well as section details and data available.") (license license:expat))) +(define-public python-pyemd + (package + (name "python-pyemd") + (version "1.0.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "pyemd" version)) + (sha256 + (base32 + "1zh0v47lxa33xg04jyvblzl1g4m3k2khx0b3xr6isnyinbkmlaxl")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-numpy)) + (native-inputs + (list python-cython-3 + python-pytest + python-setuptools + python-setuptools-scm + python-wheel)) + (home-page "https://github.com/wmayner/pyemd") + (synopsis + "Wrapper for Pele and Werman's implementation of the Earth Mover's Distance") + (description + "This package provides a Python wrapper for Ofir Pele and Michael +Werman's implementation of the Earth Mover's Distance.") + (license license:expat))) + (define-public python-imagesize (package (name "python-imagesize") @@ -25499,14 +25499,14 @@ JPEG2000 and GIF files in pure Python.") (define-public python-argcomplete (package (name "python-argcomplete") - (version "3.2.2") + (version "3.5.3") (source (origin (method url-fetch) (uri (pypi-uri "argcomplete" version)) (sha256 (base32 - "18h023ma2m2gw8w8dm2pvv4k0vpli94293jl57p2ch4vln79xr7k")))) + "14jkqmc4nhp1vxkiha7mv7zlvqiyzyjsfzbvihlvpbnqvq7gaay1")))) (build-system pyproject-build-system) (arguments (list @@ -25521,11 +25521,8 @@ JPEG2000 and GIF files in pure Python.") "def __disable_test_console_script")) (invoke "python3" "./test/test.py" "-v"))))))) (native-inputs - (list python-coverage - python-mypy - python-pexpect - python-setuptools - python-setuptools-scm + (list python-pexpect + python-hatchling python-wheel tcsh fish @@ -25738,6 +25735,8 @@ Mustache templating language renderer.") "-k" (string-append ;; Don't install anything, thank you. "not test_install_non_existent_extension" + ;; _pybind11_conduit_v1_ not found. + " and not test_wrap_coverage" ;; See <https://github.com/duckdb/duckdb/issues/11961>. " and not test_fetchmany" ;; See <https://github.com/duckdb/duckdb/issues/10702>. @@ -25907,29 +25906,29 @@ creating a tag.") (define-public python-qrcode (package (name "python-qrcode") - (version "7.3.1") + (version "8.0") (source (origin (method url-fetch) (uri (pypi-uri "qrcode" version)) (sha256 - (base32 "0y35jlwfvkgn9341lzshyaqgpp61vysjh107vhdd96ya83r6ynip")))) - (build-system python-build-system) - (arguments - ;; FIXME: Tests require packaging 'pymaging'. - '(#:tests? #f)) + (base32 "0iz3pj67b90k2racwzbf9yml6rjs8nnrpvhns6b45zppa2qy4p02")))) + (build-system pyproject-build-system) + (native-inputs + (list python-poetry-core + python-pytest)) (propagated-inputs - (list python-lxml ; for SVG output - python-pillow)) ; for PNG output + (list python-pillow + python-pypng)) (home-page "https://github.com/lincolnloop/python-qrcode") (synopsis "QR Code image generator") - (description "This package provides a pure Python QR Code generator - module. It uses the Python Imaging Library (PIL) to allow for the generation - of QR Codes. + (description + "This package provides a pure Python QR Code generator module. It uses +the Python Imaging Library (PIL) to allow for the generation of QR Codes. - In addition this package provides a command line tool to generate QR codes and - either write these QR codes to a file or do the output as ascii art at the - console.") +In addition this package provides a command line tool to generate QR codes and +either write these QR codes to a file or do the output as ascii art at the +console.") (license license:bsd-3))) (define-public python-rst2ansi @@ -26349,7 +26348,7 @@ both as keys and as attributes.") ;; fails due to deprecation warnings, etc. #:tests? #f)) (native-inputs - (list python-coverage-test-runner python-pep8)) + (list python-coverage-test-runner)) (propagated-inputs (list python-pyaml)) (home-page "https://liw.fi/cliapp/") @@ -26375,7 +26374,7 @@ both as keys and as attributes.") (file-name (git-file-name name version)))) (build-system python-build-system) (native-inputs - (list python-coverage-test-runner python-pep8)) + (list python-coverage-test-runner)) (arguments `(#:phases (modify-phases %standard-phases @@ -27022,16 +27021,15 @@ functionality removed from @code{packaging}.") (sha256 (base32 "09nhrz80dfm60nssbvjgz4czzy4yzfa8gxczcdlzbgcnnvm914vb")))) - (build-system python-build-system) + (build-system pyproject-build-system) (propagated-inputs - (list python-lxml python-genshi)) - (native-inputs - (list python-magic)) + (list python-lxml python-magic python-genshi)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://relatorio.tryton.org/") (synopsis "Templating library able to output ODT and PDF files") (description "Relatorio is a templating library which provides a way to - easily output ODT, ODS, PNG, SVG and several other kinds of files. Support - for more filetypes can be easily added by creating plugins for them.") +easily output ODT, ODS, PNG, SVG and several other kinds of files. Support +for more filetypes can be easily added by creating plugins for them.") (license license:gpl3+))) (define-public python-radon @@ -27107,10 +27105,20 @@ conversion: Gamut A, B, and C.") (base32 "1jmrskj399idw1czx6dvy2zfaijnwi02b55vx979ixp7q2mnzz68")))) (build-system python-build-system) + (arguments + (list + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'remove-rednose-dependency + (lambda _ + (substitute* "setup.py" + (("'rednose'") "")) + (substitute* '("requirements.txt" "setup.cfg") + (("rednose.*") ""))))))) (propagated-inputs (list python-mock python-six)) (native-inputs - (list python-nose python-rednose)) + (list python-nose)) (home-page "https://github.com/gabrielfalcao/sure") (synopsis "Automated testing library in python for python") (description @@ -27955,25 +27963,6 @@ pure Python module.") version of @code{SocksiPy} with bug fixes and extra features.") (license license:bsd-3))) -(define-public python-pydiff - (package - (name "python-pydiff") - (version "0.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pydiff" version)) - (sha256 - (base32 - "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44")))) - (build-system python-build-system) - (home-page "https://github.com/myint/pydiff") - (synopsis "Library to diff two Python files at the bytecode level") - (description - "@code{pydiff} makes it easy to look for actual code changes while -ignoring formatting changes.") - (license license:expat))) - (define-public python-pydub (package (name "python-pydub") @@ -28193,17 +28182,30 @@ in human-readable HTML format.") (define-public python-ratelimiter (package (name "python-ratelimiter") - (version "1.2.0") + (version "1.2.0.post1") (source (origin - (method url-fetch) - (uri (pypi-uri "ratelimiter" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/RazerM/ratelimiter") + ;; From https://github.com/RazerM/ratelimiter/pull/11 + (commit "59a0827c434706d62b89e16a220e4ae12e618858"))) (sha256 (base32 - "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p")))) - (build-system python-build-system) + "1v34w12f41j0l2gy9ji9ip01kj4idjfjx7a97wrlr1ibxi7hg3bs")))) + (build-system pyproject-build-system) (arguments - '(#:tests? #f)) ; There are no tests in the pypi archive. + (list #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'pytest-compatibility + (lambda _ + (substitute* "tests/conftest.py" + (("pytest.collect.File") "pytest.File"))))))) + (native-inputs + (list python-pytest + python-pytest-asyncio + python-setuptools + python-wheel)) (home-page "https://github.com/RazerM/ratelimiter") (synopsis "Simple rate limiting object") (description @@ -28464,18 +28466,53 @@ Time} values as well as an event scheduler.") (define-public python-pyro4 (package (name "python-pyro4") - (version "4.77") + (version "4.82") (source (origin (method url-fetch) (uri (pypi-uri "Pyro4" version)) (sha256 - (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib")))) - (build-system python-build-system) + (base32 "1yr1rv2afmq55wb14sx9qplzkqw7fya9rprsqdyxfbg90h45n7si")))) + (build-system pyproject-build-system) (arguments - '(#:tests? #f)) ;FIXME: Some tests require network access. + (list #:test-flags + #~(list "-k" + (string-join + ;; Those tests require network. + (list "testBCstart" + "testAutoClean" + "testDaemonPyroObj" + "testLookupAndRegister" + "testLookupInvalidHmac" + "testLookupUnixsockParsing" + "testMulti" + "testRefuseDottedNames" + "testResolve" + "testBCLookup0000" + "testPyroname" + "testResolveAsymmetricHmacUsage" + "testResolveWrongHmac" + "testStartNSfunc" + "testCustomDictClass" + "testDictClassFail" + "testBroadcast" + "testGetIP" + ;; XXX: Unclear why this test fails. + "testCustomClassFail") + " and not ")) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (if tests? + (apply invoke "python" "-m" "unittest" test-flags) + (format #t "test suite not run.~%"))))))) (native-inputs - (list python-cloudpickle python-dill python-msgpack)) + (list python-cloudpickle + python-dill + python-msgpack + python-setuptools + python-wheel)) (propagated-inputs (list python-serpent)) (home-page "https://pyro4.readthedocs.io") @@ -29204,6 +29241,25 @@ working with iterables.") Python.") (license license:expat))) +(define-public python-pybktree + (package + (name "python-pybktree") + (version "1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pybktree" version)) + (sha256 + (base32 "0asd2lw9c5l5wi4z24k7gkhlprpdkcvs8d94szk56x9xvmy07h7f")))) + (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/Jetsetter/pybktree") + (synopsis "Pythonic BK-tree data structure") + (description + "This package provides a BK-tree data structure to allow fast querying of +close matches in Python.") + (license license:expat))) + (define-public python-pybtex (package (name "python-pybtex") @@ -29722,38 +29778,21 @@ user-space file systems in Python.") (define-public python-stone (package (name "python-stone") - (version "3.2.1") + (version "3.3.9") (source - (origin - (method url-fetch) - (uri (pypi-uri "stone" version)) - (sha256 - (base32 - "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'change-version-requirements - (lambda _ - ;; Match the requirement in test/requirements.txt - (substitute* "setup.py" - (("pytest < 5") "pytest < 7")) - ;; We don't care about a coverage report. - (substitute* "test/requirements.txt" - (("coverage.*") "coverage\n")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; These tests don't import correctly. - (delete-file "test/test_js_client.py") - (delete-file "test/test_tsd_types.py") - (delete-file "test/test_python_gen.py") - (invoke "pytest"))))))) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dropbox/stone") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1x0kj4jygssjn66lbkln95chhf85vzy1wnpziy9jvpf4kbc1bmfy")))) + (build-system pyproject-build-system) (propagated-inputs - (list python-ply python-six)) + (list python-jinja2 python-packaging python-ply python-six)) (native-inputs - (list python-coverage python-mock python-pytest python-pytest-runner)) + (list python-pytest python-pytest-runner python-setuptools python-wheel)) (home-page "https://github.com/dropbox/stone") (synopsis "Official Api Spec Language for Dropbox") (description @@ -29763,7 +29802,7 @@ user-space file systems in Python.") (define-public pybind11 (package (name "pybind11") - (version "2.8.1") + (version "2.13.6") (source (origin (method git-fetch) (uri (git-reference @@ -29771,7 +29810,7 @@ user-space file systems in Python.") (commit (string-append "v" version)))) (sha256 (base32 - "10hrkrh78sk7k0ydw1ghmp7gvpwmkby0l2s0kf2iaj9sz0vijkhs")) + "1dbnki0pnky39kr04afd9ks597bzjc530zbk33jjss53nfvdvlj8")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (native-inputs @@ -29809,22 +29848,6 @@ library: to minimize boilerplate code in traditional extension modules by inferring type information using compile-time introspection.") (license license:bsd-3))) -;; Needed for python-optree -(define-public pybind11-2.13 - (package - (inherit pybind11) - (name "pybind11") - (version "2.13.6") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/pybind/pybind11") - (commit (string-append "v" version)))) - (sha256 - (base32 - "1dbnki0pnky39kr04afd9ks597bzjc530zbk33jjss53nfvdvlj8")) - (file-name (git-file-name name version)))))) - ;; Needed for scipy (define-public pybind11-2.10 (package @@ -29841,26 +29864,6 @@ inferring type information using compile-time introspection.") "0rbcfvl7y472sykzdq3vrkw83kar0lpzhk3wq9yj9cdydl8cpfcz")) (file-name (git-file-name name version)))))) -;; This is needed for python-vaex-core. -(define-public pybind11-2.3 - (package - (inherit pybind11) - (name "pybind11") - (version "2.3.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/pybind/pybind11") - (commit (string-append "v" version)))) - (sha256 - (base32 - "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf")) - (file-name (git-file-name name version)))) - (arguments - (substitute-keyword-arguments (package-arguments pybind11) - ((#:tests? tests? #false) - #false))))) - (define-public python-pooch (package (name "python-pooch") @@ -30485,9 +30488,8 @@ codecs for use in data storage and communication applications.") ;; but occasionally fail. They fail pretty reliably on the ;; build farm. "-k" (string-append "not test_lazy_loader and not open_array" - ;; TODO: remove this on python-team branch. - ;; This only fails on the master branch. - " and not test_encode_decode_array_dtype_shape_v3")) + ;; File not found. + " and not test_filesystem_path")) #:phases #~(modify-phases %standard-phases (add-before 'build 'set-version @@ -30546,8 +30548,12 @@ N-dimensional arrays for Python.") (arguments (list #:test-flags - ;; This one test seemingly freezes - '(list "-k" "not test_read_lazy_h5_cluster") + #~(list "-k" #$(string-append + ;; This one test seemingly freezes + "not test_read_lazy_h5_cluster" + ;; Fails with a numpy deprecation warning + ;; but not an actual failure + " and not test_read_write_X")) #:phases #~(modify-phases %standard-phases ;; Doctests require scanpy from (gnu packages bioinformatics) @@ -30606,24 +30612,25 @@ object-oriented library such as @code{scikit-learn}.") (define-public python-dill (package (name "python-dill") - (version "0.3.6") + (version "0.3.9") (source (origin (method url-fetch) (uri (pypi-uri "dill" version)) (sha256 - (base32 "0wr37zwyiprrv29jcc1hl5cla72faiwfs0mhvbxxhmkqd3rmbnz5")))) + (base32 "0b2inivjahjlph54a70x6wi3pax4qsgclhlw0blbz37nvmyjdal1")))) (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (with-directory-excursion "/tmp" - (invoke "nosetests" "-v")))))))) + (list + #:phases #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + ;; Extracted from tox.ini + (invoke "python" "dill/tests/__main__.py") + (format #t "test suite not run~%"))))))) (native-inputs - (list python-nose python-setuptools python-wheel)) + (list python-setuptools python-wheel)) (home-page "https://pypi.org/project/dill/") (synopsis "Serialize all of Python") (description "Dill extends Python's @code{pickle} module for serializing @@ -30640,39 +30647,43 @@ the saved state of the original interpreter session.") (define-public python-multiprocess (package (name "python-multiprocess") - (version "0.70.14") + (version "0.70.17") (source (origin (method url-fetch) (uri (pypi-uri "multiprocess" version)) (sha256 (base32 - "0splzd9w9yi42vl7b6mm99vb82jp2adhdrizw1xd4q125z0szp9y")))) + "0ypm9yj1ng1s96hk2iwll190dkpc2j5zras8kay9x00n6hdg3qja")))) (build-system pyproject-build-system) (arguments (list #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'disable-broken-tests - (lambda _ - ;; The "wait_result" and "shared_memory..." tests are broken as - ;; there is no keyboard interrupt. - ;; - ;; The "preload_resources" test fails as it cannot find - ;; mp_preload.py. - (substitute* "py3.10/multiprocess/tests/__init__.py" - (("^(.*)def test_(\ + #~(modify-phases %standard-phases + (add-after 'unpack 'disable-broken-tests + (lambda* (#:key inputs #:allow-other-keys) + ;; The "wait_result" and "shared_memory..." tests are broken as + ;; there is no keyboard interrupt. + ;; + ;; The "preload_resources" test fails as it cannot find + ;; mp_preload.py. + (substitute* + (string-append "py" (python-version + (assoc-ref inputs "python")) + "/multiprocess/tests/__init__.py") + (("^(.*)def test_(\ wait_result|\ shared_memory_SharedMemoryServer_ignores_sigint|\ preload_resources\ )" line indent) - (string-append indent - "@unittest.skip(\"Disabled by Guix\")\n" - line))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "-m" "multiprocess.tests"))))))) + (string-append indent + "@unittest.skip(\"Disabled by Guix\")\n" + line))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "python" "-m" "multiprocess.tests") + (format #t "test suite not run~%"))))))) (propagated-inputs (list python-dill)) (native-inputs (list python-setuptools python-wheel)) @@ -30694,17 +30705,9 @@ library's @code{threading} module.") (sha256 (base32 "1rs5a3hx1fcpfsxxkl5kx6g06c82wqjqgdqyny5l1ggl1wq0rmfn")))) - (build-system python-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) + (build-system pyproject-build-system) (propagated-inputs (list python-dill)) - (native-inputs (list python-check-manifest python-pytest python-wheel)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/sixty-north/multiprocessing_on_dill") (synopsis "Multiprocessing using dill instead of pickle") (description @@ -30750,26 +30753,19 @@ functions and classes.") (define-public python-toolz (package (name "python-toolz") - (version "0.11.2") + (version "1.0.0") (source (origin (method url-fetch) (uri (pypi-uri "toolz" version)) (sha256 (base32 - "0cxwlh8dz8gq0l0bzchjnqqwhdp261nfd958ppqm518k2mg2scbb")))) - (build-system python-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" "-m" "pytest" "--doctest-modules" - "--pyargs" "toolz"))))))) + "00ks0jhl1jwm9576c5sh10pnla8ni21yvg4kcxasr627l3cy71ic")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/pytoolz/toolz/") (synopsis "List processing tools and functional utilities") (description @@ -31097,13 +31093,13 @@ run on top of the dynamic task schedulers.") (define-public python-dask-image (package (name "python-dask-image") - (version "2023.8.1") + (version "2024.5.3") (source (origin (method url-fetch) - (uri (pypi-uri "dask-image" version)) + (uri (pypi-uri "dask_image" version)) (sha256 - (base32 "1dh49lvirf5fbgq5hw1c4972czg5w12fg9y689cinyjjn22qk6jy")))) + (base32 "0g4293n1vjlpyxbvd1xz3pz9an9z4rnsw1m7lynhm00m0bgiz7qc")))) (build-system pyproject-build-system) (arguments (list @@ -31119,7 +31115,15 @@ run on top of the dynamic task schedulers.") "--ignore=tests/test_dask_image/test_ndfourier/test_core.py" "--ignore=tests/test_dask_image/test_ndinterp/test_spline_filter.py" "--ignore=tests/test_dask_image/test_ndmeasure/test_core.py" - "--ignore=tests/test_dask_image/test_ndmeasure/test_find_objects.py"))) + "--ignore=tests/test_dask_image/test_ndmeasure/test_find_objects.py") + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'set-version + (lambda _ + (substitute* "pyproject.toml" + (("^version_file.*") "") + (("dynamic = \\[\"version\"\\]") + (string-append "version = \"" #$version "\"")))))))) (propagated-inputs (list python-dask python-numpy python-pandas-2 @@ -31127,7 +31131,16 @@ run on top of the dynamic task schedulers.") python-scipy python-tifffile)) (native-inputs - (list python-pytest-flake8 python-pytest)) + (list python-coverage + python-flake8 + python-pytest + python-pytest-cov + python-pytest-flake8 + python-pytest-timeout + python-setuptools + python-setuptools-scm + python-twine + python-wheel)) (home-page "https://github.com/dask/dask-image") (synopsis "Distributed image processing") (description "This is a package for image processing with Dask arrays. @@ -31246,15 +31259,18 @@ Features: (define-public python-precis-i18n (package (name "python-precis-i18n") - (version "1.0.3") + (version "1.1.1") (source (origin (method url-fetch) (uri (pypi-uri "precis_i18n" version)) (sha256 - (base32 - "1qfb78zpx565vqkg0xhx75pna9sc35m370vpcz82982c8ix3ypyz")))) - (build-system python-build-system) + (base32 "0cdv2vbn0kwfq0pxj4l52s2xiaqablb2cgk0nph6r9cyqayf77rn")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/byllyfish/precis_i18n") (synopsis "Implementation of the PRECIS framework") (description @@ -31390,15 +31406,16 @@ in doctests.") (define-public python-attr (package (name "python-attr") - (version "0.3.1") + (version "0.3.2") (source (origin (method url-fetch) (uri (pypi-uri "attr" version)) (sha256 - (base32 - "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch")))) - (build-system python-build-system) + (base32 "1x2627x0n2rxx8wib4cksbjjnncff8finq97k37dq70qd2kvrvhw")))) + (build-system pyproject-build-system) + (native-inputs + (list python-setuptools python-wheel)) (home-page "https://github.com/denis-ryzhkov/attr") (synopsis "Decorator for attributes of target function or class") (description "Simple decorator to set attributes of target function or @@ -31767,32 +31784,29 @@ format.") (define-public python-crontab (package (name "python-crontab") - (version "3.0.0") + (version "3.2.0") (source (origin (method url-fetch) (uri (pypi-uri name version)) (sha256 - (base32 "0yd3vdhl7z8lxa30czsry65srha51ppdcwnhjgxx9pwx0djp9yvr")))) - (build-system python-build-system) + (base32 "0sy3qlki43n6qmhzzzyya4wcs50mcp3mg1ddn9h39plsscfps1j0")))) + (build-system pyproject-build-system) (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-before 'check 'disable-failing-tests - (lambda _ - (substitute* '("tests/test_compatibility.py" - "tests/test_frequency.py") - (("test_07_non_posix_shell") - "__off_test_07_non_posix_shell") - ;; Fails on leap years - (("test_19_frequency_at_month") - "__off_test_19_frequency_at_month") - ;; AssertionError: 48 != 24 - (("test_20_frequency_at_year") - "__off_test_20_frequency_at_year"))))))) + (list #:test-flags + ;; This test is made for Windows. + #~(list "-k" "not test_07_non_posix_shell") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'defaults-to-mcron + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "crontab.py" + (("/usr/bin/crontab") + (search-input-file inputs "bin/crontab")))))))) (inputs - (list python-dateutil)) + (list mcron python-dateutil)) + (native-inputs + (list python-pytest python-setuptools python-wheel)) (home-page "https://gitlab.com/doctormo/python-crontab/") (synopsis "Module for reading and writing crontab files") (description "This Python module can read, write crontab files, and @@ -31973,37 +31987,25 @@ one-off scripts.") (define-public python-cached-property (package (name "python-cached-property") - (version "1.5.2") + (version "2.0.1") (source (origin (method url-fetch) - (uri (pypi-uri "cached-property" version)) + (uri (pypi-uri "cached_property" version)) (sha256 - (base32 - "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - ;; https://github.com/pydanny/cached-property/issues/131 - ;; recent versions of freezegun break one test - (add-after 'unpack 'disable-broken-test - (lambda _ - (substitute* "tests/test_cached_property.py" - (("def test_threads_ttl_expiry\\(self\\)" m) - (string-append "@unittest.skip(\"Disabled by Guix\")\n" - " " m))) - #t))))) + (base32 "0hbni4q15n8wspdj48j6xvg977pgm1r5wwjq3x7hxvp30mqn2ka8")))) + (build-system pyproject-build-system) (native-inputs - (list python-freezegun)) - (home-page - "https://github.com/pydanny/cached-property") - (synopsis - "Decorator for caching properties in classes") + (list python-freezegun + python-pytest + python-setuptools + python-wheel)) + (home-page "https://github.com/pydanny/cached-property") + (synopsis "Decorator for caching properties in classes") (description "This package provides a decorator which makes caching -time-or-computationally-expensive properties quick and easy and works in Python -2 or 3.") +time-or-computationally-expensive properties quick and easy and works in +Python 2 or 3.") (license license:bsd-3))) (define-public python-folium @@ -32473,38 +32475,38 @@ register custom encoders and decoders.") (define-public python-ujson (package (name "python-ujson") - (version "5.7.0") + (version "5.10.0") (source (origin (method url-fetch) (uri (pypi-uri "ujson" version)) (sha256 (base32 - "08vvyfyg4qvjy2vxrvc0qix5zmd0j6wd0icvmhc633xfvkayb277")) + "1habmn3bmmv2ym4ldiijcavdkdzp8h28h60hgwjkhxwcbly8zkdk")) (modules '((guix build utils))) (snippet - '(begin (delete-file-recursively "deps") #t)))) - (build-system python-build-system) + #~(begin (delete-file-recursively "deps"))))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'link-to-system-double-conversion - (lambda* (#:key inputs #:allow-other-keys) - (let ((d-c (assoc-ref inputs "double-conversion"))) - (substitute* "setup.py" - (("./deps/double-conversion/double-conversion\"") - (string-append d-c "/include/double-conversion\"")) - (("-lstdc++" stdc) - (string-append "-L" d-c "/lib\"," - " \"-ldouble-conversion\"," - " \"" stdc))) - #t))) - (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (invoke "pytest")))))) - (native-inputs - (list double-conversion python-setuptools-scm python-pytest)) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'link-to-system-double-conversion + (lambda* (#:key inputs #:allow-other-keys) + (let ((d-c (assoc-ref inputs "double-conversion"))) + (substitute* "setup.py" + (("./deps/double-conversion/double-conversion\"") + (string-append d-c "/include/double-conversion\"")) + (("-lstdc++" stdc) + (string-append "-L" d-c "/lib\"," + " \"-ldouble-conversion\"," + " \"" stdc))))))))) + (native-inputs + (list double-conversion + python-pytest + python-setuptools + python-setuptools-scm + python-wheel)) (home-page "https://github.com/ultrajson/ultrajson") (synopsis "Ultra fast JSON encoder and decoder for Python") (description @@ -32614,10 +32616,7 @@ standard error channel (stderr) in your program.") python-sniffio python-typing-extensions)) (native-inputs - (list python-contextlib2 - python-hypothesis - python-mock - python-psutil + (list python-psutil python-pytest python-pytest-mock python-setuptools @@ -32635,17 +32634,6 @@ concurrency on top of asyncio, and works in harmony with the native SC of trio itself.") (license license:expat))) -;; TODO: This will become the default on the python-team branch. Dataclasses -;; is part of Python. -(define-public python-anyio/without-dataclasses - (package - (inherit python-anyio) - (propagated-inputs - (list python-contextvars - python-idna - python-sniffio - python-typing-extensions)))) - (define-public python-argh ;; There are 21 commits since the latest release containing important ;; improvements. @@ -33162,39 +33150,58 @@ such as a file modification and trigger an action. This is similar to inotify, but portable.") (license license:asl2.0))) -(define-public python-watchgod +(define-public python-watchfiles (package - (name "python-watchgod") - (version "0.8.1") + (name "python-watchfiles") + (version "1.0.4") (source (origin ;; There are no tests in the PyPI tarball. (method git-fetch) (uri (git-reference - (url "https://github.com/samuelcolvin/watchgod") + (url "https://github.com/samuelcolvin/watchfiles") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0zm9xd2qf3d74l67yv8j3zhhhvi0vp25vhkg46l9d7flh9m04qrp")))) - (build-system pyproject-build-system) + (base32 "1kaxq0drjwlvcsg4in25w1bhjjgm1zlz06rr2macyi6s5x96g46h")))) + (build-system cargo-build-system) (arguments - (list #:test-flags '(list "-o" "asyncio_mode=auto" - ;; PytestUnraisableExceptionWarning - "-k" "not test_watch_log and not test_awatch") - #:phases #~(modify-phases %standard-phases - (delete 'sanity-check)))) + (list + #:install-source? #f + #:imported-modules `(,@%cargo-build-system-modules + ,@%pyproject-build-system-modules) + #:modules '((guix build cargo-build-system) + ((guix build pyproject-build-system) #:prefix py:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'build + (assoc-ref py:%standard-phases 'build)) + (add-after 'build 'install-rust-library + (lambda _ + (copy-file "target/release/lib_rust_notify.so" + "watchfiles/_rust_notify.so"))) + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (if tests? + ;; Missing file in source. + (invoke "pytest" "-vv" "-k" "not test_docs_examples") + (format #t "test suite not run~%")))) + (replace 'install + (assoc-ref py:%standard-phases 'install))) + #:cargo-inputs + (list rust-crossbeam-channel-0.5 rust-notify-7 rust-pyo3-0.23))) (native-inputs - (list python-anyio + (list maturin + python-anyio python-coverage - python-pygments + python-dirty-equals python-pytest - python-pytest-asyncio python-pytest-cov python-pytest-mock - python-pytest-sugar - python-setuptools - python-wheel)) - (home-page "https://github.com/samuelcolvin/watchgod") + python-pytest-timeout + python-wrapper)) + (home-page "https://github.com/samuelcolvin/watchfiles") (synopsis "Simple, modern file watching and code reload in Python") (description "Simple, modern file watching and code reload in Python inspired by @@ -33202,6 +33209,9 @@ but portable.") operating systems and an elegant approach to concurrency using threading.") (license license:expat))) +(define-deprecated/alias python-watchgod python-watchfiles) +(export python-watchgod) + (define-public python-wget (package (name "python-wget") @@ -33718,14 +33728,18 @@ library. Only the high-level API is bound.") (define-public python-frozendict (package (name "python-frozendict") - (version "2.3.4") + (version "2.4.6") (source (origin (method url-fetch) (uri (pypi-uri "frozendict" version)) (sha256 - (base32 "0y3zn57i1q5192f7l4w2z2zsy3rrx50g563msaq954r58s1v3d0m")))) - (build-system python-build-system) + (base32 "13ib358v66c9ykfz3plpxcs96ca6vkx8w84sjv26zlpvf1jd2z6z")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/Marco-Sulla/python-frozendict") (synopsis "Simple immutable mapping for Python") (description @@ -34234,25 +34248,6 @@ cryptographically signed ones).") dictionaries.") (license license:expat))) -(define-public python-dictpath - (package - (name "python-dictpath") - (version "0.1.3") - (source - (origin - (method url-fetch) - (uri (pypi-uri "dictpath" version)) - (sha256 - (base32 "1n4hq4wbgaw59bbb16nhkgg5wk8sl4iw940vjrgx4xmifqxxw73m")))) - (build-system python-build-system) - (native-inputs (list python-pytest python-pytest-cov python-pytest-flake8)) - (home-page "https://github.com/p1c2u/pathable") - (synopsis "Object-oriented path library for Python") - (description "This object-oriented dictionary path Python library enables -traversing resources like paths or accessing resources on demand with separate -accessor layer.") - (license license:asl2.0))) - (define-public pyzo (package (name "pyzo") @@ -34342,24 +34337,22 @@ intended for validating data coming into Python as JSON, YAML, etc.") (define-public python-cmd2 (package (name "python-cmd2") - (version "2.3.3") + (version "2.5.11") (source (origin (method url-fetch) (uri (pypi-uri "cmd2" version)) (sha256 (base32 - "0h1naik558qh48gx2iyy0a0khvw5fz0in69y84mbrhsm9nq7w3bm")))) + "0abl9aalyfbncw39d41gd3mmdgjvd7jlaa372r0lmghz0a2x781h")))) (build-system pyproject-build-system) (arguments (list #:test-flags '(list "-k" "not test_find_editor_not_specified \ and not test_transcript"))) (propagated-inputs - (list python-attrs python-colorama python-pyperclip python-wcwidth)) + (list python-pyperclip python-wcwidth)) (native-inputs - (list python-invoke - python-mock - python-pytest + (list python-pytest python-pytest-cov python-pytest-mock python-setuptools @@ -34619,23 +34612,31 @@ reStructuredText, and plain text.") (define-public python-lazr-delegates (package (name "python-lazr-delegates") - (version "2.0.4") + (version "2.1.1") (source (origin (method url-fetch) - (uri (pypi-uri "lazr.delegates" version)) + (uri (pypi-uri "lazr_delegates" version)) (sha256 - (base32 - "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx")))) - (build-system python-build-system) + (base32 "1p02diwzn58jhpvf9m8bhb5p0xkx5gnc84mzgwr3zdsidrhv5kmf")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? (invoke "nosetests"))))))) + (list + #:test-flags #~(list "-v" #$output) + #:phases + #~(modify-phases %standard-phases + (add-after 'check 'check-cleanup + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (for-each + delete-file-recursively + (find-files #$output + (lambda (file stat) + (or (member (basename file) + '("tests" ".pytest_cache")))) + #:directories? #t)))))))) (native-inputs - (list python-nose)) + (list python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-zope-interface)) (home-page "https://launchpad.net/lazr.delegates") @@ -34650,23 +34651,31 @@ and delegating behavior.") (define-public python-lazr-config (package (name "python-lazr-config") - (version "2.2.3") + (version "3.1") (source (origin (method url-fetch) - (uri (pypi-uri "lazr.config" version)) + (uri (pypi-uri "lazr_config" version)) (sha256 - (base32 - "1qdbrzl61q7cjhbnxvw9y3frcr935y7diwy15xrwcv9ynvw76jmp")))) - (build-system python-build-system) + (base32 "02xb4fs9rm6bf3f00qkq8pihgqvrvn2wfnvydn2vg9p73ddhcmvw")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "python" "-s" "-m" "nose" "-P" "lazr")))))) + (list + #:test-flags #~(list "-v" #$output) + #:phases + #~(modify-phases %standard-phases + (add-after 'check 'check-cleanup + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (for-each + delete-file-recursively + (find-files #$output + (lambda (file stat) + (or (member (basename file) + '("tests" ".pytest_cache")))) + #:directories? #t)))))))) (native-inputs - (list python-nose)) + (list python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-lazr-delegates python-zope-interface)) (home-page "https://launchpad.net/lazr.config") @@ -34717,17 +34726,41 @@ RFC 3464.") (define-public python-flufl-i18n (package (name "python-flufl-i18n") - (version "3.0") + (version "5.1.0") (source (origin (method url-fetch) - (uri (pypi-uri "flufl.i18n" version)) + (uri (pypi-uri "flufl_i18n" version)) (sha256 (base32 - "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r")))) - (build-system python-build-system) + "0bm4kmi04gm164y5nmadmrg79y1l1cs9iwxcv9y7gq0dgyr20xms")))) + (build-system pyproject-build-system) + (arguments + (list #:test-flags + #~(list "--no-cov" "--ignore-glob=docs/*") + #:phases + #~(modify-phases %standard-phases + ;; This phase add a symlink of dist-info dir for packages + ;; expecting flufl.i18n rather than flufl_i18n (mailman). + (add-after 'install 'add-custom-dist-info + (lambda _ + (for-each + (lambda (dir) + (with-directory-excursion (dirname dir) + (let ((base (basename dir))) + (symlink base + (string-join (string-split base #\_) "."))))) + (find-files #$output + (lambda (file stat) + (string-suffix? ".dist-info" file)) + #:directories? #t))))))) (propagated-inputs (list python-atpublic)) + (native-inputs + (list python-hatchling + python-pytest + python-pytest-cov + python-sybil)) (home-page "https://flufli18n.readthedocs.io") (synopsis "API for Python internationalization") (description @@ -34743,15 +34776,38 @@ different tasks.") (define-public python-flufl-lock (package (name "python-flufl-lock") - (version "4.0") + (version "8.1.0") (source (origin (method url-fetch) (uri (pypi-uri "flufl.lock" version)) (sha256 - (base32 - "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq")))) - (build-system python-build-system) + (base32 "1jz7vipjga4x803gfsb9mvnfb6q8my7ib000nsc3v9ljaq0050yq")))) + (build-system pyproject-build-system) + (arguments + (list #:test-flags + #~(list "--no-cov" "--ignore-glob=docs/*") + #:phases + #~(modify-phases %standard-phases + ;; This phase add a symlink of dist-info dir for packages + ;; expecting flufl.lock rather than flufl_lock (mailman). + (add-after 'install 'add-custom-dist-info + (lambda _ + (for-each + (lambda (dir) + (with-directory-excursion (dirname dir) + (let ((base (basename dir))) + (symlink base + (string-join (string-split base #\_) "."))))) + (find-files #$output + (lambda (file stat) + (string-suffix? ".dist-info" file)) + #:directories? #t))))))) + (native-inputs + (list python-hatchling + python-pytest + python-pytest-cov + python-sybil)) (propagated-inputs (list python-atpublic python-psutil)) (home-page "https://flufllock.readthedocs.io") @@ -34882,25 +34938,17 @@ dates in almost any string formats commonly found on web pages.") (define-public python-dpath (package (name "python-dpath") - (version "2.0.1") + (version "2.2.0") (source (origin (method url-fetch) (uri (pypi-uri "dpath" version)) (sha256 (base32 - "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y")))) - (build-system python-build-system) + "0gkavmc44f9cj3kch68343r2ajsbvbsjcmsmkqhkzsjmvhqfdxrl")))) + (build-system pyproject-build-system) (native-inputs - (list python-hypothesis python-mock python-nose)) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - ;; This invocation is taken from tox.ini. - (invoke "nosetests" "-d" "-v" "tests/")))))) + (list python-hypothesis python-nose2 python-setuptools python-wheel)) (home-page "https://github.com/akesterson/dpath-python") (synopsis "File-system-like pathing and searching for dictionaries") (description @@ -37067,9 +37115,9 @@ generation, and software testing purposes.") (define-public python-peachpy ;; There is no tag in this repo. - (let ((commit "913d74c35a6b1d330e90bfc055208ce5b06b35a0") + (let ((commit "349e8f836142b2ed0efeb6bb99b1b715d87202e9") (version "0.2.0") ;from 'peachpy/__init__.py' - (revision "2")) + (revision "3")) (package (name "python-peachpy") (version (git-version version revision commit)) @@ -37080,17 +37128,15 @@ generation, and software testing purposes.") (file-name (git-file-name name version)) (sha256 (base32 - "1wnqxspxsacw4556q0b9fbw11nhrkgn6gs8g43jdnpa35f3z9kb6")) + "16pnkghmqjc7pbws0yhyrwlz43d5pffb5c6v2bb4jk0j537gwzbi")) (patches (search-patches "python-peachpy-determinism.patch")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "nosetests"))))))) + ;; The issue is known and the test will probably never be fixed. + ;; https://github.com/Maratyszcza/PeachPy/issues/131 + (list #:test-flags ''("--ignore=tests/arm/test_arm.py"))) (native-inputs - (list python-nose python-rednose python-setuptools)) + (list python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-six python-opcodes)) (synopsis "Efficient assembly code generation in Python") @@ -37677,7 +37723,12 @@ statements in OFX files.") ;; The timestamp to local offset tests fail due to ;; missing timezone data (see: ;; https://github.com/danielrichman/strict-rfc3339/issues/9). - "-k" "not LocalOffset"))))))) + "-k" + #$@(if (or (target-x86-32?) (target-arm32?)) + ;; On 32-bit platforms the size of time_t is + ;; too small for these tests. + '("not LocalOffset and not TestTimestampToRFC3339UTCOffset") + '("not LocalOffset"))))))))) (native-inputs (list python-pytest)) (home-page "https://github.com/danielrichman/strict-rfc3339") (synopsis "RFC3339 procedures library") @@ -38296,7 +38347,9 @@ these linters: @code{pycodestlye}, @code{pyflakes}") (arguments (list #:test-flags #~(list "--durations=10" - "--ignore=tests/integration/test_dev_server.py") + "--ignore=tests/integration/test_dev_server.py" + ;; Assertion fails in diff of HTML template. + "-k" "not test_compiling_markdown") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'fix-pytest-config @@ -39156,17 +39209,21 @@ implementing a pre-defined interface.") (define-public python-itemloaders (package (name "python-itemloaders") - (version "1.1.0") + (version "1.3.2") (source (origin (method url-fetch) (uri (pypi-uri "itemloaders" version)) (sha256 - (base32 "0j2aw4ipalj208594x80blpgkh1i63gqqa4nb67b823av9hirn11")))) + (base32 "0w37g31n06x6v6b4w7cz3nbq4wl6cv7rrzg3fr203gw3pqx5pbsg")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest python-setuptools python-wheel)) + (native-inputs + (list python-packaging + python-pytest + python-setuptools + python-wheel)) (propagated-inputs - (list python-itemadapter python-jmespath python-parsel python-w3lib)) + (list python-itemadapter python-jmespath python-parsel)) (home-page "https://github.com/scrapy/itemloaders") (synopsis "Base library for scrapy's ItemLoader") (description "Itemloaders is a library that helps you collect data @@ -40466,13 +40523,13 @@ read all zbar supported codes.") (define-public python-zeroc-ice (package (name "python-zeroc-ice") - (version "3.7.9") + (version "3.7.10.1") (source (origin (method url-fetch) (uri (pypi-uri "zeroc-ice" version)) (sha256 (base32 - "0bqkrjxp2fbz34x3wxkxji39kxinypzg8q2994sibiay29mpipxb")))) + "0r46q4hd7xbpvnidbra1prkg4xhmajxjjmclfqgp3pv0lgyslqxh")))) (build-system pyproject-build-system) (inputs (list openssl)) (native-inputs (list python-setuptools python-wheel)) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c5f98c3a46..ebc9712294 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -660,6 +660,405 @@ def contents() -> str: (variable "PYTHONTZPATH") (files (list "share/zoneinfo"))))))) +(define-public python-3.11 + (package + (inherit python-3.10) + (name "python") + (version "3.11.11") + (source (origin + (method url-fetch) + (uri (string-append "https://www.python.org/ftp/python/" + version "/Python-" version ".tar.xz")) + (patches (search-patches + "python-3-deterministic-build-info.patch" + "python-3.11-fix-tests.patch" + "python-3-hurd-configure.patch" + "python-3-search-paths.patch")) + (sha256 + (base32 + "1qrvsxg5g0b0pgz2iigxic2j3g6b2c59iva46vins8ydl33j169a")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete the bundled copy of libexpat. + (delete-file-recursively "Modules/expat") + (substitute* "Modules/Setup" + ;; Link Expat instead of embedding the bundled one. + (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) + ;; Delete windows binaries + (for-each delete-file + (find-files "Lib/distutils/command" "\\.exe$")))))) + (arguments + (list + #:test-target "test" + #:configure-flags + #~(list "--enable-shared" ;allow embedding + "--with-system-expat" ;for XML support + "--with-system-ffi" ;build ctypes + "--with-ensurepip=install" ;install pip and setuptools + "--with-computed-gotos" ;main interpreter loop optimization + "--enable-unicode=ucs4" + "--without-static-libpython" + "--enable-loadable-sqlite-extensions" + + ;; FIXME: These flags makes Python significantly faster, + ;; but leads to non-reproducible binaries. + ;; "--with-lto" ;increase size by 20MB, but 15% speedup + ;; "--enable-optimizations" + + ;; Prevent the installed _sysconfigdata.py from retaining + ;; a reference to coreutils. + "INSTALL=install -c" + "MKDIR_P=mkdir -p" + + ;; Add a reference to libxcrypt in LIBS so that the + ;; sysconfigdata file records it and propagates it to programs + ;; linking against Python. + (let ((libxcrypt + (false-if-exception + (dirname + (search-input-file %build-inputs + "lib/libcrypt.so.1"))))) + (string-append + "LIBS=" + (if libxcrypt + (string-append "-L" libxcrypt) + ""))) + + ;; Disable runtime check failing if cross-compiling, see: + ;; https://lists.yoctoproject.org/pipermail/poky/2013-June/008997.html + #$@(if (%current-target-system) + '("ac_cv_buggy_getaddrinfo=no" + "ac_cv_file__dev_ptmx=no" + "ac_cv_file__dev_ptc=no") + '()) + ;; -fno-semantic-interposition reinstates some + ;; optimizations by gcc leading to around 15% speedup. + ;; This is the default starting from python 3.10. + "CFLAGS=-fno-semantic-interposition" + (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib" + " -fno-semantic-interposition")) + ;; With no -j argument tests use all available cpus, so provide one. + #:make-flags + `(list (string-append (format #f "TESTOPTS=-j~d" + (parallel-job-count)) + ;; those tests fail on low-memory systems + " --exclude" + " test_mmap" + " test_socket" + " test_threading" + " test_asyncio" + " test_shutdown" + ,@(if (system-hurd?) + '(" test_posix" ;multiple errors + " test_time" + " test_pty" + " test_shutil" + " test_tempfile" ;chflags: invalid argument: + ;; tbv14c9t/dir0/dir0/dir0/test0.txt + " test_os" ;stty: 'standard input': + ;; Inappropriate ioctl for device + " test_openpty" ;No such file or directory + " test_selectors" ;assertEqual(NUM_FDS // 2, len(fds)) + ;; 32752 != 4 + " test_compileall" ;multiple errors + " test_poll" ;list index out of range + " test_subprocess" ;runs over 10min + " test_asyncore" ;multiple errors + " test_threadsignals" + " test_eintr" ;Process return code is -14 + " test_io" ;multiple errors + " test_logging" + " test_signal" + " test_flags" ;ERROR + " test_bidirectional_pty" + " test_create_unix_connection" + " test_unix_sock_client_ops" + " test_open_unix_connection" + " test_open_unix_connection_error" + " test_read_pty_output" + " test_write_pty" + " test_concurrent_futures" ;freeze + " test_venv" ;freeze + " test_multiprocessing_forkserver" ;runs over 10min + " test_multiprocessing_spawn" ;runs over 10min + " test_builtin" + " test_capi" + " test_dbm_ndbm" + " test_exceptions" + " test_faulthandler" + " test_getopt" + " test_importlib" + " test_json" + " test_multiprocessing_fork" + " test_multiprocessing_main_handling" + " test_pdb " + " test_regrtest" + " test_sqlite") + '()))) + + #:modules + '((ice-9 ftw) + (ice-9 match) + (guix build utils) + (guix build gnu-build-system)) + + #:phases + #~(modify-phases %standard-phases + #$@(if (system-hurd?) + `((add-after 'unpack + 'disable-multi-processing + (lambda _ + (substitute* "Makefile.pre.in" + (("-j0") + "-j1"))))) + '()) + (add-before 'configure 'patch-lib-shells + (lambda _ + ;; This variable is used in setup.py to enable cross compilation + ;; specific switches. As it is not set properly by configure + ;; script, set it manually. + #$@(if (%current-target-system) + '((setenv "_PYTHON_HOST_PLATFORM" "")) + '()) + ;; Filter for existing files, since some may not exist in all + ;; versions of python that are built with this recipe. + (substitute* (filter file-exists? + '("Lib/subprocess.py" + "Lib/popen2.py" + "Lib/distutils/tests/test_spawn.py" + "Lib/test/support/__init__.py" + "Lib/test/test_subprocess.py")) + (("/bin/sh") + (which "sh"))))) + (add-before 'configure 'do-not-record-configure-flags + (lambda* (#:key configure-flags #:allow-other-keys) + ;; Remove configure flags from the installed '_sysconfigdata.py' + ;; and 'Makefile' so we don't end up keeping references to the + ;; build tools. + ;; + ;; Preserve at least '--with-system-ffi' since otherwise the + ;; thing tries to build libffi, fails, and we end up with a + ;; Python that lacks ctypes. + (substitute* "configure" + (("^CONFIG_ARGS=.*$") + (format #f "CONFIG_ARGS='~a'\n" + (if (member "--with-system-ffi" + configure-flags) + "--with-system-ffi" "")))))) + (add-before 'check 'pre-check + (lambda _ + ;; 'Lib/test/test_site.py' needs a valid $HOME + (setenv "HOME" + (getcwd)))) + (add-after 'unpack 'set-source-file-times-to-1980 + ;; XXX One of the tests uses a ZIP library to pack up some of the + ;; source tree, and fails with "ZIP does not support timestamps + ;; before 1980". Work around this by setting the file times in the + ;; source tree to sometime in early 1980. + (lambda _ + (let ((circa-1980 (* 10 366 24 60 60))) + (ftw "." + (lambda (file stat flag) + (utime file circa-1980 circa-1980) #t))))) + (add-after 'unpack 'remove-windows-binaries + (lambda _ + ;; Delete .exe from embedded .whl (zip) files + (for-each (lambda (whl) + (let ((dir "whl-content") + (circa-1980 (* 10 366 24 60 60))) + (mkdir-p dir) + (with-directory-excursion dir + (let ((whl (string-append "../" whl))) + (invoke "unzip" whl) + (for-each delete-file + (find-files "." "\\.exe$")) + (delete-file whl) + ;; Reset timestamps to prevent them from ending + ;; up in the Zip archive. + (ftw "." + (lambda (file stat flag) + (utime file circa-1980 + circa-1980) #t)) + (apply invoke "zip" "-X" whl + (find-files "." + #:directories? #t)))) + (delete-file-recursively dir))) + (find-files "Lib/ensurepip" "\\.whl$")))) + (add-after 'install 'remove-tests + ;; Remove 25 MiB of unneeded unit tests. Keep test_support.* + ;; because these files are used by some libraries out there. + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (match (scandir (string-append out "/lib") + (lambda (name) + (string-prefix? "python" name))) + ((pythonX.Y) + (let ((testdir (string-append out "/lib/" pythonX.Y + "/test"))) + (with-directory-excursion testdir + (for-each delete-file-recursively + (scandir testdir + (match-lambda + ((or "." "..") + #f) + ("support" #f) + (file (not (string-prefix? + "test_support." + file)))))) + (call-with-output-file "__init__.py" + (const #t)))) + (let ((libdir (string-append out "/lib/" pythonX.Y))) + (for-each (lambda (directory) + (let ((dir (string-append libdir "/" + directory))) + (when (file-exists? dir) + (delete-file-recursively dir)))) + '("email/test" "ctypes/test" + "unittest/test" + "tkinter/test" + "sqlite3/test" + "bsddb/test" + "lib-tk/test" + "json/tests" + "distutils/tests")))))))) + (add-after 'remove-tests 'move-tk-inter + (lambda* (#:key outputs inputs #:allow-other-keys) + ;; When Tkinter support is built move it to a separate output so + ;; that the main output doesn't contain a reference to Tcl/Tk. + (let ((out (assoc-ref outputs "out")) + (tk (assoc-ref outputs "tk"))) + (when tk + (match (find-files out "tkinter.*\\.so") + ((tkinter.so) + ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we + ;; want it under TK/lib/pythonX.Y/site-packages. + (let* ((len (string-length out)) + (target (string-append tk "/" + (string-drop (dirname + (dirname + tkinter.so)) + len) + "/site-packages"))) + (install-file tkinter.so target) + (delete-file tkinter.so)))) + ;; Remove explicit store path references. + (let ((tcl (assoc-ref inputs "tcl")) + (tk (assoc-ref inputs "tk"))) + (substitute* (find-files (string-append out "/lib") + "^(_sysconfigdata_.*\\.py|Makefile)$") + (((string-append "-L" tk "/lib")) + "") + (((string-append "-L" tcl "/lib")) + ""))))))) + (add-after 'move-tk-inter 'move-idle + (lambda* (#:key outputs #:allow-other-keys) + ;; when idle is built, move it to a separate output to save some + ;; space (5MB) + (let ((out (assoc-ref outputs "out")) + (idle (assoc-ref outputs "idle"))) + (when idle + (for-each (lambda (file) + (let ((target (string-append idle + "/bin/" + (basename + file)))) + (install-file file + (dirname target)) + (delete-file file))) + (find-files (string-append out "/bin") + "^idle")) + (match (find-files out "^idlelib$" + #:directories? #t) + ((idlelib) + (let* ((len (string-length out)) + (target (string-append idle "/" + (string-drop + idlelib len) + "/site-packages"))) + (mkdir-p (dirname target)) + (rename-file idlelib target)))))))) + (add-after 'move-idle 'rebuild-bytecode + (lambda* (#:key outputs #:allow-other-keys) + ;; Disable hash randomization to ensure the generated .pycs + ;; are reproducible. + (setenv "PYTHONHASHSEED" "0") + + (for-each (lambda (output) + ;; XXX: Delete existing pycs generated by the build + ;; system beforehand because the -f argument does + ;; not necessarily overwrite all files, leading to + ;; indeterministic results. + (for-each (lambda (pyc) + (delete-file pyc)) + (find-files output "\\.pyc$")) + + (apply invoke + #$(if (%current-target-system) + "python3" + #~(string-append #$output "/bin/python3")) + `("-m" "compileall" + "-o" "0" + "-o" "1" + "-o" "2" + "-f" ;force rebuild + "--invalidation-mode=unchecked-hash" + ;; Don't build lib2to3, because it's Python + ;; 2 code. + "-x" "lib2to3/.*" + ,output))) + (map cdr outputs)))) + (add-before 'check 'set-TZDIR + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; test_email requires the Olson time zone database. + (setenv "TZDIR" + (string-append (assoc-ref (or native-inputs + inputs) "tzdata") + "/share/zoneinfo")))) + (add-after 'install 'add-libxcrypt-reference-pkgconfig + (lambda* (#:key inputs #:allow-other-keys) + (let ((libxcrypt + (false-if-exception + (dirname + (search-input-file inputs "lib/libcrypt.so.1"))))) + (when libxcrypt + (substitute* + (find-files (string-append #$output "/lib/pkgconfig") + ".*\\.pc") + (("Libs:") + (string-append "Libs: " "-L" libxcrypt " -lcrypt"))))))) + (add-after 'install 'install-sitecustomize.py + #$(customize-site version))))) + (inputs (list bzip2 + expat + gdbm + libffi ;for ctypes + libxcrypt ;crypto module slated for removal in 3.13 + sqlite ;for sqlite extension + openssl + readline + zlib + tcl + tk)) ;for tkinter + (native-inputs `(("tzdata" ,tzdata-for-tests) + ("unzip" ,unzip) + ("zip" ,(@ (gnu packages compression) zip)) + ("pkg-config" ,pkg-config) + ("sitecustomize.py" ,(local-file (search-auxiliary-file + "python/sitecustomize.py"))) + ;; When cross-compiling, a native version of Python itself is needed. + ,@(if (%current-target-system) + `(("python" ,this-package) + ("which" ,which)) + '()))) + (native-search-paths + (list (guix-pythonpath-search-path version) + ;; Used to locate tzdata by the zoneinfo module introduced in + ;; Python 3.9. + (search-path-specification + (variable "PYTHONTZPATH") + (files (list "share/zoneinfo"))))))) + (define-public python-3.12 (package (name "python-next") @@ -1051,7 +1450,7 @@ data types.") (define-public python-next python-3.12) ;; Current 3.x version. -(define-public python-3 python-3.10) +(define-public python-3 python-3.11) ;; Current major version. (define-public python python-3) @@ -1088,10 +1487,10 @@ data types.") (build-system gnu-build-system) (arguments (substitute-keyword-arguments (package-arguments python) - ((#:configure-flags flags '()) - `(cons "--with-pydebug" ,flags)))) - (synopsis - "Python with the debug hooks enabled") + ((#:configure-flags configure-flags) + #~(append #$configure-flags + (list "--with-pydebug"))))) + (synopsis "Python with the debug hooks enabled") (description "This variant of Python provides an interpreter built with @code{--with-pydebug} to help develop and debug extensions. See diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 3e255f3f48..3821906f28 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -4033,7 +4033,7 @@ Python.") (define-public python-sip (package (name "python-sip") - (version "6.8.6") + (version "6.10.0") (source (origin (method url-fetch) @@ -4043,18 +4043,20 @@ Python.") "/sip-" version ".tar.gz"))) (sha256 (base32 - "0ykxq0607f2sdwbl5cxbp0y8pl14bsgzc9nhifpxbibfivj5kjbz")) + "176jylhzs2ci2r9f3l75k9dpwhp1dn0qv2cy9phdp62cgmlia1gs")) + (modules '((guix build utils))) + (snippet + ;; Relax setuptools dependency + #~(substitute* "pyproject.toml" + (("\"setuptools>=.*\",") "\"setuptools\","))) (patches (search-patches "python-sip-include-dirs.patch")))) (build-system pyproject-build-system) (arguments (list #:tests? #f)) ; No test system found. (native-inputs - (list python-wrapper python-setuptools python-setuptools-scm-next)) + (list python-setuptools python-setuptools-scm-next python-wheel)) (propagated-inputs - (list python-tomli - python-packaging - python-setuptools - python-wheel)) + (list python-packaging python-setuptools)) (home-page "https://www.riverbankcomputing.com/software/sip/intro") (synopsis "Python binding creator for C and C++ libraries") (description @@ -5137,7 +5139,7 @@ color-related widgets.") (define-public python-shiboken-2 (package (name "python-shiboken-2") - (version "5.15.10") + (version "5.15.16") (source (origin (method url-fetch) (uri (string-append "mirror://qt/QtForPython/pyside2/PySide2-" @@ -5145,7 +5147,7 @@ color-related widgets.") version ".tar.xz")) (sha256 (base32 - "0fnkx8ax2lkin3bpqbz4zbdrdin2ixb4d6s3c0xghh9sc79r3xia")))) + "0q3ky0fai3wr8kr1q82vdg5byhbn5sfdymmb554afpi72zyxcgkd")))) (build-system cmake-build-system) (inputs (list clang-toolchain diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm index 3724988ce4..2752380a3a 100644 --- a/gnu/packages/radio.scm +++ b/gnu/packages/radio.scm @@ -3272,7 +3272,6 @@ satellites.") (native-inputs (list python-mock python-mox3 - python-pep8 python-pytest python-pytest-mock python-pyyaml diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm index 01c154d35e..4b3e598e38 100644 --- a/gnu/packages/sphinx.scm +++ b/gnu/packages/sphinx.scm @@ -81,10 +81,15 @@ (arguments (list #:test-flags - ;; These require Internet access. - #~(list "-k" (string-append "not test_latex_images" - " and not test_build_latex_doc[lualatex-manual]" - " and not est_build_latex_doc[lualatex-howto]")) + #~(list "-k" (string-join + (list + ;; These require Internet access. + "not test_latex_images" + "test_build_latex_doc[lualatex-manual]" + "est_build_latex_doc[lualatex-howto]" + ;; AssertionError: assert...list of weak references to the object... + "test_autodoc_default_options") + " and not ")) #:phases #~(modify-phases %standard-phases (add-before 'check 'pre-check @@ -192,7 +197,10 @@ sources.") " and not test_viewcode" ;; These fail with pygments 2.10+. They are harmless. " and not test_additional_targets_should_not_be_translated" - " and not test_additional_targets_should_be_translated")) + " and not test_additional_targets_should_be_translated" + ;; As in Sphinx@6: + ;; AssertionError: assert...list of weak references to the object... + " and not test_autodoc_default_options")) #:phases '(modify-phases %standard-phases (add-before 'check 'pre-check @@ -262,25 +270,6 @@ sources.") (texlive-updmap.cfg (list texlive-cm-super texlive-tex-gyre)))))) -;; Some packages do not support Sphinx 5 yet. Remove when unused. -(define-public python-sphinx-4 - (package - (inherit python-sphinx-5) - (version "4.5.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "Sphinx" version)) - (sha256 - (base32 - "1rp28jryxwy24y8vpacclqihbizyi6b1s6id86pibvm46ybcmy3v")))) - (propagated-inputs - (modify-inputs (package-propagated-inputs python-sphinx) - (replace "python-docutils" python-docutils-0.15))) - (native-inputs - (modify-inputs (package-native-inputs python-sphinx) - (delete python-flit-core) - (append python-setuptools python-wheel))))) - (define-public python-sphinxcontrib-apidoc (package (name "python-sphinxcontrib-apidoc") @@ -603,7 +592,15 @@ supported with @code{sphinx-issues}.") (sha256 (base32 "1ivqz6yv96a2jp59kylg1gbkrmzq6zwilppz3ij0zrkjn25zb97k")))) (build-system pyproject-build-system) - (propagated-inputs (list python-docutils-0.15 python-sphinx-4)) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'loosen-requirements + (lambda _ + (substitute* "setup.py" + (("sphinx>=2,<5") + "sphinx>=2,<6"))))))) + (propagated-inputs (list python-docutils-0.16 python-sphinx-5)) (native-inputs (list python-pytest python-pytest-regressions @@ -1229,13 +1226,6 @@ enabled web server.") documenting acceptable argument types and return value types of functions.") (license license:expat))) -(define-public python-sphinx-autodoc-typehints-5 - (package/inherit python-sphinx-autodoc-typehints - (propagated-inputs - (modify-inputs - (package-propagated-inputs python-sphinx-autodoc-typehints) - (replace "python-sphinx" python-sphinx-5))))) - (define-public python-sphinx-pytest (package (name "python-sphinx-pytest") diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index fb23142c02..5292a0e379 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -916,7 +916,7 @@ comparison and diagnostics.") (define-public python-pymc (package (name "python-pymc") - (version "5.11.0") + (version "5.21.0") (source (origin (method git-fetch) ; no tests in PyPI (uri (git-reference @@ -925,28 +925,17 @@ comparison and diagnostics.") (file-name (git-file-name name version)) (sha256 (base32 - "0x94qzq3z02fxlliz1xfdpb2pbn7nhp4skzcxz6qdavbj9xqcxys")))) + "0azkbl0mpanza35ibdqdm21bf45n3xi26wy01lnxzxqblcjcny9l")))) (build-system pyproject-build-system) (arguments (list #:tests? #f ; tests are too computationally intensive #:phases #~(modify-phases %standard-phases (add-after 'unpack 'versioneer (lambda _ - (with-output-to-file "setup.cfg" - (lambda () - (display "\ -[versioneer] -VCS = git -style = pep440 -versionfile_source = pymc/_version.py -versionfile_build = pymc/_version.py -tag_prefix = -parentdir_prefix = pymc- -"))) - (invoke "versioneer" "install") - (substitute* "setup.py" - (("versioneer.get_version\\(\\)") - (string-append "\"" #$version "\""))))) + (invoke "versioneer" "install") + (substitute* "setup.py" + (("version=versioneer.get_version\\(),") + (format #f "version=~s," #$version))))) ;; To create the compiledir for tests. (add-before 'check 'write-permissions (lambda* (#:key tests? #:allow-other-keys) @@ -1009,24 +998,18 @@ and a lot more.") (define-public python-patsy (package (name "python-patsy") - (version "0.5.2") + (version "1.0.1") (source (origin (method url-fetch) (uri (pypi-uri "patsy" version)) (sha256 (base32 - "17dn72519gvwifw3i8mzwlslxmxkl8ihzfrxg1iblsk70iwdwlsh")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? (invoke "pytest" "-vv"))))))) + "1i60b6s8zj0w2ks63ip4mr8z14p6pixp76rm9q2qr0gc3qwsk1p7")))) + (build-system pyproject-build-system) (propagated-inputs - (list python-numpy python-scipy python-six)) + (list python-numpy python-scipy)) (native-inputs - (list python-pytest)) + (list python-pytest python-pytest-cov python-setuptools python-wheel)) (home-page "https://github.com/pydata/patsy") (synopsis "Describe statistical models and build design matrices") (description @@ -3333,7 +3316,7 @@ statistical summary in arrays and enumerables.") (define-public python-pgmpy (package (name "python-pgmpy") - (version "0.1.24") + (version "1.0.0") (source (origin (method git-fetch) ;pypi package does not include test data @@ -3343,8 +3326,14 @@ statistical summary in arrays and enumerables.") (file-name (git-file-name name version)) (sha256 (base32 - "0fvzh6v0yhgdryczamvzhfy2ymywkh0ssx4rl47xnfvi43hnij90")))) + "1hg6wrg3jcac71zn4gknni1wrn38wa86ka3sgp2bndz59mx6sr2s")))) (build-system pyproject-build-system) + (arguments + (list #:test-flags + #~(list "-k" (string-append + "not test_pillai" + " and not test_estimate_with_cache_no_llm_calls" + " and not test_estimate_with_orientations")))) (propagated-inputs (list python-daft python-joblib python-networkx @@ -3358,7 +3347,11 @@ statistical summary in arrays and enumerables.") python-statsmodels python-tqdm)) (native-inputs (list python-mock - python-pytest)) + python-pyro-ppl + python-pytest + python-setuptools + python-wheel + python-xgboost)) (home-page "https://github.com/pgmpy/pgmpy") (synopsis "Probabilistic Graphical Models library") (description "This package provides a library for Probabilistic diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index 1016f16318..6c029321d5 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -44,6 +44,7 @@ #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages libevent) + #:use-module (gnu packages libffi) #:use-module (gnu packages linux) #:use-module (gnu packages check) #:use-module (gnu packages compression) @@ -261,7 +262,7 @@ networks.") (define-public onionshare-cli (package (name "onionshare-cli") - (version "2.6") + (version "2.6.3") (source (origin (method git-fetch) @@ -270,32 +271,53 @@ networks.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1bhrp019a0923h7dnfxhgvgvdp81blvnsbnvzy34hp827abxf3ic")) - (patches (search-patches "onionshare-cli-async-mode.patch")))) - (build-system python-build-system) + (base32 "16yr25llnbgl2iwk458ca0rhrxsmpfx72q4gdg4a52i6g546p3hd")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-cython-3 + python-poetry-core + python-pytest + python-wheel)) (inputs - ;; TODO: obfs4proxy (list python-click + python-cffi python-colorama python-eventlet python-flask - python-flask-httpauth + python-flask-compress python-flask-socketio - python-pynacl + python-gevent + python-gevent-websocket + python-packaging python-psutil - python-pycryptodome + python-pynacl python-pysocks + python-qrcode python-requests + python-setuptools python-stem python-unidecode - python-urllib3 + python-urllib3-next + python-waitress + python-werkzeug tor)) (arguments (list #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + ;; All tests passed, and the CLI is working in runtime, relax + ;; Poetry way too strict requirements. + (substitute* "cli/pyproject.toml" + (("2.3.2") "^3.0.0") ; flask = "2.3.2" + (("5.3.4") "5.5.1") ; flask-socketio = "5.3.4" + (("23.9.1") "24.11.1") ; gevent = "^23.9.1" + (("7.4.2") "8.0.0") ; qrcode = "^7.4.2" + (("70.0.0") "67.6.1") ; setuptools = ">=70.0.0" + (("1.8.1") "^1.8.1") ; stem = "1.8.1" + (("3.0.6") "^3.0.6") ; werkzeug = "3.0.6" + (("0.41.2") "0.40.0")))) ; wheel = "^0.41.2" (add-after 'unpack 'bake-tor (lambda* (#:key inputs #:allow-other-keys) (substitute* (list "cli/onionshare_cli/common.py" @@ -307,16 +329,15 @@ networks.") (search-input-directory inputs "share/tor"))))) (add-before 'build 'change-directory (lambda _ (chdir "cli"))) - (replace 'check + (add-before 'check 'pre-check (lambda* (#:key tests? #:allow-other-keys) (when tests? (setenv "HOME" "/tmp") - ;; Greendns is not needed for testing, and if eventlet tries to - ;; load it, an OSError is thrown when getprotobyname is called. - ;; Thankfully there is an environment variable to disable the - ;; greendns import, so use it: - (setenv "EVENTLET_NO_GREENDNS" "yes") - (invoke "pytest" "-v" "./tests"))))))) + ;; Greendns is not needed for testing, and if eventlet tries + ;; to load it, an OSError is thrown when getprotobyname is + ;; called. Thankfully there is an environment variable to + ;; disable the greendns import, so use it: + (setenv "EVENTLET_NO_GREENDNS" "yes"))))))) (home-page "https://onionshare.org/") (synopsis "Securely and anonymously share files") (description "OnionShare lets you securely and anonymously share files, diff --git a/gnu/packages/tryton.scm b/gnu/packages/tryton.scm index 7f62e2d339..37c09c83d8 100644 --- a/gnu/packages/tryton.scm +++ b/gnu/packages/tryton.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2025 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,24 +24,29 @@ (define-module (gnu packages tryton) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages databases) #:use-module (gnu packages finance) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) #:use-module (gnu packages pdf) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) #:use-module (gnu packages xml) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) - #:use-module (guix build-system python)) + #:use-module (guix build-system python) + #:use-module (guix build-system pyproject)) (define (guix-trytonpath-search-path version) "Generate a GUIX_TRYTOND_MODULES_PATH search path specification, using @@ -58,41 +64,49 @@ installed in the same environments. Collecting only paths actually containing (define-public trytond (package (name "trytond") - (version "6.2.10") + (version "7.4.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond" version)) (sha256 - (base32 "0s53ig8snbs9936h99pwa0lwhcrd3j3cbpwlmf90mf1chrif7zca")) - (patches (search-patches "trytond-add-egg-modules-to-path.patch" - "trytond-add-guix_trytond_path.patch")))) - (build-system python-build-system) + (base32 "1bwa631qz07k6s5fbki3ph6sx0ch9yss2q4sa1jb67z6angiwv5f")) + (patches (search-patches "trytond-add-guix_trytond_path.patch")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + '(list "-k" + (string-append + ;; "modules" is [None], but should be a list of modules. + "not ModuleTestCase" + ;; fixture 'self' not found + " and not test_method")) + #:phases + '(modify-phases %standard-phases + (add-before 'check 'preparations + (lambda _ + (setenv "DB_NAME" ":memory:") + (setenv "HOME" "/tmp")))))) (propagated-inputs (list python-dateutil python-defusedxml python-genshi python-lxml - python-magic python-passlib python-polib - python-psycopg2 python-relatorio python-sql - python-werkzeug-1.0 ;setup.py requires werkzeug<2 - python-wrapt)) + python-werkzeug)) (native-inputs - (list python-mock python-pillow)) + (list python-pillow + python-pydot + python-pytest + python-setuptools + python-wheel + tzdata-for-tests)) (native-search-paths (list (guix-trytonpath-search-path (package-version python)))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'preparations - (lambda _ - (setenv "DB_NAME" ":memory:") - (setenv "HOME" "/tmp") - #t))))) (home-page "https://www.tryton.org/") (synopsis "Tryton Server") (description "Tryton is a three-tier high-level general purpose @@ -104,30 +118,33 @@ and security.") (define-public tryton (package (name "tryton") - (version "6.2.7") + (version "7.4.4") (source (origin (method url-fetch) (uri (pypi-uri "tryton" version)) (sha256 - (base32 "1bvwkrj2mmnddaif60g2np2jpx8lq5ka32xlhd4rlnshnbryrm5q")))) - (build-system python-build-system) + (base32 "0q0qa4pjbpc0h8r9hlnm5dh315w5i7mzqpdrlw1c8qvigpl1rf7g")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'change-home - (lambda _ - ;; Change from /homeless-shelter to /tmp for write permission. - (setenv "HOME" "/tmp"))) - (add-after 'install 'wrap-gi-python - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (gi-typelib-path (getenv "GI_TYPELIB_PATH"))) - (wrap-program (string-append out "/bin/tryton") - `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'change-home + (lambda _ + ;; Change from /homeless-shelter to /tmp for write permission. + (setenv "HOME" "/tmp"))) + (add-after 'install 'wrap-gi-python + (lambda _ + (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH"))) + (wrap-program (string-append #$output "/bin/tryton") + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))))) (native-inputs (list `(,glib "bin") - gobject-introspection)) + gobject-introspection + python-pytest + python-setuptools + python-wheel)) (inputs (list bash-minimal)) ;for wrap-program (propagated-inputs (list (librsvg-for-system) @@ -145,19 +162,20 @@ and security.") (define-public python-proteus (package (name "python-proteus") - (version "6.2.3") + (version "7.4.1") (source (origin (method url-fetch) (uri (pypi-uri "proteus" version)) (sha256 - (base32 "0xx8kqzgs66rgz6bk5favnjs0akz6znz81vmjwpwp2wpq7094fsr")))) - (build-system python-build-system) + (base32 "1q3d0hkvmfsmxbx2qqp8zpslyy11mzwh0q2dkrh958yfyrzi1550")))) + (build-system pyproject-build-system) ;; Tests require python-trytond-party which requires python-proteus. (arguments `(#:tests? #f)) (propagated-inputs (list python-dateutil python-defusedxml)) + (native-inputs (list python-setuptools python-wheel)) (home-page "http://www.tryton.org/") (synopsis "Library to access a Tryton server as a client") (description diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 22403d3106..8d6709f7f6 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -2702,7 +2702,7 @@ execution of any hook written in any language before every commit.") (native-search-paths (list (search-path-specification (variable "HGEXTENSIONPATH") - (files '("lib/python3.10/site-packages/hgext3rd"))))) + (files '("lib/python3.11/site-packages/hgext3rd"))))) (home-page "https://www.mercurial-scm.org/") (synopsis "Decentralized version control system") (description @@ -4312,53 +4312,50 @@ defects faster.") (license license:expat))) (define-public gita - (let ((commit "e41b504dca90a25e9be27f296da7ce22e5782893") - (revision "1")) - (package - (name "gita") - (version (git-version "0.12.9" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/nosarthur/gita") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1k03zgcbhl91cgyh4k7ywyjp00y63q4bqbimncqh5b3lni8l8j5l")))) - (build-system python-build-system) - (native-inputs - (list git ;for tests - python-pytest)) - (propagated-inputs - (list python-pyyaml)) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (substitute* "tests/test_main.py" - (("'gita\\\\n'") "'source\\n'") - (("'gita'") "'source'")) - (invoke (search-input-file inputs "/bin/git") - "init") - (add-installed-pythonpath inputs outputs) - (invoke (search-input-file inputs "/bin/pytest") - "-vv" "tests"))) - (add-after 'install 'install-shell-completions - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bash-completion (string-append out "/etc/bash_completion.d")) - (zsh-completion (string-append out "/etc/zsh/site-functions"))) - (mkdir-p bash-completion) - (copy-file ".gita-completion.bash" - (string-append bash-completion "/gita")) - (mkdir-p zsh-completion) - (copy-file ".gita-completion.zsh" - (string-append zsh-completion "/_gita")))))))) - (home-page "https://github.com/nosarthur/gita") - (synopsis "Command-line tool to manage multiple Git repos") - (description "This package provides a command-line tool to manage + (package + (name "gita") + (version "0.16.7.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nosarthur/gita") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "118dzmjgml0c32yllr2178ash2hvgn201i463bv4y0qbywajm9ax")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags #~(list "--ignore" "tests/test_main.py") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + (invoke (string-append + #$(this-package-native-input "git-minimal") "/bin/git") + "init"))) + (add-after 'install 'install-shell-completions + (lambda _ + (let* ((out #$output) + (bash-completion (string-append out "/etc/bash_completion.d")) + (zsh-completion (string-append out "/etc/zsh/site-functions"))) + (mkdir-p bash-completion) + (copy-file "auto-completion/bash/.gita-completion.bash" + (string-append bash-completion "/gita")) + (mkdir-p zsh-completion) + (copy-file "auto-completion/zsh/.gita-completion.zsh" + (string-append zsh-completion "/_gita")))))))) + (native-inputs + (list git-minimal/pinned ;for tests + python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-argcomplete)) + (home-page "https://github.com/nosarthur/gita") + (synopsis "Command-line tool to manage multiple Git repos") + (description "This package provides a command-line tool to manage multiple Git repos. This tool does two things: @@ -4369,7 +4366,7 @@ commit message side by side @end itemize If several repos are related, it helps to see their status together.") - (license license:expat)))) + (license license:expat))) (define-public ghq (package diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 97be01258b..36981f3c0e 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -3221,7 +3221,7 @@ YouTube.com and many more sites.") python-mutagen python-pycryptodomex python-requests-next ; TODO Remove this special package - python-urllib3-next ; TODO Remove this one too + python-urllib3-1.26 ; TODO Remove this one too python-websockets)) (native-inputs (append @@ -3799,34 +3799,28 @@ and custom quantization matrices.") (define-public streamlink (package (name "streamlink") - (version "6.3.1") + (version "7.1.2") (source (origin (method url-fetch) (uri (pypi-uri "streamlink" version)) (sha256 (base32 - "0i2qym2plm4gpcq50vl67j69m8a4zz9mb8gi2xryx28pbnpdzh4k")) - (snippet - #~(begin (use-modules (guix build utils)) - (substitute* "pyproject.toml" - (("trio >=0\\.22") "trio >=0.21")))))) - (build-system python-build-system) + "1mvg8lw3rkng6ciryziqh9r4ffj0ls7k0sv3byk3439s5d2qxh31")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "-m" "pytest"))))))) + (list + #:test-flags #~(list "-k" "not test_no_cache"))) (native-inputs (list python-freezegun - python-requests-mock python-pytest - python-pytest-asyncio - python-pytest-trio)) + python-pytest-trio + python-requests-mock + python-setuptools + python-wheel)) (propagated-inputs (list python-certifi + python-exceptiongroup python-isodate python-lxml python-pycountry @@ -3835,7 +3829,6 @@ and custom quantization matrices.") python-requests python-trio python-trio-websocket - python-typing-extensions python-urllib3 python-websocket-client)) (home-page "https://github.com/streamlink/streamlink") diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 74203262ef..25792aae0f 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -7217,6 +7217,12 @@ efficient where possible.") (list #:phases '(modify-phases %standard-phases + (add-after 'unpack 'remove-rednose-dependency + (lambda _ + (substitute* "setup.py" + (("'rednose'") "")) + (substitute* '("requirements.txt" "setup.cfg") + (("rednose.*") "")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -7230,7 +7236,6 @@ efficient where possible.") python-httplib2 python-nose python-pyparsing - python-rednose python-requests python-sure python-tornado)) diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm index 7bbdafeb89..2f806482f9 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2023 Malte Frank Gerdes <malte.f.gerdes@gmail.com> ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2025 Ekaitz Zarraga <ekaitz@elenq.tech> +;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,6 +38,7 @@ #:use-module ((guix licenses) #:prefix l:) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system perl) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages) @@ -57,7 +59,9 @@ #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages qt) #:use-module (gnu packages sdl) #:use-module (gnu packages video) #:use-module (gnu packages web) @@ -318,26 +322,38 @@ and many other languages.") (define-public python-wxpython (package (name "python-wxpython") - (version "4.2.0") + (version "4.2.2") (source (origin (method url-fetch) (uri (pypi-uri "wxPython" version)) (sha256 - (base32 - "1iw6xp76b3fmdqwbqmsx9i1razzpfki5z1hq6l8mszlxa32fng36")) + (base32 "1fp2717a96hd5pdai6hlzc4pngdazxas55apjv2w5zb71xjv1g2x")) (modules '((guix build utils))) - (snippet - '(begin - ;; Remove bundled wxwidgets - (delete-file-recursively "ext/wxWidgets"))) - (patches (search-patches "python-wxwidgets-type-errors.patch")))) - (build-system python-build-system) + (snippet #~(begin + ;; Remove bundled wxWidgets + (delete-file-recursively "ext/wxWidgets"))))) + (build-system pyproject-build-system) (outputs '("out" "debug")) (arguments (list + #:modules '((guix build pyproject-build-system) + (guix build utils) + (ice-9 ftw) + (ice-9 match) + (srfi srfi-26)) #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch-avoid-circular-import + (lambda _ + (substitute* "wx/__init__.py" + (("^import wx\\.__version__.*$") "\ +try: + import wx.__version__ +except ImportError: + pass\n") + (("^__version__ = .*") + (format #f "__version__ = ~s~%" #$version))))) (add-before 'build 'configure (lambda* (#:key inputs #:allow-other-keys) ;; Configure the build options provided to the 'build.py' build @@ -357,11 +373,24 @@ and many other languages.") (string-append "#" all))) ;; The build script tries to write to demo/version.py. So, we set ;; correct write permissions. - (chmod "demo/version.py" #o644)))))) + (chmod "demo/version.py" #o644))) + (add-before 'check 'add-missing-.so + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((site (site-packages inputs outputs))) + (with-directory-excursion (string-append site "/wx") + (for-each + (match-lambda + ("siplib" + (rename-file "siplib" "siplib.so")) + ((? (cut string-prefix? "_" <>) file) + (unless (string-prefix? "__" file) + (rename-file file (string-append file ".so")))) + (_ #t)) + (scandir "."))))))))) (inputs (list gtk+ wxwidgets)) (native-inputs - (list pkg-config python-waf)) + (list pkg-config python-setuptools python-waf python-wheel)) (propagated-inputs (list python-attrdict3 python-numpy python-pillow python-six)) (home-page "https://wxpython.org/") |