Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/setuptools/
Date: Thu, 19 May 2022 07:15:05
Message-Id: 1652944488.e9a7bc94ef5c909cfee7f1fb0d92dd823247325c.mgorny@gentoo
1 commit: e9a7bc94ef5c909cfee7f1fb0d92dd823247325c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 19 05:35:45 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu May 19 07:14:48 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9a7bc94
7
8 dev-python/setuptools: Bump to 62.3.2
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/setuptools/Manifest | 1 +
13 dev-python/setuptools/setuptools-62.3.2.ebuild | 133 +++++++++++++++++++++++++
14 2 files changed, 134 insertions(+)
15
16 diff --git a/dev-python/setuptools/Manifest b/dev-python/setuptools/Manifest
17 index 9fd61eabf2a4..e7c429c141fd 100644
18 --- a/dev-python/setuptools/Manifest
19 +++ b/dev-python/setuptools/Manifest
20 @@ -4,3 +4,4 @@ DIST setuptools-60.10.0.tar.gz 2420706 BLAKE2B 66d7f3b648b1e3222736ddf46ff97441b
21 DIST setuptools-62.1.0.tar.gz 2512885 BLAKE2B a26a6bd5001922885b623bc7f1d42da90c59e6d9e195e9dd292ce2e73cd35a51f07fc714261c12db2fdf4510fa1137f57e7f3f649312f6a75035b9d927936a7c SHA512 41f39b5aa22e908c123e8e04c11e505e23cd3aaaae72793e106015dc14b1a44ff3b17aa15ca3da34f34a4becc887ceea7f41932650e38d409f95d7227707d2e1
22 DIST setuptools-62.2.0.tar.gz 2512927 BLAKE2B 34932917fb635aa434b574d2e47d1dd0dd742275dc577e7592fc7ad2b7892d7e0fa5281b687873a8a70ab44cb28ecc7a5b8889c954ffcafc2ce298e10a28f3f0 SHA512 4d5b9a88088ef6cb0a742bd708ab52798ee5202a0be33dd6102fa44975d121496edda1ddd9abd4a97e4c29fe804687a1d298d930004a53ee2935c0a15821917f
23 DIST setuptools-62.3.1.tar.gz 2583892 BLAKE2B ad6afbe6b879b4ffd3dc576c3b1746d989b0ad2cdb2527873b2b55e9d30d3dff52cff4ac25824e3dd1f04ba53eeb5c6786845097fe408981ecb009d0cc52082d SHA512 7f24e57951638d8cab1c1efa4fbe482179c26ebcfb3276e22896f0b0878753103b4527e804312483d71f44a2b2e62a6bdbf2f8de2d9d1384c025a51a2878ae71
24 +DIST setuptools-62.3.2.tar.gz 2583924 BLAKE2B 54229ba7505d162b379c77121d4974b31feecdd44346688b0bdedf0d63010cc7330001a862e51a86f7c560d0518e32c62ad5daa4be2a84dcd87180fc16fff193 SHA512 8674ff31b04f9229b28247f6035aff3d6b3be6f0a197c7059bd55d9dd390d6cec067ac59def830c3f98dde7fefec72a65cbec34ae923b5088d4b491fea8828ac
25
26 diff --git a/dev-python/setuptools/setuptools-62.3.2.ebuild b/dev-python/setuptools/setuptools-62.3.2.ebuild
27 new file mode 100644
28 index 000000000000..d493d79567b9
29 --- /dev/null
30 +++ b/dev-python/setuptools/setuptools-62.3.2.ebuild
31 @@ -0,0 +1,133 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
36 +EAPI=7
37 +
38 +DISTUTILS_USE_PEP517=standalone
39 +PYTHON_TESTED=( python3_{8..11} pypy3 )
40 +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
41 +PYTHON_REQ_USE="xml(+)"
42 +
43 +inherit distutils-r1 multiprocessing
44 +
45 +CPY_PATCHSET="python-gentoo-patches-3.10.4"
46 +DESCRIPTION="Collection of extensions to Distutils"
47 +HOMEPAGE="
48 + https://github.com/pypa/setuptools/
49 + https://pypi.org/project/setuptools/
50 +"
51 +SRC_URI="
52 + mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
53 + https://dev.gentoo.org/~mgorny/dist/python/${CPY_PATCHSET}.tar.xz
54 +"
55 +
56 +LICENSE="MIT"
57 +SLOT="0"
58 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-solaris"
59 +IUSE="test"
60 +RESTRICT="!test? ( test )"
61 +
62 +RDEPEND="
63 + >=dev-python/appdirs-1.4.4-r2[${PYTHON_USEDEP}]
64 + >=dev-python/jaraco-text-3.7.0-r1[${PYTHON_USEDEP}]
65 + >=dev-python/more-itertools-8.12.0-r1[${PYTHON_USEDEP}]
66 + dev-python/nspektr[${PYTHON_USEDEP}]
67 + >=dev-python/ordered-set-4.0.2-r1[${PYTHON_USEDEP}]
68 + >=dev-python/packaging-21.3-r2[${PYTHON_USEDEP}]
69 + $(python_gen_cond_dep '
70 + >=dev-python/importlib_metadata-4.10.1-r1[${PYTHON_USEDEP}]
71 + ' 3.8 3.9)
72 + $(python_gen_cond_dep '
73 + >=dev-python/importlib_resources-5.4.0-r3[${PYTHON_USEDEP}]
74 + ' 3.8)
75 +"
76 +BDEPEND="
77 + ${RDEPEND}
78 + >=dev-python/wheel-0.37.1-r1[${PYTHON_USEDEP}]
79 + test? (
80 + $(python_gen_cond_dep '
81 + dev-python/build[${PYTHON_USEDEP}]
82 + >=dev-python/ini2toml-0.9[${PYTHON_USEDEP}]
83 + >=dev-python/filelock-3.4.0[${PYTHON_USEDEP}]
84 + >=dev-python/jaraco-envs-2.2[${PYTHON_USEDEP}]
85 + >=dev-python/jaraco-path-3.2.0[${PYTHON_USEDEP}]
86 + dev-python/mock[${PYTHON_USEDEP}]
87 + dev-python/pip[${PYTHON_USEDEP}]
88 + dev-python/pip-run[${PYTHON_USEDEP}]
89 + dev-python/pytest[${PYTHON_USEDEP}]
90 + dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
91 + dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
92 + dev-python/pytest-xdist[${PYTHON_USEDEP}]
93 + dev-python/tomli[${PYTHON_USEDEP}]
94 + >=dev-python/tomli-w-1.0.0[${PYTHON_USEDEP}]
95 + >=dev-python/virtualenv-20[${PYTHON_USEDEP}]
96 + dev-python/wheel[${PYTHON_USEDEP}]
97 + ' "${PYTHON_TESTED[@]}")
98 + )
99 +"
100 +PDEPEND="
101 + >=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]
102 + dev-python/setuptools_scm[${PYTHON_USEDEP}]
103 +"
104 +
105 +DOCS=( {CHANGES,README}.rst )
106 +
107 +src_prepare() {
108 + # remove bundled dependencies, setuptools will switch to system deps
109 + # automatically
110 + rm -r */_vendor || die
111 +
112 + # remove the ugly */extern hack that breaks on unvendored deps
113 + rm -r */extern || die
114 + find -name '*.py' -exec sed \
115 + -e 's:from \w*[.]\+extern ::' -e 's:\w*[.]\+extern[.]::' \
116 + -i {} + || die
117 +
118 + # apply distutils patches to the bundled distutils
119 + pushd setuptools/_distutils >/dev/null || die
120 + # TODO: distutils C++ patch?
121 + eapply -p3 "${WORKDIR}/${CPY_PATCHSET}/0006-distutils-make-OO-enable-both-opt-1-and-opt-2-optimi.patch"
122 + popd >/dev/null || die
123 +
124 + distutils-r1_src_prepare
125 +
126 + export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
127 +}
128 +
129 +python_test() {
130 + local -x SETUPTOOLS_USE_DISTUTILS=stdlib
131 +
132 + if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
133 + return
134 + fi
135 +
136 + local EPYTEST_DESELECT=(
137 + # network
138 + # TODO: see if PRE_BUILT_SETUPTOOLS_* helps
139 + setuptools/tests/config/test_apply_pyprojecttoml.py::test_apply_pyproject_equivalent_to_setupcfg
140 + setuptools/tests/integration/test_pip_install_sdist.py::test_install_sdist
141 + setuptools/tests/test_distutils_adoption.py
142 + setuptools/tests/test_setuptools.py::test_its_own_wheel_does_not_contain_tests
143 + setuptools/tests/test_virtualenv.py::test_clean_env_install
144 + setuptools/tests/test_virtualenv.py::test_no_missing_dependencies
145 + 'setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[None]'
146 + setuptools/tests/test_virtualenv.py::test_test_command_install_requirements
147 + # unhappy with pytest-xdist?
148 + setuptools/tests/test_easy_install.py::TestUserInstallTest::test_local_index
149 + # TODO
150 + setuptools/tests/config/test_setupcfg.py::TestConfigurationReader::test_basic
151 + setuptools/tests/config/test_setupcfg.py::TestConfigurationReader::test_ignore_errors
152 + setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_allow_hosts
153 + setuptools/tests/test_extern.py::test_distribution_picklable
154 + setuptools/tests/test_test.py::test_tests_are_run_once
155 + # expects bundled deps in virtualenv
156 + setuptools/tests/config/test_apply_pyprojecttoml.py::TestMeta::test_example_file_in_sdist
157 + setuptools/tests/config/test_apply_pyprojecttoml.py::TestMeta::test_example_file_not_in_wheel
158 + setuptools/tests/test_editable_install.py::test_editable_with_pyproject
159 + )
160 +
161 + # test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
162 + # It tries to sandbox the test in a tempdir
163 + HOME="${PWD}" epytest -n "$(makeopts_jobs)" setuptools
164 +}