From 5e3861ee6f0046fbecf7aa40c8981a2316451520b36a4e1bf6a5b0b86bdf37a7 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 11 Dec 2021 11:55:54 +0000 Subject: [PATCH] Accepting request 939488 from home:bnavigator:branches:devel:languages:python - update to 0.3.4 * Fixed #153: Raise warnings in get_distributions() if bad metadata seen, but keep going. * Fixed #154: Determine Python versions correctly for Python >= 3.10. * Updated launcher executables. - Drop obsolete remove-backports.patch OBS-URL: https://build.opensuse.org/request/show/939488 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-distlib?expand=0&rev=20 --- distlib-0.3.3.zip | 3 -- distlib-0.3.4.zip | 3 ++ python-distlib.changes | 11 +++++++ python-distlib.spec | 29 +++++------------- remove-backports.patch | 67 ++---------------------------------------- 5 files changed, 25 insertions(+), 88 deletions(-) delete mode 100644 distlib-0.3.3.zip create mode 100644 distlib-0.3.4.zip diff --git a/distlib-0.3.3.zip b/distlib-0.3.3.zip deleted file mode 100644 index fa1d61d..0000000 --- a/distlib-0.3.3.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d982d0751ff6eaaab5e2ec8e691d949ee80eddf01a62eaa96ddb11531fe16b05 -size 743791 diff --git a/distlib-0.3.4.zip b/distlib-0.3.4.zip new file mode 100644 index 0000000..483d15c --- /dev/null +++ b/distlib-0.3.4.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579 +size 631981 diff --git a/python-distlib.changes b/python-distlib.changes index df53981..1775043 100644 --- a/python-distlib.changes +++ b/python-distlib.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Dec 10 21:56:30 UTC 2021 - Ben Greiner + +- update to 0.3.4 + * Fixed #153: Raise warnings in get_distributions() if bad + metadata seen, but keep going. + * Fixed #154: Determine Python versions correctly for Python >= + 3.10. + * Updated launcher executables. +- Drop obsolete remove-backports.patch + ------------------------------------------------------------------- Sun Nov 7 18:22:20 UTC 2021 - Dirk Müller diff --git a/python-distlib.spec b/python-distlib.spec index 4633c15..e3226fc 100644 --- a/python-distlib.spec +++ b/python-distlib.spec @@ -18,13 +18,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-distlib -Version: 0.3.3 +Version: 0.3.4 Release: 0 Summary: Distribution utilities License: Python-2.0 -URL: https://bitbucket.org/pypa/distlib +URL: https://github.com/pypa/distlib Source: https://files.pythonhosted.org/packages/source/d/distlib/distlib-%{version}.zip -Patch0: remove-backports.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -40,25 +39,12 @@ Python distribution utilities. %setup -q -n distlib-%{version} %autopatch -p1 -rm -r tests/unittest2 - -# tarfile backport is broken -rm distlib/_backport/tarfile.py - -# sysconfig backport is unnecessary and untested -rm distlib/_backport/sysconfig.* - -# These test modules require internet access and are unnecessary -rm tests/test_locators.py tests/test_sysconfig.py - -# Unused -rm distlib/_backport/misc.* +# This test module requires internet access and are unnecessary +sed -i '/from test_locators import LocatorTestCase/d' tests/distlib_tests.py # Unneeded on Linux rm distlib/*.exe -# However, the tests for shutil fail when not using using provided backport - %build %python_build @@ -68,12 +54,13 @@ rm distlib/*.exe %check export LANG=en_US.UTF-8 -# These two tests need internet access -%pytest -k 'not (test_search or test_package_data)' +# This file and two tests need internet access +%pytest --ignore tests/test_locators.py -k 'not (test_search or test_package_data)' %files %{python_files} %doc CHANGES.rst README.rst %license LICENSE.txt -%{python_sitelib}/* +%{python_sitelib}/distlib +%{python_sitelib}/distlib-%{version}*-info %changelog diff --git a/remove-backports.patch b/remove-backports.patch index c2c1ef0..fc1a546 100644 --- a/remove-backports.patch +++ b/remove-backports.patch @@ -1,48 +1,7 @@ -Index: distlib-0.3.3/distlib/_backport/shutil.py +Index: distlib-0.3.4/tests/distlib_tests.py =================================================================== ---- distlib-0.3.3.orig/distlib/_backport/shutil.py -+++ distlib-0.3.3/distlib/_backport/shutil.py -@@ -19,7 +19,7 @@ try: - except ImportError: - from collections import Callable - import errno --from . import tarfile -+import tarfile - - try: - import bz2 -Index: distlib-0.3.3/distlib/compat.py -=================================================================== ---- distlib-0.3.3.orig/distlib/compat.py -+++ distlib-0.3.3/distlib/compat.py -@@ -313,10 +313,7 @@ except ImportError: # pragma: no cover - return 'IronPython' - return 'CPython' - --try: -- import sysconfig --except ImportError: # pragma: no cover -- from ._backport import sysconfig -+import sysconfig - - try: - callable = callable -Index: distlib-0.3.3/setup.py -=================================================================== ---- distlib-0.3.3.orig/setup.py -+++ distlib-0.3.3/setup.py -@@ -63,7 +63,6 @@ distutils.core.setup( - 'distlib._backport', - ], - package_data={ -- 'distlib._backport': ['sysconfig.cfg'], - 'distlib': ['t32.exe', 't64.exe', 'w32.exe', 'w64.exe', - 't64-arm.exe', 'w64-arm.exe'], - }, -Index: distlib-0.3.3/tests/distlib_tests.py -=================================================================== ---- distlib-0.3.3.orig/tests/distlib_tests.py -+++ distlib-0.3.3/tests/distlib_tests.py +--- distlib-0.3.4.orig/tests/distlib_tests.py ++++ distlib-0.3.4/tests/distlib_tests.py @@ -10,7 +10,6 @@ _ver = sys.version_info[:2] from test_database import (DataFilesTestCase, TestDatabase, TestDistribution, TestEggInfoDistribution, DepGraphTestCase) @@ -51,23 +10,3 @@ Index: distlib-0.3.3/tests/distlib_tests.py from test_manifest import ManifestTestCase from test_markers import MarkersTestCase from test_metadata import MetadataTestCase, LegacyMetadataTestCase -@@ -23,6 +22,5 @@ from test_wheel import WheelTestCase - - if _ver == (2, 6): - from test_shutil import TestCopyFile, TestMove, TestShutil -- from test_sysconfig import TestSysConfig, MakefileTests - from test_util import (UtilTestCase, ProgressTestCase, FileOpsTestCase, - GlobTestCase) -Index: distlib-0.3.3/tests/test_shutil.py -=================================================================== ---- distlib-0.3.3.orig/tests/test_shutil.py -+++ distlib-0.3.3/tests/test_shutil.py -@@ -19,7 +19,7 @@ import tempfile - from compat import unittest, find_executable, spawn - from support import DistlibTestCase - --from distlib._backport import shutil, tarfile -+from distlib._backport import shutil; import tarfile - from distlib._backport.shutil import ( - _make_tarball, _make_zipfile, make_archive, unpack_archive, - register_archive_format, unregister_archive_format, get_archive_formats,