1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-15 19:40:46 +02:00

gnu: python-internetarchive: Update to 5.1.0.

* gnu/packages/web.scm (python-internetarchive): Update to 5.1.0.
[source]: Remove snippet.
[build-system]: Use pyproject-build-system.
[arguments]: Remove custom 'check phase; use test-flags.
[propagated-inputs]: Add python-importlib-metadata and python-tqdm; update
python-jsonpatch and python-schema.
[native-inputs]: Add nss-certs-for-test, python-setuptools, and python-wheel.

Change-Id: I8b5ea44e118ccb30b4e470957823a3f4dde89f43
This commit is contained in:
Ricardo Wurmus 2025-01-16 12:31:05 +01:00
parent 4de70c1a77
commit d42e59c575
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -7160,7 +7160,7 @@ command-line arguments or read from stdin.")
(define-public python-internetarchive (define-public python-internetarchive
(package (package
(name "python-internetarchive") (name "python-internetarchive")
(version "1.8.5") (version "5.1.0")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -7170,47 +7170,34 @@ command-line arguments or read from stdin.")
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"0ih7hplv92wbv6cmgc1gs0v35qkajwicalwcq8vcljw30plr24fp")) "186nx0dj0lgqrqkg9kzng5h0scbz3m6bk44vj83wzckr8yh3q08z"))))
(modules '((guix build utils))) (build-system pyproject-build-system)
(snippet
'(begin
;; Python 3.7 removed `_pattern_type'.
(for-each (lambda (file)
(chmod file #o644)
(substitute* file
(("^import re\n" line)
(string-append line "re._pattern_type = re.Pattern\n"))))
(find-files "." "\\.py$"))
;; Mapping got moved to collections.abc
(substitute* "internetarchive/utils.py"
(("from collections import Mapping")
"from collections.abc import Mapping"))))))
(build-system python-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:test-flags
(delete 'check) '(list "-k"
(add-after 'install 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
(setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
":" (getenv "PATH")))
(invoke "py.test" "-v" "-k"
(string-append (string-append
;; These tests attempt to make a connection to ;; These tests need Internet access.
;; an external web service.
"not test_get_item_with_kwargs" "not test_get_item_with_kwargs"
" and not test_ia"))))))) " and not test_upload"
" and not test_ia"))))
(propagated-inputs (propagated-inputs
(list python-requests (list python-backports-csv
python-jsonpatch-0.4
python-docopt
python-clint python-clint
python-docopt
python-importlib-metadata
python-jsonpatch
python-requests
python-six python-six
python-schema-0.5 python-schema
python-backports-csv)) python-tqdm))
(native-inputs (native-inputs
(list python-pytest python-pytest-capturelog python-responses)) (list nss-certs-for-test
python-pytest
python-pytest-capturelog
python-responses
python-setuptools
python-wheel))
(home-page "https://github.com/jjjake/internetarchive") (home-page "https://github.com/jjjake/internetarchive")
(synopsis "Command-line interface to archive.org") (synopsis "Command-line interface to archive.org")
(description "@code{ia} is a command-line tool for using (description "@code{ia} is a command-line tool for using