mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 01:46:58 +02:00
dev-python/setuptools: Sync with gentoo
It's from gentoo commit 30135c0cba46171bb19dda992b075a8ed1c6b00c.
This commit is contained in:
parent
f78253b5c0
commit
5d278ee374
@ -1,2 +1,3 @@
|
|||||||
DIST setuptools-46.4.0.zip 865912 BLAKE2B 452d36132f5648c79c7e1616a93ff6a39ab2f64b2864ee397b4f57e7f72c47d418ff274f5decd35b0591b09800ad2a7cbd71c283550bd0e60a4d85744a57d4ec SHA512 31e58fd1d682089a45d23aa07c3c2c4c952ca016fa4c3416b2cba979d8b57369f80baef98ce857912e506e87d6cb456497a1ce1c75a0cdf1ee25d4e753b58726
|
DIST python-gentoo-patches-3.10.0rc1.tar.xz 8112 BLAKE2B d6f9b44c5a231f447ffe3533afbcaffe0f3b8bdd5a6690f1854bd7e1199d036d11a4cf4abfae345a88c42740ccbd4b72e53cbe28aea1a5db39dda1e5bfd47229 SHA512 bba7045f56369ca0354a539f8478a1afed77dc89a9faf548a0cf8959d644360b0afc4f84b95151ebfc2a6553078322c7445073f7a4104e9cd639ccc86ad0f792
|
||||||
DIST setuptools-50.3.0.zip 2169216 BLAKE2B 029ea0159de270af0078a4661c696b93681b33dcc475640c7626f5a40bf1bb4759e5915948696c03b76dca10bdc4e790e2e9ef9628f41abca9a6aa48adcb72f6 SHA512 f67a2b7d639e03bf8b3815133e128902a559baf689afdd5893844ddc7c83505d727a6bb30ced1f78c4d2719dd405d2f4c527576bfa14dd9cb50c8ec4a479683e
|
DIST setuptools-57.5.0.tar.gz 2141727 BLAKE2B 54c065e0bdcb0c3a0a76026d78ab26615e07ee013e684ef18c3731757a38efe38d21d4c99b687595873679d77ab8381cccc483847467c98eb7086d9cac5bd8ec SHA512 9dae7cbddcca0859d128f528232c2ab6baca2b4447bba129a7bbc014c98a8ecc866cc71c7e93900bb93ea4bbbe5e398c1c3b4a4867afb2caf2c38a2d5a46d67c
|
||||||
|
DIST setuptools-58.2.0.tar.gz 2268140 BLAKE2B 13281c3b2ed664fdcec77117cded285fb5b608036c19715c7c786734bb04cc02bc0f300a28e7c49967f695a6b706f9413baa33d99ac4f1f957522136ee5857e0 SHA512 028c9d9533f5493ff89c80c705ea002661a70e0e43afecb0c7546029990ae599e16fad7248ffc29573c18c6aeb33f1bba1fde09f25fe04b74717ad9308ce9cfc
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
From ad05b5dfebbc9025b631d6afffa25cdda8079d25 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||||
|
Date: Mon, 6 Sep 2021 07:41:24 +0200
|
||||||
|
Subject: [PATCH] Fix syntax error in test_build_meta's pyproject.toml files
|
||||||
|
|
||||||
|
Fix missing closing quotes in pyproject.toml files used
|
||||||
|
in test_build_meta's tests. This fixes the test failures due
|
||||||
|
to TOMLDecodeError.
|
||||||
|
---
|
||||||
|
setuptools/tests/test_build_meta.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py
|
||||||
|
index ab75a189..0f4a1a73 100644
|
||||||
|
--- a/setuptools/tests/test_build_meta.py
|
||||||
|
+++ b/setuptools/tests/test_build_meta.py
|
||||||
|
@@ -167,7 +167,7 @@ class TestBuildMetaBackend:
|
||||||
|
'pyproject.toml': DALS("""
|
||||||
|
[build-system]
|
||||||
|
requires = ["setuptools", "wheel"]
|
||||||
|
- build-backend = "setuptools.build_meta
|
||||||
|
+ build-backend = "setuptools.build_meta"
|
||||||
|
"""),
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -260,7 +260,7 @@ class TestBuildMetaBackend:
|
||||||
|
'pyproject.toml': DALS("""
|
||||||
|
[build-system]
|
||||||
|
requires = ["setuptools", "wheel"]
|
||||||
|
- build-backend = "setuptools.build_meta
|
||||||
|
+ build-backend = "setuptools.build_meta"
|
||||||
|
"""),
|
||||||
|
}
|
||||||
|
path.build(files)
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
@ -0,0 +1,78 @@
|
|||||||
|
From 987edfa3265187a47b8688119943e7d96712d859 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Isuru Fernando <isuruf@gmail.com>
|
||||||
|
Date: Tue, 21 Sep 2021 13:45:50 -0700
|
||||||
|
Subject: [PATCH] Fix PyPy3.8 install locations
|
||||||
|
|
||||||
|
---
|
||||||
|
setuptools/_distutils/command/install.py | 26 +++++++++++++++++---------
|
||||||
|
1 file changed, 17 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/setuptools/_distutils/command/install.py b/setuptools/_distutils/command/install.py
|
||||||
|
index 866e2d5..e98f049 100644
|
||||||
|
--- a/setuptools/_distutils/command/install.py
|
||||||
|
+++ b/setuptools/_distutils/command/install.py
|
||||||
|
@@ -29,16 +29,16 @@
|
||||||
|
|
||||||
|
INSTALL_SCHEMES = {
|
||||||
|
'unix_prefix': {
|
||||||
|
- 'purelib': '$base/lib/python$py_version_short/site-packages',
|
||||||
|
- 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages',
|
||||||
|
- 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
|
||||||
|
+ 'purelib': '$base/lib/$implementation_lower$py_version_short/site-packages',
|
||||||
|
+ 'platlib': '$platbase/$platlibdir/$implementation_lower$py_version_short/site-packages',
|
||||||
|
+ 'headers': '$base/include/$implementation_lower$py_version_short$abiflags/$dist_name',
|
||||||
|
'scripts': '$base/bin',
|
||||||
|
'data' : '$base',
|
||||||
|
},
|
||||||
|
'unix_home': {
|
||||||
|
- 'purelib': '$base/lib/python',
|
||||||
|
- 'platlib': '$base/$platlibdir/python',
|
||||||
|
- 'headers': '$base/include/python/$dist_name',
|
||||||
|
+ 'purelib': '$base/lib/$implementation_lower',
|
||||||
|
+ 'platlib': '$base/$platlibdir/$implementation_lower',
|
||||||
|
+ 'headers': '$base/include/$implementation_lower/$dist_name',
|
||||||
|
'scripts': '$base/bin',
|
||||||
|
'data' : '$base',
|
||||||
|
},
|
||||||
|
@@ -64,8 +64,8 @@
|
||||||
|
INSTALL_SCHEMES['nt_user'] = {
|
||||||
|
'purelib': '$usersite',
|
||||||
|
'platlib': '$usersite',
|
||||||
|
- 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name',
|
||||||
|
- 'scripts': '$userbase/Python$py_version_nodot/Scripts',
|
||||||
|
+ 'headers': '$userbase/$implementation$py_version_nodot/Include/$dist_name',
|
||||||
|
+ 'scripts': '$userbase/$implementation$py_version_nodot/Scripts',
|
||||||
|
'data' : '$userbase',
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -73,7 +73,7 @@
|
||||||
|
'purelib': '$usersite',
|
||||||
|
'platlib': '$usersite',
|
||||||
|
'headers':
|
||||||
|
- '$userbase/include/python$py_version_short$abiflags/$dist_name',
|
||||||
|
+ '$userbase/include/$implementation_lower$py_version_short$abiflags/$dist_name',
|
||||||
|
'scripts': '$userbase/bin',
|
||||||
|
'data' : '$userbase',
|
||||||
|
}
|
||||||
|
@@ -83,6 +83,12 @@
|
||||||
|
# and to SCHEME_KEYS here.
|
||||||
|
SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data')
|
||||||
|
|
||||||
|
+def _get_implementation():
|
||||||
|
+ if hasattr(sys, 'pypy_version_info'):
|
||||||
|
+ return 'PyPy'
|
||||||
|
+ else:
|
||||||
|
+ return 'Python'
|
||||||
|
+
|
||||||
|
|
||||||
|
class install(Command):
|
||||||
|
|
||||||
|
@@ -313,6 +319,8 @@ def finalize_options(self):
|
||||||
|
'exec_prefix': exec_prefix,
|
||||||
|
'abiflags': abiflags,
|
||||||
|
'platlibdir': getattr(sys, 'platlibdir', 'lib'),
|
||||||
|
+ 'implementation_lower': _get_implementation().lower(),
|
||||||
|
+ 'implementation': _get_implementation(),
|
||||||
|
}
|
||||||
|
|
||||||
|
if HAS_USER_SITE:
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
<maintainer type="project">
|
<maintainer type="project">
|
||||||
<email>python@gentoo.org</email>
|
<email>python@gentoo.org</email>
|
||||||
|
@ -1,85 +0,0 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
# Set to 'manual' to avoid triggering install QA check
|
|
||||||
DISTUTILS_USE_SETUPTOOLS=manual
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
|
|
||||||
PYTHON_REQ_USE="xml(+)"
|
|
||||||
|
|
||||||
inherit distutils-r1
|
|
||||||
|
|
||||||
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}.zip"
|
|
||||||
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE="test"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
BDEPEND="
|
|
||||||
app-arch/unzip
|
|
||||||
test? (
|
|
||||||
$(python_gen_cond_dep '
|
|
||||||
dev-python/mock[${PYTHON_USEDEP}]
|
|
||||||
dev-python/pip[${PYTHON_USEDEP}]
|
|
||||||
>=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
|
|
||||||
dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
|
|
||||||
dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
|
|
||||||
dev-python/wheel[${PYTHON_USEDEP}]
|
|
||||||
' -3)
|
|
||||||
)
|
|
||||||
"
|
|
||||||
# installing plugins apparently breaks stuff at runtime, so let's pull
|
|
||||||
# it early
|
|
||||||
PDEPEND="
|
|
||||||
>=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]
|
|
||||||
$(python_gen_cond_dep '
|
|
||||||
dev-python/setuptools_scm[${PYTHON_USEDEP}]
|
|
||||||
' -3)"
|
|
||||||
|
|
||||||
# Force in-source build because build system modifies sources.
|
|
||||||
DISTUTILS_IN_SOURCE_BUILD=1
|
|
||||||
|
|
||||||
DOCS=( {CHANGES,README}.rst docs/{easy_install.txt,pkg_resources.txt,setuptools.txt} )
|
|
||||||
|
|
||||||
python_prepare_all() {
|
|
||||||
# silence the py2 warning that is awfully verbose and breaks some
|
|
||||||
# packages by adding unexpected output
|
|
||||||
# (also, we know!)
|
|
||||||
sed -i -e '/py2_warn/d' pkg_resources/__init__.py || die
|
|
||||||
|
|
||||||
# disable tests requiring a network connection
|
|
||||||
rm setuptools/tests/test_packageindex.py || die
|
|
||||||
|
|
||||||
# don't run integration tests
|
|
||||||
rm setuptools/tests/test_integration.py || die
|
|
||||||
|
|
||||||
# xpass-es for me on py3
|
|
||||||
sed -e '/xfail.*710/s:(:(six.PY2, :' \
|
|
||||||
-i setuptools/tests/test_archive_util.py || die
|
|
||||||
|
|
||||||
# avoid pointless dep on flake8
|
|
||||||
sed -i -e 's:--flake8::' pytest.ini || die
|
|
||||||
|
|
||||||
distutils-r1_python_prepare_all
|
|
||||||
}
|
|
||||||
|
|
||||||
python_test() {
|
|
||||||
if ! python_is_python3; then
|
|
||||||
einfo "Tests are skipped on py2 to untangle deps"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
distutils_install_for_testing
|
|
||||||
# test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
|
|
||||||
# It tries to sandbox the test in a tempdir
|
|
||||||
HOME="${PWD}" pytest -vv ${PN} || die "Tests failed under ${EPYTHON}"
|
|
||||||
}
|
|
||||||
|
|
||||||
python_install() {
|
|
||||||
export DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
|
|
||||||
distutils-r1_python_install
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
# Set to 'manual' to avoid triggering install QA check
|
|
||||||
DISTUTILS_USE_SETUPTOOLS=manual
|
|
||||||
PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
|
|
||||||
PYTHON_REQ_USE="xml(+)"
|
|
||||||
|
|
||||||
inherit distutils-r1
|
|
||||||
|
|
||||||
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}.zip"
|
|
||||||
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE="test"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
BDEPEND="
|
|
||||||
app-arch/unzip
|
|
||||||
test? (
|
|
||||||
dev-python/jaraco-envs[${PYTHON_USEDEP}]
|
|
||||||
dev-python/mock[${PYTHON_USEDEP}]
|
|
||||||
dev-python/pip[${PYTHON_USEDEP}]
|
|
||||||
>=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
|
|
||||||
dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
|
|
||||||
dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
|
|
||||||
dev-python/wheel[${PYTHON_USEDEP}]
|
|
||||||
)
|
|
||||||
"
|
|
||||||
PDEPEND="
|
|
||||||
>=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]
|
|
||||||
dev-python/setuptools_scm[${PYTHON_USEDEP}]"
|
|
||||||
|
|
||||||
# Force in-source build because build system modifies sources.
|
|
||||||
DISTUTILS_IN_SOURCE_BUILD=1
|
|
||||||
|
|
||||||
DOCS=( {CHANGES,README}.rst docs/{easy_install.txt,pkg_resources.txt,setuptools.txt} )
|
|
||||||
|
|
||||||
python_prepare_all() {
|
|
||||||
# disable tests requiring a network connection
|
|
||||||
rm setuptools/tests/test_packageindex.py || die
|
|
||||||
|
|
||||||
# don't run integration tests
|
|
||||||
rm setuptools/tests/test_integration.py || die
|
|
||||||
|
|
||||||
# xpass-es for me on py3
|
|
||||||
#sed -e '/xfail.*710/s:(:(six.PY2, :' \
|
|
||||||
# -i setuptools/tests/test_archive_util.py || die
|
|
||||||
|
|
||||||
# avoid pointless dep on flake8
|
|
||||||
sed -i -e 's:--flake8::' -e 's:--cov::' pytest.ini || die
|
|
||||||
|
|
||||||
# disable the code disabling non-existing coverage plugin
|
|
||||||
sed -i -e 's:cov = .*:return:' conftest.py || die
|
|
||||||
|
|
||||||
distutils-r1_python_prepare_all
|
|
||||||
}
|
|
||||||
|
|
||||||
python_test() {
|
|
||||||
distutils_install_for_testing
|
|
||||||
# test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
|
|
||||||
# It tries to sandbox the test in a tempdir
|
|
||||||
HOME="${PWD}" pytest -vv ${PN} || die "Tests failed under ${EPYTHON}"
|
|
||||||
}
|
|
||||||
|
|
||||||
python_install() {
|
|
||||||
export DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
|
|
||||||
distutils-r1_python_install
|
|
||||||
}
|
|
92
sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-57.5.0.ebuild
vendored
Normal file
92
sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-57.5.0.ebuild
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
# Copyright 1999-2021 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
|
||||||
|
|
||||||
|
# Set to 'manual' to avoid triggering install QA check
|
||||||
|
DISTUTILS_USE_SETUPTOOLS=manual
|
||||||
|
PYTHON_COMPAT=( python3_{8..10} pypy3 )
|
||||||
|
PYTHON_REQ_USE="xml(+)"
|
||||||
|
|
||||||
|
inherit distutils-r1 multiprocessing
|
||||||
|
|
||||||
|
CPY_PATCHSET="python-gentoo-patches-3.10.0rc1"
|
||||||
|
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
|
||||||
|
https://dev.gentoo.org/~mgorny/dist/python/${CPY_PATCHSET}.tar.xz"
|
||||||
|
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||||
|
IUSE="test"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
BDEPEND="
|
||||||
|
test? (
|
||||||
|
$(python_gen_cond_dep '
|
||||||
|
dev-python/jaraco-envs[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/jaraco-path-3.2.0[${PYTHON_USEDEP}]
|
||||||
|
dev-python/mock[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pip[${PYTHON_USEDEP}]
|
||||||
|
dev-python/sphinx[${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/virtualenv-20[${PYTHON_USEDEP}]
|
||||||
|
dev-python/wheel[${PYTHON_USEDEP}]
|
||||||
|
' python3_{8..10} pypy3)
|
||||||
|
)
|
||||||
|
"
|
||||||
|
PDEPEND="
|
||||||
|
>=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]
|
||||||
|
dev-python/setuptools_scm[${PYTHON_USEDEP}]"
|
||||||
|
|
||||||
|
# Force in-source build because build system modifies sources.
|
||||||
|
DISTUTILS_IN_SOURCE_BUILD=1
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/setuptools-57.5.0-syntaxerror.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
DOCS=( {CHANGES,README}.rst )
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# apply distutils patches to the bundled distutils
|
||||||
|
pushd setuptools/_distutils >/dev/null || die
|
||||||
|
# TODO: distutils C++ patch?
|
||||||
|
eapply -p3 "${WORKDIR}/${CPY_PATCHSET}/0006-distutils-make-OO-enable-both-opt-1-and-opt-2-optimi.patch"
|
||||||
|
popd >/dev/null || die
|
||||||
|
|
||||||
|
distutils-r1_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
python_test() {
|
||||||
|
# keep in sync with python_gen_cond_dep above!
|
||||||
|
has "${EPYTHON}" python3.{8..10} pypy3 || continue
|
||||||
|
|
||||||
|
distutils_install_for_testing
|
||||||
|
local deselect=(
|
||||||
|
# network
|
||||||
|
'setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[None]'
|
||||||
|
setuptools/tests/test_distutils_adoption.py
|
||||||
|
# TODO
|
||||||
|
setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_allow_hosts
|
||||||
|
)
|
||||||
|
[[ ${EPYTHON} == pypy3 ]] && deselect+=(
|
||||||
|
setuptools/tests/test_develop.py::TestDevelop::test_2to3_user_mode
|
||||||
|
)
|
||||||
|
|
||||||
|
# test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
|
||||||
|
# It tries to sandbox the test in a tempdir
|
||||||
|
HOME="${PWD}" epytest ${deselect[@]/#/--deselect } \
|
||||||
|
-n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" \
|
||||||
|
setuptools
|
||||||
|
}
|
||||||
|
|
||||||
|
python_install() {
|
||||||
|
export DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
|
||||||
|
distutils-r1_python_install
|
||||||
|
}
|
91
sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-58.2.0-r1.ebuild
vendored
Normal file
91
sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-58.2.0-r1.ebuild
vendored
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
# Copyright 1999-2021 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
|
||||||
|
|
||||||
|
# Set to 'manual' to avoid triggering install QA check
|
||||||
|
DISTUTILS_USE_SETUPTOOLS=manual
|
||||||
|
PYTHON_COMPAT=( python3_{8..10} pypy3 )
|
||||||
|
PYTHON_REQ_USE="xml(+)"
|
||||||
|
|
||||||
|
inherit distutils-r1 multiprocessing
|
||||||
|
|
||||||
|
CPY_PATCHSET="python-gentoo-patches-3.10.0rc1"
|
||||||
|
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
|
||||||
|
https://dev.gentoo.org/~mgorny/dist/python/${CPY_PATCHSET}.tar.xz"
|
||||||
|
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||||
|
IUSE="test"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
BDEPEND="
|
||||||
|
test? (
|
||||||
|
$(python_gen_cond_dep '
|
||||||
|
dev-python/jaraco-envs[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/jaraco-path-3.2.0[${PYTHON_USEDEP}]
|
||||||
|
dev-python/mock[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pip[${PYTHON_USEDEP}]
|
||||||
|
dev-python/sphinx[${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/virtualenv-20[${PYTHON_USEDEP}]
|
||||||
|
dev-python/wheel[${PYTHON_USEDEP}]
|
||||||
|
' python3_{8..10} pypy3)
|
||||||
|
)
|
||||||
|
"
|
||||||
|
PDEPEND="
|
||||||
|
>=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]
|
||||||
|
dev-python/setuptools_scm[${PYTHON_USEDEP}]"
|
||||||
|
|
||||||
|
# Force in-source build because build system modifies sources.
|
||||||
|
DISTUTILS_IN_SOURCE_BUILD=1
|
||||||
|
|
||||||
|
DOCS=( {CHANGES,README}.rst )
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
# https://github.com/pypa/distutils/pull/58
|
||||||
|
"${FILESDIR}/${P}-fix-pypy3.8-install.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# apply distutils patches to the bundled distutils
|
||||||
|
pushd setuptools/_distutils >/dev/null || die
|
||||||
|
# TODO: distutils C++ patch?
|
||||||
|
eapply -p3 "${WORKDIR}/${CPY_PATCHSET}/0006-distutils-make-OO-enable-both-opt-1-and-opt-2-optimi.patch"
|
||||||
|
popd >/dev/null || die
|
||||||
|
|
||||||
|
distutils-r1_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
python_test() {
|
||||||
|
# keep in sync with python_gen_cond_dep above!
|
||||||
|
has "${EPYTHON}" python3.{8..10} pypy3 || continue
|
||||||
|
|
||||||
|
distutils_install_for_testing
|
||||||
|
local EPYTEST_DESELECT=(
|
||||||
|
# network
|
||||||
|
setuptools/tests/test_distutils_adoption.py
|
||||||
|
'setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[None]'
|
||||||
|
# unhappy with pytest-xdist?
|
||||||
|
setuptools/tests/test_easy_install.py::TestUserInstallTest::test_local_index
|
||||||
|
# TODO
|
||||||
|
setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_allow_hosts
|
||||||
|
)
|
||||||
|
|
||||||
|
# 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 "${MAKEOPTS}" "$(get_nproc)")" setuptools
|
||||||
|
}
|
||||||
|
|
||||||
|
python_install() {
|
||||||
|
export DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
|
||||||
|
distutils-r1_python_install
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user