summaryrefslogtreecommitdiff
path: root/dev-python/python-distutils-extra
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-17 14:32:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-17 14:32:10 +0100
commit51c50bd4c895ebf56d81fecae8e45ec3b5fc3efa (patch)
tree753b6b08624c34d1ed8414bbe22c45409f7741b9 /dev-python/python-distutils-extra
parentbe9d77d3ac6af8f4ead98d89706f356b65578c93 (diff)
parentdeba8115d2c2af26df42966b91ef04ff4dd79cde (diff)
Merge branch 'edge' into next
Diffstat (limited to 'dev-python/python-distutils-extra')
-rw-r--r--dev-python/python-distutils-extra/Manifest8
-rw-r--r--dev-python/python-distutils-extra/files/python-distutils-extra-2.44-skip-build.patch63
-rw-r--r--dev-python/python-distutils-extra/files/python-distutils-extra-2.44-test.patch27
-rw-r--r--dev-python/python-distutils-extra/metadata.xml4
-rw-r--r--dev-python/python-distutils-extra/python-distutils-extra-2.42-r1.ebuild50
-rw-r--r--dev-python/python-distutils-extra/python-distutils-extra-2.44-r1.ebuild42
6 files changed, 139 insertions, 55 deletions
diff --git a/dev-python/python-distutils-extra/Manifest b/dev-python/python-distutils-extra/Manifest
index 973047ee84eb..94e9cf6e36b2 100644
--- a/dev-python/python-distutils-extra/Manifest
+++ b/dev-python/python-distutils-extra/Manifest
@@ -1,3 +1,5 @@
-DIST python-distutils-extra_2.42.tar.xz 37996 BLAKE2B dee4cc950bb34027b60dcf58e173bae502a7090062e3c2218fd2ec562d6350f5872ed5c0865b89f1463bd35be0f365f23e05bb0220f70a944181af40df42ee60 SHA512 ff0df0a25a29504bec89970dbbf24d0b618e9f2d5d07a037f67778b86c92e880eafee86dd102b4ada4f280abd3102de9f4a4e47dbc68c1eaaa05fb492cbbae29
-EBUILD python-distutils-extra-2.42-r1.ebuild 1413 BLAKE2B 211ab016649d01c0639e553ba7b06511b93674070154517995ef48954e0424a140ded586a3bc730a7b13935000ee567770436a346faf6ce7da1d681aaa21c8c3 SHA512 582a2bc41ae2d44f47791966623c282bbdafa7032e42094aa21753c897f8eec83fc767d1c67c59a6abc07527bf5d39d3fe6133660429570557e88c898f99e174
-MISC metadata.xml 401 BLAKE2B 6ba770986ed5364c9311bbf2a48957c0ec46f3c16e7718b564865b9ca7459f3c64cbcf6ee04c4b66564429e7f6714b0a128f83f2bd0d33f062b3670210d11858 SHA512 0dfe7658fe14d75a542a901de11983e7e0d8663b158032f5b8a71814c4caa93c14b4bc32e422c49a19550544c1b1fd4075be8a6644f0ea780bb23e1adc65b402
+AUX python-distutils-extra-2.44-skip-build.patch 2560 BLAKE2B 2c027fe6875b1b0b94f7a40b521bfdf226be5add5634958395c637918363ea6ad98d82b7befbd95b3c566581719cd316afbf487ce30683427eddde4d49ff2818 SHA512 07808a920eeb5b1519778bcc9dd24186715b90b82b32b5c21a2e1754e6cb89057c3da856a250874777311fdd38de277161999f50e03af7a60fcc9b295450469f
+AUX python-distutils-extra-2.44-test.patch 1020 BLAKE2B 5818c26d89980d5f1608a9d0ed59f4ebedecc942d5eee599a78b77ff331244b4969d265390c9e6b6dddd3a0886f2a39eaf7f4e7f631ab6dab9fcdd5dfc02cdc5 SHA512 3381a8ca6cd87635a260f37d349204cb5112718f7a2aa13b384d1c3622fa3e61685c2e4bdbd15e7f8421d2d8554a13cabbfd490e17975d5aa7084c293b161c55
+DIST python-distutils-extra-2.44.tar.bz2 37687 BLAKE2B 3d7e3ad277440bfb6fbade8b890b95aad37589700b69a26ec9a5c30e97491871bc8c8f82b540131859d2ce82cebd3758f29ca510abe28046ffcaa0e7240fad3e SHA512 517222b4e34efba730db53ffeee8b8c8d96bd9d1b6044e6ca84c0f2c1d5c0e044240b899d460c50295615c94c513f7e57db3e34e5db6588a01ec92a73999f822
+EBUILD python-distutils-extra-2.44-r1.ebuild 1082 BLAKE2B e466ccbb2ca635c9d090ecc6a9e80181558ee4918bf1d6ca2a04df7b67775d0c00d9b6bd2a35fef3d9e6983054f9182dba0129cee05df61351210f239c7f41ec SHA512 17fdf960c10b6654bd19c2fac3d72497d3254fb44db577488a0e84221a968cf16665b3c6e059e1d0fc7016c8d0d1e79e3a755b54c8770dd1534ae9728ff299e0
+MISC metadata.xml 339 BLAKE2B c7a822f45ad521df2cf6837bdc46e1e8473d8fac77428f80561dfd518b84b47353a37064bd0b9ad1e77441e7f376f0f005755d9c07c67e742c38b7dda02e7348 SHA512 2b8f9ffa8823ba2e9f1811782e17e8a6b3011c2096454b3dfa9373d085b4404f6a0afd1d8d9346adedaa01e09f4410c0d154ca74a00d770b8ad5da33a1a151a0
diff --git a/dev-python/python-distutils-extra/files/python-distutils-extra-2.44-skip-build.patch b/dev-python/python-distutils-extra/files/python-distutils-extra-2.44-skip-build.patch
new file mode 100644
index 000000000000..f2a19990ed34
--- /dev/null
+++ b/dev-python/python-distutils-extra/files/python-distutils-extra-2.44-skip-build.patch
@@ -0,0 +1,63 @@
+From 4f5e11110ce9cc3f511c798acfc009ce5db4e9ef Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 28 Apr 2020 10:48:18 +0200
+Subject: [PATCH] Fix install_auto command with --skip-build
+
+python-distutils-extra seems to rely on a very bad practice of modifying
+internal state (file lists) in middle of `build` commands. As a result,
+if the package is installed via `build` command followed by `install
+--skip-build` (since everything was built already!), most of the files
+are not installed.
+
+Ideally, this would be resolved by making internal state updates
+independent of `build` command execution. However, given that
+the package is not really alive and worth the effort, let's settle
+on a cheap hack of calling all `build_*` subcommands from `install`
+if `--skip-build` is used. This partially reverses what standard
+distutils `install` command does but it will rebuild only the data files
+rather than all C extensions.
+
+Modify tests to use `--skip-build` unconditionally to test this better.
+Testing both scenarios probably makes little sense.
+---
+ DistUtilsExtra/auto.py | 7 +++++++
+ test/auto.py | 5 +++--
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/DistUtilsExtra/auto.py b/DistUtilsExtra/auto.py
+index ea15183..db45f7a 100644
+--- a/DistUtilsExtra/auto.py
++++ b/DistUtilsExtra/auto.py
+@@ -711,6 +711,13 @@ class sdist_auto(distutils.command.sdist.sdist):
+
+ class install_auto(distutils.command.install.install):
+ def run(self):
++ # run build_* subcommands to get file lists if install command
++ # won't run 'build' for us
++ if self.skip_build:
++ self.run_command('build_help')
++ self.run_command('build_i18n')
++ self.run_command('build_icons')
++
+ # install files from etc/
+ if os.path.isdir('etc'):
+ # work around a bug in copy_tree() which fails with "File exists" on
+diff --git a/test/auto.py b/test/auto.py
+index b9644ba..15780c6 100755
+--- a/test/auto.py
++++ b/test/auto.py
+@@ -873,8 +873,9 @@ print ('import iamnota.module')
+ '''
+ self.install_tree = tempfile.mkdtemp()
+
+- return self.setup_py(['install', '--no-compile', '--prefix=/usr',
+- '--root=' + self.install_tree])
++ self.setup_py(['build'])
++ return self.setup_py(['install', '--no-compile', '--skip-build',
++ '--prefix=/usr', '--root=' + self.install_tree])
+
+ def installed_files(self):
+ '''Return list of file paths in install tree.'''
+--
+2.26.2
+
diff --git a/dev-python/python-distutils-extra/files/python-distutils-extra-2.44-test.patch b/dev-python/python-distutils-extra/files/python-distutils-extra-2.44-test.patch
new file mode 100644
index 000000000000..b00fc32d017a
--- /dev/null
+++ b/dev-python/python-distutils-extra/files/python-distutils-extra-2.44-test.patch
@@ -0,0 +1,27 @@
+From 33026583f3b2f59bcc415fae4c1ae84bfd058817 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 27 Apr 2020 21:25:37 +0200
+Subject: [PATCH] test: Find .egg-info file rather than guessing path (wrong)
+
+---
+ test/auto.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/test/auto.py b/test/auto.py
+index b9644ba..1d605e6 100755
+--- a/test/auto.py
++++ b/test/auto.py
+@@ -734,7 +734,9 @@ print ('import iamnota.module')
+ # parse .egg-info
+ (o, e, s) = self.setup_py(['install_egg_info', '-d', self.install_tree])
+ self.assertEqual(e, 'ERROR: Python module unknown not found\n')
+- egg = self._installed_contents('foo-0.1.egg-info').splitlines()
++ egg_paths = [x for x in inst if x.endswith('.egg-info')]
++ self.assertEqual(len(egg_paths), 1)
++ egg = self._installed_contents(egg_paths[0].strip(os.path.sep)).splitlines()
+ self.assertIn('Name: foo', egg)
+
+ # check provides
+--
+2.26.2
+
diff --git a/dev-python/python-distutils-extra/metadata.xml b/dev-python/python-distutils-extra/metadata.xml
index 930ec08cf4e8..6b8ef6a12b6e 100644
--- a/dev-python/python-distutils-extra/metadata.xml
+++ b/dev-python/python-distutils-extra/metadata.xml
@@ -5,8 +5,8 @@
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
+ <stabilize-allarches/>
<upstream>
- <remote-id type="launchpad">python-distutils-extra</remote-id>
- <bugs-to>https://bugs.launchpad.net/python-distutils-extra</bugs-to>
+ <bugs-to>https://www.debian.org/Bugs/</bugs-to>
</upstream>
</pkgmetadata>
diff --git a/dev-python/python-distutils-extra/python-distutils-extra-2.42-r1.ebuild b/dev-python/python-distutils-extra/python-distutils-extra-2.42-r1.ebuild
deleted file mode 100644
index 183471d82a32..000000000000
--- a/dev-python/python-distutils-extra/python-distutils-extra-2.42-r1.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS="rdepend"
-PYTHON_COMPAT=( python{2_7,3_6,3_7,3_8} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Gettext support, themed icons and scrollkeeper-based documentation in distutils"
-HOMEPAGE="https://launchpad.net/python-distutils-extra"
-SRC_URI="mirror://ubuntu/pool/universe/p/${PN}/${PN}_${PV}.tar.xz"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ppc x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
-
-DOCS=( doc/{README,FAQ} )
-
-python_prepare_all() {
- # This line is run when the file is imported
- # https://bugs.launchpad.net/python-distutils-extra/+bug/1657919
- sed -i '/^unittest.main()$/d' test/auto.py || die
-
- distutils-r1_python_prepare_all
-}
-
-python_test() {
- # 5 tests fail with disabled byte-compilation (they rely on exact
- # output from python).
- # The other 4 are broken.
- pytest -vv -k "not (test_pot_manual or test_pot_auto_explicit or \
- test_pot_auto or test_modules or test_packages) and not \
- (test_desktop or test_po or test_policykit or \
- test_requires_provides)" test/auto.py || \
- die "tests failed with ${EPYTHON}"
-}
-
-python_install_all() {
- distutils-r1_python_install_all
-
- docinto examples
- dodoc doc/{setup.cfg.example,setup.py.example}
- docompress -x /usr/share/doc/${PF}/examples
-}
diff --git a/dev-python/python-distutils-extra/python-distutils-extra-2.44-r1.ebuild b/dev-python/python-distutils-extra/python-distutils-extra-2.44-r1.ebuild
new file mode 100644
index 000000000000..a53af5d7f0fd
--- /dev/null
+++ b/dev-python/python-distutils-extra/python-distutils-extra-2.44-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS="rdepend"
+PYTHON_COMPAT=( python{2_7,3_6,3_7,3_8} )
+
+inherit distutils-r1
+
+DESCRIPTION="Gettext support, themed icons and scrollkeeper-based documentation in distutils"
+HOMEPAGE="
+ https://salsa.debian.org/python-team/modules/python-distutils-extra
+ https://launchpad.net/python-distutils-extra"
+SRC_URI="
+ https://salsa.debian.org/python-team/modules/python-distutils-extra/-/archive/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ppc x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DOCS=( doc/{README,FAQ} )
+
+BDEPEND="
+ test? (
+ dev-libs/gobject-introspection
+ dev-python/httplib2[${PYTHON_USEDEP}]
+ dev-python/pygobject[${PYTHON_USEDEP}]
+ dev-util/intltool
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/python-distutils-extra-2.44-test.patch
+ "${FILESDIR}"/python-distutils-extra-2.44-skip-build.patch
+)
+
+python_test() {
+ unset LINGUAS PYTHONDONTWRITEBYTECODE
+ "${EPYTHON}" test/auto.py -v || die "Tests fail with ${EPYTHON}"
+}