mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-13 16:06:59 +02:00
eclass/distutils-r1: Sync with Gentoo
It's from Gentoo commit 3900e6f2244e545c211959ab7e89347640b9828c.
This commit is contained in:
parent
bc7c58567f
commit
ee6f15f7bf
@ -107,7 +107,7 @@ esac
|
|||||||
# The variable specifies the build system used. Currently,
|
# The variable specifies the build system used. Currently,
|
||||||
# the following values are supported:
|
# the following values are supported:
|
||||||
#
|
#
|
||||||
# - flit - flit_core backend
|
# - flit - flit-core backend
|
||||||
#
|
#
|
||||||
# - flit_scm - flit_scm backend
|
# - flit_scm - flit_scm backend
|
||||||
#
|
#
|
||||||
@ -210,7 +210,7 @@ _distutils_set_globals() {
|
|||||||
case ${DISTUTILS_USE_PEP517} in
|
case ${DISTUTILS_USE_PEP517} in
|
||||||
flit)
|
flit)
|
||||||
bdep+='
|
bdep+='
|
||||||
>=dev-python/flit_core-3.8.0[${PYTHON_USEDEP}]
|
>=dev-python/flit-core-3.8.0[${PYTHON_USEDEP}]
|
||||||
'
|
'
|
||||||
;;
|
;;
|
||||||
flit_scm)
|
flit_scm)
|
||||||
@ -225,7 +225,7 @@ _distutils_set_globals() {
|
|||||||
;;
|
;;
|
||||||
jupyter)
|
jupyter)
|
||||||
bdep+='
|
bdep+='
|
||||||
>=dev-python/jupyter_packaging-0.12.3[${PYTHON_USEDEP}]
|
>=dev-python/jupyter-packaging-0.12.3[${PYTHON_USEDEP}]
|
||||||
'
|
'
|
||||||
;;
|
;;
|
||||||
maturin)
|
maturin)
|
||||||
@ -330,9 +330,12 @@ _distutils_set_globals() {
|
|||||||
|
|
||||||
if [[ ${DISTUTILS_EXT} ]]; then
|
if [[ ${DISTUTILS_EXT} ]]; then
|
||||||
DEPEND="${PYTHON_DEPS}"
|
DEPEND="${PYTHON_DEPS}"
|
||||||
IUSE="debug"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ${DISTUTILS_EXT} ]]; then
|
||||||
|
IUSE="debug"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
_distutils_set_globals
|
_distutils_set_globals
|
||||||
unset -f _distutils_set_globals
|
unset -f _distutils_set_globals
|
||||||
@ -918,12 +921,12 @@ _distutils-r1_print_package_versions() {
|
|||||||
case ${DISTUTILS_USE_PEP517} in
|
case ${DISTUTILS_USE_PEP517} in
|
||||||
flit)
|
flit)
|
||||||
packages+=(
|
packages+=(
|
||||||
dev-python/flit_core
|
dev-python/flit-core
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
flit_scm)
|
flit_scm)
|
||||||
packages+=(
|
packages+=(
|
||||||
dev-python/flit_core
|
dev-python/flit-core
|
||||||
dev-python/flit_scm
|
dev-python/flit_scm
|
||||||
dev-python/setuptools-scm
|
dev-python/setuptools-scm
|
||||||
)
|
)
|
||||||
@ -937,7 +940,7 @@ _distutils-r1_print_package_versions() {
|
|||||||
;;
|
;;
|
||||||
jupyter)
|
jupyter)
|
||||||
packages+=(
|
packages+=(
|
||||||
dev-python/jupyter_packaging
|
dev-python/jupyter-packaging
|
||||||
dev-python/setuptools
|
dev-python/setuptools
|
||||||
dev-python/setuptools-scm
|
dev-python/setuptools-scm
|
||||||
dev-python/wheel
|
dev-python/wheel
|
||||||
@ -1305,6 +1308,7 @@ distutils_pep517_install() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local root=${1}
|
local root=${1}
|
||||||
|
export BUILD_DIR
|
||||||
local -x WHEEL_BUILD_DIR=${BUILD_DIR}/wheel
|
local -x WHEEL_BUILD_DIR=${BUILD_DIR}/wheel
|
||||||
mkdir -p "${WHEEL_BUILD_DIR}" || die
|
mkdir -p "${WHEEL_BUILD_DIR}" || die
|
||||||
|
|
||||||
@ -1316,23 +1320,42 @@ distutils_pep517_install() {
|
|||||||
case ${DISTUTILS_USE_PEP517} in
|
case ${DISTUTILS_USE_PEP517} in
|
||||||
meson-python)
|
meson-python)
|
||||||
local -x NINJAOPTS=$(get_NINJAOPTS)
|
local -x NINJAOPTS=$(get_NINJAOPTS)
|
||||||
config_settings=$(
|
if has_version -b '>=dev-python/meson-python-0.13'; then
|
||||||
"${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
|
config_settings=$(
|
||||||
import json
|
"${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
|
||||||
import os
|
import json
|
||||||
import shlex
|
import os
|
||||||
import sys
|
import shlex
|
||||||
|
import sys
|
||||||
|
|
||||||
ninjaopts = shlex.split(os.environ["NINJAOPTS"])
|
ninjaopts = shlex.split(os.environ["NINJAOPTS"])
|
||||||
print(json.dumps({
|
print(json.dumps({
|
||||||
"setup-args": sys.argv[1:],
|
"builddir": "${BUILD_DIR}",
|
||||||
"compile-args": [
|
"setup-args": sys.argv[1:],
|
||||||
"-v",
|
"compile-args": ["-v"] + ninjaopts,
|
||||||
f"--ninja-args={ninjaopts!r}",
|
}))
|
||||||
],
|
EOF
|
||||||
}))
|
)
|
||||||
EOF
|
else
|
||||||
)
|
config_settings=$(
|
||||||
|
"${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import shlex
|
||||||
|
import sys
|
||||||
|
|
||||||
|
ninjaopts = shlex.split(os.environ["NINJAOPTS"])
|
||||||
|
print(json.dumps({
|
||||||
|
"builddir": "${BUILD_DIR}",
|
||||||
|
"setup-args": sys.argv[1:],
|
||||||
|
"compile-args": [
|
||||||
|
"-v",
|
||||||
|
f"--ninja-args={ninjaopts!r}",
|
||||||
|
],
|
||||||
|
}))
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
setuptools)
|
setuptools)
|
||||||
if [[ -n ${DISTUTILS_ARGS[@]} ]]; then
|
if [[ -n ${DISTUTILS_ARGS[@]} ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user