diff --git a/doc/guix.texi b/doc/guix.texi index af91f02d1f1..9aadad4c2ea 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -144,6 +144,7 @@ Copyright @copyright{} 2024 Evgeny Pisemsky@* Copyright @copyright{} 2025 jgart@* Copyright @copyright{} 2025 Artur Wroblewski@* Copyright @copyright{} 2025 Edouard Klein@* +Copyright @copyright{} 2025 Rodion Goritskov@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -35700,6 +35701,80 @@ The file which should store the logging output of Agate. @end table @end deftp +@subsubheading Miniflux + +@cindex miniflux +The @uref{https://miniflux.app/, Miniflux} is a minimalist RSS feed reader +with a web interface. + +Depending on the configuration, an initial administrator user can be pre-created +on startup. To enable this, @code{create-admin?} should be set to @code{#t}, and +both @code{admin-username-file} and @code{admin-password-file} should point to +files containing the username and password, respectively. However, it is +recommended to manually change the password to a secure one via the web +UI after the initial service startup. + +@defvar miniflux-service-type +This is the type of the Miniflux service. Its value +must be a @code{miniflux-configuration} record as in this example: + +@lisp +(service miniflux-service-type + (miniflux-configuration + (listen-address "0.0.0.0:8080") + (base-url "http://my-news-source.test") + (create-administrator-account? #t) + (administrator-account-name "/var/miniflux/initial-admin-username") + (administrator-account-password "/var/miniflux/initial-admin-password"))) +@end lisp + +The details of the @code{miniflux-configuration} record type are given below. + +@end defvar + +@deftp {Data Type} miniflux-configuration +Available @code{miniflux-configuration} fields are: + +@table @asis +@item @code{listen-address} (default: @code{"127.0.0.1:8080"}) (type: string) +Address to listen on. +Use absolute path like @code{"/var/run/miniflux/miniflux.sock"} for a Unix socket. + +@item @code{base-url} (default: @code{"http://127.0.0.1/"}) (type: string) +Base URL to generate HTML links and base path for cookies. + +@item @code{create-administrator-account?} (default: @code{#f}) (type: boolean) +Create an initial administrator account. + +@item @code{administrator-account-name} (type: maybe-string-or-file-path) +Initial administrator account name as a string or an absolute path +to a file with an account name inside. + +@item @code{administrator-account-password} (type: maybe-string-or-file-path) +Initial administrator account password as a string or an absolute path +to a file with a password inside. + +@item @code{run-migrations?} (default: @code{#t}) (type: boolean) +Run database migrations during application startup. + +@item @code{database-url} (default: @code{"host=/var/run/postgresql"}) (type: string) +PostgreSQL connection string. + +@item @code{user} (default: @code{"miniflux"}) (type: string) +User name for Postgresql and system account. + +@item @code{group} (default: @code{"miniflux"}) (type: string) +Group for the system account. + +@item @code{log-file} (default: @code{"/var/log/miniflux.log"}) (type: string) +Path to the log file. + +@item @code{extra-settings} (type: maybe-list) +Extra configuration parameters as a list of strings. + +@end table +@end deftp + @node High Availability Services @subsection High Availability Services diff --git a/etc/teams.scm b/etc/teams.scm index 69057e16efa..8a75b68d70e 100755 --- a/etc/teams.scm +++ b/etc/teams.scm @@ -1058,8 +1058,8 @@ the \"texlive\" importer." (define-member (person "Ludovic Courtès" "ludo@gnu.org" "civodul") - core home bootstrap core-packages installer - documentation mentors) + core core-packages hpc installer + mentors) (define-member (person "Andreas Enge" "andreas@enge.fr" @@ -1305,7 +1305,7 @@ the \"texlive\" importer." (define-member (person "Nicolas Graves" "ngraves@ngraves.fr" - "ngraves") + "nicolas-graves") javascript python ruby) (define-member (person "Yelninei" diff --git a/gnu/home/services/sway.scm b/gnu/home/services/sway.scm index bf001de1e5a..835053de1af 100644 --- a/gnu/home/services/sway.scm +++ b/gnu/home/services/sway.scm @@ -168,7 +168,7 @@ (lambda (e) (or (member e '("no-warn" "whole-window" "border" "exclude-titlebar" - "release" "locked" "inhibited" "no-repeat")) + "release" "locked" "to-code" "inhibited" "no-repeat")) (string-prefix? "input-device=" e))) lst)) @@ -177,7 +177,7 @@ (lambda (e) (or (member e '("no-warn" "whole-window" "border" "exclude-titlebar" - "release" "locked" "to-code" "inhibited" "no-repeat")) + "release" "locked" "inhibited" "no-repeat")) (string-prefix? "input-device=" e))) lst)) diff --git a/gnu/local.mk b/gnu/local.mk index 43de2994f45..f185f1d7ed9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -512,7 +512,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/openkinect.scm \ %D%/packages/onc-rpc.scm \ %D%/packages/opencl.scm \ - %D%/packages/openbox.scm \ %D%/packages/opencog.scm \ %D%/packages/openldap.scm \ %D%/packages/openpgp.scm \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 3c7bebc189e..fbd4a518e16 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -601,8 +601,13 @@ interface and is based on GNU Guile.") "/bin/gzip") (string-append "--with-zstd=" #$(this-package-input "zstd") "/bin/zstd"))))) - (inputs (modify-inputs (package-inputs shepherd-0.10) - (append gzip zstd))))) + (native-inputs + (modify-inputs (package-native-inputs shepherd-0.10) + (replace "guile-fibers" guile-fibers))) ;use latest guile-fibers available + (inputs + (modify-inputs (package-inputs shepherd-0.10) + (replace "guile-fibers" guile-fibers) ;use latest guile-fibers available + (append gzip zstd))))) (define-public shepherd shepherd-0.10) @@ -1110,8 +1115,21 @@ on memory usage on GNU/Linux systems.") (base32 "058y4a4mvx9m179dyr4wi8mlm6i4ybywshadaj4cvfn9fv0r0nkx")) (file-name (git-file-name name version)))) (build-system gnu-build-system) + (arguments + (list + #:configure-flags + #~(list "--enable-sensors") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-dlopen + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "linux/LibSensors.c" + (("dlopen\\(\"libsensors\\.so") + (string-append "dlopen(\"" + (search-input-file + inputs "/lib/libsensors.so"))))))))) (inputs - (list ncurses)) + (list ncurses (list lm-sensors "lib"))) (native-inputs (list autoconf automake python-minimal-wrapper)) ; for scripts/MakeHeader.py (home-page "https://htop.dev") @@ -6294,6 +6312,10 @@ alias cysdig=sudo csysdig --modern-bpf "fail2ban/client/fail2banregex.py") (("/etc/fail2ban") (string-append #$output "/etc/fail2ban"))))) + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (invoke "./bin/fail2ban-testcases")))) (add-after 'fix-default-config 'set-action-dependencies (lambda* (#:key inputs #:allow-other-keys) ;; deleting things that are not feasible to fix @@ -6374,7 +6396,8 @@ alias cysdig=sudo csysdig --modern-bpf "fail2ban-regex" "fail2ban-server" "fail2ban-testcases")) ((install-man "5") "jail.conf"))))))) - (native-inputs (list python-setuptools python-wheel)) + (native-inputs (list python-aiosmtpd + python-setuptools)) (inputs (list gawk coreutils-minimal curl diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index d3d50d30826..75fc119f681 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -2204,26 +2204,38 @@ intended to behave exactly the same as the original BWK awk.") (define-public python-bcbio-gff (package (name "python-bcbio-gff") - (version "0.6.9") + ;; python-bcbio-gff can only be refreshed manually, because guix refresh + ;; does not understand the tags on the github repository. + (version "0.7.1") (source (origin - (method url-fetch) - (uri (pypi-uri "bcbio-gff" version)) + ;; No tests in PyPI package. + (method git-fetch) + (uri (git-reference + (url "https://github.com/chapmanb/bcbb") + (commit (string-append "bcbio-gff-v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1pm1szyxabhn8jismrj9cjhf88ajgcmm39f0cgf36iagw5qakprl")))) + "0144xxzibq4mrg8a1w2scs120rd9svq07hm5ccs91n3a4nvwjfsd")))) (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'enter-directory + (lambda _ (chdir "gff")))))) (native-inputs - (list python-pytest)) + (list python-setuptools python-pytest)) (propagated-inputs (list python-biopython - python-setuptools - python-six - python-wheel)) + python-six)) (home-page "https://github.com/chapmanb/bcbb/tree/master/gff") (synopsis "Read and write GFF files with Biopython integration") (description "This package lets you read and write files in Generic Feature Format (GFF) with Biopython integration.") + (properties + '((upstream-name . "bcbio-gff"))) (license (license:non-copyleft "http://www.biopython.org/DIST/LICENSE")))) (define-public python-bcbio-gff/biopython-1.73 @@ -12153,26 +12165,19 @@ interpretation.") (define-public python-taggd (package (name "python-taggd") - (version "0.3.6") + (version "0.4.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/SpatialTranscriptomicsResearch/taggd") + (url "https://github.com/jfnavarro/taggd") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 - "0j19ah81z7aqrdljah9hyarp91gvgbk63pz6fz3pdpksy1yqyi6k")) - (modules '((guix build utils))) - (snippet - '(for-each delete-file - (find-files "taggd" "\\.c$"))))) + "17hi1vs1qwhxx8jnradnl9k471li6fjb6w5sljkpzjxy7rkxwb85")))) (build-system pyproject-build-system) (arguments (list - #:test-flags - ;; AssertionError: 0 is not true : Running Normal BAM test failed. - #~(list "-k" "not test_normal_bam_run") #:phases #~(modify-phases %standard-phases (add-before 'check 'remove-local-taggd @@ -12181,10 +12186,16 @@ interpretation.") ;; taggd when running tests. (delete-file-recursively "taggd")))))) (propagated-inputs - (list python-numpy python-pysam)) + (list python-numpy + python-pysam + python-tqdm + python-aiofiles + python-dnaio + python-types-aiofiles + python-types-tqdm)) (native-inputs (list python-cython python-pytest python-setuptools)) - (home-page "https://github.com/SpatialTranscriptomicsResearch/taggd") + (home-page "https://github.com/jfnavarro/taggd") (synopsis "Genetic barcode demultiplexing") (description "This package provides TagGD barcode demultiplexing utilities for Spatial Transcriptomics data.") @@ -12193,40 +12204,45 @@ for Spatial Transcriptomics data.") (define-public stpipeline (package (name "stpipeline") - (version "1.8.1") + (version "2.0.0") (source (origin - (method url-fetch) - (uri (pypi-uri "stpipeline" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/jfnavarro/st_pipeline") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0har2g42fvaqpiz66lincy86aj1hvwzds26kxhxfamvyvv4721wk")))) + (base32 "1qah9sa7wy9ywf0si2ngqg0qyr9jjp5gxmjx3y65i78bxyq8pfyx")))) (build-system pyproject-build-system) (arguments (list #:phases '(modify-phases %standard-phases - (add-after 'unpack 'relax-requirements - (lambda _ - (substitute* "requirements.txt" - (("argparse.*") - ""))))))) + ;; requirements.txt and pyproject.toml have all versions + ;; of the dependencies hardcoded. All tests pass, so it should + ;; be good enough. + ;; However, the sanity-check of any Python package that has + ;; stpipelines a dependency, would fail too. + (delete 'sanity-check)))) (propagated-inputs (list htseq - python-cython - python-invoke + python-distance + python-dnaio python-numpy python-pandas - python-pympler python-pysam python-regex python-scikit-learn python-scipy python-seaborn - python-setuptools - python-sqlitedict python-taggd + python-types-regex samtools star)) - (native-inputs (list python-setuptools python-wheel)) - (home-page "https://github.com/SpatialTranscriptomicsResearch/st_pipeline") + (native-inputs (list + python-cython + python-pytest + python-poetry-core)) + (home-page "https://github.com/jfnavarro/st_pipeline") (synopsis "Pipeline for spatial mapping of unique transcripts") (description "This package provides an automated pipeline for spatial mapping of diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index dbce7075e30..840cce37122 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1041,6 +1041,7 @@ CONFIG_TOOLS_KWBIMAGE=n") (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "./u_boot_pylib"))))))) + (native-inputs (list python-setuptools)) (synopsis "U-Boot Python library") (description "This package provides common Python code used by some of the commands part of the U-Boot project, such as Patman."))) @@ -1076,6 +1077,7 @@ commands part of the U-Boot project, such as Patman."))) ,(dirname (search-input-file inputs "libexec/git-core/git-send-email")))))))))) + (native-inputs (list python-setuptools)) (inputs (list git `(,git "send-email") diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 2451fd9d045..4b974917893 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -3184,25 +3184,6 @@ JSON APIs with Behave.") time by mocking the datetime module.") (license license:asl2.0))) -(define-public python-flexmock - (package - (name "python-flexmock") - (version "0.12.2") - (source (origin - (method url-fetch) - (uri (pypi-uri "flexmock" version)) - (sha256 - (base32 - "18dcr7mpldf3cxsqi9rak75n4z7x3j544l4ixdspairm7cf6cp23")))) - (build-system pyproject-build-system) - (native-inputs (list poetry python-pytest)) - (home-page "https://flexmock.readthedocs.org") - (synopsis "Testing library for Python") - (description - "flexmock is a testing library for Python that makes it easy to create -mocks, stubs and fakes.") - (license license:bsd-3))) - (define-public python-flaky (package (name "python-flaky") diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index 06fa6676e23..93fe90a858f 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -701,10 +701,20 @@ symmetries written in C. Spglib can be used to: (sha256 (base32 "0w3c71wvhnc44pfafcjfgqkjimkcdkpjk3bahg9v6l1z8c0cyhfy")))) (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-six + (lambda _ + (substitute* "geometric/nifty.py" + (("import six") "") + (("six\\.string_types") "str")) + (substitute* "setup.py" + (("'six',") ""))))))) (native-inputs (list python-pytest - python-setuptools - python-wheel)) + python-setuptools)) (propagated-inputs (list python-numpy python-scipy diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index f2aa2ae9340..e6f4e9c38a8 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -211,7 +211,7 @@ client.") python-docker-5 python-dockerpty python-docopt - python-dotenv + python-dotenv-0.13.0 python-jsonschema-3 python-pyyaml python-requests diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm index 99b41e91693..9a80ca954cd 100644 --- a/gnu/packages/efi.scm +++ b/gnu/packages/efi.scm @@ -172,7 +172,7 @@ information.") (arguments `(#:tests? #f ; No tests exist. #:make-flags - '("CC=gcc") + '("CC=gcc -g -O2 -Wno-error=implicit-function-declaration") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 1c10acad067..5343b8147f2 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -8455,6 +8455,29 @@ whose goal is to provide colorful yet legible options for users who want something with a bit more flair than the Modus themes.") (license license:gpl3+))) +(define-public emacs-doric-themes + (package + (name "emacs-doric-themes") + (version "0.4.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/protesilaos/doric-themes") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "06kvv5hvqig1sngzzvpxfpb9wln9fv2b7krjmvb0n3kvp0s0bxmd")))) + (build-system emacs-build-system) + (arguments (list #:tests? #f)) ;no tests + (home-page "https://github.com/protesilaos/doric-themes") + (synopsis "Highly readable minimalist Emacs themes") + (description + "This package provides a set of Emacs themes that conform with a +minimalist aesthetic: they use few colours and appear monochromatic in many +contexts") + (license license:gpl3+))) + (define-public emacs-eslint-flymake (let ((commit "c78246330ee3ac1e0e07a709473d98a113d268e5") (revision "1")) diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index 8a08262e22d..f0229489570 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -561,6 +561,7 @@ directories. @dfn{Enlightenment Foundation Libraries} (EFL).") (license license:bsd-2))) +;; XXX: See: . (define-public epour (package (name "epour") @@ -583,8 +584,8 @@ directories. (substitute* "epour/gui/__init__.py" (("join\\(data_path") (string-append "join(\"" #$output "/share/epour\"")))))))) - (native-inputs (list intltool python-distutils-extra python-setuptools - python-wheel)) + (native-inputs (list intltool python-distutils-extra python-setuptools-67 + python-wheel-0.40)) (inputs (list libtorrent-rasterbar-1.2 python-dbus python-efl python-pyxdg)) (home-page "https://www.enlightenment.org") (synopsis "EFL Bittorrent client") diff --git a/gnu/packages/esolangs.scm b/gnu/packages/esolangs.scm index 2f84688f9ad..04f93c6355d 100644 --- a/gnu/packages/esolangs.scm +++ b/gnu/packages/esolangs.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2020 Hendursaga ;;; Copyright © 2020 Liliana Marie Prikler ;;; Copyright © 2022 jgart +;;; Copyright © 2025 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,12 +27,14 @@ #:use-module (gnu packages flex) #:use-module (gnu packages ncurses) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages readline) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages)) @@ -106,18 +109,32 @@ whenever possible to the extent that the above points are not compromised. (name "folders") (version "0.0.8") (source - (origin - (method url-fetch) - (uri (pypi-uri "Folders" version)) - (sha256 - (base32 "0qh80qx7sjx0zii1hf8fm853d9rcg4rginm6v4gpp0hgn2a4q4gh")))) - (build-system python-build-system) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/SinaKhalili/Folders.py") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14fs8c7ilvsw6xbskr688s1dp3nd8vnwv7bg23ab1l6vj6fpzwmw")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "Folders" "sample_programs/HelloWorld") + (format #t "test suite not run~%"))))))) + (native-inputs (list python-setuptools)) (home-page "https://github.com/SinaKhalili/Folders.py") (synopsis "Structural programming language") - (description "Folders is a programming language, in which programs -are encoded as (nested) directories. Note that the switches you pass to -@command{du} may affect your score when code golfing.") - (properties `((lint-hidden-cpe-vendors . ("premio" "jenkins")))) + (description + "Folders is a programming language, in which programs are encoded as +(nested) directories. Note that the switches you pass to @command{du} may +affect your score when code golfing.") + (properties `((lint-hidden-cpe-vendors "premio" "jenkins"))) (license license:expat))) (define-public shakespeare-spl diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 5c51d9329d6..242477f5d4e 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -799,6 +799,11 @@ other machines/servers. Electrum does not download the Bitcoin blockchain.") (substitute* "electroncash/secp256k1.py" (("libsecp256k1.so.0") (search-input-file inputs "lib/libsecp256k1.so.0"))))) + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "contrib/requirements/requirements.txt" + (("python-dateutil<2\\.9") + "python-dateutil")))) (add-after 'install 'wrap-qt (lambda* (#:key outputs inputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 738f274324f..f265db356c2 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -13408,7 +13408,7 @@ virtual reality devices.") (list #:configure-flags #~(list "-DUSE_TESTS=ON" "-DOPENGL_BACKEND=OpenGL"))) - (native-inputs (list python-3.10 glibc-locales googletest)) + (native-inputs (list python glibc-locales googletest)) (inputs (list freetype libiconv libpng diff --git a/gnu/packages/gcal.scm b/gnu/packages/gcal.scm index 32d3849faaa..c9ac90055bd 100644 --- a/gnu/packages/gcal.scm +++ b/gnu/packages/gcal.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2018 Ludovic Courtès +;;; Copyright © 2025 Andy Tai ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,19 +21,22 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module (guix licenses)) + #:use-module (guix licenses) + #:use-module (gnu packages check) + #:use-module (gnu packages pkg-config)) + (define-public gcal (package (name "gcal") - (version "4.1") + (version "4.2.0") (source (origin (method url-fetch) - (uri (string-append "mirror://gnu/gcal/gcal-" + (uri (string-append "https://www.alteholz.dev/gnu/gcal-" version ".tar.xz")) (sha256 (base32 - "1av11zkfirbixn05hyq4xvilin0ncddfjqzc4zd9pviyp506rdci")) + "1p3q6his31bxs24nsgpfavw3nlhalqf0zak4f3b530p725s2vgfq")) (modules '((guix build utils))) (snippet '(begin @@ -50,6 +54,8 @@ "/* BSD stdio derived implementations"))) #t)))) (build-system gnu-build-system) + (native-inputs (list check pkg-config)) + (arguments `(#:configure-flags '("LDFLAGS=-lm"))) (home-page "https://www.gnu.org/software/gcal/") (synopsis "Calculating and printing a wide variety of calendars") (description diff --git a/gnu/packages/genealogy.scm b/gnu/packages/genealogy.scm index 668505a71a9..f244b5db6c9 100644 --- a/gnu/packages/genealogy.scm +++ b/gnu/packages/genealogy.scm @@ -18,9 +18,10 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages genealogy) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (gnu packages base) #:use-module (gnu packages bash) @@ -34,6 +35,7 @@ #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-xyz) #:use-module (gnu packages sqlite) #:use-module (gnu packages version-control) @@ -52,11 +54,48 @@ (file-name (git-file-name name version)) (sha256 (base32 "1gzhi5hxpgc6pxs40xsxf67hndjifnfhm89s3ly68c70x83qmwhd")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments + (list + #:imported-modules + `((guix build glib-or-gtk-build-system) + ,@%pyproject-build-system-modules) + #:modules + `((ice-9 match) + (srfi srfi-1) + (guix build pyproject-build-system) + ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'prepare-tests + (lambda _ + (setenv "HOME" (getenv "TMPDIR")) + ;; Presence of .git directory is used to determine whether this + ;; is a final installation. Without it, tests fail to determine + ;; resource path. + (mkdir ".git") + ;; Test is failing + (delete-file "gramps/gen/utils/test/file_test.py"))) + (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH + (lambda* (#:key inputs #:allow-other-keys) + (wrap-program (string-append #$output "/bin/gramps") + `("GI_TYPELIB_PATH" ":" prefix + ,(filter-map + (match-lambda + ((output . directory) + (let ((girepodir (string-append + directory + "/lib/girepository-1.0"))) + (and (file-exists? girepodir) + girepodir)))) + inputs))))) + (add-after 'wrap 'glib-or-gtk-wrap + (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) (native-inputs - `(("gettext" ,gettext-minimal) - ("intltool" ,intltool) - ("glibc-utf8-locales" ,glibc-utf8-locales))) ;; for one test + (list gettext-minimal intltool + glibc-utf8-locales ;for one test + python-setuptools)) (inputs (list bash-minimal cairo @@ -81,42 +120,6 @@ rcs sqlite xdg-utils)) - (arguments - `(#:imported-modules ((guix build glib-or-gtk-build-system) - ,@%python-build-system-modules) - #:modules ((ice-9 match) - (guix build python-build-system) - ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) - (guix build utils)) - #:phases - (modify-phases %standard-phases - (add-before 'check 'set-home-for-tests - (lambda _ - (setenv "HOME" (getenv "TMPDIR")))) - (add-before 'check 'prepare-tests - (lambda _ - ;; Presence of .git directory is used to determine whether this - ;; is a final installation. Without it, tests fail to determine - ;; resource path. - (mkdir ".git") - ;; Test is failing - (delete-file "gramps/gen/utils/test/file_test.py"))) - (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (paths (map (match-lambda - ((output . directory) - (let ((girepodir (string-append - directory - "/lib/girepository-1.0"))) - (if (file-exists? girepodir) - girepodir - #f)))) - inputs))) - (wrap-program (string-append out "/bin/gramps") - `("GI_TYPELIB_PATH" ":" prefix ,(filter identity paths)))))) - (add-after 'wrap 'glib-or-gtk-wrap - (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) (home-page "https://gramps-project.org") (synopsis "Genealogical research software") (description diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index b5b6a3b887b..ad45984a064 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -1189,7 +1189,20 @@ is not available for Guile 2.0.") (base32 "15ynxr3pfjscd6mz641zagv6i84jh9y65i5dnbb3j3q72j6bbvnb")) (patches '()))) - (arguments '()))) + (arguments + (if (target-aarch64?) + (list #:phases + #~(modify-phases %standard-phases + (add-before 'check 'disable-jit + (lambda _ + ;; XXX: Due to a JIT bug in Guile 3.0.9 on AArch64, + ;; some tests would hang: + ;; . + ;; Disable JIT for now; re-enable it when Guile 3.0.10+ + ;; is used. (Note: The Shepherd disables JIT on + ;; AArch64 so it can safely use Fibers.) + (setenv "GUILE_JIT_THRESHOLD" "-1"))))) + '())))) (define-public guile-fibers guile-fibers-1.4) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 773e3423f23..87a1649970b 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -502,7 +502,7 @@ without requiring the source code to be rewritten.") ;; The main goal here is to allow for '--with-branch'. (method git-fetch) (uri (git-reference - (url "https://git.savannah.gnu.org/git/guile.git") + (url "https://codeberg.org/guile/guile.git") (commit commit))) (file-name (git-file-name name version)) (sha256 diff --git a/gnu/packages/iso-codes.scm b/gnu/packages/iso-codes.scm index ad9b90a5641..000ea057b30 100644 --- a/gnu/packages/iso-codes.scm +++ b/gnu/packages/iso-codes.scm @@ -21,11 +21,11 @@ (define-module (gnu packages iso-codes) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) - #:use-module (guix build-system python) #:use-module (guix build-system pyproject) #:use-module (gnu packages check) #:use-module (gnu packages gettext) @@ -152,17 +152,42 @@ region, WIOD classification, ccTLD.") (version "0.4.5") (source (origin - (method url-fetch) - (uri (pypi-uri "iso-639" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/noumar/iso639") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 - "0jffmh4m20q8j27xb2fqbnlghjj0cx8pgsbzqisdg65qh2wd976w")))) - (build-system python-build-system) + (base32 "02kx6kr3x43linxqafjlx85zdk04s6ab2fv5ikyglghwr5hsvic4")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "tests/tests.py" + "-k" (string-join + (list + ;; module 'collections' has no attribute 'Iterable' + "not test_iter" + ;; 'Moroccan Arabic' != 'Arabic' + "test_logic_part2" + ;; 'Languages' object has no attribute 'indices' + "test_compare_alpha2" + "test_compare_bibliographic" + "test_compare_terminology") + " and not ")) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'configure-tests + (lambda _ + (setenv "PYTHONPATH" + (string-append (getcwd) ":" + (getenv "GUIX_PYTHONPATH")))))))) + (native-inputs (list python-pycountry python-pytest python-setuptools)) (home-page "https://github.com/noumar/iso639") (synopsis "Python library for ISO 639 standard") - (description "This package provides a Python library for ISO 639 standard -that is concerned with representation of names for languages and language -groups.") + (description + "This package provides a Python library for ISO 639 standard that is +concerned with representation of names for languages and language groups.") (license license:agpl3+))) (define-public python-iso3166 @@ -171,13 +196,64 @@ groups.") (version "2.1.1") (source (origin - (method url-fetch) - (uri (pypi-uri "iso3166" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/deactivated/python-iso3166") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "068p94gavc8gbmp5a2kw8hi5l551wfzbpmp6z7ll8sx6vnw53mgw")))) - (build-system python-build-system) + (base32 "0j0bnm4bd23cyb7dga00gb20myg9skylchkw4d23yh31b7a315m8")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/deactivated/python-iso3166") (synopsis "Self-contained ISO 3166-1 country definitions") (description "This package provides the ISO 3166-1 country definitions.") (license license:expat))) + +(define-public python-pycountry + (package + (name "python-pycountry") + (version "24.6.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pycountry/pycountry") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0qs99acz1vsj96s8pcwbnp3z3s01mzzvdayk7fm0nnl6lf3lz1g1")))) + (build-system pyproject-build-system) + (native-inputs (list python-poetry-core python-pytest python-pytest-cov)) + (home-page "https://github.com/pycountry/pycountry") + (synopsis "ISO databases for languages, countries, currencies, etc.") + (description + "@code{pycountry} provides the ISO databases for the standards: + @enumerate + @item 639-3 (Languages) + @item 3166 (Countries) + @item 3166-3 (Deleted Countries) + @item 3166-2 (Subdivisions of countries) + @item 4217 (Currencies) + @item 15924 (Scripts) + @end enumerate + It includes a copy from Debian’s pkg-isocodes and makes the data accessible + through a Python API.") + (license license:lgpl2.1+))) + +(define-public python-pycountry-20.7.3 + (hidden-package + (package + (inherit python-pycountry) + (name "python-pycountry") + (version "20.7.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pycountry/pycountry") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1aqzbdqvy3pg0x33ay099vriazs28v6kw7fwc8ajg3avdcws2mgm")))) + (native-inputs (list python-pytest python-pytest-cov python-setuptools))))) diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm index 4d70a9b276d..e1ccfdcb818 100644 --- a/gnu/packages/kde-frameworks.scm +++ b/gnu/packages/kde-frameworks.scm @@ -77,7 +77,6 @@ #:use-module (gnu packages libcanberra) #:use-module (gnu packages linux) #:use-module (gnu packages mp3) - #:use-module (gnu packages openbox) #:use-module (gnu packages pdf) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) @@ -96,6 +95,7 @@ #:use-module (gnu packages video) #:use-module (gnu packages vulkan) #:use-module (gnu packages web) + #:use-module (gnu packages wm) #:use-module (gnu packages xml) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm index 82bca77dd71..8229c7e7306 100644 --- a/gnu/packages/lean.scm +++ b/gnu/packages/lean.scm @@ -24,11 +24,12 @@ #:use-module (ice-9 match) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages check) #:use-module (gnu packages llvm) #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) #:use-module (guix build-system cmake) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix gexp) #:use-module (guix packages) @@ -165,18 +166,33 @@ interactive and automated theorem proving.") (package (name "python-mathlibtools") (version "1.1.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "mathlibtools" version)) - (sha256 - (base32 - "089pql105imx8z7ar1wiz9fn000jp6xqdfixw4jf2vric94vn9fj")))) - (build-system python-build-system) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/leanprover-community/mathlib-tools") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1kllk99cd9vsbmb0ifi21gkhrg2w803z4y5xhx0a7hx3viyjb3cv")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-before 'check 'fix-home-directory - (lambda _ - (setenv "HOME" "/tmp")))))) + (list + #:test-flags + #~(list "-k" + ;; These tests require network access. + (string-join (list "not test_new" + "test_add" + "test_upgrade_project" + "test_upgrade_mathlib" + "test_get_tutorials") + " and not ")) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'fix-home-directory + (lambda _ + (setenv "HOME" "/tmp")))))) + (native-inputs (list python-pytest python-setuptools)) (inputs (list python-toml python-pygithub python-certifi diff --git a/gnu/packages/libcanberra.scm b/gnu/packages/libcanberra.scm index cf38ac113e9..52616572fae 100644 --- a/gnu/packages/libcanberra.scm +++ b/gnu/packages/libcanberra.scm @@ -26,7 +26,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (gnu packages autotools) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) @@ -34,6 +34,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python-build) #:use-module (gnu packages xiph)) (define-public libcanberra @@ -133,15 +134,13 @@ sounds for various system events.") (uri (string-append "http://ftp.n0.is/pub/releases/" "pycanberra-" version ".tar.xz")) (sha256 - (base32 - "16jjf8fcgaprmz6jacsxrh17l1ad891fns38bxv49lg3s3mn1nj2")))) - (build-system python-build-system) - (arguments - `(#:tests? #f)) ;No tests included. - (propagated-inputs - (list libcanberra)) + (base32 "16jjf8fcgaprmz6jacsxrh17l1ad891fns38bxv49lg3s3mn1nj2")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;No tests included. + (native-inputs (list python-setuptools)) + (propagated-inputs (list libcanberra)) + (home-page "https://github.com/totdb/pycanberra") (synopsis "Ctypes wrapper for the libcanberra API") (description "Pycanberra is a basic Python wrapper for libcanberra.") - (home-page "http://c.n0.is/ng0/pycanberra/") (license lgpl2.1+))) diff --git a/gnu/packages/lxde.scm b/gnu/packages/lxde.scm index ba1c1374ef0..3aeb2a5321a 100644 --- a/gnu/packages/lxde.scm +++ b/gnu/packages/lxde.scm @@ -47,7 +47,6 @@ #:use-module (gnu packages libusb) #:use-module (gnu packages linux) #:use-module (gnu packages lsof) - #:use-module (gnu packages openbox) #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) #:use-module (gnu packages polkit) diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm index 634a2f58492..03ec37101a5 100644 --- a/gnu/packages/lxqt.scm +++ b/gnu/packages/lxqt.scm @@ -57,7 +57,6 @@ #:use-module (gnu packages perl) #:use-module (gnu packages lxde) #:use-module (gnu packages maths) - #:use-module (gnu packages openbox) #:use-module (gnu packages pcre) #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) @@ -65,6 +64,7 @@ #:use-module (gnu packages pulseaudio) #:use-module (gnu packages qt) #:use-module (gnu packages textutils) + #:use-module (gnu packages wm) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index e04525b3d6d..8e8b4c9d088 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -6121,12 +6121,14 @@ simple speech recognition.") (build-system pyproject-build-system) (arguments (list + #:test-backend #~'custom + #:test-flags #~(list "../../tests/from_words_to_digits.py") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'chdir (lambda _ (chdir "package/python")))))) - (native-inputs (list python-setuptools python-wheel)) + (native-inputs (list python-setuptools)) (propagated-inputs (list python-vosk)) (home-page "https://github.com/ideasman42/nerd-dictation") (synopsis "Offline speech-to-text for desktop Linux") diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index fba7b9e08d0..a0d32ff2656 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -4353,16 +4353,16 @@ It is a replacement for the @command{urlview} program.") (define-public mumi (package (name "mumi") - (version "0.13.0") + (version "0.14.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://git.savannah.gnu.org/git/guix/mumi.git/") + (url "https://codeberg.org/guix/mumi.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 - "04mcd1xkdpvxlvpf4k4mvnwi06sdy8vy1di6gxxsr9msgdb366ir")))) + "1v5gjzh8idz926518c0bv0qsmyggr6lvqn5vksf5j0qdh6r6dar7")))) (build-system gnu-build-system) (arguments (list @@ -4743,11 +4743,15 @@ the RFC 8617 Authenticated Received Chain (ARC) protocol.") (base32 "12hl93336w64iyqalpv4rma2ijigav68qy1xmgziibdi7inxr3hi")))) (build-system pyproject-build-system) + (arguments + (list + ;; dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf + #:test-flags #~(list "-k" "not test_authenticate_dmarc_psdsub"))) (propagated-inputs (list python-authres python-dkimpy python-dnspython python-publicsuffix2)) (native-inputs - (list python-setuptools python-wheel)) + (list python-pytest python-setuptools)) (home-page "https://github.com/ValiMail/authentication-headers") (synopsis "Library wrapping email authentication header verification and generation") (description @@ -4760,38 +4764,40 @@ DKIM and ARC sign messages and output the corresponding signature headers.") (license (list license:zpl2.1 license:zlib license:mpl2.0)))) (define-public python-aiosmtpd - (package - (name "python-aiosmtpd") - (version "1.4.6") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/aio-libs/aiosmtpd") - (commit (string-append "v" version)))) - (sha256 - (base32 "0b5y94zc8pq75sjwsifblzgjnliyclkwypi68b2zffrxcdnz27r2")) - (file-name (git-file-name name version)))) - (build-system pyproject-build-system) - (arguments - ;; This QA test requires git. - (list #:test-flags ''("-k" "not test_ge_master"))) - (native-inputs - (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/") - (synopsis "Asyncio based SMTP server") - (description - "This project is a reimplementation of the Python stdlib @code{smtpd.py} + ;; Tests run fixed on not yet released version. + (let ((commit "98f578389ae86e5345cc343fa4e5a17b21d9c96d") + (revision "0")) + (package + (name "python-aiosmtpd") + (version (git-version "1.4.6" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/aio-libs/aiosmtpd") + (commit commit))) + (sha256 + (base32 "1pmvlzxfcqjplvn2bzi9jd3m3941ff7nlgxxfwc7pzhmazlkqf8z")) + (file-name (git-file-name name version)))) + (build-system pyproject-build-system) + (arguments + ;; This QA test requires git. + (list #:test-flags ''("-k" "not test_ge_master"))) + (native-inputs + (list python-pytest + python-pytest-cov + python-pytest-mock + python-setuptools)) + (propagated-inputs + (list python-atpublic + python-attrs)) + (home-page "https://aiosmtpd.readthedocs.io/") + (synopsis "Asyncio based SMTP server") + (description + "This project is a reimplementation of the Python stdlib @code{smtpd.py} based on asyncio.") - (license (list license:asl2.0 - license:lgpl3)))) ; only for setup_helpers.py + (license (list license:asl2.0 + license:lgpl3))))) ; only for setup_helpers.py (define-public python-imaplib2 (package diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 1cd0865263a..82d878592ac 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -11316,8 +11316,12 @@ the Wolfram language.") (sha256 (base32 "1iagdic8f0yjx01kdds40jfcxcpdbrd3i0ywydl01dhyyvd2yjk9")))) (build-system pyproject-build-system) - (propagated-inputs (list python-mathics-scanner python-pygments)) - (native-inputs (list python-setuptools python-wheel)) + (native-inputs + (list python-pytest + python-setuptools)) + (propagated-inputs + (list python-mathics-scanner + python-pygments)) (home-page "http://github.com/Mathics3/mathics-pygments/") (synopsis "Wolfram language lexer for Pygments") (description "This package provides a Wolfram language lexer for Pygments.") diff --git a/gnu/packages/medical.scm b/gnu/packages/medical.scm index a9cffacdd9b..8c32731d899 100644 --- a/gnu/packages/medical.scm +++ b/gnu/packages/medical.scm @@ -65,28 +65,32 @@ (package (name "mygnuhealth") (version "2.2.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "MyGNUHealth" version)) - (sha256 - (base32 - "1jcrriccqzb4jx7zayhiqmpvi3cvfy3bbf9zr3m83878f94yww8j")))) - (build-system python-build-system) + (source + (origin + (method url-fetch) + (uri (pypi-uri "MyGNUHealth" version)) + (sha256 + (base32 "1jcrriccqzb4jx7zayhiqmpvi3cvfy3bbf9zr3m83878f94yww8j")))) + (build-system pyproject-build-system) (arguments (list - #:imported-modules `(,@%python-build-system-modules - ,@%qt-build-system-modules) - #:modules `(((guix build qt-build-system) #:prefix qt:) - (guix build python-build-system) - (guix build utils)) - #:phases #~(modify-phases %standard-phases - (add-after 'install 'qt-wrap - (assoc-ref qt:%standard-phases 'qt-wrap)) - (add-before 'check 'env-setup - (lambda _ - (mkdir-p "/tmp/mygh/") - (setenv "HOME" "/tmp")))))) - (native-inputs (list python-pyside-2)) + #:tests? #f ; no tests. + #:imported-modules + `(,@%pyproject-build-system-modules + ,@%qt-build-system-modules) + #:modules + `(((guix build qt-build-system) #:prefix qt:) + (guix build pyproject-build-system) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'qt-wrap + (assoc-ref qt:%standard-phases 'qt-wrap)) + (add-before 'check 'env-setup + (lambda _ + (mkdir-p "/tmp/mygh/") + (setenv "HOME" "/tmp")))))) + (native-inputs (list python-pyside-2 python-setuptools)) (inputs (list bash-minimal kirigami-5 python diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 26ea6d55fe7..1b9d6d2cbde 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -3611,21 +3611,24 @@ for notification of events.") (license license:gpl3+))) (define-public python-harmony + ;; TODO: Remove python-harmony? Repository is archived. (package (name "python-harmony") - (version "0.7.1") + (version "0.7.2") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/taylordotfish/harmony.git") + (url "https://github.com/taylordotfish/harmony") (commit version))) - (file-name (string-append name "-" version "-checkout")) + (file-name (git-file-name name version)) (sha256 (base32 - "1bm9xcnzpnpj6rlhbrnl2abwclzl7ivgh1vb5644y9mnhcs489js")))) - (build-system python-build-system) + "1d202pymabzvkzmxpplyjv55x74g937abxmnxdg9bxjjvp85c1nv")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;no tests in repository (native-inputs - (list python-tox)) + (list python-setuptools)) (inputs (list python-librecaptcha python-keyring python-requests)) (synopsis "Discord account management") diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index 30d0eac330d..ea5cc62b396 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -36,7 +36,7 @@ #:use-module (guix deprecation) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages bash) @@ -62,6 +62,8 @@ #:use-module (gnu packages parallel) #: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 ssh) #:use-module (gnu packages valgrind) #:use-module (gnu packages version-control) @@ -528,36 +530,48 @@ only provides @code{MPI_THREAD_FUNNELED}."))) (define-public python-mpi4py (package (name "python-mpi4py") - (version "3.1.4") + (version "4.1.0") (source (origin - (method url-fetch) - (uri (pypi-uri "mpi4py" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/mpi4py/mpi4py") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "101lz7bnm9l17nrkbg6497kxscyh53aah7qd2b820ck2php8z18p")))) - (build-system python-build-system) + (base32 "1r4n2d3nacpa6sq18jp0xk4a81ha0iipgvlsdv0bhfmdvgpv2vqy")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'build 'mpi-setup - ,%openmpi-setup) - (add-before 'check 'pre-check - (lambda _ - ;; Skip BaseTestSpawn class (causes error 'ompi_dpm_dyn_init() - ;; failed --> Returned "Unreachable"' in chroot environment). - (substitute* "test/test_spawn.py" - (("unittest.skipMPI\\('openmpi\\(<3.0.0\\)'\\)") - "unittest.skipMPI('openmpi')")) - #t))))) - (inputs - (list openmpi)) - (properties - '((updater-extra-inputs . ("openmpi")))) + (list + #:test-flags + #~(list ;; MPI errors are unrecoverable. + "--ignore=test/test_spawn.py" + "--ignore=test/test_util_pool.py" + "--ignore=demo/futures/test_futures.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'build 'mpi-setup #$%openmpi-setup) + (add-before 'check 'pre-check + (lambda _ + ;; Skip BaseTestSpawn class (causes error 'ompi_dpm_dyn_init() + ;; failed --> Returned "Unreachable"' in chroot environment). + (substitute* "test/test_spawn.py" + (("unittest.skipMPI\\('openmpi\\(<3.0.0\\)'\\)") + "unittest.skipMPI('openmpi')")))) + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (if tests? + (apply invoke "mpiexec" "pytest" "-vv" test-flags) + (format #t "test suite not run~%"))))))) + (native-inputs (list python-cython python-pytest python-setuptools)) + (inputs (list openmpi)) + (properties '((updater-extra-inputs "openmpi"))) (home-page "https://github.com/mpi4py/mpi4py") (synopsis "Python bindings for the Message Passing Interface standard") - (description "MPI for Python (mpi4py) provides bindings of the Message -Passing Interface (MPI) standard for the Python programming language, allowing -any Python program to exploit multiple processors. + (description + "MPI for Python (mpi4py) provides bindings of the Message Passing +Interface (MPI) standard for the Python programming language, allowing any +Python program to exploit multiple processors. mpi4py is constructed on top of the MPI-1/MPI-2 specification and provides an object oriented interface which closely follows MPI-2 C++ bindings. It diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 5e7b7015a05..763c21b7933 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -154,6 +154,7 @@ #:use-module (gnu packages image) #:use-module (gnu packages image-viewers) #:use-module (gnu packages imagemagick) + #:use-module (gnu packages iso-codes) #:use-module (gnu packages java) #:use-module (gnu packages kde-frameworks) #:use-module (gnu packages libevent) @@ -4206,8 +4207,8 @@ websites such as Libre.fm.") (license license:asl2.0))) (define-public instantmusic - (let ((commit "300891d09c703525215fa5a116b9294af1c923c8") - (revision "1")) + (let ((commit "0477dd310e0aeb11d4d113bb96baa40d824cc330") + (revision "2")) (package (name "instantmusic") (version (git-version "1.0" revision commit)) @@ -4219,10 +4220,11 @@ websites such as Libre.fm.") (file-name (git-file-name name version)) (sha256 (base32 - "0j7qivaa04bpdz3anmgci5833dgiyfqqwq9fdrpl9m68b34gl773")))) + "0pxp1h0q4j7bidgdh4wgrvnm4ckdr4bvgk1wccr02mynfsjq8x5c")))) (build-system pyproject-build-system) (arguments (list + #:tests? #f ;no tests #:phases #~(modify-phases %standard-phases (add-before 'build 'change-directory @@ -4243,7 +4245,7 @@ websites such as Libre.fm.") (chmod file #o644)) (find-files "instantmusic.egg-info" "PKG-INFO|.*\\.txt"))))))) - (native-inputs (list python-setuptools python-wheel)) + (native-inputs (list python-setuptools)) (inputs (list yt-dlp)) (propagated-inputs (list python-requests eyed3 python-beautifulsoup4)) (home-page "https://github.com/yask123/Instant-Music-Downloader") diff --git a/gnu/packages/nicotine.scm b/gnu/packages/nicotine.scm index ff6676c4a1d..56c6b6a3116 100644 --- a/gnu/packages/nicotine.scm +++ b/gnu/packages/nicotine.scm @@ -23,7 +23,7 @@ #:use-module (guix packages) #:use-module (guix gexp) #:use-module (guix git-download) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (gnu packages bash) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) @@ -31,6 +31,7 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages gtk) #:use-module (gnu packages mp3) + #:use-module (gnu packages python-build) #:use-module (gnu packages xorg)) (define-public nicotine+ @@ -45,43 +46,42 @@ (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0xj7hlhgirgjyfmdchksvwhjhaqaf5n84brzih6fqlbsrr9gxkw9")) - (modules '((guix build utils))) - ;; Remove test that relies on network access. - (snippet '(delete-file-recursively - "pynicotine/tests/unit/test_version.py")))) - (build-system python-build-system) + (base32 "0xj7hlhgirgjyfmdchksvwhjhaqaf5n84brzih6fqlbsrr9gxkw9")))) + (build-system pyproject-build-system) (arguments (list - #:imported-modules `((guix build glib-or-gtk-build-system) - ,@%python-build-system-modules) - #:modules `((guix build utils) - (guix build python-build-system) - ((guix build glib-or-gtk-build-system) - #:prefix glib-or-gtk:)) - #:phases #~(modify-phases %standard-phases - (add-after 'install 'wrap-program - (lambda _ - (wrap-program (string-append #$output "/bin/nicotine") - `("GI_TYPELIB_PATH" ":" prefix - (,(getenv "GI_TYPELIB_PATH")))))) - (add-after 'wrap-program 'glib-or-gtk-wrap - (assoc-ref glib-or-gtk:%standard-phases - 'glib-or-gtk-wrap)) - (add-after 'glib-or-gtk-wrap 'glib-or-gtk-compile-schemas - (assoc-ref glib-or-gtk:%standard-phases - 'glib-or-gtk-compile-schemas)) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "xvfb-run" "python" "-m" "unittest"))))))) + #:imported-modules + `((guix build glib-or-gtk-build-system) + ,@%pyproject-build-system-modules) + #:modules + `((guix build utils) + (guix build pyproject-build-system) + ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'wrap-program + (lambda _ + (wrap-program (string-append #$output "/bin/nicotine") + `("GI_TYPELIB_PATH" ":" prefix + (,(getenv "GI_TYPELIB_PATH")))))) + (add-after 'wrap-program 'glib-or-gtk-wrap + (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)) + (add-after 'glib-or-gtk-wrap 'glib-or-gtk-compile-schemas + (assoc-ref glib-or-gtk:%standard-phases + 'glib-or-gtk-compile-schemas)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Remove test that relies on network access. + (delete-file "pynicotine/tests/unit/test_version.py") + (invoke "xvfb-run" "python" "-m" "unittest"))))))) (inputs (list bash-minimal gspell gtk python-pygobject libappindicator python-pytaglib)) - (native-inputs (list gettext-minimal xvfb-run)) + (native-inputs (list gettext-minimal python-setuptools xvfb-run)) (home-page "https://nicotine-plus.org/") (synopsis "Graphical client for Soulseek") (description diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index a8410be78b7..8e9fe03a41e 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -1470,14 +1470,15 @@ Knuth’s LR(1) parser construction technique.") (wrap-program (string-append #$output "/bin/" "binsec") `("OCAMLPATH" ":" prefix ,ocamlpath)))))))) (inputs (list bash-minimal)) - (native-inputs (list gmp ocaml-qcheck ocaml-ounit2)) + (native-inputs (list gmp ocaml-qcheck ocaml-ounit2 z3)) (propagated-inputs (list dune-site ocaml-base ocaml-menhir ocaml-graph ocaml-zarith ocaml-grain-dypgen - ocaml-toml)) + ocaml-toml + ocaml-z3)) (synopsis "Binary-level analysis platform") (description "BINSEC is a binary analysis platform which implements analysis diff --git a/gnu/packages/openbox.scm b/gnu/packages/openbox.scm deleted file mode 100644 index 08ce89b5476..00000000000 --- a/gnu/packages/openbox.scm +++ /dev/null @@ -1,120 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Julien Lepiller -;;; Copyright © 2016, 2023 Efraim Flashner -;;; Copyright © 2017 Nikita -;;; Copyright © 2022 Maxim Cournoyer -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (gnu packages openbox) - #:use-module ((guix licenses) #:select (gpl2+)) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix utils) - #:use-module (guix build-system gnu) - #:use-module (guix gexp) - #:use-module (gnu packages) - #:use-module (gnu packages autotools) - #:use-module (gnu packages freedesktop) - #:use-module (gnu packages gettext) - #:use-module (gnu packages gnome) - #:use-module (gnu packages gtk) - #:use-module (gnu packages image) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages python) - #:use-module (gnu packages xdisorg) - #:use-module (gnu packages xml) - #:use-module (gnu packages xorg)) - -(define-public openbox - (package - (name "openbox") - (version "3.6.1") - (source (origin - (method url-fetch) - (uri (string-append - "http://openbox.org/dist/openbox/" name "-" - version ".tar.xz")) - (sha256 - (base32 - "0vg2y1qddsdxkjv806mzpvmkgzliab8ll4s7zm7ma5jnriamirxb")) - (patches (search-patches "openbox-add-fix-for-glib2-exposed-segfault.patch" "openbox-python3.patch")))) - (build-system gnu-build-system) - (arguments - (list #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'force-reconfigure - ;; This is made necessary by the openbox-python3 patch. - (lambda _ - (delete-file "configure")))))) - (native-inputs (list autoconf automake gettext-minimal libtool pkg-config)) - (propagated-inputs (list python-pyxdg)) - (inputs (list imlib2 - libxml2 - (librsvg-for-system) - libsm - libxcursor - libxinerama - libxml2 - libxrandr - libxft - pango - python-wrapper)) - (synopsis "Box style window manager") - (description - "Openbox is a highly configurable, next generation window manager with -extensive standards support. The *box visual style is well known for its -minimalistic appearance. Openbox uses the *box visual style, while providing -a greater number of options for theme developers than previous *box -implementations.") - (home-page "http://openbox.org/wiki/Main_Page") - (license gpl2+))) - -(define-public obconf - (package - (name "obconf") - (version "2.0.4") - (source - (origin - (method url-fetch) - (uri (string-append "http://openbox.org/dist/" name - "/" name "-" version ".tar.gz")) - (sha256 - (base32 - "1fanjdmd8727kk74x5404vi8v7s4kpq48l583d12fsi4xvsfb8vi")))) - (inputs (list gtk+-2 - imlib2 - libglade - libsm - librsvg - libxft - openbox - startup-notification)) - (native-inputs (list gettext-minimal pkg-config)) - (build-system gnu-build-system) - (arguments - (list - #:configure-flags - #~(list "--enable-nls" - "CFLAGS=-g -O2 -Wno-error=implicit-function-declaration"))) - (home-page "https://openbox.org/obconf") - (synopsis "Openbox configuration tool") - (description - "Obconf is a tool for configuring the Openbox window manager. -You can configure its appearance, themes, and much more.") - (license gpl2+))) - -;;; openbox.scm ends here diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 4fa251d6294..9b0c4f1857d 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -1931,7 +1931,7 @@ This package just includes the agent component."))) (define-public guix-jupyter (package (name "guix-jupyter") - (version "0.3.0") + (version "0.3.1") (home-page "https://codeberg.org/guix-science/guix-jupyter") (source (origin (method git-fetch) @@ -1939,7 +1939,7 @@ This package just includes the agent component."))) (commit (string-append "v" version)))) (sha256 (base32 - "0cvjxv60la2bqmwb7m2bfpvjy8hx1hmjk2qy9wfzaffcabgr0x44")) + "1yvrmaj4qcb9vn2nfjz1q0cil830hvmxpp8cgi76aylbnv36aask")) (file-name (string-append "guix-jupyter-" version "-checkout")))) (build-system gnu-build-system) (arguments diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index 511f8bfead6..540b85b41aa 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -35,7 +35,7 @@ #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system meson) #:use-module (guix build-system ocaml) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages base) @@ -367,40 +367,37 @@ you to figure out what is going on in that merge you keep avoiding.") (package (name "patchwork") (version "3.2.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/getpatchwork/patchwork") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "04ikawdyhjwspxvhazbp5f5vym672y0jcw8rd2m75h9ipcpnyxim")))) - (build-system python-build-system) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/getpatchwork/patchwork") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "04ikawdyhjwspxvhazbp5f5vym672y0jcw8rd2m75h9ipcpnyxim")))) + (build-system pyproject-build-system) (arguments - `(;; TODO: Tests require a running database - #:tests? #f - #:phases - (modify-phases %standard-phases - (delete 'configure) - (delete 'build) - (add-after 'unpack 'replace-wsgi.py - (lambda* (#:key inputs outputs #:allow-other-keys) - (delete-file "patchwork/wsgi.py") - (call-with-output-file "patchwork/wsgi.py" - (lambda (port) - ;; Embed the PYTHONPATH containing the dependencies, as well - ;; as the python modules in this package in the wsgi.py file, - ;; as this will ensure they are available at runtime. - (define pythonpath - (string-append (getenv "GUIX_PYTHONPATH") - ":" - (site-packages inputs outputs))) - (display - (string-append " -import os, sys - -sys.path.extend('" pythonpath "'.split(':')) + (list + #:tests? #f ;TODO: Tests require a running database + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (add-after 'unpack 'replace-wsgi.py + (lambda* (#:key inputs outputs #:allow-other-keys) + (delete-file "patchwork/wsgi.py") + (call-with-output-file "patchwork/wsgi.py" + (lambda (port) + ;; Embed the PYTHONPATH containing the dependencies, as well + ;; as the python modules in this package in the wsgi.py file, + ;; as this will ensure they are available at runtime. + (define pythonpath + (string-append (getenv "GUIX_PYTHONPATH") ":" + (site-packages inputs outputs))) + (display (string-append + "\nimport os, sys\n\nsys.path.extend('" pythonpath + "'.split(':')) from django.core.wsgi import get_wsgi_application @@ -415,89 +412,88 @@ os.environ['DJANGO_SETTINGS_MODULE'] = os.getenv( ) application = get_wsgi_application()\n") port))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "DJANGO_SETTINGS_MODULE" "patchwork.settings.dev") - (invoke "python" "-Wonce" "./manage.py" "test" "--noinput")) - #t)) - (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (out-site-packages (site-packages inputs outputs))) - (for-each (lambda (directory) - (copy-recursively - directory - (string-append out-site-packages "/" directory))) - '(;; Contains the python code - "patchwork" - ;; Contains the templates for the generated HTML - "templates")) - (delete-file-recursively - (string-append out-site-packages "/patchwork/tests")) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "DJANGO_SETTINGS_MODULE" "patchwork.settings.dev") + (invoke "python" "-Wonce" "./manage.py" "test" "--noinput")))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (out-site-packages (site-packages inputs outputs))) + (for-each (lambda (directory) + (copy-recursively directory + (string-append out-site-packages + "/" directory))) + '( ;Contains the python code + "patchwork" + ;; Contains the templates for the generated HTML + "templates")) + (delete-file-recursively (string-append out-site-packages + "/patchwork/tests")) - ;; Install patchwork related tools - (for-each (lambda (file) - (install-file file (string-append out "/bin"))) - (list - (string-append out-site-packages - "/patchwork/bin/parsemail.sh") - (string-append out-site-packages - "/patchwork/bin/parsemail-batch.sh"))) + ;; Install patchwork related tools + (for-each (lambda (file) + (install-file file + (string-append out "/bin"))) + (list (string-append out-site-packages + "/patchwork/bin/parsemail.sh") + (string-append out-site-packages + "/patchwork/bin/parsemail-batch.sh"))) - ;; Collect the static assets, this includes JavaScript, CSS and - ;; fonts. This is a standard Django process when running a - ;; Django application for regular use, and includes assets for - ;; dependencies like the admin site from Django. - ;; - ;; The intent here is that you can serve files from this - ;; directory through a webserver, which is recommended when - ;; running Django applications. - (let ((static-root - (string-append out "/share/patchwork/htdocs"))) - (mkdir-p static-root) - (copy-file "patchwork/settings/production.example.py" - "patchwork/settings/assets.py") - (setenv "DJANGO_SECRET_KEY" "dummyvalue") - (setenv "DJANGO_SETTINGS_MODULE" "patchwork.settings.assets") - (setenv "STATIC_ROOT" static-root) - (invoke "./manage.py" "collectstatic" "--no-input")) + ;; Collect the static assets, this includes JavaScript, CSS and + ;; fonts. This is a standard Django process when running a + ;; Django application for regular use, and includes assets for + ;; dependencies like the admin site from Django. + ;; + ;; The intent here is that you can serve files from this + ;; directory through a webserver, which is recommended when + ;; running Django applications. + (let ((static-root (string-append out + "/share/patchwork/htdocs"))) + (mkdir-p static-root) + (copy-file "patchwork/settings/production.example.py" + "patchwork/settings/assets.py") + (setenv "DJANGO_SECRET_KEY" "dummyvalue") + (setenv "DJANGO_SETTINGS_MODULE" "patchwork.settings.assets") + (setenv "STATIC_ROOT" static-root) + (invoke "./manage.py" "collectstatic" "--no-input")) - ;; The lib directory includes example configuration files that - ;; may be useful when deploying patchwork. - (copy-recursively "lib" - (string-append - out "/share/doc/" ,name "-" ,version))) - #t)) - ;; The hasher script is used from the post-receive.hook - (add-after 'install 'install-hasher - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (out-site-packages (site-packages inputs outputs)) - (out-hasher.py (string-append out-site-packages - "/patchwork/hasher.py"))) - (chmod out-hasher.py #o555) - (symlink out-hasher.py (string-append out "/bin/hasher"))) - #t)) - ;; Create a patchwork specific version of Django's command line admin - ;; utility. - (add-after 'install 'install-patchwork-admin - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out"))) - (mkdir-p (string-append out "/bin")) - (call-with-output-file (string-append out "/bin/patchwork-admin") - (lambda (port) - (simple-format port "#!~A + ;; The lib directory includes example configuration files that + ;; may be useful when deploying patchwork. + (copy-recursively "lib" + (string-append out "/share/doc/" + #$name "-" + #$version))))) + ;; The hasher script is used from the post-receive.hook + (add-after 'install 'install-hasher + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-site-packages (site-packages inputs outputs)) + (out-hasher.py (string-append out-site-packages + "/patchwork/hasher.py"))) + (chmod out-hasher.py #o555) + (symlink out-hasher.py + (string-append out "/bin/hasher"))))) + ;; Create a patchwork specific version of Django's command line admin + ;; utility. + (add-after 'install 'install-patchwork-admin + (lambda _ + (mkdir-p (string-append #$output "/bin")) + (call-with-output-file (string-append #$output + "/bin/patchwork-admin") + (lambda (port) + (simple-format port "#!~A import os, sys if __name__ == \"__main__\": from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)" (which "python")))) - (chmod (string-append out "/bin/patchwork-admin") #o555)) - #t))))) - (inputs - (list python-wrapper)) + (chmod (string-append #$output "/bin/patchwork-admin") + #o555)))))) + (native-inputs (list python-setuptools)) + (inputs (list python-wrapper)) (propagated-inputs (list python-django ;; TODO: Make this configurable @@ -553,47 +549,34 @@ patches do not match perfectly.") (package (name "pwclient") (version "1.3.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/getpatchwork/pwclient") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1xckwvcqklzpyh3xs4k2zm40ifp0q5fdkj2vmgb8vhfvl1ivs6jv")))) - (build-system python-build-system) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/getpatchwork/pwclient") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1xckwvcqklzpyh3xs4k2zm40ifp0q5fdkj2vmgb8vhfvl1ivs6jv")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-requirements - (lambda _ - (substitute* "test-requirements.txt" - ;; The pytest requirement is unnecessarily strict - (("pytest>=3.0,<5.0;") - "pytest>=3.0,<6.0;")) - #t)) - (add-before 'build 'set-PBR_VERSION - (lambda _ - (setenv "PBR_VERSION" - ,version) - #t)) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest")) - #t)) - (add-after 'install 'install-man-page - (lambda* (#:key outputs #:allow-other-keys) - (install-file "man/pwclient.1" - (string-append - (assoc-ref outputs "out") - "/share/man/man1")) - #t))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'set-PBR_VERSION + (lambda _ + (setenv "PBR_VERSION" #$version))) + (add-after 'install 'install-man-page + (lambda _ + (install-file "man/pwclient.1" + (string-append #$output "/share/man/man1"))))))) (native-inputs - (list python-pbr python-pytest python-pytest-cov python-mock)) - (home-page - "https://github.com/getpatchwork/pwclient") + (list python-pbr + python-pytest + python-pytest-cov + python-mock + python-setuptools)) + (home-page "https://github.com/getpatchwork/pwclient") (synopsis "Command-line client for the Patchwork patch tracking tool") (description "pwclient is a VCS-agnostic tool for interacting with Patchwork, the diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index c6d5f42aa5b..6404da5d51b 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -185,7 +185,7 @@ it.") (define-public trealla (package (name "trealla") - (version "2.83.8") + (version "2.83.11") (source (origin (method git-fetch) @@ -194,7 +194,7 @@ it.") (url "https://github.com/trealla-prolog/trealla") (commit (string-append "v" version)))) (sha256 - (base32 "1bpfzrwsgbmjl1maiaw5b8ixkgh548gw1lkiznsjgkjm7dxr4ns4")) + (base32 "00kbcq9mzxqm3hgfgbxjblb733lzy1hvfwnf73a5gxnfdbqhr5dz")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index c95596dd4d6..e40b92f5083 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -1,8 +1,11 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015 Cyril Roelandt +;;; Copyright © 2015, 2017 Cyril Roelandt ;;; Copyright © 2015, 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2016-2022 Marius Bakke +;;; Copyright © 2016 宋文武 ;;; Copyright © 2017 Muriithi Frederick Muriuki +;;; Copyright © 2017 Thomas Danckaert +;;; Copyright © 2018 Fis Trivial ;;; Copyright © 2018-2020 Tobias Geerinckx-Rice ;;; Copyright © 2019-2025 Ricardo Wurmus ;;; Copyright © 2019-2024 Maxim Cournoyer @@ -23,6 +26,7 @@ ;;; Copyright © 2022 Tomasz Jeneralczyk ;;; Copyright © 2022 jgart ;;; Copyright © 2023 John Kehayias +;;; Copyright © 2024 Danny Milosavljevic ;;; Copyright © 2024-2025 Troy Figiel ;;; Copyright © 2024 Navid Afkhami ;;; Copyright © 2024, 2025 David Elsing @@ -226,6 +230,38 @@ the implementation of that name.") (license (list license:asl2.0 license:lgpl3)))) ; only for setup_helpers.py +(define-public python-autopep8 + (package + (name "python-autopep8") + (version "2.3.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "autopep8" version)) + (sha256 + (base32 "0n0pjdk39n6vlddjqvbpkxd4a7q33dkf0k2yk6dbd5wijr7hli49")))) + (build-system pyproject-build-system) + (propagated-inputs + (list python-pycodestyle python-tomli)) + (native-inputs + (list python-setuptools)) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'prepare-check + (lambda _ + (setenv "HOME" "/tmp")))))) + (home-page "https://github.com/hhatto/autopep8") + (synopsis "Format Python code according to the PEP 8 style guide") + (description + "@code{autopep8} automatically formats Python code to conform to +the PEP 8 style guide. It uses the pycodestyle utility to determine +what parts of the code needs to be formatted. @code{autopep8} is +capable of fixing most of the formatting issues that can be reported +by pycodestyle.") + (license (license:non-copyleft + "https://github.com/hhatto/autopep8/blob/master/LICENSE")))) + (define-public python-avocado-framework (package (name "python-avocado-framework") @@ -786,6 +822,27 @@ list/set/dict comprehensions.") providing hints about what deprecated methods should be replaced with.") (license license:gpl2))) +(define-public python-flexmock + (package + (name "python-flexmock") + (version "0.12.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "flexmock" version)) + (sha256 + (base32 "18dcr7mpldf3cxsqi9rak75n4z7x3j544l4ixdspairm7cf6cp23")))) + (build-system pyproject-build-system) + (native-inputs + (list python-poetry-core + python-pytest)) + (home-page "https://flexmock.readthedocs.io/") + (synopsis "Testing library for Python") + (description + "flexmock is a testing library for Python that makes it easy to create +mocks, stubs and fakes.") + (license license:bsd-3))) + (define-public python-gcovr (package (name "python-gcovr") diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 32b9f17aaa7..b20bec061fd 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -1771,6 +1771,7 @@ in different situations. @end enumerate") (license license:expat))) +;; XXX: Not maintained since 2016. (define-public python-pydes (package (name "python-pydes") @@ -1782,8 +1783,10 @@ in different situations. (sha256 (base32 "04lh71f47y04vspfrdrq6a0hn060ibxvdp5z1pcr0gmqs8hqxaz2")))) (build-system pyproject-build-system) - (native-inputs (list python-setuptools python-wheel)) - (home-page "http://twhiteman.netfirms.com/des.html") + (arguments + (list #:tests? #f)) ;no tests in PyPI, I could not fine Git + (native-inputs (list python-setuptools)) + (home-page "http://twhiteman.netfirms.com/des.html") ;XXX: Dead link (synopsis "Pure python implementation of the DES and TRIPLE DES encryption algorithms") (description diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 7b4c7cdfe5d..ad89a3940ae 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -335,22 +335,34 @@ reduces the code overhead typically encountered when using a mostly object-oriented library such as @code{scikit-learn}.") (license license:bsd-3))) +;; XXX: See: . (define-public python-aplus - (package - (name "python-aplus") - (version "0.11.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "aplus" version)) - (sha256 - (base32 "1rznc26nlp641rn8gpdngfp79a3fji38yavqakxi35mx2da04msg")))) - (build-system python-build-system) - (home-page "https://github.com/xogeny/aplus") - (synopsis "Promises/A+ for Python") - (description "This package is an implementation of the Promises/A+ -specification and test suite in Python.") - (license license:expat))) + ;; PyPI release lacks the latest version, Git has no tags. + (let ((commit "1ab8ebec987fb7213766784aad02cbf4410d9036") + (revision "0")) + (package + (name "python-aplus") + (version (git-version "0.11.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xogeny/aplus") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "02jcfj7dywvs0sd60c85pxwh0mwsj9p1q27445pba6j489x3dffj")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;they depend on Nose test runner + (native-inputs + (list python-setuptools)) + (home-page "https://github.com/xogeny/aplus") + (synopsis "Promises/A+ for Python") + (description + "This package is an implementation of the Promises/A+ specification and +test suite in Python.") + (license license:expat)))) (define-public python-apted ;; PyPI release lacks tests and there is no Git tag. @@ -3930,19 +3942,25 @@ production-critical data pipelines or reproducible research settings. With ;; marked turtle can be skipped using "-m" "not turtle". (arguments (list - #:test-flags '(list - "-n" (number->string (parallel-job-count)) - ;; Tries to connect to the internet. - "-k" (string-append "not test_is_connected" - ;; Test files are not included - " and not test_read_commandline_bad_cmd") - ;; Test files are not included - "--ignore=tests/io/test_read_csvs.py" - ;; Polars has not been packaged yet. - "--ignore=tests/polars" - ;; PySpark has not been packaged yet. - "--ignore=tests/spark/functions/test_clean_names_spark.py" - "--ignore=tests/spark/functions/test_update_where_spark.py") + ;; tests: 1042 passed, 2 skipped, 2 deselected, 45 xfailed, 6 xpassed, + ;; 735 warnings + #:test-flags + ;; The tests take quite long, so consider adding the "-n" line and + ;; adding python-pytest-xdist to the native-inputs when testing. + ;; However, the tests are not deterministic when ran with -n, so + ;; disable again before committing. + #~(list ;; "-n" (number->string (parallel-job-count)) + ;; Test files are not included. + "--ignore=tests/io/test_read_csvs.py" + ;; Polars has not been packaged yet. + "--ignore=tests/polars" + ;; PySpark has not been packaged yet. + "--ignore=tests/spark/functions/test_clean_names_spark.py" + "--ignore=tests/spark/functions/test_update_where_spark.py" + ;; Tries to connect to the internet. + "-k" (string-append "not test_is_connected" + ;; Test files are not included. + " and not test_read_commandline_bad_cmd")) #:phases #~(modify-phases %standard-phases (add-before 'check 'set-env-ci @@ -3950,20 +3968,22 @@ production-critical data pipelines or reproducible research settings. With ;; Some tests are skipped if the JANITOR_CI_MACHINE ;; variable is not set. (setenv "JANITOR_CI_MACHINE" "1")))))) + ;; TODO: Remove python-requests and inject its target data to make the + ;; package behaviour reproducible. (propagated-inputs (list python-multipledispatch python-natsort python-pandas-flavor + python-requests python-scipy ;; Optional imports. python-biopython ;biology submodule python-unyt)) ;engineering submodule (native-inputs (list python-pytest - python-pytest-xdist + ;;python-pytest-xdist ;only for -n when testing + python-setuptools ;; Optional imports. We do not propagate them due to ;; their size. python-numba ;speedup of joins - python-setuptools - python-wheel rdkit)) ;chemistry submodule (home-page "https://github.com/pyjanitor-devs/pyjanitor") (synopsis "Tools for cleaning and transforming pandas DataFrames") @@ -4123,6 +4143,8 @@ changed, it made sense to abstract away the nuisance of having to re-learn them.") (license license:bsd-3))) +;; XXX: Not maintained since 2019. The project was archived by the owner on +;; Nov 2, 2020. It is now read-only. (define-public python-fbpca (package (name "python-fbpca") @@ -4133,7 +4155,10 @@ them.") (sha256 (base32 "1lbjqhqsdmqk86lb86q3ywf7561zmdny1dfvgwqkyrkr4ij7f1hm")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments + (list #:test-flags #~(list "fbpca.py"))) + (native-inputs (list python-pytest python-setuptools)) (propagated-inputs (list python-numpy python-scipy)) (home-page "https://fbpca.readthedocs.io/") diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index fe7f39333f1..1200ffb3ad4 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -64,6 +64,8 @@ ;;; Copyright © 2023 dan ;;; Copyright © 2023 John Kehayias ;;; Copyright © 2023 Ivan Vilata-i-Balaguer +;;; Copyright © 2024 Fabio Natali +;;; Copyright © 2024 Steve George ;;; Copyright © 2024 Troy Figiel ;;; Copyright © 2024, 2025 Sharlatan Hellseher ;;; Copyright © 2024 normally_js @@ -120,6 +122,7 @@ #:use-module (gnu packages gnupg) #:use-module (gnu packages graphviz) #:use-module (gnu packages groff) + #:use-module (gnu packages iso-codes) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) #:use-module (gnu packages libidn) @@ -205,6 +208,112 @@ writing applications that talk to network enabled embedded @acronym{IoT,Internet of Things} devices.") (license license:expat))) +(define-public python-apprise + (package + (name "python-apprise") + (version "1.9.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "apprise" version)) + (sha256 + (base32 "126951n9lnlqrw5lbsvs9xs7jzg33bqqxm7cfnqag2csw6p24ca8")))) + (build-system pyproject-build-system) + (arguments + (list + ;; These tests used to be ran with --numprocesses, but that seems to have + ;; made them non-deterministic. + #:test-flags + #~(list "--ignore=tests/test_plugin_macosx.py" + "-k" "not test_plugin_glib_send_raises_generic"))) + (native-inputs + (list python-babel + python-pytest + python-pytest-mock + python-setuptools)) + (propagated-inputs + (list python-certifi + python-click + python-markdown + python-pygobject + python-pyyaml + python-requests + python-requests-oauthlib)) + (home-page "https://github.com/caronc/apprise") + (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.") + (license license:bsd-2))) + +(define-public python-blacksheep + (package + (name "python-blacksheep") + (version "2.4.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Neoteroi/BlackSheep") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1iwlj6vl0rnvddbn9zsdgpya88z0lifr86wz3ci1d67li7w5bjiq")))) + (build-system pyproject-build-system) + (arguments + (list + ;; tests: 1443 passed, 3 skipped + ;; + ;; 1. Ignore integration tests. + ;; 2. Client tests use test fixture no longer available in + ;; pytest-asyncio, + ;; + ;; See: . + #:test-flags + #~(list "--ignore=itests" + "--ignore=tests/client") + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'cythonize + (lambda _ + (with-directory-excursion "blacksheep" + (for-each (lambda (file) + (invoke "cython" "-3" file "-I" ".")) + (find-files "." ".*\\.pyx$")))))))) + (native-inputs + (list python-cython + python-flask + python-jinja2 + python-pydantic + python-pyjwt + python-pytest + python-pytest-asyncio + python-setuptools)) + (propagated-inputs + (list python-certifi + python-dateutil + python-essentials-openapi + python-guardpost + python-itsdangerous)) + (home-page "https://github.com/Neoteroi/BlackSheep") + (synopsis "Asynchronous framework to build event based web applications") + (description + "BlackSheep is a lightweight, asynchronous, event driven Web framework. + +The framework offers +@itemize +@item A rich code API, based on dependency injection and inspired by Flask and +ASP.NET Core. +@item A typing-friendly codebase, which enables a comfortable development +experience thanks to hints when coding with IDEs. +@item Built-in generation of OpenAPI Documentation, supporting version 3, YAML, +and JSON. +@item A cross-platform framework, using the most modern versions of Python. +@item Good performance. +@end itemize") + (license license:expat))) + (define-public python-devpi-common (package (name "python-devpi-common") @@ -606,6 +715,40 @@ Async mode for @url{https://domainconnect.org/, Domain Connect protocol}.") Dropbox API v2.") (license license:expat))) +(define-public python-essentials-openapi + (package + (name "python-essentials-openapi") + (version "1.2.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Neoteroi/essentials-openapi") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0f3lhpkqhvv8sr1c34cvzdqkc61306m03w3jp0zdih1v6is05j8x")))) + (build-system pyproject-build-system) + (native-inputs + (list python-flask + python-hatchling + python-pydantic + python-pytest + python-rich)) + (propagated-inputs + (list python-essentials + python-httpx + python-jinja2 + python-markupsafe + python-pyyaml)) + (home-page "https://github.com/Neoteroi/essentials-openapi/") + (synopsis "Generator for OpenAPI Documentation") + (description + "Generator for OpenAPI Documentation version 2 and 3, in JSON and YAML +formats. Generator for other kinds of documents from OpenAPI Documentation +files.") + (license license:expat))) + (define-public python-eventlet (package (name "python-eventlet") @@ -773,6 +916,51 @@ formats (PDF/XML/CSV).") @url{https://www.globus.org/, Globus} APIs.") (license license:asl2.0))) +(define-public python-guardpost + (package + (name "python-guardpost") + (version "1.0.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Neoteroi/guardpost") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1cwxxxhazpaphhcysgpivk51vp76zdf7hrryc1vr6vlp2zzgwsxd")))) + (build-system pyproject-build-system) + (arguments + (list + ;; Possible timing issue, see: + ;; . + #:test-flags '(list "--ignore=tests/test_jwts.py"))) + (native-inputs + (list python-cryptography + python-flask + python-hatchling + python-pyjwt + python-pytest + python-pytest-asyncio)) + (propagated-inputs + (list python-rodi)) + (home-page "https://github.com/Neoteroi/GuardPost/") + (synopsis + "Authentication and authorization framework for Python applications") + (description + "GuardPost is a framework to handle authentication and +authorization in asynchronous Python applications. + +Its features include + +@itemize +@item Strategy to implement authentication. +@item Strategy to implement authorization. +@item Support for dependency injection +@item Built-in support for JSON Web Tokens (JWTs) authentication. +@end itemize") + (license license:expat))) + (define-public python-hookdns (package (name "python-hookdns") @@ -1699,9 +1887,8 @@ It features a minimal TLS 1.3 implementation, a QUIC stack and an HTTP/3 stack." ;; This test opens a remote connection. #~(list "-k" "not test_create_connection_resolve_good"))) (native-inputs (list python-pytest - python-pytest-asyncio - python-setuptools - python-wheel)) + python-pytest-asyncio-0.26 + python-setuptools)) (propagated-inputs (list python-attrs python-websockets)) (home-page "https://github.com/kyuupichan/aiorpcX") @@ -5295,7 +5482,10 @@ WebSocket usage in Python programs.") (method url-fetch) (uri (pypi-uri "websocket-client" version)) (sha256 - (base32 "0p0cz2mdissq7iw1n7jrmsfir0jfmgs1dvnpnrx477ffx9hbsxnk")))))) + (base32 "0p0cz2mdissq7iw1n7jrmsfir0jfmgs1dvnpnrx477ffx9hbsxnk")))) + (native-inputs + (modify-inputs (package-native-inputs python-websocket-client) + (append python-six))))) (define-public python-purl (package @@ -10640,19 +10830,44 @@ can be handled by the @code{colorsys} module in the Python standard library.") (license license:bsd-3))) (define-public python-woob + ;; TODO: woob requires backends which are currently installed on the fly in + ;; ~/.local/share/woob/modules/3.7/woob_modules/ , perhaps we should install + ;; them in the store instead. Many modules are included in the modules + ;; directory in the source tree, but it is unclear how to install them. + ;; Many modules require extra dependencies though, so maybe they should be + ;; packaged independently of woob itself. (package (name "python-woob") - (version "3.0") + (version "3.7") (source (origin - (method url-fetch) - (uri (pypi-uri "woob" version)) + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/woob/woob.git") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "09hpxy5zhn2b8li0xjf3zd7s46lawb0315p5mdcsci3bj3s4v1j7")))) - (build-system python-build-system) - ;; A small number of tests for optional applications fails due to missing - ;; inputs. - (arguments `(#:tests? #f)) + (base32 "1sy0aykff56xs4dnc7ak6m8is2zgz9fprf3i1pk8n861xz1z748i")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; Deselect tests that require DNS lookup. + #~(list + "--deselect=tests/browser/adapters.py::TestAdapter::test_ciphers" + "--deselect=tests/browser/browsers.py::TestBrowser::test_verify") + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'relax-requirements + (lambda _ + ;; "packaging ~= 23.0", + (substitute* "pyproject.toml" + (("\"packaging .*\",") + ""))))))) + (native-inputs + (list nss-certs-for-test + python-pytest + python-setuptools)) (propagated-inputs (list python-babel python-colorama @@ -10661,19 +10876,20 @@ can be handled by the @code{colorsys} module in the Python standard library.") python-feedparser python-html2text python-lxml + python-packaging python-pillow python-prettytable - python-pyqt + python-pycountry python-pyyaml python-requests - python-six + python-responses + python-rich + python-termcolor python-unidecode)) - (native-inputs - (list python-coverage python-flake8 python-nose python-selenium - python-xunitparser)) (home-page "https://woob.tech/") (synopsis "Woob, Web Outside Of Browsers") - (description "Woob is a collection of applications able to interact with + (description + "Woob is a collection of applications able to interact with websites, without requiring the user to open them in a browser. It also provides well-defined APIs to talk to websites lacking one.") (license license:lgpl3+))) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index e8e373652f9..30a14303a3d 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -237,6 +237,7 @@ #:use-module (gnu packages image-processing) #:use-module (gnu packages imagemagick) #:use-module (gnu packages inkscape) + #:use-module (gnu packages iso-codes) #:use-module (gnu packages java) #:use-module (gnu packages jupyter) #:use-module (gnu packages kerberos) @@ -344,46 +345,6 @@ protocol of git-annex, while leaving the behavior of the remote up to the user.") (license license:gpl3))) -(define-public python-apprise - (package - (name "python-apprise") - (version "1.9.3") - (source - (origin - (method url-fetch) - (uri (pypi-uri "apprise" version)) - (sha256 - (base32 "19k51ici58134m61f6di0m36mbqgdyr6r31i8v6rk22vldz6d0zm")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags - #~(list "--numprocesses" (number->string (parallel-job-count)) - "--ignore=test/test_plugin_macosx.py" - ;; AssertionError - "--deselect=test/test_plugin_wxpusher.py::test_plugin_wxpusher_urls"))) - (native-inputs - (list python-babel - python-pytest - 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 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.") - (license license:bsd-2))) - (define-public python-archspec (package (name "python-archspec") @@ -646,7 +607,8 @@ line drawing algorithm}.") (sha256 (base32 "08dmi4chamk5dbdpvrc0nb09iybfhj3wqwxgffiqnkj7030qhqb8")))) (build-system pyproject-build-system) - (native-inputs (list python-setuptools python-wheel)) + ;; tests: 797 passed, 1 warning + (native-inputs (list python-pytest python-setuptools)) (propagated-inputs (list python-ply)) (home-page "https://github.com/calmjs/calmjs.parse/") (synopsis "Parsers for ECMA standards") @@ -1015,6 +977,8 @@ package. ") It also supports IPython/Jupyter.") (license license:expat))) +;; TODO: Move to ci or task-runners, see: +;; . (define-public python-huey (package (name "python-huey") @@ -1038,9 +1002,12 @@ It also supports IPython/Jupyter.") (substitute* "huey/tests/test_kt_huey.py" (("^has_ktserver = sp.call\\(\\['which', 'ktserver'\\].*$") "has_ktserver = False")))) - (add-before 'check 'pre-check - (lambda _ (spawn "redis-server" '("redis-server"))))))) - (native-inputs (list python-setuptools python-wheel redis tzdata-for-tests)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (spawn "redis-server" '("redis-server")) + (invoke "python3" "-m" "runtests" "--verbosity" "2"))))))) + (native-inputs (list python-setuptools redis tzdata-for-tests)) (propagated-inputs (list python-redis)) (home-page "https://huey.readthedocs.io") (synopsis "Lightweight task queue for Python") @@ -4179,7 +4146,7 @@ with Numpy and SciPy.") (define-public python-rich-tables (package (name "python-rich-tables") - (version "0.6.1") + (version "0.8.0") (source (origin (method git-fetch) ; no tests data in PyPi package @@ -4188,8 +4155,13 @@ with Numpy and SciPy.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1wqr6sldf97ycs4gfvsqhbh1ki2kgsaicsy44g9lspvlda5nfcp1")))) + (base32 "1gkwgxcjnghn0alqw53kgb4ixf047dnb49kc0af3blvcwnmfmb5f")))) (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; TypeError: can't subtract offset-naive and offset-aware datetimes + #~(list "--deselect=tests/test_outputs.py::test_outputs[tests/json/album.json]"))) (native-inputs (list python-freezegun python-poetry-core @@ -4197,6 +4169,7 @@ with Numpy and SciPy.") python-pytest-cov)) (propagated-inputs (list python-funcy + python-humanize python-multimethod python-platformdirs python-rgbxy @@ -4809,6 +4782,31 @@ Unicode-to-LaTeX conversion.") @code{subprocess} feature.") (license license:expat))) +;; Old version just for python-dotenv-0.13.0 for docker-compose; remove once +;; that is updated. +(define-public python-sh-1 + (package + (inherit python-sh) + (version "1.14.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sh" version)) + (sha256 + (base32 + "03gyss1rhj4in7pgysg4q0hxp3230whinlpy1532ljs99lrx0ywx")))) + ;(build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + ;; XXX: A Python 2 test fails when HOME=/homeless-shelter. + (setenv "HOME" "/tmp") + (invoke "python" "sh.py" "test")))))) + (native-inputs + (list python-setuptools)))) + (define-public python-cftime (package (name "python-cftime") @@ -6499,9 +6497,11 @@ other Python program.") (base32 "0skrs5i5pvpzvihgxw766zi1c9bbp33aisdldxgj470mlchvdgyy")))) (build-system pyproject-build-system) + (arguments + (list #:test-backend #~'custom + #:test-flags #~(list "tests/functional/tests.py"))) (native-inputs - (list python-setuptools - python-wheel)) + (list python-setuptools)) (home-page "https://agateau.com/projects/doxyqml") (synopsis "Doxygen input filter for QML files") (description @@ -7753,6 +7753,7 @@ something else) to Python data-types.") (base32 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s")))))) +;; XXX: See: . (define-public python-kconfiglib (package (name "python-kconfiglib") @@ -7764,9 +7765,10 @@ something else) to Python data-types.") (sha256 (base32 "0g690bk789hsry34y4ahvly5c8w8imca90ss4njfqf7m2qicrlmy")))) (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;tests require complex set up (native-inputs (list python-setuptools - python-wheel `(,python "tk"))) (home-page "https://github.com/ulfalizer/Kconfiglib") (synopsis @@ -8518,6 +8520,7 @@ important tasks for becoming a daemon process: ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed. (license (list license:asl2.0 license:gpl3+)))) +;; XXX: See: . (define-public python-elevate (package (name "python-elevate") @@ -8530,13 +8533,14 @@ important tasks for becoming a daemon process: (base32 "02g23lxzzl64j1b4fsnrdxqiahl9lnrqyxpqwcfzn0g33px1kbak")))) (build-system pyproject-build-system) (arguments - `(#:phases + `(#:tests? #f ;no tests in PyPI + #:phases (modify-phases %standard-phases (add-after 'unpack 'clean-up (lambda _ ;; Uses stuff we don't have. (delete-file "elevate/windows.py")))))) - (native-inputs (list python-setuptools python-wheel)) + (native-inputs (list python-setuptools)) (home-page "https://github.com/barneygale/elevate") (synopsis "Python library for requesting root privileges") (description "This package provides a Python library for requesting @@ -12292,39 +12296,6 @@ run simple @code{argparse} parsers from function signatures.") from a program in a @dfn{pager} such as @command{less}.") (license license:asl2.0))) -(define-public python-autopep8 - (package - (name "python-autopep8") - (version "2.0.4") - (source - (origin - (method url-fetch) - (uri (pypi-uri "autopep8" version)) - (sha256 - (base32 - "037yhzmc9lssmn6cifa5gvw23f1c0hgsfgn83jfl3cwppm50c4r9")))) - (build-system pyproject-build-system) - (propagated-inputs - (list python-pycodestyle python-tomli)) - (native-inputs - (list python-setuptools python-wheel)) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'prepare-check - (lambda _ - (setenv "HOME" "/tmp")))))) - (home-page "https://github.com/hhatto/autopep8") - (synopsis "Format Python code according to the PEP 8 style guide") - (description - "@code{autopep8} automatically formats Python code to conform to -the PEP 8 style guide. It uses the pycodestyle utility to determine -what parts of the code needs to be formatted. @code{autopep8} is -capable of fixing most of the formatting issues that can be reported -by pycodestyle.") - (license (license:non-copyleft - "https://github.com/hhatto/autopep8/blob/master/LICENSE")))) - (define-public python-dirty-equals (package (name "python-dirty-equals") @@ -13745,10 +13716,10 @@ memoizing PEG/Packrat parser in Python.") (define-public python-grandalf (package (name "python-grandalf") - (version "0.7") + ;; `guix refresh` will try to upgrade to v0.55555, but that is older. + (version "0.8") (source (origin - ;; There's no source tarball on PyPI. (method git-fetch) (uri (git-reference (url "https://github.com/bdcht/grandalf") @@ -13756,16 +13727,18 @@ memoizing PEG/Packrat parser in Python.") (file-name (git-file-name name version)) (sha256 (base32 - "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g")))) - (build-system python-build-system) + "199f86hz3g4p237ma4j27rzwmska3bxzsbgq20i4l4pczf9v7ax0")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "python" "setup.py" "pytest")))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'patch-requirements + (lambda _ + (substitute* "setup.py" + (("install_requires=\\['pyparsing'],") ""))))))) (native-inputs - (list python-pytest python-pytest-runner)) + (list python-setuptools python-pytest)) (propagated-inputs (list python-numpy python-ply)) (home-page "https://github.com/bdcht/grandalf") @@ -17279,7 +17252,7 @@ pseudo terminal (pty), and interact with both the process and its pty.") ;; XXX: Snippet below is required because on v1.1.30 the source code ;; has configshell_fb as softlink to configshell and guix ;; pyproject-build-system doesn't work with symlinks very well. - ;; + ;; ;; This package is only used in spdk for now and it's crucial to keep ;; it locked on version and keep the snipped for spdk to build ;; successfully. @@ -20156,18 +20129,22 @@ and dataclasses.") (define-public python-argparse-manpage (package (name "python-argparse-manpage") - (version "4.5") + (version "4.7") (source (origin (method url-fetch) - (uri (pypi-uri "argparse-manpage" version)) + (uri (pypi-uri "argparse_manpage" version)) (sha256 - (base32 - "1nq4sq1zk1xzdsqq61hd27jhj978ys136aba1zjg02x1g0c0cg11")))) + (base32 "0clb20scp408gxac675v731vnj89pk9d5fb7pcy7bj1a45mvgshx")))) (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; Tests require PIP. + #~(list "--ignore=tests/test_examples.py"))) (native-inputs - (list python-pip python-pytest python-setuptools python-tomli - python-wheel)) + (list python-pytest + python-setuptools)) (home-page "https://github.com/praiskup/argparse-manpage") (synopsis "Build manual page from Python's ArgumentParser object") (description @@ -20367,6 +20344,33 @@ package and greatly reduce the number of imports for your users. It is a small pure Python module that works on virtually all Python versions.") (license license:expat))) +(define-public python-essentials + (package + (name "python-essentials") + (version "1.1.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Neoteroi/essentials") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1bh8yi79gn9fg26mp58nm9xhnxcfab7rhc076av4qg00mg5p9rn0")))) + (build-system pyproject-build-system) + (native-inputs + (list python-hatchling + python-pydantic + python-pytest-asyncio)) + (home-page "https://github.com/Neoteroi/essentials/wiki") + (synopsis + "Utility functions, exceptions, and classes for Python applications") + (description + "Essentials is a collection of functions, exceptions, and classes for Python +applications. Examples of utilities are exceptions for common scenarios, +friendly JSON encoder, decorators for retries and logging.") + (license license:expat))) + (define-public python-execnet (package (name "python-execnet") @@ -23191,7 +23195,7 @@ specified in POSIX.1-2001 and POSIX.1-2008.") (sha256 (base32 "1clb3lfw694crq8m767q0yjaazkplcrbzdr9fr2w39hhndivhcd6")))) (build-system pyproject-build-system) - (native-inputs (list python-setuptools python-wheel)) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/rocky/pycolumnize") (synopsis "Format a simple (i.e. not nested) list into aligned columns.") (description @@ -25286,6 +25290,41 @@ GraphQL schema describes your data model, and provides a GraphQL server with an associated set of resolve methods that know how to fetch data.") (license license:expat))) +(define-public python-rodi + (package + (name "python-rodi") + (version "2.0.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Neoteroi/rodi") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0kf98yjllrq7vqcp07r2gmkqcviqglsnai3sdigdsrwrfc0b44yp")))) + (build-system pyproject-build-system) + (native-inputs + (list python-hatchling + python-pytest + python-pytest-asyncio)) + (home-page "https://github.com/Neoteroi/rodi") + (synopsis "Dependency injection framework for Python") + (description + "Rodi is a dependency injection framework for Python applications. + +Its features include + +@itemize +@item Type resolution by signature types annotations. +@item Type resolution by class annotations. +@item Type resolution by names and aliases. +@item Build graph of objects without the need for source code changes. +@item Minimum overhead to obtain services, once the objects graph is built. +@item Support for singleton, transient, and scoped services. +@end itemize") + (license license:expat))) + ;; XXX: The last time updated in 2015, consider to remove it when nothing is ;; depend on it. (define-public python-snowballstemmer @@ -25990,46 +26029,6 @@ converting text with ANSI color codes to HTML or LaTeX.") can even create animations with the cursor controls.") (license license:expat))) -(define-public python-pycountry - (package - (name "python-pycountry") - (version "22.3.5") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pycountry" version)) - (sha256 - (base32 - "0ihnkh86zz01vi46gcwgq6h71jrpj7hq71zi13c98n2qdhj3l5mj")))) - (build-system python-build-system) - (home-page "https://bitbucket.org/flyingcircus/pycountry") - (synopsis "ISO databases for languages, countries, currencies, etc.") - (description - "@code{pycountry} provides the ISO databases for the standards: - @enumerate - @item 639-3 (Languages) - @item 3166 (Countries) - @item 3166-3 (Deleted Countries) - @item 3166-2 (Subdivisions of countries) - @item 4217 (Currencies) - @item 15924 (Scripts) - @end enumerate - It includes a copy from Debian’s pkg-isocodes and makes the data accessible - through a Python API.") - (license license:lgpl2.1+))) - -(define-public python-pycountry@20.7.3 - (package - (inherit python-pycountry) - (name "python-pycountry") - (version "20.7.3") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pycountry" version)) - (sha256 - (base32 "0hnbabsmqimx5hqh0jbd2f64i8fhzhhbrvid57048hs5sd9ll241")))))) - (define-public python-pycosat (package (name "python-pycosat") @@ -26967,9 +26966,10 @@ filetypes can be easily added by creating plugins for them.") (sha256 (base32 "0c3dgm1rf7ih79pgkj7adffn8hlyqh5qah8rbzlq436kz3srk83q")))) (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;no tests in PyPI or Git (native-inputs - (list python-setuptools - python-wheel)) + (list python-setuptools)) (home-page "https://github.com/benknight/hue-python-rgb-converter") (synopsis "RGB conversion tool in Python") (description @@ -29437,29 +29437,32 @@ supports the globstar @code{**} operator to match an arbitrary number of path components.") (license license:asl2.0))) +;; XXX: Not maintained since 2021. (define-public python-git-hammer (package (name "python-git-hammer") - (version "0.3.1") + (version "0.3.2") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/asharov/git-hammer") - (commit version))) + (url "https://github.com/asharov/git-hammer") + (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 - "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr")))) - (build-system python-build-system) + (base32 "0j0skpbhi7js45hp1w2n87093yz1hjdg5y3kicwvm84fb8i38gvx")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-setup.py + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements (lambda _ (substitute* "setup.py" - (("setup\\(") - "setup(\n test_suite=\"test\","))))))) + (("matplotlib <3.1") "matplotlib"))))))) + (native-inputs + (list python-pytest + python-setuptools)) (propagated-inputs (list python-beautifultable python-dateutil @@ -29471,8 +29474,8 @@ path components.") (home-page "https://github.com/asharov/git-hammer") (synopsis "Provide statistics for git repositories") (description - "Git Hammer is a statistics tool for projects in git repositories. -Its major feature is tracking the number of lines authored by each person for every + "Git Hammer is a statistics tool for projects in git repositories. Its major +feature is tracking the number of lines authored by each person for every commit, but it also includes some other useful statistics.") (license license:asl2.0))) @@ -30962,6 +30965,7 @@ module.") (properties '((upstream-name . "Wikidata"))) (license license:gpl3+))) +;; XXX: Not maintained since 2022, leaf package. (define-public python-attr (package (name "python-attr") @@ -30973,8 +30977,11 @@ module.") (sha256 (base32 "1x2627x0n2rxx8wib4cksbjjnncff8finq97k37dq70qd2kvrvhw")))) (build-system pyproject-build-system) + (arguments + (list #:test-backend #~'custom + #:test-flags #~(list "-c" "import dry_attr; dry_attr.test()"))) (native-inputs - (list python-setuptools python-wheel)) + (list python-setuptools)) (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 @@ -32109,6 +32116,7 @@ register custom encoders and decoders.") bindings for Python 3.") (license license:bsd-3))) +;; XXX: See: . (define-public python-iocapture ;; The latest release is more than a year older than this commit. (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c") @@ -32126,8 +32134,12 @@ bindings for Python 3.") (sha256 (base32 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz")))) (build-system pyproject-build-system) - (native-inputs (list python-flexmock python-pytest python-pytest-cov - python-setuptools python-wheel)) + (native-inputs + (list python-flexmock + python-pytest + python-pytest-cov + python-setuptools + python-six)) (home-page "https://github.com/oinume/iocapture") (synopsis "Python capturing tool for stdout and stderr") (description @@ -34095,6 +34107,8 @@ to minimize duplication of information across files. The format supports schema validation.") (license license:lgpl3))) +;; XXX: Not maintained since 2021, there is no git available as seen in +;; . (define-public python-flufl-bounce (package (name "python-flufl-bounce") @@ -34106,7 +34120,7 @@ validation.") (sha256 (base32 "0c9qc2l47lyqnpwskp6vvi7m3jqh6hx42v6d35dgxh3fjzmlll15")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases @@ -34119,7 +34133,7 @@ validation.") (propagated-inputs (list python-atpublic python-zope-interface)) (native-inputs - (list python-flufl-testing python-nose2)) + (list python-flufl-testing python-nose2 python-setuptools)) (home-page "https://fluflbounce.readthedocs.io/en/latest/") (synopsis "Email bounce detectors") (description "The @code{flufl.bounce} library provides a set of heuristics @@ -36879,6 +36893,35 @@ systems in Python.") key-value pairs from a @code{.env} file and set them as environment variables.") (license license:bsd-3))) +;; Old version just for docker-compose; remove once that is updated. +(define-public python-dotenv-0.13.0 + (package (inherit python-dotenv) + (name "python-dotenv") + (version "0.13.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "python-dotenv" version)) + (sha256 + (base32 + "0x5dagmfn31phrbxlwacw3s4w5vibv8fxqc62nqcdvdhjsy0k69v")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (setenv "PATH" (string-append (getenv "PATH") ":" + (assoc-ref outputs "out") "/bin")) + ;; Skip the ipython tests. + (delete-file "tests/test_ipython.py") + (invoke "python" "-m" "pytest"))))))) + (native-inputs + (modify-inputs (package-native-inputs python-dotenv) + (append python-mock) + (replace "python-sh" python-sh-1))))) + (define-public date2name (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798") (revision "1")) @@ -37943,6 +37986,43 @@ static types.") (description "This package providis typing stubs for python-dateutil.") (license license:asl2.0))) +(define-public python-types-aiofiles + (package + (name "python-types-aiofiles") + (version "24.1.0.20250822") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_aiofiles" version)) + (sha256 + (base32 "0ysar1an6il2rsd54fwzwdis209z3qq3i4zhgixfjzrh1j70vfcs")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for python-aiofiles") + (description "This package providis typing stubs for python-aiofiles.") + (license license:asl2.0))) + +(define-public python-types-tqdm + (package + (name "python-types-tqdm") + (version "4.67.0.20250809") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_tqdm" version)) + (sha256 + (base32 "006md2hnsq79p7d5z3kiaapvl9wwa4dz3yb39jf0n22n2awpmgq2")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs (list python-setuptools)) + (propagated-inputs (list python-types-requests)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for python-tqdm") + (description "This package providis typing stubs for python-tqdm.") + (license license:asl2.0))) + (define-public python-types-docutils (package (name "python-types-docutils") @@ -39348,7 +39428,19 @@ client library.") (sha256 (base32 "122a8prbcj070y3fl82kvxmbciv36hj1h1d448l6zcdrb22q4mhx")))) (build-system pyproject-build-system) - (native-inputs (list python-setuptools python-wheel)) + (arguments + (list + ;; tests: 1571 passed, 37 deselected, 1 warning + ;; + ;; Two test fail with assertion not equal: + ;; + ;; test_decode_error[0001-unpack_from requires a buffer of at least 1 + ;; bytes] - AssertionError + ;; + ;; test_decode_error[00000101-unpack_from requires a buffer of at least + ;; 1 bytes] - AssertionError + #:test-flags #~(list "-k" "not test_decode_error"))) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://ndeflib.readthedocs.io/") (synopsis "NFC Data Exchange Format decoder and encoder.") (description "This package provides a NFC (Near-Field Communication) @@ -39759,6 +39851,24 @@ package. It can be used by type-checking tools like mypy, PyCharm, pytype etc. to check code that uses @code{orjson}.") (license license:asl2.0))) +(define-public python-types-regex + (package + (name "python-types-regex") + (version "2025.9.18.20250921") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_regex" version)) + (sha256 + (base32 "0gqc8b9d38pdm1l6nryi9rq9vmpis575hqnxlvj904n3n4hhqw71")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for regex") + (description "This package provides typing stubs for regex.") + (license license:asl2.0))) + (define-public python-rpds-py (package (name "python-rpds-py") @@ -40103,8 +40213,16 @@ read all zbar supported codes.") (base32 "0r46q4hd7xbpvnidbra1prkg4xhmajxjjmclfqgp3pv0lgyslqxh")))) (build-system pyproject-build-system) + (arguments + ;; XXX: No tests in PyPI, tere are tests in Git, but there is no 3.7.10.1 + ;; tag. + ;; + ;; See: + ;; - URL: + ;; - File: + (list #:tests? #f)) (inputs (list openssl)) - (native-inputs (list python-setuptools python-wheel)) + (native-inputs (list python-setuptools)) (home-page "https://zeroc.com") (synopsis "RPC framework") (description @@ -40113,6 +40231,29 @@ software by taking care of all interactions with low-level network programming interfaces.") (license license:gpl2))) +;; Package variant to build python-omero-py@5.20.0 +(define-public python-zeroc-ice-3.6 + (package + (inherit python-zeroc-ice) + (version "3.6.5") + (source (origin + (method url-fetch) + (uri (pypi-uri "zeroc-ice" version)) + (sha256 + (base32 + "0mikjfvq26kh8asnn9v55z41pap4c5ypymqnwwi4xkavc3mzyda2")) + (patches + (search-patches + "python-zeroc-ice-3.6.5-python-3.11-support.patch")))) + (arguments + (substitute-keyword-arguments (package-arguments python-zeroc-ice) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-before 'build 'relax-gcc-14-strictness + (lambda _ + (setenv "CFLAGS" + "-g -O2 -Wno-error=implicit-function-declaration"))))))))) + (define-public python-islenska (package (name "python-islenska") @@ -40213,20 +40354,6 @@ instance in spelling correction, predictive typing, to help disabled people write text fast, and for various text generation, statistics, and modeling tasks.") (license license:expat))) -(define-public python-zeroc-ice-3.6 - (package - (inherit python-zeroc-ice) - (version "3.6.5") - (source (origin - (method url-fetch) - (uri (pypi-uri "zeroc-ice" version)) - (sha256 - (base32 - "0mikjfvq26kh8asnn9v55z41pap4c5ypymqnwwi4xkavc3mzyda2")) - (patches - (search-patches - "python-zeroc-ice-3.6.5-python-3.11-support.patch")))))) - (define-public python-whenever (package (name "python-whenever") diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 3ad2181530b..646ef54357a 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -4793,6 +4793,8 @@ PySide2, PyQt6, PySide6) and additional custom QWidgets.") (base32 "07rvfwzjl378j75j2va0c6xylwx16icxa6dycsjgjc329pgpng40")))) (build-system python-build-system) (native-inputs (list python-pyqt)) + (arguments + (list #:tests? #f)) ; No tests (home-page "https://github.com/mottosso/Qt.py") (synopsis "Abstraction layer for Python Qt bindings") (description diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm index e846ce973d4..104f56442d8 100644 --- a/gnu/packages/radio.scm +++ b/gnu/packages/radio.scm @@ -766,6 +766,8 @@ a local network link.") python-wheel)) (propagated-inputs (list python-numpy soapysdr)) + (arguments + (list #:tests? #f)) ; No tests (home-page "https://github.com/xmikos/simplesoapy") (synopsis "Python wrapper for SoapySDR") (description @@ -820,7 +822,8 @@ devices that are supported by the SoapySDR library.") python-simplesoapy soapy-power)) (arguments - (list #:phases + (list #:tests? #f ; No tests + #:phases #~(modify-phases %standard-phases (add-after 'install 'wrap-path ;; Add the location of the default backend to PATH. diff --git a/gnu/packages/rednotebook.scm b/gnu/packages/rednotebook.scm index 6d61fa13911..6dcc8a2cac1 100644 --- a/gnu/packages/rednotebook.scm +++ b/gnu/packages/rednotebook.scm @@ -18,21 +18,25 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages rednotebook) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix git-download) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages bash) - #:use-module (gnu packages python) + #:use-module (gnu packages check) + #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) - #:use-module (gnu packages webkit) - #:use-module (gnu packages python-xyz)) + #:use-module (gnu packages python) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages webkit)) (define-public rednotebook (package (name "rednotebook") - (version "2.22") + (version "2.41") (source (origin (method git-fetch) @@ -41,35 +45,36 @@ (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "11n970ad0j57vlll5j30ngkrfyil23v1b29ickbnblcldvjbgwa5")))) - (build-system python-build-system) + (base32 "1nljj227lykl4gq1qvvv0pj00k8pbi3njm4agz7wsfcihz6dlrxi")))) + (build-system pyproject-build-system) (arguments - ;; Tests fail to find the "_" function. - ;; It should be defined in rednotebook/info.py if '_' is not a member of - ;; 'builtins'. It is either not defined or not exported during the check - ;; phase. The program does not have this problem after it is installed. - ;; TODO: Fix tests. - `(#:tests? #f - #:imported-modules ((guix build glib-or-gtk-build-system) - ,@%python-build-system-modules) - #:modules ((ice-9 match) - (guix build python-build-system) - ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) - (guix build utils)) - #:phases - (modify-phases %standard-phases - ;; Make sure rednotebook can find the typelibs and webkitgtk shared - ;; libraries. - (add-before 'wrap 'wrap-with-library-paths - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (gi-typelib-path (getenv "GI_TYPELIB_PATH")) - (webkitgtk-path (string-append - (assoc-ref inputs "webkitgtk-for-gtk3") - "/lib"))) - (wrap-program (string-append out "/bin/rednotebook") - `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)) - `("LD_LIBRARY_PATH" ":" prefix (,webkitgtk-path))))))))) + (list + #:imported-modules + `((guix build glib-or-gtk-build-system) + ,@%pyproject-build-system-modules) + #:modules + `((ice-9 match) + (guix build pyproject-build-system) + ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'configure-tests + (lambda _ + (setenv "HOME" (getcwd)))) + ;; Make sure rednotebook can find the typelibs and webkitgtk shared + ;; libraries. + (add-before 'wrap 'wrap-with-library-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((webkitgtk-bin (search-input-file inputs + "bin/WebKitWebDriver"))) + (wrap-program (string-append #$output "/bin/rednotebook") + `("GI_TYPELIB_PATH" ":" prefix + (,(getenv "GI_TYPELIB_PATH"))) + `("LD_LIBRARY_PATH" ":" prefix + (,(string-append (dirname (dirname webkitgtk-bin)) + "/lib")))))))))) + (native-inputs (list gettext-minimal python-pytest python-setuptools)) (inputs (list bash-minimal gtk+ @@ -79,7 +84,7 @@ webkitgtk-for-gtk3)) ;; TODO: package the following for python3 (if possible), add them as ;; dependencies, and remove them from rednotebook source: - ;; pygtkspellcheck, elib.intl, msgfmt, txt2tags + ;; pygtkspellcheck, elib.intl, txt2tags ;; TODO: package and add pyenchant for python3 and add it as a dependency. (home-page "https://www.rednotebook.app") (synopsis "Daily journal with calendar, templates and keyword searching") diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index c0e3654fd8f..6a045477e72 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -42,7 +42,7 @@ #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (guix build-system meson) #:use-module (gnu packages) #:use-module (gnu packages adns) @@ -71,6 +71,7 @@ #:use-module (gnu packages pdf) #:use-module (gnu packages photo) #: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) @@ -640,65 +641,72 @@ search the generated indexes.") (source (origin (method url-fetch) - (uri (string-append - "https://finestructure.net/xapers/releases/xapers-" - version ".tar.gz")) + (uri (string-append "https://finestructure.net/xapers/releases/xapers-" + version ".tar.gz")) (sha256 - (base32 - "0ykz6hn3qj46w3c99d6q0pi5ncq2894simcl7vapv047zm3cylmd")))) - (build-system python-build-system) - (propagated-inputs - (list poppler python-urwid xclip xdg-utils)) - (inputs - (list python-latexcodec - python-pybtex - python-pycurl - python-pyyaml - python-six - python-xapian-bindings)) + (base32 "0ykz6hn3qj46w3c99d6q0pi5ncq2894simcl7vapv047zm3cylmd")))) + (build-system pyproject-build-system) (arguments - `(#:modules ((ice-9 rdelim) - (guix build python-build-system) + (list + #:tests? #f ; A lot of tests are failing, unclear why. + #:modules `((ice-9 rdelim) + (guix build pyproject-build-system) (guix build utils)) - #:phases - (modify-phases %standard-phases - (add-after 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) - (define (purge-term-support input output) - (let loop ((line (read-line input))) - (if (string-prefix? "if [[ \"$term\"" line) - (begin (display "eval \"$cmd\"\n" output) - #t) - (begin (display (string-append line "\n") output) - (loop (read-line input)))))) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (adder-out (string-append bin "/xapers-adder")) - (man1 (string-append out "/share/man/man1"))) - (install-file "man/man1/xapers.1" man1) - (install-file "man/man1/xapers-adder.1" man1) - ;; below is equivalent to setting --no-term option - ;; permanently on; this is desirable to avoid imposing - ;; an x-terminal installation on the user but breaks - ;; some potential xapers-adder uses like auto browser - ;; pdf handler, but user could instead still use - ;; e.g. "xterm -e xapers-adder %F" for same use. - ;; alternatively we could propagate xterm as an input - ;; and replace 'x-terminal-emulator' with 'xterm' - (call-with-input-file "bin/xapers-adder" - (lambda (input) - (call-with-output-file adder-out - (lambda (output) - (purge-term-support input output))))) - (chmod adder-out #o555))))))) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'install-doc + (lambda* (#:key inputs outputs #:allow-other-keys) + (define (purge-term-support input output) + (let loop + ((line (read-line input))) + (if (string-prefix? "if [[ \"$term\"" line) + (display "eval \"$cmd\"\n" output) + (begin + (display (string-append line "\n") output) + (loop (read-line input)))))) + (let* ((bin (string-append #$output "/bin")) + (adder-out (string-append bin "/xapers-adder")) + (man1 (string-append #$output "/share/man/man1"))) + (install-file "man/man1/xapers.1" man1) + (install-file "man/man1/xapers-adder.1" man1) + ;; below is equivalent to setting --no-term option + ;; permanently on; this is desirable to avoid imposing + ;; an x-terminal installation on the user but breaks + ;; some potential xapers-adder uses like auto browser + ;; pdf handler, but user could instead still use + ;; e.g. "xterm -e xapers-adder %F" for same use. + ;; alternatively we could propagate xterm as an input + ;; and replace 'x-terminal-emulator' with 'xterm' + (mkdir-p (dirname adder-out)) + (call-with-input-file "bin/xapers-adder" + (lambda (input) + (call-with-output-file adder-out + (lambda (output) + (purge-term-support input output))))) + (chmod adder-out #o555)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (with-directory-excursion "test" + (setenv "HOME" (getcwd)) + (invoke "bash" "all")) + (format #t "test suite not run~%"))))))) + (native-inputs (list python-setuptools)) + (propagated-inputs (list poppler python-urwid xclip xdg-utils)) + (inputs (list python-latexcodec + python-pybtex + python-pycurl + python-pyyaml + python-six + python-xapian-bindings)) (home-page "https://finestructure.net/xapers/") (synopsis "Personal document indexing system") (description - "Xapers is a personal document indexing system, -geared towards academic journal articles build on the Xapian search engine. -Think of it as your own personal document search engine, or a local cache of -online libraries. It provides fast search of document text and -bibliographic data and simple document and bibtex retrieval.") + "Xapers is a personal document indexing system, geared towards academic +journal articles build on the Xapian search engine. Think of it as your own +personal document search engine, or a local cache of online libraries. It +provides fast search of document text and bibliographic data and simple +document and bibtex retrieval.") (license license:gpl3+))) (define-public ugrep diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index bc52898c0ae..71d9cee818c 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -69,6 +69,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-build) + #:use-module (gnu packages python-check) #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) #:use-module (gnu packages ruby) diff --git a/gnu/packages/stenography.scm b/gnu/packages/stenography.scm index 687a23e85a4..3f0979c3063 100644 --- a/gnu/packages/stenography.scm +++ b/gnu/packages/stenography.scm @@ -45,17 +45,21 @@ (package (name "python-plover-stroke") (version "1.1.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "plover_stroke" version)) - (sha256 - (base32 - "0lyifam9xqpx2jzqcbah84sv909n4g2frm7pd5gvcrpf98zv40yy")))) - (build-system python-build-system) - (native-inputs (list python-pytest)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/benoit-pierre/plover_stroke") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "104ab1lr2xr8nbq98n7h3jvskfzzg8m41rhb1ik4b7w474rlxgh3")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/benoit-pierre/plover_stroke") (synopsis "Stroke handling helper library for Plover") - (description "This package provides a helper class for working with steno strokes.") + (description + "This package provides a helper class for working with steno strokes.") (license license:gpl2+))) (define-public plover diff --git a/gnu/packages/task-management.scm b/gnu/packages/task-management.scm index 0a978f9c9f3..f61f7ec99e8 100644 --- a/gnu/packages/task-management.scm +++ b/gnu/packages/task-management.scm @@ -92,20 +92,16 @@ (file-name (git-file-name name version)) (sha256 (base32 "1nyx80z53xxlbhpb5k22jnv4jajxqhjm0gz7qb18w9pqqlrvkqd4")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (setenv "HOME" (getenv "TEMP")) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv"))))))) + (add-before 'check 'configure-tests + (lambda _ + (setenv "HOME" (getenv "TEMP"))))))) (native-inputs - (list python-pytest - python-click)) + (list python-pytest python-click python-setuptools)) (inputs (list python-click python-click-default-group diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm index 762bd6ef42d..7d48a5a4afc 100644 --- a/gnu/packages/tree-sitter.scm +++ b/gnu/packages/tree-sitter.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2023, 2024 Raven Hallsby ;;; Copyright © 2024 Foundation Devices, Inc. ;;; Copyright © 2025 Andrew Wong +;;; Copyright © 2025 Nguyễn Gia Phong ;;; ;;; This file is part of GNU Guix. ;;; @@ -530,6 +531,14 @@ which will be used as a snippet in origin." #:commit commit #:license license:asl2.0))) +(define-public tree-sitter-janet + (tree-sitter-grammar + "janet" "Janet" + "1sg862gqxn5y86sqa4habyicsr1ax70i7w8ibnn2yyx1bzn99jqn" + "0.1.0" + #:repository-url "https://github.com/GrayJack/tree-sitter-janet" + #:license license:bsd-3)) + (define-public tree-sitter-java (tree-sitter-grammar "java" "Java" diff --git a/gnu/packages/tryton.scm b/gnu/packages/tryton.scm index ee6cc9b6bfc..0261e92e8e7 100644 --- a/gnu/packages/tryton.scm +++ b/gnu/packages/tryton.scm @@ -33,6 +33,7 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) + #:use-module (gnu packages iso-codes) #:use-module (gnu packages pdf) #:use-module (gnu packages python) #:use-module (gnu packages python-build) @@ -1739,7 +1740,7 @@ month and a year of work.") (arguments (tryton-arguments "country" "--no-doctest")) (native-inputs (%standard-trytond-native-inputs)) (propagated-inputs - (list python-pycountry@20.7.3 trytond)) + (list python-pycountry-20.7.3 trytond)) (home-page "http://www.tryton.org/") (synopsis "Tryton module with countries") (description diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 0db72149759..f0f23e6f8d8 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -74,6 +74,7 @@ ;;; Copyright © 2025 Sharlatan Hellseher ;;; Copyright © 2025 VnPower ;;; Copyright © 2025 Zhu Zihao +;;; Copyright © 2025 Remco van 't Veer ;;; ;;; This file is part of GNU Guix. ;;; @@ -3138,7 +3139,7 @@ video streaming services of the Finnish national broadcasting company Yle.") (define-public yt-dlp (package (name "yt-dlp") - (version "2025.09.23") + (version "2025.09.26") (source (origin (method git-fetch) @@ -3150,7 +3151,7 @@ video streaming services of the Finnish national broadcasting company Yle.") (snippet #~(substitute* "pyproject.toml" (("^.*Programming Language :: Python :: 3\\.13.*$") ""))) (sha256 - (base32 "0x6yjvv0wwyx10bpk2s06k8amah4q6v1g2plwrng1ap2jza539x6")))) + (base32 "0j6l2zskmsvqk8h3ialbymk75i0bfzn2qmc2gk6s1ybhnpryrv7y")))) (build-system pyproject-build-system) (arguments (list @@ -3172,7 +3173,7 @@ video streaming services of the Finnish national broadcasting company Yle.") "'\n"))))) (add-before 'build 'build-generated-files (lambda* (#:key inputs #:allow-other-keys) - (if (search-input-file inputs "bin/pandoc") + (if (which "pandoc") (invoke "make" "PYTHON=python" "yt-dlp" diff --git a/gnu/packages/weather.scm b/gnu/packages/weather.scm index 18f392ccf54..6a89c651036 100644 --- a/gnu/packages/weather.scm +++ b/gnu/packages/weather.scm @@ -20,13 +20,14 @@ (define-module (gnu packages weather) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system go) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (gnu packages) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-xyz) + #:use-module (gnu packages python-build) #:use-module (gnu packages qt) #:use-module (gnu packages xml)) @@ -65,30 +66,35 @@ precipitation amount and probability.") (name "meteo-qt") (version "4.2") (source - (origin (method git-fetch) - (uri (git-reference (url "https://github.com/dglent/meteo-qt") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1cvmh5rq50dncd2fmp4amjb2hhl2mryb2ywg0zdzhz89dkjq0kdk")))) - (build-system python-build-system) - (native-inputs (list python-pyqt-6)) - (propagated-inputs (list python-lxml python-pyqt-6 python-sip)) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dglent/meteo-qt") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1cvmh5rq50dncd2fmp4amjb2hhl2mryb2ywg0zdzhz89dkjq0kdk")))) + (build-system pyproject-build-system) (arguments - (list #:phases - #~(modify-phases %standard-phases - (add-before 'build 'remove-translations - (lambda _ - ;; Translation processing is broken because Guix thinks lprodump - ;; is in qtbase, not qttools. So, we'll skip it and exclude - ;; qttools from the native input list until it is fixed. - (substitute* "setup.py" - (("/usr") #$output) - (("^.+lrelease-pro-qt6.+$") "") - (("^.+meteo_qt/translations.+$") ""))))))) + (list + #:tests? #f ; No tests. + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'remove-translations + (lambda _ + ;; Translation processing is broken because Guix thinks lprodump + ;; is in qtbase, not qttools. So, we'll skip it and exclude + ;; qttools from the native input list until it is fixed. + (substitute* "setup.py" + (("/usr") #$output) + (("^.+lrelease-pro-qt6.+$") "") + (("^.+meteo_qt/translations.+$") ""))))))) + (native-inputs (list python-pyqt-6 python-setuptools)) + (propagated-inputs (list python-lxml python-pyqt-6 python-sip)) (home-page "https://github.com/dglent/meteo-qt") (synopsis "Weather application for the system tray") - (description "meteo-qt is an application to display weather information in -desktop panels, desktop notifictions and its own window. Weather information is + (description + "meteo-qt is an application to display weather information in desktop +panels, desktop notifictions and its own window. Weather information is retrieved from OpenWeatherMap.") (license license:gpl3))) diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index 5940ca54188..aa55af927a5 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -48,7 +48,6 @@ #:use-module (guix build-system go) #:use-module (guix build-system meson) #:use-module (guix build-system pyproject) - #:use-module (guix build-system python) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) @@ -1095,7 +1094,9 @@ with a terminal interface, for Gemini also a GUI is available.") (file-name (git-file-name name version)) (sha256 (base32 "0jp4v4jw82qqynqqs7x35g5yvm1sd48cvbqh7j2r1ixw1z6ldhc4")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ; No tests. + (native-inputs (list python-setuptools)) (home-page "https://github.com/xyzshantaram/leo") (synopsis "Gemini client written in Python") (description @@ -1107,21 +1108,31 @@ saved to a file for further viewing in another window.") (define-public av-98 (package (name "av-98") - (version "1.0.1") - (properties - '((upstream-name . "AV-98"))) + (version "1.4") + (properties '((upstream-name . "AV-98"))) (source (origin - (method url-fetch) - (uri (pypi-uri "AV-98" version)) + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~solderpunk/AV-98") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "02fjnc2rvm010gb3i07p8r4xlhrmnv1wca1qymfjcymr7vm68h0i")))) - (build-system python-build-system) - (home-page "https://tildegit.org/solderpunk/AV-98/") + (base32 "04dzkzsan1cnrslsvfgn1whpwald8xy34wqzvq81hd2mvw9a2n69")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f ; No tests. + #:phases + #~(modify-phases %standard-phases + (add-before 'sanity-check 'configure-sanity-check + (lambda _ + (setenv "HOME" (getcwd))))))) + (native-inputs (list python-setuptools)) + (home-page "https://git.sr.ht/~solderpunk/AV-98") (synopsis "Command line Gemini client") - (description "AV-98 is an experimental client for the Gemini protocol. -Features include + (description + "AV-98 is an experimental client for the Gemini protocol. Features include @itemize @item TOFU or CA server certificate validation; @item Extensive client certificate support if an openssl binary is available; diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 7b91e2b33a0..e4853c589b6 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -1,11 +1,12 @@ ;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 Julien Lepiller ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2015 Siniša Biđin ;;; Copyright © 2015, 2016, 2022 Eric Bavier ;;; Copyright © 2015 xd1le ;;; Copyright © 2015 Paul van der Walt ;;; Copyright © 2016 Danny Milosavljevic -;;; Copyright © 2016, 2019, 2020, 2023, 2024 Efraim Flashner +;;; Copyright © 2016, 2019-2020, 2023-2024 Efraim Flashner ;;; Copyright © 2016 Al McElrath ;;; Copyright © 2016 Carlo Zancanaro ;;; Copyright © 2016 2019, 2021-2022 Ludovic Courtès @@ -81,6 +82,7 @@ ;;; Copyright © 2025 Tomáš Čech ;;; Copyright © 2025 Ricardo Wurmus ;;; Copyright © 2025 Andrew Wong +;;; Copyright © 2025 Hugo Buddelmeijer ;;; ;;; This file is part of GNU Guix. ;;; @@ -707,6 +709,85 @@ the i3 window manager through its i3bar component, as an alternative to i3status.") (license license:gpl3+))) +(define-public obconf + (package + (name "obconf") + (version "2.0.4") + (source + (origin + (method url-fetch) + (uri (string-append "http://openbox.org/dist/" name + "/" name "-" version ".tar.gz")) + (sha256 + (base32 + "1fanjdmd8727kk74x5404vi8v7s4kpq48l583d12fsi4xvsfb8vi")))) + (inputs (list gtk+-2 + imlib2 + libglade + libsm + librsvg + libxft + openbox + startup-notification)) + (native-inputs (list gettext-minimal pkg-config)) + (build-system gnu-build-system) + (arguments + (list + #:configure-flags + #~(list "--enable-nls" + "CFLAGS=-g -O2 -Wno-error=implicit-function-declaration"))) + (home-page "https://openbox.org/obconf") + (synopsis "Openbox configuration tool") + (description + "Obconf is a tool for configuring the Openbox window manager. +You can configure its appearance, themes, and much more.") + (license license:gpl2+))) + +(define-public openbox + (package + (name "openbox") + (version "3.6.1") + (source + (origin + (method url-fetch) + (uri (string-append + "http://openbox.org/dist/openbox/" name "-" + version ".tar.xz")) + (sha256 + (base32 + "0vg2y1qddsdxkjv806mzpvmkgzliab8ll4s7zm7ma5jnriamirxb")) + (patches (search-patches "openbox-add-fix-for-glib2-exposed-segfault.patch" "openbox-python3.patch")))) + (build-system gnu-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'force-reconfigure + ;; This is made necessary by the openbox-python3 patch. + (lambda _ + (delete-file "configure")))))) + (native-inputs (list autoconf automake gettext-minimal libtool pkg-config)) + (propagated-inputs (list python-pyxdg)) + (inputs (list imlib2 + libxml2 + (librsvg-for-system) + libsm + libxcursor + libxinerama + libxml2 + libxrandr + libxft + pango + python-wrapper)) + (synopsis "Box style window manager") + (description + "Openbox is a highly configurable, next generation window manager with +extensive standards support. The *box visual style is well known for its +minimalistic appearance. Openbox uses the *box visual style, while providing +a greater number of options for theme developers than previous *box +implementations.") + (home-page "http://openbox.org/wiki/Main_Page") + (license license:gpl2+))) + (define-public papersway (package (name "papersway") @@ -991,6 +1072,65 @@ and locate windows on all your workspaces, using an interactive dmenu prompt.") (license license:wtfpl2)))) +(define-public quicktile + ;; Latest release, 0.4.0, is 5 years old and does not use pyproject.toml yet. + (let ((commit "2c499beedf31d5906e86c482f70129d94e429350") + (revision "0")) + (package + (name "quicktile") + (version (git-version "0.4.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ssokolow/quicktile") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "08kwilln32kx2cdg1sg7ffb214fkhacchx8jd64pyjbshmradgxr")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "tests") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + ;; tests/test_functional.py moves windows around and thus needs + ;; access to an X server. + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "HOME" "/tmp") + (mkdir-p "/tmp/.config") + (system "Xvfb :1 &") + (setenv "DISPLAY" ":1") + ;; First run creates /tmp/.config/quicktile.cfg. + (invoke "./quicktile.sh"))))))) + (native-inputs + (list openbox ;necessary for test_functional.py + python-pluggy + python-pytest + python-pytest-cov + python-setuptools + xorg-server-for-tests)) + (inputs + (list gtk+ + libwnck + python-xlib + python-pygobject + python-dbus-python)) + ;; The actual home page https://ssokolow.com/quicktile/ + ;; gives an SSL error. + (home-page "https://github.com/ssokolow/quicktile") + (synopsis "window-tiling hotkeys to any X11 desktop") + (description + "QuickTile is a simple utility, inspired by +@url{https://github.com/dozius/winsplit-revolution, WinSplit Revolution} for +Windows, which adds window-tiling keybindings to existing X11 window manager. +It may be used as a standalone alternative to the keyboard related features of +the Compiz Grid plugin.") + (license license:gpl2+)))) + (define-public i3lock-color (package (name "i3lock-color") diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 3989607646e..ae33a25394d 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2023 Miguel Ángel Moreno ;;; Copyright © 2024 Leo Nikkilä ;;; Copyright © 2025 Maxim Cournoyer +;;; Copyright © 2025 Rodion Goritskov ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,8 +41,10 @@ #:use-module (gnu services shepherd) #:use-module (gnu services admin) #:use-module (gnu services configuration) + #:use-module (gnu services databases) #:use-module (gnu services getmail) #:use-module (gnu services mail) + #:use-module (gnu system file-systems) #:use-module (gnu system pam) #:use-module (gnu system shadow) #:use-module (gnu packages admin) @@ -59,7 +62,9 @@ #:use-module (gnu packages mail) #:use-module (gnu packages rust-apps) #:autoload (guix i18n) (G_) + #:autoload (gnu build linux-container) (%namespaces) #:use-module (guix diagnostics) + #:use-module (guix least-authority) #:use-module (guix packages) #:use-module (guix records) #:use-module (guix modules) @@ -74,6 +79,7 @@ #:use-module (srfi srfi-34) #:use-module (ice-9 match) #:use-module (ice-9 format) + #:use-module (ice-9 regex) #:export (httpd-configuration httpd-configuration? httpd-configuration-package @@ -328,7 +334,23 @@ agate-configuration-group agate-configuration-log-file - agate-service-type)) + agate-service-type + + miniflux-configuration + miniflux-configuration? + miniflux-configuration-listen-address + miniflux-configuration-base-url + miniflux-configuration-create-administrator-account? + miniflux-configuration-administrator-account-name + miniflux-configuration-administrator-account-password + miniflux-configuration-run-migrations? + miniflux-configuration-database-url + miniflux-configuration-user + miniflux-configuration-group + miniflux-configuration-log-file + miniflux-configuration-extra-settings + + miniflux-service-type)) ;;; Commentary: ;;; @@ -2279,3 +2301,173 @@ root=/srv/gemini (default-value (agate-configuration)) (description "Run Agate, a simple Gemini protocol server written in Rust."))) + +(define (serialize-string field-name val) + (format #f "~a=~a\n" field-name val)) + +(define (string-or-file-path? val) + (string? val)) +(define (serialize-string-or-file-path field-name val) + (serialize-string (if (absolute-file-name? val) + (format #f "~a_FILE" field-name) field-name) val)) +(define-maybe string-or-file-path) + +(define (serialize-list field-name val) + (string-append (string-join val "\n") "\n")) +(define-maybe list) + +(define (serialize-boolean field-name val) + (if val (serialize-string field-name "1") (serialize-string field-name "0"))) + +(define-configuration/no-serialization miniflux-configuration + (listen-address + (string "127.0.0.1:8080") + "Address to listen on. +Use absolute path like @code{\"/var/run/miniflux/miniflux.sock\"} for a Unix socket.") + (base-url + (string "http://127.0.0.1/") + "Base URL to generate HTML links and base path for cookies.") + (create-administrator-account? + (boolean #f) + "Create an initial administrator account.") + (administrator-account-name + maybe-string-or-file-path + "Initial administrator account name as a string or an absolute path to a file with a account name inside.") + (administrator-account-password + maybe-string-or-file-path + "Initial administrator account password as a string or an absolute path to a file with a password inside.") + (run-migrations? + (boolean #t) + "Run database migrations during application startup.") + (database-url + (string "host=/var/run/postgresql") + "PostgreSQL connection string.") + (user + (string "miniflux") + "User name for Postgresql and system account.") + (group + (string "miniflux") + "Group for the system account.") + (log-file + (string "/var/log/miniflux.log") + "Path to the log file.") + (extra-settings + maybe-list + "Extra configuration parameters as a list of strings.")) + +(define (miniflux-serialize-configuration config) + (match-record config + (listen-address base-url create-administrator-account? + administrator-account-name administrator-account-password + run-migrations? database-url extra-settings) + (string-append (serialize-string "LISTEN_ADDR" listen-address) + (serialize-string "BASE_URL" base-url) + (serialize-boolean "CREATE_ADMIN" create-administrator-account?) + (serialize-maybe-string-or-file-path "ADMIN_USERNAME" administrator-account-name) + (serialize-maybe-string-or-file-path "ADMIN_PASSWORD" administrator-account-password) + (serialize-boolean "RUN_MIGRATIONS" run-migrations?) + (serialize-string "DATABASE_URL" database-url) + (serialize-maybe-list #f extra-settings)))) + +(define (miniflux-configuration-file config) + (mixed-text-file "miniflux.conf" (miniflux-serialize-configuration config))) + +(define (pair->file-system-mapping pair previous) + (if (pair? pair) + (let ((path (car pair)) + (writable (cdr pair))) + (if (or (and (string? path) + (absolute-file-name? path)) + (computed-file? path)) + (append previous (list (file-system-mapping + (source path) + (target source) + (writable? writable)))) + previous)) + previous)) + +(define (miniflux-shepherd-service config) + (match-record config + (user group log-file database-url listen-address + administrator-account-name administrator-account-password) + (let ((config-file (miniflux-configuration-file config))) + (list (shepherd-service + (documentation "Run Miniflux server") + (provision '(miniflux)) + (requirement '(postgres networking)) + (start #~(make-forkexec-constructor + (list #$(least-authority-wrapper + (file-append miniflux "/bin/miniflux") + #:name "miniflux" + #:user user + #:group group + #:preserved-environment-variables + (append %default-preserved-environment-variables + '("SSL_CERT_FILE")) + #:mappings + (fold pair->file-system-mapping + '() + `((,log-file . #t) + (,config-file . #f) + ("/etc/ssl/certs/ca-certificates.crt" . #f) + (,administrator-account-name . #f) + (,administrator-account-password . #f) + (,(dirname listen-address) . #t) + ,(let* ((db-socket-match (string-match ".*host=(/[^ ]*).*" database-url)) + (db-socket (if db-socket-match (match:substring db-socket-match 1) #f))) + (if db-socket + `(,db-socket . #t))))) + #:namespaces + (fold delq %namespaces '(net user))) + "-config-file" + #$config-file) + #:log-file #$log-file)) + (stop #~(make-kill-destructor))))))) + +(define (miniflux-accounts config) + (match-record config + (user group) + `(,(user-group + (name group) + (system? #t)) + ,(user-account + (name user) + (group group) + (system? #t) + (comment "miniflux server user") + (home-directory "/var/empty") + (shell (file-append shadow "/sbin/nologin")))))) + +(define (miniflux-postgresql-role config) + (list (postgresql-role + (name (miniflux-configuration-user config)) + (create-database? #t)))) + +(define (miniflux-log-files config) + (list (miniflux-configuration-log-file config))) + +(define (miniflux-activation-service-type config) + (match-record config + (user listen-address) + #~(begin + (use-modules (gnu build activation)) + (let ((user (getpwnam #$user))) + (if (absolute-file-name? #$listen-address) + (mkdir-p/perms (dirname #$listen-address) user #o755)))))) + +(define miniflux-service-type + (service-type + (name 'miniflux) + (default-value (miniflux-configuration)) + (extensions + (list (service-extension account-service-type + miniflux-accounts) + (service-extension postgresql-role-service-type + miniflux-postgresql-role) + (service-extension shepherd-root-service-type + miniflux-shepherd-service) + (service-extension log-rotation-service-type + miniflux-log-files) + (service-extension activation-service-type + miniflux-activation-service-type))) + (description "Run Miniflux, minimalist feed reader"))) diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index be3de699a40..b26dc890a44 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -43,7 +43,6 @@ #:use-module (gnu packages firmware) #:use-module (gnu packages linux) #:use-module (gnu packages ocr) - #:use-module (gnu packages openbox) #:use-module (gnu packages package-management) #:use-module (gnu packages ratpoison) #:use-module (gnu packages suckless) diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm index 431996ede48..419b5f0b5bf 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2018 Pierre-Antoine Rouby ;;; Copyright © 2018 Marius Bakke ;;; Copyright © 2024 Maxim Cournoyer +;;; Copyright © 2025 Rodion Goritskov ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,6 +38,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages databases) #:use-module (gnu packages guile-xyz) + #:use-module (gnu packages gnupg) #:use-module (gnu packages patchutils) #:use-module (gnu packages python) #:use-module (gnu packages tls) @@ -56,7 +58,10 @@ %test-hpcguix-web %test-anonip %test-patchwork - %test-agate)) + %test-agate + %test-miniflux-admin-string + %test-miniflux-admin-file + %test-miniflux-socket)) (define %index.html-contents ;; Contents of the /index.html file. @@ -848,3 +853,190 @@ HTTP-PORT." (name "agate") (description "Connect to a running Agate service.") (value (run-agate-test name %agate-os %index.gmi-contents)))) + + +;;; +;;; Miniflux +;;; + +(define %miniflux-create-admin-credentials + #~(begin + (mkdir "/var/miniflux") + (call-with-output-file "/var/miniflux/admin-username" + (lambda (port) + (display "test" port))) + (call-with-output-file "/var/miniflux/admin-password" + (lambda (port) + (display "testpassword" port))))) + +(define miniflux-base-system + (lambda (miniflux-config) + (simple-operating-system + (simple-service 'create-admin-credentials + activation-service-type + %miniflux-create-admin-credentials) + (service dhcpcd-service-type) + (service postgresql-service-type + (postgresql-configuration + (postgresql postgresql-13))) + (service miniflux-service-type + miniflux-config)))) + +(define %miniflux-with-admin-as-string + (miniflux-base-system + (miniflux-configuration + (listen-address "0.0.0.0:8080") + (create-administrator-account? #t) + (administrator-account-name "test") + (administrator-account-password "testpassword")))) + +(define %miniflux-with-admin-as-file + (miniflux-base-system + (miniflux-configuration + (listen-address "0.0.0.0:8080") + (create-administrator-account? #t) + (administrator-account-name "/var/miniflux/admin-username") + (administrator-account-password "/var/miniflux/admin-password")))) + +(define %miniflux-with-socket + (miniflux-base-system + (miniflux-configuration + (listen-address "/var/run/miniflux/miniflux.sock")))) + +(define* (run-miniflux-test name test-os) + (define os + (marionette-operating-system + test-os + #:imported-modules '((gnu services herd) + (guix combinators)))) + + (define forwarded-port 8080) + + (define vm + (virtual-machine + (operating-system os) + (memory-size 512) + (port-forwardings `((8080 . ,forwarded-port))))) + + (define test + (with-extensions (list guile-gcrypt) + (with-imported-modules '((gnu build marionette)) + #~(begin + (use-modules (srfi srfi-64) + (srfi srfi-11) + (gnu build marionette) + (web client) + (web uri) + (web response) + (ice-9 match) + (ice-9 iconv) + (gcrypt base64)) + + (define marionette + (make-marionette (list #$vm))) + + (test-runner-current (system-test-runner #$output)) + (test-begin #$name) + + (test-assert "Check Miniflux service is running" + (begin + (#$retry-on-error + (lambda () + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service '#$(string->symbol "miniflux")) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + (#f #f) + ((running) #t))))) + marionette)) + #:delay 1 + #:times 10))) + + (test-assert "Miniflux TCP port ready, IPv4" + (wait-for-tcp-port #$forwarded-port marionette)) + + (test-assert "Miniflux login page is opened" + (begin + (wait-for-tcp-port #$forwarded-port marionette) + (#$retry-on-error + (lambda () + (let-values (((_ text) + (http-get + #$(format #f "http://localhost:~A/" forwarded-port) + #:decode-body? #t))) + (string-contains text "Sign In - Miniflux"))) + #:times 10 + #:delay 2))) + + (define authorization-header + (let ((encoded (base64-encode (string->bytevector "test:testpassword" "utf-8")))) + `(authorization . (basic . ,encoded)))) + + (test-equal "Miniflux initial admin API call is successful" + 200 + (begin + (wait-for-tcp-port #$forwarded-port marionette) + (#$retry-on-error + (lambda () + (let-values (((response _) + (http-get #$(format #f "http://localhost:~A/v1/me" forwarded-port) + #:headers (list authorization-header) + #:decode-body? #t))) + + (response-code response))) + #:times 10 + #:delay 2))) + + (test-end))))) + (gexp->derivation (string-append name "-test") test)) + +(define* (run-miniflux-socket-test name test-os) + (define os + (marionette-operating-system + test-os + #:imported-modules '((gnu services herd) + (guix combinators)))) + + (define vm + (virtual-machine + (operating-system os) + (memory-size 512))) + + (define test + (with-imported-modules '((gnu build marionette)) + #~(begin + (use-modules (srfi srfi-64) + (gnu build marionette)) + + (define marionette + (make-marionette (list #$vm))) + + (test-runner-current (system-test-runner #$output)) + (test-begin #$name) + + (test-assert "Check socket file is created" + (wait-for-unix-socket "/var/run/miniflux/miniflux.sock" marionette)) + + (test-end)))) + (gexp->derivation (string-append name "-test") test)) + +(define %test-miniflux-admin-string + (system-test + (name "miniflux-admin-string") + (description "Run Miniflux with initial admin credentials as string.") + (value (run-miniflux-test name %miniflux-with-admin-as-string)))) + +(define %test-miniflux-admin-file + (system-test + (name "miniflux-admin-file") + (description "Run Miniflux with initial admin credentials as file.") + (value (run-miniflux-test name %miniflux-with-admin-as-file)))) + +(define %test-miniflux-socket + (system-test + (name "miniflux-socket") + (description "Run Miniflux on unix socket.") + (value (run-miniflux-socket-test name %miniflux-with-socket)))) diff --git a/po/packages/POTFILES.in b/po/packages/POTFILES.in index 0dfbbd6e61b..9522bdc5c70 100644 --- a/po/packages/POTFILES.in +++ b/po/packages/POTFILES.in @@ -461,7 +461,6 @@ gnu/packages/nushell.scm gnu/packages/ocaml.scm gnu/packages/ocr.scm gnu/packages/onc-rpc.scm -gnu/packages/openbox.scm gnu/packages/opencog.scm gnu/packages/openldap.scm gnu/packages/openstack.scm