mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-aenum: Update to 3.1.15.
* gnu/packages/python-xyz.scm (python-aenum): Update to 3.1.15. [build-system]: Switch to pyproject. [arguments] <phases>: Use default 'check; add 'fix-tests. <test-flags>: Skip 3 failing tests. [native-inputs]: Add python-pytest, python-setuptools, and python-wheel. [home-page]: Fix it, Bitbucket's one no longer exists, current one was taken from <https://pypi.org/project/aenum/>. Change-Id: I43994aac2ea688a63066ee8c8aa1855c51632ac2
This commit is contained in:
parent
4c08d7037a
commit
149905f81b
1 changed files with 34 additions and 22 deletions
|
@ -4543,43 +4543,55 @@ helpers.")
|
||||||
language. It aims to be fast.")
|
language. It aims to be fast.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
|
;; XXX: The project might be abandoned and this package has no users in Guix,
|
||||||
|
;; consider to remove if it keeps failing.
|
||||||
|
;; See: <https://github.com/ethanfurman/aenum/issues/45>,
|
||||||
|
;; <https://github.com/ethanfurman/aenum/issues/44>,
|
||||||
|
;; <https://github.com/ethanfurman/aenum/issues/27>.
|
||||||
(define-public python-aenum
|
(define-public python-aenum
|
||||||
(package
|
(package
|
||||||
(name "python-aenum")
|
(name "python-aenum")
|
||||||
(version "3.1.12")
|
(version "3.1.15")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "aenum" version))
|
(uri (pypi-uri "aenum" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1w1ffkcxgnimi5w8802qk6w2qxz9k8hpvsg6yy2zi08ahs8iqlry"))
|
(base32 "0ncmbdblqhqyb2mg73d5663vx3q2xb9q8hmj77zp1y64336pdgcc"))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
;; Delete the Python 2 specific files which won't compile
|
;; Delete the Python 2 specific files which won't compile
|
||||||
;; in Python 3.
|
;; in Python 3.
|
||||||
'(for-each delete-file (find-files "." "_py2.py$")))))
|
'(for-each delete-file (find-files "." "_py2.py$")))))
|
||||||
(build-system python-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases (modify-phases %standard-phases
|
(list
|
||||||
(replace 'check
|
#:test-flags
|
||||||
|
;; These tests are defined in "aenum/test_v3.py" and require a function
|
||||||
|
;; "test_pickle_dump_load" from "aenum/test.py" which is not imported
|
||||||
|
;; into the module's scope.
|
||||||
|
#~(list "-k" (string-join
|
||||||
|
(list "not test_pickle_enum_function_with_qualname"
|
||||||
|
"test_class_nested_enum_and_pickle_protocol_four"
|
||||||
|
"test_subclasses_with_getnewargs_ex")
|
||||||
|
" and not "))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'fix-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
;; We must run the test suite module directly, as it
|
(substitute* "aenum/test_v3.py"
|
||||||
;; fails to define the 'tempdir' variable in scope for
|
;; tempdir variable is not defined in the module.
|
||||||
;; the tests otherwise
|
(("import tempfile.*")
|
||||||
;; (see:https://bitbucket.org/stoneleaf/aenum/\
|
(format #f "import tempfile~%tempdir = tempfile.mkdtemp()~%"))))))))
|
||||||
;; issues/32/running-tests-with-python-setuppy-test).
|
(native-inputs
|
||||||
(invoke "python3" "aenum/test.py")
|
(list python-pytest
|
||||||
;; This one fails with "NameError: name
|
python-setuptools
|
||||||
;; 'test_pickle_dump_load' is not defined" (see:
|
python-wheel))
|
||||||
;; https://bitbucket.org/stoneleaf/aenum/issues/33
|
(home-page "https://github.com/ethanfurman/aenum")
|
||||||
;; /error-running-the-test_v3py-test-suite).
|
|
||||||
;; (invoke "python3" "aenum/test_v3.py")
|
|
||||||
#t)))))
|
|
||||||
(home-page "https://bitbucket.org/stoneleaf/aenum")
|
|
||||||
(synopsis "Advanced enumerations, namedtuples and constants for Python")
|
(synopsis "Advanced enumerations, namedtuples and constants for Python")
|
||||||
(description "The aenum library includes an @code{Enum} base class, a
|
(description
|
||||||
metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
|
"The aenum library includes an @code{Enum} base class, a metaclass-based
|
||||||
class.")
|
@code{NamedTuple} implementation and a @code{NamedConstant} class.")
|
||||||
(license license:bsd-3)))
|
(license license:bsd-3)))
|
||||||
|
|
||||||
(define-public python-calver
|
(define-public python-calver
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue