mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-alchemy-mock: Switch to pyproject.
* gnu/packages/databases.scm (python-alchemy-mock): [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]: Pass pytest options through <#:test-flags> rather than <#:phases>. [native-inputs]: Add python-setuptools, python-wheel. Change-Id: I03ad45d452c11001b500b513682c338f3bff33e8 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
parent
8cdd561e78
commit
26a3deadd4
1 changed files with 21 additions and 27 deletions
|
@ -4394,34 +4394,28 @@ You might also want to install the following optional dependencies:
|
||||||
(name "python-alchemy-mock")
|
(name "python-alchemy-mock")
|
||||||
(version "0.4.3")
|
(version "0.4.3")
|
||||||
(home-page "https://github.com/miki725/alchemy-mock")
|
(home-page "https://github.com/miki725/alchemy-mock")
|
||||||
(source (origin
|
(source
|
||||||
(method url-fetch)
|
(origin
|
||||||
(uri (pypi-uri "alchemy-mock" version))
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/miki725/alchemy-mock")
|
||||||
|
(commit version)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32 "053gj8d8ca5kpp7v61wd7lcm9mqp9xqz3d8pp9spdbcjsaqz9nk9"))
|
||||||
"0ylxygl3bcdapzz529n8wgk7vx9gjwb3ism564ypkpd7dbsw653r"))
|
(snippet #~(begin
|
||||||
(snippet
|
(use-modules (guix build utils))
|
||||||
#~(begin (use-modules (guix build utils))
|
|
||||||
(substitute* "alchemy_mock/comparison.py"
|
(substitute* "alchemy_mock/comparison.py"
|
||||||
(("collections\\.Mapping") "collections.abc.Mapping"))))))
|
(("collections\\.Mapping")
|
||||||
(build-system python-build-system)
|
"collections.abc.Mapping"))))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases (modify-phases %standard-phases
|
(list
|
||||||
(replace 'check
|
#:test-flags
|
||||||
(lambda _
|
#~(list "--doctest-modules" "alchemy_mock")))
|
||||||
;; Create pytest.ini that adds doctest options to
|
(native-inputs (list python-mock python-pytest python-setuptools
|
||||||
;; prevent test failure. Taken from tox.ini.
|
python-wheel))
|
||||||
(call-with-output-file "pytest.ini"
|
(propagated-inputs (list python-sqlalchemy))
|
||||||
(lambda (port)
|
|
||||||
(format port "[pytest]
|
|
||||||
doctest_optionflags=IGNORE_EXCEPTION_DETAIL
|
|
||||||
")))
|
|
||||||
(invoke "pytest" "-vv" "--doctest-modules"
|
|
||||||
"alchemy_mock/"))))))
|
|
||||||
(native-inputs
|
|
||||||
(list python-mock python-pytest))
|
|
||||||
(propagated-inputs
|
|
||||||
(list python-six python-sqlalchemy))
|
|
||||||
(synopsis "Mock helpers for SQLAlchemy")
|
(synopsis "Mock helpers for SQLAlchemy")
|
||||||
(description
|
(description
|
||||||
"This package provides mock helpers for SQLAlchemy that makes it easy
|
"This package provides mock helpers for SQLAlchemy that makes it easy
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue