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: Tue, 18 Aug 2020 08:17:29
Message-Id: 1597738600.e96c1d113f47ac076ee71b951afebe3515850918.mgorny@gentoo
1 commit: e96c1d113f47ac076ee71b951afebe3515850918
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 18 08:15:33 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 18 08:16:40 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e96c1d11
7
8 dev-python/setuptools: Pull setuptools_scm early
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 ...s-49.6.0.ebuild => setuptools-46.4.0-r2.ebuild} | 43 ++++++++++++++--------
13 dev-python/setuptools/setuptools-49.6.0.ebuild | 3 +-
14 2 files changed, 29 insertions(+), 17 deletions(-)
15
16 diff --git a/dev-python/setuptools/setuptools-49.6.0.ebuild b/dev-python/setuptools/setuptools-46.4.0-r2.ebuild
17 similarity index 55%
18 copy from dev-python/setuptools/setuptools-49.6.0.ebuild
19 copy to dev-python/setuptools/setuptools-46.4.0-r2.ebuild
20 index 87b98893729..fe0f241c616 100644
21 --- a/dev-python/setuptools/setuptools-49.6.0.ebuild
22 +++ b/dev-python/setuptools/setuptools-46.4.0-r2.ebuild
23 @@ -3,7 +3,7 @@
24
25 EAPI=7
26 DISTUTILS_USE_SETUPTOOLS=no
27 -PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
28 +PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
29 PYTHON_REQ_USE="xml(+)"
30
31 inherit distutils-r1
32 @@ -14,24 +14,28 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
33
34 LICENSE="MIT"
35 SLOT="0"
36 -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"
37 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
38 IUSE="test"
39 RESTRICT="!test? ( test )"
40
41 BDEPEND="
42 app-arch/unzip
43 test? (
44 - dev-python/jaraco-envs[${PYTHON_USEDEP}]
45 - dev-python/mock[${PYTHON_USEDEP}]
46 - dev-python/pip[${PYTHON_USEDEP}]
47 - >=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
48 - dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
49 - dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
50 - dev-python/wheel[${PYTHON_USEDEP}]
51 + $(python_gen_cond_dep '
52 + dev-python/mock[${PYTHON_USEDEP}]
53 + dev-python/pip[${PYTHON_USEDEP}]
54 + >=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
55 + dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
56 + dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
57 + dev-python/wheel[${PYTHON_USEDEP}]
58 + ' -3)
59 )
60 "
61 +# installing plugins apparently breaks stuff at runtime, so let's pull
62 +# it early
63 PDEPEND="
64 - >=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]"
65 + >=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]
66 + dev-python/setuptools_scm[${PYTHON_USEDEP}]"
67
68 # Force in-source build because build system modifies sources.
69 DISTUTILS_IN_SOURCE_BUILD=1
70 @@ -39,6 +43,11 @@ DISTUTILS_IN_SOURCE_BUILD=1
71 DOCS=( {CHANGES,README}.rst docs/{easy_install.txt,pkg_resources.txt,setuptools.txt} )
72
73 python_prepare_all() {
74 + # silence the py2 warning that is awfully verbose and breaks some
75 + # packages by adding unexpected output
76 + # (also, we know!)
77 + sed -i -e '/py2_warn/d' pkg_resources/__init__.py || die
78 +
79 # disable tests requiring a network connection
80 rm setuptools/tests/test_packageindex.py || die
81
82 @@ -46,19 +55,21 @@ python_prepare_all() {
83 rm setuptools/tests/test_integration.py || die
84
85 # xpass-es for me on py3
86 - #sed -e '/xfail.*710/s:(:(six.PY2, :' \
87 - # -i setuptools/tests/test_archive_util.py || die
88 + sed -e '/xfail.*710/s:(:(six.PY2, :' \
89 + -i setuptools/tests/test_archive_util.py || die
90
91 # avoid pointless dep on flake8
92 - sed -i -e 's:--flake8::' -e 's:--cov::' pytest.ini || die
93 -
94 - # disable the code disabling non-existing coverage plugin
95 - sed -i -e 's:cov = .*:return:' conftest.py || die
96 + sed -i -e 's:--flake8::' pytest.ini || die
97
98 distutils-r1_python_prepare_all
99 }
100
101 python_test() {
102 + if ! python_is_python3; then
103 + einfo "Tests are skipped on py2 to untangle deps"
104 + return
105 + fi
106 +
107 distutils_install_for_testing
108 # test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
109 # It tries to sandbox the test in a tempdir
110
111 diff --git a/dev-python/setuptools/setuptools-49.6.0.ebuild b/dev-python/setuptools/setuptools-49.6.0.ebuild
112 index 87b98893729..0d8d2e8bfb9 100644
113 --- a/dev-python/setuptools/setuptools-49.6.0.ebuild
114 +++ b/dev-python/setuptools/setuptools-49.6.0.ebuild
115 @@ -31,7 +31,8 @@ BDEPEND="
116 )
117 "
118 PDEPEND="
119 - >=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]"
120 + >=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]
121 + dev-python/setuptools_scm[${PYTHON_USEDEP}]"
122
123 # Force in-source build because build system modifies sources.
124 DISTUTILS_IN_SOURCE_BUILD=1