mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 12:16:41 +02:00
eclass/distutils-r1: Sync with Gentoo
It's from Gentoo commit 80a7960b9faa73152efd81e316f1083644817a02.
This commit is contained in:
parent
884d913e8e
commit
8bf25b4b83
@ -195,7 +195,6 @@ esac
|
||||
# @CODE
|
||||
|
||||
# @ECLASS_VARIABLE: DISTUTILS_ALLOW_WHEEL_REUSE
|
||||
# @DEFAULT_UNSET
|
||||
# @USER_VARIABLE
|
||||
# @DESCRIPTION:
|
||||
# If set to a non-empty value, the eclass is allowed to reuse a wheel
|
||||
@ -205,6 +204,7 @@ esac
|
||||
# This is an optimization that can avoid the overhead of calling into
|
||||
# the build system in pure Python packages and packages using the stable
|
||||
# Python ABI.
|
||||
DISTUTILS_ALLOW_WHEEL_REUSE=1
|
||||
|
||||
# @ECLASS_VARIABLE: BUILD_DIR
|
||||
# @OUTPUT_VARIABLE
|
||||
@ -572,6 +572,9 @@ distutils_enable_sphinx() {
|
||||
# with the specified test runner. Also copies the current value
|
||||
# of RDEPEND to test?-BDEPEND. The test-runner argument must be one of:
|
||||
#
|
||||
# - import-check: `pytest --import-check` fallback (for use when there are
|
||||
# no tests to run)
|
||||
#
|
||||
# - pytest: dev-python/pytest
|
||||
#
|
||||
# - setup.py: setup.py test (no deps included)
|
||||
@ -597,9 +600,13 @@ distutils_enable_tests() {
|
||||
[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: test-runner"
|
||||
|
||||
local test_deps=${RDEPEND}
|
||||
local test_pkgs=
|
||||
case ${1} in
|
||||
import-check)
|
||||
test_pkgs+=' dev-python/pytest-import-check[${PYTHON_USEDEP}]'
|
||||
;&
|
||||
pytest)
|
||||
local test_pkgs='>=dev-python/pytest-7.4.4[${PYTHON_USEDEP}]'
|
||||
test_pkgs+=' >=dev-python/pytest-7.4.4[${PYTHON_USEDEP}]'
|
||||
if [[ -n ${EPYTEST_TIMEOUT} ]]; then
|
||||
test_pkgs+=' dev-python/pytest-timeout[${PYTHON_USEDEP}]'
|
||||
fi
|
||||
@ -1560,6 +1567,9 @@ distutils-r1_python_test() {
|
||||
_python_check_EPYTHON
|
||||
|
||||
case ${_DISTUTILS_TEST_RUNNER} in
|
||||
import-check)
|
||||
epytest --import-check "${BUILD_DIR}/install$(python_get_sitedir)"
|
||||
;;
|
||||
pytest)
|
||||
epytest
|
||||
;;
|
||||
@ -1933,7 +1943,7 @@ _distutils-r1_compare_installed_files() {
|
||||
# Perform the check only if at least one potentially reusable wheel
|
||||
# has been produced. Nonpure packages (e.g. NumPy) may install
|
||||
# interpreter configuration details into sitedir.
|
||||
if [[ ${!DISTUTILS_WHEELS[*]} != *-none-any.whl* &&
|
||||
if [[ ${!DISTUTILS_WHEELS[*]} != *py3-none-any.whl* &&
|
||||
${!DISTUTILS_WHEELS[*]} != *-abi3-*.whl ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user