diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 37508 -> 37524 bytes | |||
-rw-r--r-- | eclass/distutils-r1.eclass | 119 | ||||
-rw-r--r-- | eclass/ninja-utils.eclass | 15 | ||||
-rw-r--r-- | eclass/python-utils-r1.eclass | 16 |
4 files changed, 84 insertions, 66 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex b8e6fc77f656..dc8a7ace981c 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 4cc117dfbd54..97c5e562bc0f 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -178,7 +178,7 @@ esac if [[ ! ${_DISTUTILS_R1} ]]; then [[ ${EAPI} == 6 ]] && inherit eutils xdg-utils -inherit multibuild multiprocessing toolchain-funcs +inherit multibuild multiprocessing ninja-utils toolchain-funcs if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then inherit python-r1 @@ -207,7 +207,7 @@ _distutils_set_globals() { case ${DISTUTILS_USE_PEP517} in flit) bdep+=' - >=dev-python/flit_core-3.7.1[${PYTHON_USEDEP}] + >=dev-python/flit_core-3.8.0[${PYTHON_USEDEP}] ' ;; flit_scm) @@ -217,7 +217,7 @@ _distutils_set_globals() { ;; hatchling) bdep+=' - >=dev-python/hatchling-1.8.1[${PYTHON_USEDEP}] + >=dev-python/hatchling-1.11.1[${PYTHON_USEDEP}] ' ;; jupyter) @@ -227,7 +227,7 @@ _distutils_set_globals() { ;; maturin) bdep+=' - >=dev-util/maturin-0.13.2[${PYTHON_USEDEP}] + >=dev-util/maturin-0.13.7[${PYTHON_USEDEP}] ' ;; no) @@ -236,33 +236,33 @@ _distutils_set_globals() { ;; meson-python) bdep+=' - >=dev-python/meson-python-0.9.0[${PYTHON_USEDEP}] + >=dev-python/meson-python-0.10.0-r1[${PYTHON_USEDEP}] ' ;; pbr) bdep+=' - >=dev-python/pbr-5.10.0[${PYTHON_USEDEP}] + >=dev-python/pbr-5.11.0[${PYTHON_USEDEP}] ' ;; pdm) bdep+=' - >=dev-python/pdm-pep517-1.0.4[${PYTHON_USEDEP}] + >=dev-python/pdm-pep517-1.0.5[${PYTHON_USEDEP}] ' ;; poetry) bdep+=' - >=dev-python/poetry-core-1.2.0[${PYTHON_USEDEP}] + >=dev-python/poetry-core-1.3.2[${PYTHON_USEDEP}] ' ;; setuptools) bdep+=' - >=dev-python/setuptools-65.3.0[${PYTHON_USEDEP}] - dev-python/wheel[${PYTHON_USEDEP}] + >=dev-python/setuptools-65.5.1[${PYTHON_USEDEP}] + >=dev-python/wheel-0.38.4[${PYTHON_USEDEP}] ' ;; sip) bdep+=' - >=dev-python/sip-6.6.2[${PYTHON_USEDEP}] + >=dev-python/sip-6.7.5[${PYTHON_USEDEP}] ' ;; standalone) @@ -277,7 +277,7 @@ _distutils_set_globals() { eqawarn "is enabled." fi else - local setuptools_dep='>=dev-python/setuptools-65.3.0[${PYTHON_USEDEP}]' + local setuptools_dep='>=dev-python/setuptools-65.5.1[${PYTHON_USEDEP}]' case ${DISTUTILS_USE_SETUPTOOLS:-bdepend} in no|manual) @@ -482,7 +482,7 @@ distutils_enable_sphinx() { _DISTUTILS_SPHINX_PLUGINS=( "${@}" ) local deps autodoc=1 d - deps=">=dev-python/sphinx-4.5.0-r1[\${PYTHON_USEDEP}]" + deps=">=dev-python/sphinx-5.3.0[\${PYTHON_USEDEP}]" for d; do if [[ ${d} == --no-autodoc ]]; then autodoc= @@ -506,7 +506,7 @@ distutils_enable_sphinx() { use doc || return 0 local p - for p in ">=dev-python/sphinx-4.5.0-r1" \ + for p in ">=dev-python/sphinx-5.3.0" \ "${_DISTUTILS_SPHINX_PLUGINS[@]}" do python_has_version "${p}[${PYTHON_USEDEP}]" || @@ -514,7 +514,7 @@ distutils_enable_sphinx() { done } else - deps=">=dev-python/sphinx-4.5.0-r1" + deps=">=dev-python/sphinx-5.3.0" fi sphinx_compile_all() { @@ -594,7 +594,7 @@ distutils_enable_tests() { local test_pkg case ${1} in nose) - test_pkg=">=dev-python/nose-1.3.7_p20211111_p1-r1" + test_pkg=">=dev-python/nose-1.3.7_p20221026" ;; pytest) test_pkg=">=dev-python/pytest-7.1.3" @@ -929,6 +929,8 @@ _distutils-r1_print_package_versions() { hatchling) packages+=( dev-python/hatchling + dev-python/hatch-fancy-pypi-readme + dev-python/hatch-vcs ) ;; jupyter) @@ -1263,25 +1265,14 @@ distutils_wheel_install() { local wheel=${2} einfo " Installing ${wheel##*/} to ${root}" - if has_version -b ">=dev-python/gpep517-9"; then - # TODO: inline when we dep on >=9 - local cmd=( - gpep517 install-wheel - --destdir="${root}" - --interpreter="${PYTHON}" - --prefix="${EPREFIX}/usr" - --optimize=all - "${wheel}" - ) - else - local cmd=( - gpep517 install-wheel - --destdir="${root}" - --interpreter="${PYTHON}" - --prefix="${EPREFIX}/usr" - "${wheel}" - ) - fi + local cmd=( + gpep517 install-wheel + --destdir="${root}" + --interpreter="${PYTHON}" + --prefix="${EPREFIX}/usr" + --optimize=all + "${wheel}" + ) printf '%s\n' "${cmd[*]}" "${cmd[@]}" || die "Wheel install failed" @@ -1319,9 +1310,34 @@ distutils_pep517_install() { fi local config_settings= - if [[ -n ${DISTUTILS_ARGS[@]} ]]; then - case ${DISTUTILS_USE_PEP517} in - setuptools) + case ${DISTUTILS_USE_PEP517} in + meson-python) + # TODO: remove the condition once we BDEP on >=0.11 + if has_version -b ">=dev-python/meson-python-0.11"; then + local -x NINJAOPTS=$(get_NINJAOPTS) + config_settings=$( + "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die + import json + import os + import shlex + import sys + + ninjaopts = shlex.split(os.environ["NINJAOPTS"]) + print(json.dumps({ + "setup-args": sys.argv[1:], + "compile-args": [ + "-v", + f"--ninja-args={ninjaopts!r}", + ], + })) + EOF + ) + elif [[ -n ${DISTUTILS_ARGS[@]} ]]; then + die "DISTUTILS_ARGS requires >=dev-python/meson-python-0.11 (missing BDEP?)" + fi + ;; + setuptools) + if [[ -n ${DISTUTILS_ARGS[@]} ]]; then config_settings=$( "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die import json @@ -1329,8 +1345,10 @@ distutils_pep517_install() { print(json.dumps({"--global-option": sys.argv[1:]})) EOF ) - ;; - sip) + fi + ;; + sip) + if [[ -n ${DISTUTILS_ARGS[@]} ]]; then # NB: for practical reasons, we support only --foo=bar, # not --foo bar local arg @@ -1353,12 +1371,13 @@ distutils_pep517_install() { print(json.dumps(args)) EOF ) - ;; - *) + fi + ;; + *) + [[ -n ${DISTUTILS_ARGS[@]} ]] && die "DISTUTILS_ARGS are not supported by ${DISTUTILS_USE_PEP517}" - ;; - esac - fi + ;; + esac local build_backend=$(_distutils-r1_get_backend) einfo " Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}" @@ -1988,16 +2007,6 @@ _distutils-r1_post_python_install() { die "Package installs '${p}' package which is forbidden and likely a bug in the build system." fi done - - if [[ ${DISTUTILS_USE_PEP517} ]]; then - if ! has_version -b ">=dev-python/gpep517-9" - then - # TODO: remove when we dep on >=9 - # we need to recompile everything here in order to embed - # the correct paths - python_optimize "${sitedir}" - fi - fi fi } diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass index 0dffd2eb86ff..9be502fa8ad9 100644 --- a/eclass/ninja-utils.eclass +++ b/eclass/ninja-utils.eclass @@ -62,6 +62,16 @@ case "${NINJA}" in ;; esac +# @FUNCTION: get_NINJAOPTS +# @DESCRIPTION: +# Get the value of NINJAOPTS, inferring them from MAKEOPTS if unset. +get_NINJAOPTS() { + if [[ -z ${NINJAOPTS+set} ]]; then + NINJAOPTS="-j$(makeopts_jobs "${MAKEOPTS}" 999) -l$(makeopts_loadavg "${MAKEOPTS}" 0)" + fi + echo "${NINJAOPTS}" +} + # @FUNCTION: eninja # @USAGE: [<args>...] # @DESCRIPTION: @@ -72,11 +82,8 @@ eninja() { local nonfatal_args=() [[ ${EAPI} != 5 ]] && nonfatal_args+=( -n ) - if [[ -z ${NINJAOPTS+set} ]]; then - NINJAOPTS="-j$(makeopts_jobs "${MAKEOPTS}" 999) -l$(makeopts_loadavg "${MAKEOPTS}" 0)" - fi [[ -n "${NINJA_DEPEND}" ]] || ewarn "Unknown value '${NINJA}' for \${NINJA}" - set -- "${NINJA}" -v ${NINJAOPTS} "$@" + set -- "${NINJA}" -v $(get_NINJAOPTS) "$@" echo "$@" >&2 "$@" || die "${nonfatal_args[@]}" "${*} failed" } diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 7a5f84bd561e..c0099fa756ad 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -455,21 +455,21 @@ _python_export() { local d case ${impl} in python2.7) - PYTHON_PKG_DEP='>=dev-lang/python-2.7.10_p15:2.7';; + PYTHON_PKG_DEP='>=dev-lang/python-2.7.10_p16:2.7';; python3.8) - PYTHON_PKG_DEP=">=dev-lang/python-3.8.13:3.8";; + PYTHON_PKG_DEP=">=dev-lang/python-3.8.15_p3:3.8";; python3.9) - PYTHON_PKG_DEP=">=dev-lang/python-3.9.12:3.9";; + PYTHON_PKG_DEP=">=dev-lang/python-3.9.15_p3:3.9";; python3.10) - PYTHON_PKG_DEP=">=dev-lang/python-3.10.4:3.10";; + PYTHON_PKG_DEP=">=dev-lang/python-3.10.8_p3:3.10";; python3.11) - PYTHON_PKG_DEP=">=dev-lang/python-3.11.0_beta4:3.11";; + PYTHON_PKG_DEP=">=dev-lang/python-3.11.0_p2:3.11";; python*) PYTHON_PKG_DEP="dev-lang/python:${impl#python}";; pypy) - PYTHON_PKG_DEP='>=dev-python/pypy-7.3.9:0=';; + PYTHON_PKG_DEP='>=dev-python/pypy-7.3.9-r2:0=';; pypy3) - PYTHON_PKG_DEP='>=dev-python/pypy3-7.3.9_p1:0=';; + PYTHON_PKG_DEP='>=dev-python/pypy3-7.3.9_p9:0=';; *) die "Invalid implementation: ${impl}" esac @@ -1339,6 +1339,8 @@ epytest() { # not to have DISPLAY at all, causing crashes sometimes # and causing us to miss missing virtualx usage -p no:xvfb + # tavern is intrusive and breaks test suites of various packages + -p no:tavern ) local x for x in "${EPYTEST_DESELECT[@]}"; do |