mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
gnu: python-brotlicffi: Fix tests.
* gnu/packages/python-compression.scm (python-brotlicffi): Fix tests. [arguments] <phases>: Add 'set-brotli-source. [native-inputs]: Add python-pytest. Change-Id: I50555c234d4dbf20f2cdd846f8191c8da7349247
This commit is contained in:
@@ -394,9 +394,24 @@ Jump conversion filter by CFFI for Python.")
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'use-shared-brotli
|
||||
(lambda _
|
||||
(setenv "USE_SHARED_BROTLI" "1"))))))
|
||||
(setenv "USE_SHARED_BROTLI" "1")))
|
||||
(add-before 'check 'set-brotli-source
|
||||
(lambda _
|
||||
(let* ((brotli-source
|
||||
#+(package-source (this-package-input "brotli")))
|
||||
(brotli-test-data
|
||||
(string-append brotli-source "/tests/testdata"))
|
||||
(brotli-version-source
|
||||
(string-append brotli-source "/c/common/version.h")))
|
||||
(substitute* "test/conftest.py"
|
||||
(("TEST_DATA_DIR = .*")
|
||||
(format #f "TEST_DATA_DIR = ~s~%" brotli-test-data)))
|
||||
(substitute* "test/test_compatibility.py"
|
||||
(("open\\(version_h\\)")
|
||||
(format #f "open(~s)" brotli-version-source)))))))))
|
||||
(native-inputs
|
||||
(list python-setuptools
|
||||
(list python-pytest
|
||||
python-setuptools
|
||||
python-wheel))
|
||||
(inputs
|
||||
(list brotli))
|
||||
|
||||
Reference in New Issue
Block a user