public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/files/, dev-python/distlib/
@ 2015-12-28 13:34 Justin Lecher
  0 siblings, 0 replies; 5+ messages in thread
From: Justin Lecher @ 2015-12-28 13:34 UTC (permalink / raw
  To: gentoo-commits

commit:     36591fe050f9a043b56ef0546de18585d43db015
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 28 09:29:23 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 13:34:28 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36591fe0

dev-python/distlib: Fix varios test failures

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=558706
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=558708
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=569922

Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 dev-python/distlib/distlib-0.2.1-r1.ebuild         |  11 +-
 .../distlib/files/distlib-0.2.1-online.patch       | 113 +++++++++++++++++++++
 2 files changed, 121 insertions(+), 3 deletions(-)

diff --git a/dev-python/distlib/distlib-0.2.1-r1.ebuild b/dev-python/distlib/distlib-0.2.1-r1.ebuild
index 1a438d6..8b8f7c9 100644
--- a/dev-python/distlib/distlib-0.2.1-r1.ebuild
+++ b/dev-python/distlib/distlib-0.2.1-r1.ebuild
@@ -20,6 +20,7 @@ IUSE=""
 
 PATCHES=(
 	"${FILESDIR}"/${P}-unbundle.patch
+	"${FILESDIR}"/${P}-online.patch
 )
 
 python_prepare_all() {
@@ -29,20 +30,24 @@ python_prepare_all() {
 		tests/test_shutil.py* \
 		tests/test_sysconfig.py* || die
 
+	distutils-r1_python_prepare_all
+
 	# Broken tests
 	# 1 fails due to it being sensitive to dictionary ordering
 	# inconsistency between code and test
 	sed \
 		-e 's:test_dependency_finder:_&:g' \
-		-e 's:test_abi:_&:g' \
 		-i tests/*py || die
 
-	distutils-r1_python_prepare_all
+	# Gentoo still doesn't report correct ABI
+	sed \
+		-e 's:test_abi:_&:g' \
+		-i tests/*py || die
 }
 
 python_test() {
 	sed \
 		-e '/PIP_AVAILABLE/s:True:False:g' \
 		-i tests/*py || die
-	PYTHONHASHSEED=0 esetup.py test
+	SKIP_ONLINE=True PYTHONHASHSEED=0 esetup.py test
 }

diff --git a/dev-python/distlib/files/distlib-0.2.1-online.patch b/dev-python/distlib/files/distlib-0.2.1-online.patch
new file mode 100644
index 0000000..3d5d655
--- /dev/null
+++ b/dev-python/distlib/files/distlib-0.2.1-online.patch
@@ -0,0 +1,113 @@
+ tests/test_index.py    |  1 +
+ tests/test_locators.py | 10 ++++++++++
+ tests/test_util.py     |  1 +
+ 3 files changed, 12 insertions(+)
+
+diff --git a/tests/test_index.py b/tests/test_index.py
+index a188816..dbef670 100644
+--- a/tests/test_index.py
++++ b/tests/test_index.py
+@@ -290,6 +290,7 @@ class PackageIndexTestCase(unittest.TestCase):
+         self.assertRaises(DistlibException, self.index.download_file, url, fn,
+                           digest[:-1] + '8')
+ 
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_search(self):
+         self.index = PackageIndex()
+         result = self.index.search({'name': 'tatterdema'})
+diff --git a/tests/test_locators.py b/tests/test_locators.py
+index de97541..436ea9d 100644
+--- a/tests/test_locators.py
++++ b/tests/test_locators.py
+@@ -29,6 +29,7 @@ PYPI_WEB_HOST = os.environ.get('PYPI_WEB_HOST', 'https://pypi.python.org/simple/
+ class LocatorTestCase(unittest.TestCase):
+ 
+     @unittest.skipIf('SKIP_SLOW' in os.environ, 'Skipping slow test')
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_xmlrpc(self):
+         locator = PyPIRPCLocator(PYPI_RPC_HOST)
+         try:
+@@ -53,6 +54,7 @@ class LocatorTestCase(unittest.TestCase):
+         self.assertGreater(len(names), 25000)
+ 
+     @unittest.skipIf('SKIP_SLOW' in os.environ, 'Skipping slow test')
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_json(self):
+         locator = PyPIJSONLocator(PYPI_RPC_HOST)
+         result = locator.get_project('sarge')
+@@ -69,6 +71,7 @@ class LocatorTestCase(unittest.TestCase):
+         self.assertRaises(NotImplementedError, locator.get_distribution_names)
+ 
+     @unittest.skipIf('SKIP_SLOW' in os.environ, 'Skipping slow test')
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_scraper(self):
+         locator = SimpleScrapingLocator('https://pypi.python.org/simple/')
+         for name in ('sarge', 'Sarge'):
+@@ -88,6 +91,7 @@ class LocatorTestCase(unittest.TestCase):
+         self.assertGreater(len(names), 25000)
+ 
+     @unittest.skipIf('SKIP_SLOW' in os.environ, 'Skipping slow test')
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_unicode_project_name(self):
+         # Just checking to see that no exceptions are raised.
+         NAME = '\u2603'
+@@ -166,6 +170,7 @@ class LocatorTestCase(unittest.TestCase):
+             sys.path.pop(0)
+ 
+     @unittest.skipIf('SKIP_SLOW' in os.environ, 'Skipping slow test')
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_aggregation(self):
+         d = os.path.join(HERE, 'fake_archives')
+         loc1 = DirectoryLocator(d)
+@@ -201,6 +206,7 @@ class LocatorTestCase(unittest.TestCase):
+         n2 = loc2.get_distribution_names()
+         self.assertEqual(locator.get_distribution_names(), n1 | n2)
+ 
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_dependency_finder(self):
+         locator = AggregatingLocator(
+             JSONLocator(),
+@@ -280,6 +286,7 @@ class LocatorTestCase(unittest.TestCase):
+         for url1, url2 in cases:
+             self.assertEqual(default_locator.prefer_url(url1, url2), url1)
+ 
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_prereleases(self):
+         locator = AggregatingLocator(
+             JSONLocator(),
+@@ -308,6 +315,7 @@ class LocatorTestCase(unittest.TestCase):
+         self.assertEqual(dists, set([actual[0], dist]))
+         self.assertFalse(problems)
+ 
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_dist_reqts(self):
+         r = 'config (<=0.3.5)'
+         dist = default_locator.locate(r)
+@@ -316,6 +324,7 @@ class LocatorTestCase(unittest.TestCase):
+         self.assertTrue(dist.matches_requirement(r))
+         self.assertFalse(dist.matches_requirement('config (0.3.6)'))
+ 
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_dist_reqts_extras(self):
+         r = 'config[doc,test](<=0.3.5)'
+         dist = default_locator.locate(r)
+@@ -323,6 +332,7 @@ class LocatorTestCase(unittest.TestCase):
+         self.assertTrue(dist.matches_requirement(r))
+         self.assertEqual(dist.extras, ['doc', 'test'])
+ 
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_all(self):
+         d = default_locator.get_project('setuptools')
+         self.assertTrue('urls' in d)
+diff --git a/tests/test_util.py b/tests/test_util.py
+index 1b615d7..2908eee 100644
+--- a/tests/test_util.py
++++ b/tests/test_util.py
+@@ -461,6 +461,7 @@ class UtilTestCase(unittest.TestCase):
+         self.assertFalse(is_string_sequence(['a', 'b', None]))
+         self.assertRaises(AssertionError, is_string_sequence, [])
+ 
++    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
+     def test_package_data(self):
+         data = get_package_data(name='config', version='0.3.6')
+         self.assertTrue(data)


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/files/, dev-python/distlib/
@ 2016-02-02 21:19 Patrice Clement
  0 siblings, 0 replies; 5+ messages in thread
From: Patrice Clement @ 2016-02-02 21:19 UTC (permalink / raw
  To: gentoo-commits

commit:     89e350bf011198fa03e9cff57c667008b554f348
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  2 16:23:43 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Feb  2 21:17:28 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89e350bf

dev-python/distlib: Add patches for distlib-0.2.2.

Package-Manager: portage-2.2.26
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 dev-python/distlib/distlib-0.2.2.ebuild            |  1 -
 .../distlib/files/distlib-0.2.2-unbundle.patch     | 35 ++++++++++++++++++++++
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/dev-python/distlib/distlib-0.2.2.ebuild b/dev-python/distlib/distlib-0.2.2.ebuild
index b5fbc3e..81a6691 100644
--- a/dev-python/distlib/distlib-0.2.2.ebuild
+++ b/dev-python/distlib/distlib-0.2.2.ebuild
@@ -20,7 +20,6 @@ IUSE=""
 
 PATCHES=(
 	"${FILESDIR}"/${P}-unbundle.patch
-	"${FILESDIR}"/${P}-online.patch
 )
 
 python_prepare_all() {

diff --git a/dev-python/distlib/files/distlib-0.2.2-unbundle.patch b/dev-python/distlib/files/distlib-0.2.2-unbundle.patch
new file mode 100644
index 0000000..5ee9129
--- /dev/null
+++ b/dev-python/distlib/files/distlib-0.2.2-unbundle.patch
@@ -0,0 +1,35 @@
+--- distlib-0.1.9/distlib/compat.py.orig	2014-06-06 09:58:21.317560756 +0200
++++ distlib-0.1.9/distlib/compat.py	2014-06-06 09:58:29.955611427 +0200
+@@ -17,7 +17,7 @@ if sys.version_info[0] < 3:
+     from types import FileType as file_type
+     import __builtin__ as builtins
+     import ConfigParser as configparser
+-    from ._backport import shutil
++    import shutil
+     from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
+     from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
+                         pathname2url, ContentTooShortError, splittype)
+@@ -267,7 +267,7 @@ except ImportError: # pragma: no cover
+ try:
+     import sysconfig
+ except ImportError: # pragma: no cover
+-    from ._backport import sysconfig
++    import sysconfig
+ 
+ try:
+     callable = callable
+--- distlib-0.1.9/setup.py.orig	2014-06-06 10:19:13.971997156 +0200
++++ distlib-0.1.9/setup.py	2014-06-06 10:19:20.012034150 +0200
+@@ -62,12 +62,7 @@ distutils.core.setup(
+     platforms='any',
+     packages=[
+         'distlib',
+-        'distlib._backport',
+     ],
+-    package_data={
+-        'distlib._backport': ['sysconfig.cfg'],
+-        'distlib': ['t32.exe', 't64.exe', 'w32.exe', 'w64.exe'],
+-    },
+     cmdclass={
+         'test': TestCommand,
+     },


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/files/, dev-python/distlib/
@ 2017-05-02  8:47 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2017-05-02  8:47 UTC (permalink / raw
  To: gentoo-commits

commit:     b71e43c2388265448a3729eed2f9c8693434762c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May  2 08:11:04 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May  2 08:47:10 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b71e43c2

dev-python/distlib: Clean old versions up

 dev-python/distlib/Manifest                        |   1 -
 dev-python/distlib/distlib-0.2.1-r1.ebuild         |  54 ----------
 dev-python/distlib/distlib-0.2.2.ebuild            |  53 ----------
 .../distlib/files/distlib-0.2.1-online.patch       | 113 ---------------------
 .../distlib/files/distlib-0.2.1-unbundle.patch     |  35 -------
 5 files changed, 256 deletions(-)

diff --git a/dev-python/distlib/Manifest b/dev-python/distlib/Manifest
index 812bf658aa3..81c6d53705e 100644
--- a/dev-python/distlib/Manifest
+++ b/dev-python/distlib/Manifest
@@ -1,3 +1,2 @@
 DIST distlib-0.2.1.zip 542424 SHA256 d91dc4a509ca50d1ba796ba1c4b23d5587f082d8a886856544546c88f4d9a685 SHA512 f6453585650db242ad4a176bbd468cc6069ee0941b6ea23f24fc32000778097d8a100de82eaad7b3d8d998dc153d25f537505c7eefcc6f98f37995cfc9d5be77 WHIRLPOOL 86c2eb318c9df8233847b5ded3370d77ed71fab22067f4fa039531d5a3df2ede463e1688d920401a0870e4359f18f8d765230c72e71be1458e5db14de153ad8d
-DIST distlib-0.2.2.zip 544724 SHA256 ddd173fc2ce7491c5dc92ac69b3cf2702e9885677b1d5f1c877a36f4dd5b9b6c SHA512 399469376eebbedf288ebc04c0d551c75b3656d8aeb87bae02c7e2542e41018bd50ec28d76a99b293b10b941e0e7735841e5e13512acccc9fdb2af0044c970ee WHIRLPOOL fc9498233c31a33eb8c351c3af4ec75809c0484af302f8041cd7b3aeb28f90f4a9cbb9fab514bebda1ad127d4a1e89f8714ae771eb103277850aaa5cbb27be7f
 DIST distlib-0.2.4.zip 547411 SHA256 ee0966c613d04b19e425367b238c0a426ef34a43e1e0ffa6b16f781045d2a2a3 SHA512 03f9f9474578226e1a40a85a490aead3ec0509ba444856a263d4f25b3c86b5f919a3e18ff715a3a329d80a3f20a540b8c57a6e3dff55703c9cce730e2d021084 WHIRLPOOL 5dc9abf490bfccfc86c3092193d56963bef71a3f426f40b1e7dfdb9d2c45da7751488dff4213487e8a84871318a3379a7f122b1350f561cd7a195dd7ed7d45da

diff --git a/dev-python/distlib/distlib-0.2.1-r1.ebuild b/dev-python/distlib/distlib-0.2.1-r1.ebuild
deleted file mode 100644
index 6ae66f65f45..00000000000
--- a/dev-python/distlib/distlib-0.2.1-r1.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3  )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="Distribution utilities"
-HOMEPAGE="https://pypi.python.org/pypi/distlib https://bitbucket.org/vinay.sajip/distlib https://github.com/vsajip/distlib"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
-
-SLOT="0"
-LICENSE="BSD"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-DEPEND="app-arch/unzip"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-unbundle.patch
-	"${FILESDIR}"/${P}-online.patch
-)
-
-python_prepare_all() {
-	rm -r \
-		distlib/*.exe \
-		distlib/_backport \
-		tests/test_shutil.py* \
-		tests/test_sysconfig.py* || die
-
-	distutils-r1_python_prepare_all
-
-	# Broken tests
-	# 1 fails due to it being sensitive to dictionary ordering
-	# inconsistency between code and test
-	sed \
-		-e 's:test_dependency_finder:_&:g' \
-		-i tests/*py || die
-
-	# Gentoo still doesn't report correct ABI
-	sed \
-		-e 's:test_abi:_&:g' \
-		-i tests/*py || die
-}
-
-python_test() {
-	sed \
-		-e '/PIP_AVAILABLE/s:True:False:g' \
-		-i tests/*py || die
-	SKIP_ONLINE=True PYTHONHASHSEED=0 esetup.py test
-}

diff --git a/dev-python/distlib/distlib-0.2.2.ebuild b/dev-python/distlib/distlib-0.2.2.ebuild
deleted file mode 100644
index 19b127eb6a5..00000000000
--- a/dev-python/distlib/distlib-0.2.2.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3  )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="Distribution utilities"
-HOMEPAGE="https://pypi.python.org/pypi/distlib https://bitbucket.org/vinay.sajip/distlib https://github.com/vsajip/distlib"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
-
-SLOT="0"
-LICENSE="BSD"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-DEPEND="app-arch/unzip"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-unbundle.patch
-)
-
-python_prepare_all() {
-	rm -r \
-		distlib/*.exe \
-		distlib/_backport \
-		tests/test_shutil.py* \
-		tests/test_sysconfig.py* || die
-
-	distutils-r1_python_prepare_all
-
-	# Broken tests
-	# 1 fails due to it being sensitive to dictionary ordering
-	# inconsistency between code and test
-	sed \
-		-e 's:test_dependency_finder:_&:g' \
-		-i tests/*py || die
-
-	# Gentoo still doesn't report correct ABI
-	sed \
-		-e 's:test_abi:_&:g' \
-		-i tests/*py || die
-}
-
-python_test() {
-	sed \
-		-e '/PIP_AVAILABLE/s:True:False:g' \
-		-i tests/*py || die
-	SKIP_ONLINE=True PYTHONHASHSEED=0 esetup.py test
-}

diff --git a/dev-python/distlib/files/distlib-0.2.1-online.patch b/dev-python/distlib/files/distlib-0.2.1-online.patch
deleted file mode 100644
index 3d5d655e879..00000000000
--- a/dev-python/distlib/files/distlib-0.2.1-online.patch
+++ /dev/null
@@ -1,113 +0,0 @@
- tests/test_index.py    |  1 +
- tests/test_locators.py | 10 ++++++++++
- tests/test_util.py     |  1 +
- 3 files changed, 12 insertions(+)
-
-diff --git a/tests/test_index.py b/tests/test_index.py
-index a188816..dbef670 100644
---- a/tests/test_index.py
-+++ b/tests/test_index.py
-@@ -290,6 +290,7 @@ class PackageIndexTestCase(unittest.TestCase):
-         self.assertRaises(DistlibException, self.index.download_file, url, fn,
-                           digest[:-1] + '8')
- 
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_search(self):
-         self.index = PackageIndex()
-         result = self.index.search({'name': 'tatterdema'})
-diff --git a/tests/test_locators.py b/tests/test_locators.py
-index de97541..436ea9d 100644
---- a/tests/test_locators.py
-+++ b/tests/test_locators.py
-@@ -29,6 +29,7 @@ PYPI_WEB_HOST = os.environ.get('PYPI_WEB_HOST', 'https://pypi.python.org/simple/
- class LocatorTestCase(unittest.TestCase):
- 
-     @unittest.skipIf('SKIP_SLOW' in os.environ, 'Skipping slow test')
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_xmlrpc(self):
-         locator = PyPIRPCLocator(PYPI_RPC_HOST)
-         try:
-@@ -53,6 +54,7 @@ class LocatorTestCase(unittest.TestCase):
-         self.assertGreater(len(names), 25000)
- 
-     @unittest.skipIf('SKIP_SLOW' in os.environ, 'Skipping slow test')
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_json(self):
-         locator = PyPIJSONLocator(PYPI_RPC_HOST)
-         result = locator.get_project('sarge')
-@@ -69,6 +71,7 @@ class LocatorTestCase(unittest.TestCase):
-         self.assertRaises(NotImplementedError, locator.get_distribution_names)
- 
-     @unittest.skipIf('SKIP_SLOW' in os.environ, 'Skipping slow test')
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_scraper(self):
-         locator = SimpleScrapingLocator('https://pypi.python.org/simple/')
-         for name in ('sarge', 'Sarge'):
-@@ -88,6 +91,7 @@ class LocatorTestCase(unittest.TestCase):
-         self.assertGreater(len(names), 25000)
- 
-     @unittest.skipIf('SKIP_SLOW' in os.environ, 'Skipping slow test')
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_unicode_project_name(self):
-         # Just checking to see that no exceptions are raised.
-         NAME = '\u2603'
-@@ -166,6 +170,7 @@ class LocatorTestCase(unittest.TestCase):
-             sys.path.pop(0)
- 
-     @unittest.skipIf('SKIP_SLOW' in os.environ, 'Skipping slow test')
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_aggregation(self):
-         d = os.path.join(HERE, 'fake_archives')
-         loc1 = DirectoryLocator(d)
-@@ -201,6 +206,7 @@ class LocatorTestCase(unittest.TestCase):
-         n2 = loc2.get_distribution_names()
-         self.assertEqual(locator.get_distribution_names(), n1 | n2)
- 
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_dependency_finder(self):
-         locator = AggregatingLocator(
-             JSONLocator(),
-@@ -280,6 +286,7 @@ class LocatorTestCase(unittest.TestCase):
-         for url1, url2 in cases:
-             self.assertEqual(default_locator.prefer_url(url1, url2), url1)
- 
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_prereleases(self):
-         locator = AggregatingLocator(
-             JSONLocator(),
-@@ -308,6 +315,7 @@ class LocatorTestCase(unittest.TestCase):
-         self.assertEqual(dists, set([actual[0], dist]))
-         self.assertFalse(problems)
- 
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_dist_reqts(self):
-         r = 'config (<=0.3.5)'
-         dist = default_locator.locate(r)
-@@ -316,6 +324,7 @@ class LocatorTestCase(unittest.TestCase):
-         self.assertTrue(dist.matches_requirement(r))
-         self.assertFalse(dist.matches_requirement('config (0.3.6)'))
- 
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_dist_reqts_extras(self):
-         r = 'config[doc,test](<=0.3.5)'
-         dist = default_locator.locate(r)
-@@ -323,6 +332,7 @@ class LocatorTestCase(unittest.TestCase):
-         self.assertTrue(dist.matches_requirement(r))
-         self.assertEqual(dist.extras, ['doc', 'test'])
- 
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_all(self):
-         d = default_locator.get_project('setuptools')
-         self.assertTrue('urls' in d)
-diff --git a/tests/test_util.py b/tests/test_util.py
-index 1b615d7..2908eee 100644
---- a/tests/test_util.py
-+++ b/tests/test_util.py
-@@ -461,6 +461,7 @@ class UtilTestCase(unittest.TestCase):
-         self.assertFalse(is_string_sequence(['a', 'b', None]))
-         self.assertRaises(AssertionError, is_string_sequence, [])
- 
-+    @unittest.skipIf('SKIP_ONLINE' in os.environ, 'Skipping online tests')
-     def test_package_data(self):
-         data = get_package_data(name='config', version='0.3.6')
-         self.assertTrue(data)

diff --git a/dev-python/distlib/files/distlib-0.2.1-unbundle.patch b/dev-python/distlib/files/distlib-0.2.1-unbundle.patch
deleted file mode 100644
index 5ee91290560..00000000000
--- a/dev-python/distlib/files/distlib-0.2.1-unbundle.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- distlib-0.1.9/distlib/compat.py.orig	2014-06-06 09:58:21.317560756 +0200
-+++ distlib-0.1.9/distlib/compat.py	2014-06-06 09:58:29.955611427 +0200
-@@ -17,7 +17,7 @@ if sys.version_info[0] < 3:
-     from types import FileType as file_type
-     import __builtin__ as builtins
-     import ConfigParser as configparser
--    from ._backport import shutil
-+    import shutil
-     from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
-     from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
-                         pathname2url, ContentTooShortError, splittype)
-@@ -267,7 +267,7 @@ except ImportError: # pragma: no cover
- try:
-     import sysconfig
- except ImportError: # pragma: no cover
--    from ._backport import sysconfig
-+    import sysconfig
- 
- try:
-     callable = callable
---- distlib-0.1.9/setup.py.orig	2014-06-06 10:19:13.971997156 +0200
-+++ distlib-0.1.9/setup.py	2014-06-06 10:19:20.012034150 +0200
-@@ -62,12 +62,7 @@ distutils.core.setup(
-     platforms='any',
-     packages=[
-         'distlib',
--        'distlib._backport',
-     ],
--    package_data={
--        'distlib._backport': ['sysconfig.cfg'],
--        'distlib': ['t32.exe', 't64.exe', 'w32.exe', 'w64.exe'],
--    },
-     cmdclass={
-         'test': TestCommand,
-     },


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/files/, dev-python/distlib/
@ 2021-05-29 20:45 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2021-05-29 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     b2c5aa195cc826dffc688a413431dc713193e618
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 29 20:44:45 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 29 20:45:17 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2c5aa19

dev-python/distlib: Enable py3.10

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/distlib/distlib-0.3.2.ebuild            |  4 ++-
 dev-python/distlib/files/distlib-0.3.2-py310.patch | 29 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/dev-python/distlib/distlib-0.3.2.ebuild b/dev-python/distlib/distlib-0.3.2.ebuild
index f63f8868e8e..43cd8fc4d2e 100644
--- a/dev-python/distlib/distlib-0.3.2.ebuild
+++ b/dev-python/distlib/distlib-0.3.2.ebuild
@@ -4,7 +4,7 @@
 EAPI=7
 
 DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( python3_{7..9} pypy3 )
+PYTHON_COMPAT=( python3_{7..10} pypy3 )
 
 inherit distutils-r1 vcs-snapshot
 
@@ -38,6 +38,8 @@ src_prepare() {
 
 	# use system pypiserver instead of broken bundled one
 	eapply "${FILESDIR}"/distlib-0.3.2-system-pypiserver.py || die
+	# fix tests for py310
+	eapply "${FILESDIR}"/${P}-py310.patch
 
 	# doesn't work with our patched pip
 	sed -e '/PIP_AVAIL/s:True:False:' \

diff --git a/dev-python/distlib/files/distlib-0.3.2-py310.patch b/dev-python/distlib/files/distlib-0.3.2-py310.patch
new file mode 100644
index 00000000000..23c3dbbe027
--- /dev/null
+++ b/dev-python/distlib/files/distlib-0.3.2-py310.patch
@@ -0,0 +1,29 @@
+From 5a9540cf58fc020b0c6a1d5c23b9b93d1abd2eb0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 29 May 2021 22:08:57 +0200
+Subject: [PATCH] Fix test_is_compatible to fix Python 3.10 support
+
+On Python 3.10, PYVER is py310 which wrongly matches the original
+'py27' <= PYVER < 'py32' condition.  Replace it with explicit match
+against known Python versions in this range.  This is probably
+the simplest and the most future-proof solution to the problem at hand.
+---
+ tests/test_wheel.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_wheel.py b/tests/test_wheel.py
+index 849e7c1..7c8f5ee 100644
+--- a/tests/test_wheel.py
++++ b/tests/test_wheel.py
+@@ -206,7 +206,7 @@ class WheelTestCase(DistlibTestCase):
+ 
+     def test_is_compatible(self):
+         fn = os.path.join(HERE, 'dummy-0.1-py27-none-any.whl')
+-        if 'py27' <= PYVER < 'py32':
++        if PYVER in ('py27', 'py30', 'py31'):
+             self.assertTrue(is_compatible(fn))
+             self.assertTrue(Wheel(fn).is_compatible())
+         # use actual wheel names from PyPI.
+-- 
+2.31.1
+


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/files/, dev-python/distlib/
@ 2021-07-08  7:06 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2021-07-08  7:06 UTC (permalink / raw
  To: gentoo-commits

commit:     03c13f91ccc5269f43a5089d2bb4b19edc2eb22f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  8 07:00:56 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul  8 07:00:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03c13f91

dev-python/distlib: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/distlib/Manifest                        |  1 -
 dev-python/distlib/distlib-0.3.1-r1.ebuild         | 54 ----------------------
 .../files/distlib-0.3.1-system-pypiserver.py       | 37 ---------------
 3 files changed, 92 deletions(-)

diff --git a/dev-python/distlib/Manifest b/dev-python/distlib/Manifest
index 04e1bb52bd1..593287ce60f 100644
--- a/dev-python/distlib/Manifest
+++ b/dev-python/distlib/Manifest
@@ -1,2 +1 @@
-DIST distlib-0.3.1.tar.bz2 1068500 BLAKE2B 52135869242f71cc6d6887da6d9e20ffc6b46c84d8146393961062d92d8c0bd68e1309277f64fdec0319ff3c503b1caaba3d5378f5c081dca79573c8d9c2e6f2 SHA512 f259299176c45be7024b80759015a2fad120ffdde55b6abea0f7fb0335cee90809b5daedcb88abdfb68fd496284b2e478df622004b3750327bfc86807581116c
 DIST distlib-0.3.2.tar.bz2 1075843 BLAKE2B 3595dc6af53beb7ff7dc49013e6c3db3453b501b56790a953c2cfea5a73aaca71fc69de68c8121ae92ffafd32a70ffa69d768cfd42844135fd5bd6647611e090 SHA512 e033ff2ff6b760f698a20103e01d63fa87bc1839bbf44fce252284c793e10a057dac645d818a4e0a2aa8be97bb85fcf9c8706b2399c505f12a093024d11be578

diff --git a/dev-python/distlib/distlib-0.3.1-r1.ebuild b/dev-python/distlib/distlib-0.3.1-r1.ebuild
deleted file mode 100644
index ab98794d534..00000000000
--- a/dev-python/distlib/distlib-0.3.1-r1.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
-
-inherit distutils-r1 vcs-snapshot
-
-DESCRIPTION="Low-level components of distutils2/packaging"
-HOMEPAGE="https://pypi.org/project/distlib/
-	https://bitbucket.org/pypa/distlib/"
-# pypi has zip only :-(
-SRC_URI="
-	https://bitbucket.org/pypa/distlib/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
-
-LICENSE="PSF-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
-IUSE="test"
-# This package's tests are extremely fragile and tend to break or hang
-# when it doesn't like metadata of packages installed on the system.
-RESTRICT="test"
-
-# pypiserver is called as external executable
-# openpyxl installs invalid metadata that breaks distlib
-BDEPEND="
-	test? (
-		dev-python/pypiserver
-		!!<dev-python/openpyxl-3.0.3[${PYTHON_USEDEP}]
-	)"
-
-src_prepare() {
-	# make sure they're not used
-	rm -r tests/unittest2 || die
-	rm tests/pypi-server-standalone.py || die
-
-	# use system pypiserver instead of broken bundled one
-	eapply "${FILESDIR}"/distlib-0.3.1-system-pypiserver.py || die
-
-	# doesn't work with our patched pip
-	sed -e '/PIP_AVAIL/s:True:False:' \
-		-i tests/test_wheel.py || die
-
-	distutils-r1_src_prepare
-}
-
-python_test() {
-	local -x SKIP_ONLINE=1
-	local -x PYTHONHASHSEED=0
-	"${EPYTHON}" tests/test_all.py -v ||
-		die "Tests failed with ${EPYTHON}"
-}

diff --git a/dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py b/dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py
deleted file mode 100644
index beb0cd8dd92..00000000000
--- a/dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py
+++ /dev/null
@@ -1,37 +0,0 @@
-From f30a24d3dffee78cf0581218d9cca0e395b75f6a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Wed, 8 Jul 2020 09:24:42 +0200
-Subject: [PATCH] Use system pypiserver
-
----
- tests/test_index.py | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/tests/test_index.py b/tests/test_index.py
-index bc24367..4971e3f 100644
---- a/tests/test_index.py
-+++ b/tests/test_index.py
-@@ -52,11 +52,6 @@ class PackageIndexTestCase(unittest.TestCase):
-     def setUpClass(cls):
-         if cls.run_test_server:
-             cls.server = None
--            server_script = os.path.join(HERE, 'pypi-server-standalone.py')
--            if not os.path.exists(server_script):
--                logger.debug('test server not available - some tests '
--                             'will be skipped.')
--                return
-             pwdfn = os.path.join(HERE, 'passwords')
-             if not os.path.exists(pwdfn):   # pragma: no cover
-                 with open(pwdfn, 'w') as f:
-@@ -65,7 +60,7 @@ class PackageIndexTestCase(unittest.TestCase):
-             if not os.path.isdir(pkgdir):   # pragma: no cover
-                 os.mkdir(pkgdir)
-             cls.sink = sink = open(os.devnull, 'w')
--            cmd = [sys.executable, 'pypi-server-standalone.py',
-+            cmd = ['pypi-server',
-                    '-P', 'passwords', 'packages']
-             cls.server = subprocess.Popen(cmd, stdout=sink, stderr=sink,
-                                           cwd=HERE)
--- 
-2.27.0
-


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-08  7:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-08  7:06 [gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/files/, dev-python/distlib/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2021-05-29 20:45 Michał Górny
2017-05-02  8:47 Michał Górny
2016-02-02 21:19 Patrice Clement
2015-12-28 13:34 Justin Lecher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox