• [gentoo-dev] [PATCH 1/5] distutils-r1.eclass: esetup.py, omit setup.cfg

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue Jan 31 12:50:01 2023
    Closes: https://bugs.gentoo.org/891959
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 8 +++++++-
    1 file changed, 7 insertions(+), 1 deletion(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 8896768d3ce9..65d48a19e73d 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -647,7 +647,13 @@ esetup.py() {

    local setup_py=( setup.py )
    if [[ ! -f setup.py ]]; then
    - if [[ ! -f setup.cfg ]]; then
    + # The following call can succeed even if the package does not
    + # feature any setuptools configuration. In non-PEP517 mode this
    + # could lead to installing an "empty" package. In PEP517 mode, + # we verify the build system when invoking the backend,
    + # rendering this check redundant (and broken for projects using + # pyproject.toml configuration).
    + if [[ ! ${DISTUTILS_USE_PEP517} && ! -f setup.cfg ]]; then
    die "${FUNCNAME}: setup.py nor setup.cfg not found"
    fi
    setup_py=( -c "from setuptools import setup; setup()" )
    --
    2.39.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue Jan 31 12:50:02 2023
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 20 ++++++++++----------
    1 file changed, 10 insertions(+), 10 deletions(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 65d48a19e73d..0bf5d51a363e 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -195,7 +195,7 @@ _distutils_set_globals() {
    fi

    bdep='
    - >=dev-python/gpep517-9[${PYTHON_USEDEP}]
    + >=dev-python/gpep517-13[${PYTHON_USEDEP}]
    '
    case ${DISTUTILS_USE_PEP517} in
    flit)
    @@ -210,7 +210,7 @@ _distutils_set_globals() {
    ;;
    hatchling)
    bdep+='
    - >=dev-python/hatchling-1.11.1[${PYTHON_USEDEP}]
    + >=dev-python/hatchling-1.12.2[${PYTHON_USEDEP}]
    '
    ;;
    jupyter)
    @@ -220,7 +220,7 @@ _distutils_set_globals() {
    ;;
    maturin)
    bdep+='
    - >=dev-util/maturin-0.13.7[${PYTHON_USEDEP}]
    + >=dev-util/maturin-0.14.10[${PYTHON_USEDEP}]
    '
    ;;
    no)
    @@ -229,33 +229,33 @@ _distutils_set_globals() {
    ;;
    meson-python
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue Jan 31 12:50:02 2023
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/python-utils-r1.eclass | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index bc397229a670..be2183463550 100644
    --- a/eclass/python-utils-r1.eclass
    +++ b/eclass/python-utils-r1.eclass
    @@ -441,13 +441,13 @@ _python_export() {
    local d
    case ${impl} in
    python3.9)
    - PYTHON_PKG_DEP=">=dev-lang/python-3.9.16:3.9";;
    + PYTHON_PKG_DEP=">=dev-lang/python-3.9.16-r1:3.9";;
    python3.10)
    - PYTHON_PKG_DEP=">=dev-lang/python-3.10.9:3.10";;
    + PYTHON_PKG_DEP=">=dev-lang/python-3.10.9-r1:3.10";;
    python3.11)
    - PYTHON_PKG_DEP=">=dev-lang/python-3.11.1:3.11";;
    + PYTHON_PKG_DEP=">=dev-lang/python-3.11.1-r1:3.11";;
    pypy3)
    - PYTHON_PKG_DEP='>=dev-python/pypy3-7.3.10-r1:0=';;
    + PYTHON_PKG_DEP='>=dev-python/pypy3-7.3.11-r1:0=';;
    *)
    die "Invalid implementation: ${impl}"
    esac
    --
    2.39.1

    --- SoupGate-Win32 v1.05
    * Origin
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue Jan 31 12:50:01 2023
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 0bf5d51a363e..ab688a64e1a8 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -582,7 +582,7 @@ distutils_enable_tests() {
    test_pkg=">=dev-python/nose-1.3.7_p20221026"
    ;;
    pytest)
    - test_pkg=">=dev-python/pytest-7.1.3"
    + test_pkg=">=dev-python/pytest-7.2.1"
    ;;
    setup.py)
    ;;
    --
    2.39.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue Jan 31 12:50:02 2023
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 7 +------
    1 file changed, 1 insertion(+), 6 deletions(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index ab688a64e1a8..5b7a03b9bcc2 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -1039,11 +1039,6 @@ distutils-r1_python_prepare_all() {
    python_export_utf8_locale
    _distutils-r1_print_package_versions

    - if [[ -n ${SYSROOT} ]] && ! has_version -b ">=dev-python/gpep517-12"; then
    - ewarn ">=dev-python/gpep517-12 features cross-compilation fixes."
    - ewarn "Please consider upgrading to avoid issues."
    - fi
    -
    _DISTUTILS_DEFAULT_CALLED=1
    }

    @@ -1376,7 +1371,7 @@ distutils_pep517_install() {
    if [[ -n ${config_settings} ]]; then
    cmd+=( --config-json "${config_settings}" )
    fi
    - if [[ -n ${SYSROOT} ]] && has_version -b ">=dev-python/gpep517-12"; then
    + if [[ -n ${SYSROOT} ]]; then
    cmd+=( --sysroot "${SYSROOT}" )
    fi
    printf '%s\n' "${cmd[*]}"
    --
    2.39.1

    --- SoupGate-Win32 v1.05
    *