mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/setuptools: Bump to 62.4.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST python-gentoo-patches-3.10.4.tar.xz 8592 BLAKE2B 67fba3e1fedb17430e5cd93da995b4acaf714db512031b5a2f775a25f793f007941561663cfa413d645ccddc2e22d65d250a40fa166cafda8805488d877ff57d SHA512 3ed2b8ff8f1eb8febe7dcd4b5d13d6d54468be1d525f8f1118977d3bbc78f690a597b09383939d023b03380a306e4bff1693382e29ff562312d803305b1709b2
|
||||
DIST setuptools-62.3.3.tar.gz 2586270 BLAKE2B 764f90a5b2585f05b6ae0ad23568a08069bb4ca776c969635dfaceb6b3f64dc6d56291c3e9f0a4540f0416eab9122f5d7d6ad193a5f604949b5827f3cfc2d1a9 SHA512 a7ca81b3f7adedb15a4ff3607654d1a4615de1b30a22aa5cbe4b0a8077db8bdd9348167cbb6deb97e1076d320c2a2a4b0d30acda389905d6503786902eeb66af
|
||||
DIST setuptools-62.3.4.tar.gz 2590435 BLAKE2B 089bb185b65107d54b3a17b423caa28b0505566f8e19efaf34ac347e074492278699295b5e8856756312182a78d524ae5098e86783c5c6e089bdbe2de1d1f60d SHA512 edd9595971ee3cca2d1280e695401d8e4aa38796af89f24132d81b897004147ff4f4fc8daebf6fef0606512cc71e09487a2cb416deeecd851a82abed30f57887
|
||||
DIST setuptools-62.4.0.tar.gz 2592908 BLAKE2B 5221c32545d451fe9e80f6c78296044fc805e995578f32d2a8809483c00ea84f918a3bb5e1d1a6d184533282d96a68fab8b4d303d839255a640952d1c575f53a SHA512 552bb6c93793a438d8d319b1ef51932e7e15fab965b9fc81a4f15015e02f3e7318b9df9890c3fb59fac1ec443c17cd5cbd17b7227a6a82deb355230673ae9ec5
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
From 8911d627245f4389488c5d65cce6d1258f4cce7b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Tue, 14 Jun 2022 05:58:20 +0200
|
||||
Subject: [PATCH] make -OO enable both opt-1 and opt-2
|
||||
|
||||
---
|
||||
setuptools/_distutils/command/build_py.py | 10 ++++------
|
||||
setuptools/_distutils/command/install_lib.py | 14 ++++++--------
|
||||
2 files changed, 10 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/setuptools/_distutils/command/build_py.py b/setuptools/_distutils/command/build_py.py
|
||||
index 1b22004e..88565bce 100644
|
||||
--- a/setuptools/_distutils/command/build_py.py
|
||||
+++ b/setuptools/_distutils/command/build_py.py
|
||||
@@ -325,11 +325,9 @@ class build_py(Command):
|
||||
outputs.append(
|
||||
importlib.util.cache_from_source(filename, optimization='')
|
||||
)
|
||||
- if self.optimize > 0:
|
||||
+ for opt in range(1, self.optimize + 1):
|
||||
outputs.append(
|
||||
- importlib.util.cache_from_source(
|
||||
- filename, optimization=self.optimize
|
||||
- )
|
||||
+ importlib.util.cache_from_source(filename, optimization=opt)
|
||||
)
|
||||
|
||||
outputs += [
|
||||
@@ -403,10 +401,10 @@ class build_py(Command):
|
||||
byte_compile(
|
||||
files, optimize=0, force=self.force, prefix=prefix, dry_run=self.dry_run
|
||||
)
|
||||
- if self.optimize > 0:
|
||||
+ for opt in range(1, self.optimize + 1):
|
||||
byte_compile(
|
||||
files,
|
||||
- optimize=self.optimize,
|
||||
+ optimize=opt,
|
||||
force=self.force,
|
||||
prefix=prefix,
|
||||
dry_run=self.dry_run,
|
||||
diff --git a/setuptools/_distutils/command/install_lib.py b/setuptools/_distutils/command/install_lib.py
|
||||
index ad3089c8..7f906a29 100644
|
||||
--- a/setuptools/_distutils/command/install_lib.py
|
||||
+++ b/setuptools/_distutils/command/install_lib.py
|
||||
@@ -25,8 +25,8 @@ class install_lib(Command):
|
||||
# 2) compile .pyc only (--compile --no-optimize; default)
|
||||
# 3) compile .pyc and "opt-1" .pyc (--compile --optimize)
|
||||
# 4) compile "opt-1" .pyc only (--no-compile --optimize)
|
||||
- # 5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
|
||||
- # 6) compile "opt-2" .pyc only (--no-compile --optimize-more)
|
||||
+ # 5) compile .pyc, "opt-1" and "opt-2" .pyc (--compile --optimize-more)
|
||||
+ # 6) compile "opt-1" and "opt-2" .pyc (--no-compile --optimize-more)
|
||||
#
|
||||
# The UI for this is two options, 'compile' and 'optimize'.
|
||||
# 'compile' is strictly boolean, and only decides whether to
|
||||
@@ -142,10 +142,10 @@ class install_lib(Command):
|
||||
prefix=install_root,
|
||||
dry_run=self.dry_run,
|
||||
)
|
||||
- if self.optimize > 0:
|
||||
+ for opt in range(1, self.optimize + 1):
|
||||
byte_compile(
|
||||
files,
|
||||
- optimize=self.optimize,
|
||||
+ optimize=opt,
|
||||
force=self.force,
|
||||
prefix=install_root,
|
||||
verbose=self.verbose,
|
||||
@@ -182,11 +182,9 @@ class install_lib(Command):
|
||||
bytecode_files.append(
|
||||
importlib.util.cache_from_source(py_file, optimization='')
|
||||
)
|
||||
- if self.optimize > 0:
|
||||
+ for opt in range(1, self.optimize + 1):
|
||||
bytecode_files.append(
|
||||
- importlib.util.cache_from_source(
|
||||
- py_file, optimization=self.optimize
|
||||
- )
|
||||
+ importlib.util.cache_from_source(py_file, optimization=opt)
|
||||
)
|
||||
|
||||
return bytecode_files
|
||||
--
|
||||
2.35.1
|
||||
|
||||
130
dev-python/setuptools/setuptools-62.4.0.ebuild
Normal file
130
dev-python/setuptools/setuptools-62.4.0.ebuild
Normal file
@@ -0,0 +1,130 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
|
||||
EAPI=7
|
||||
|
||||
DISTUTILS_USE_PEP517=standalone
|
||||
PYTHON_TESTED=( python3_{8..11} pypy3 )
|
||||
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
|
||||
PYTHON_REQ_USE="xml(+)"
|
||||
|
||||
inherit distutils-r1 multiprocessing
|
||||
|
||||
DESCRIPTION="Collection of extensions to Distutils"
|
||||
HOMEPAGE="
|
||||
https://github.com/pypa/setuptools/
|
||||
https://pypi.org/project/setuptools/
|
||||
"
|
||||
SRC_URI="
|
||||
mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/appdirs-1.4.4-r2[${PYTHON_USEDEP}]
|
||||
>=dev-python/jaraco-text-3.7.0-r1[${PYTHON_USEDEP}]
|
||||
>=dev-python/more-itertools-8.12.0-r1[${PYTHON_USEDEP}]
|
||||
>=dev-python/nspektr-0.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/ordered-set-4.0.2-r1[${PYTHON_USEDEP}]
|
||||
>=dev-python/packaging-21.3-r2[${PYTHON_USEDEP}]
|
||||
>=dev-python/tomli-2.0.1[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/importlib_metadata-4.11.1[${PYTHON_USEDEP}]
|
||||
' 3.8 3.9)
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/importlib_resources-5.4.0-r3[${PYTHON_USEDEP}]
|
||||
' 3.8)
|
||||
"
|
||||
BDEPEND="
|
||||
${RDEPEND}
|
||||
>=dev-python/wheel-0.37.1-r1[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/build[${PYTHON_USEDEP}]
|
||||
>=dev-python/ini2toml-0.9[${PYTHON_USEDEP}]
|
||||
>=dev-python/filelock-3.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/jaraco-envs-2.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/jaraco-path-3.2.0[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/pip[${PYTHON_USEDEP}]
|
||||
dev-python/pip-run[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
>=dev-python/tomli-w-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/virtualenv-20[${PYTHON_USEDEP}]
|
||||
dev-python/wheel[${PYTHON_USEDEP}]
|
||||
' "${PYTHON_TESTED[@]}")
|
||||
)
|
||||
"
|
||||
PDEPEND="
|
||||
>=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools_scm[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
DOCS=( {CHANGES,README}.rst )
|
||||
|
||||
src_prepare() {
|
||||
local PATCHES=(
|
||||
# TODO: remove this when we're 100% PEP517 mode
|
||||
"${FILESDIR}"/setuptools-62.4.0-py-compile.patch
|
||||
)
|
||||
|
||||
# remove bundled dependencies, setuptools will switch to system deps
|
||||
# automatically
|
||||
rm -r */_vendor || die
|
||||
|
||||
# remove the ugly */extern hack that breaks on unvendored deps
|
||||
rm -r */extern || die
|
||||
find -name '*.py' -exec sed \
|
||||
-e 's:from \w*[.]\+extern ::' -e 's:\w*[.]\+extern[.]::' \
|
||||
-i {} + || die
|
||||
|
||||
distutils-r1_src_prepare
|
||||
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local -x SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
|
||||
if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
|
||||
return
|
||||
fi
|
||||
|
||||
local EPYTEST_DESELECT=(
|
||||
# network
|
||||
# TODO: see if PRE_BUILT_SETUPTOOLS_* helps
|
||||
setuptools/tests/config/test_apply_pyprojecttoml.py::test_apply_pyproject_equivalent_to_setupcfg
|
||||
setuptools/tests/integration/test_pip_install_sdist.py::test_install_sdist
|
||||
setuptools/tests/test_distutils_adoption.py
|
||||
setuptools/tests/test_setuptools.py::test_its_own_wheel_does_not_contain_tests
|
||||
setuptools/tests/test_virtualenv.py::test_clean_env_install
|
||||
setuptools/tests/test_virtualenv.py::test_no_missing_dependencies
|
||||
'setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[None]'
|
||||
setuptools/tests/test_virtualenv.py::test_test_command_install_requirements
|
||||
# unhappy with pytest-xdist?
|
||||
setuptools/tests/test_easy_install.py::TestUserInstallTest::test_local_index
|
||||
# TODO
|
||||
setuptools/tests/config/test_setupcfg.py::TestConfigurationReader::test_basic
|
||||
setuptools/tests/config/test_setupcfg.py::TestConfigurationReader::test_ignore_errors
|
||||
setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_allow_hosts
|
||||
setuptools/tests/test_extern.py::test_distribution_picklable
|
||||
setuptools/tests/test_test.py::test_tests_are_run_once
|
||||
# expects bundled deps in virtualenv
|
||||
setuptools/tests/config/test_apply_pyprojecttoml.py::TestMeta::test_example_file_in_sdist
|
||||
setuptools/tests/config/test_apply_pyprojecttoml.py::TestMeta::test_example_file_not_in_wheel
|
||||
setuptools/tests/test_editable_install.py::test_editable_with_pyproject
|
||||
)
|
||||
|
||||
# test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
|
||||
# It tries to sandbox the test in a tempdir
|
||||
HOME="${PWD}" epytest -n "$(makeopts_jobs)" setuptools
|
||||
}
|
||||
Reference in New Issue
Block a user