commit 7ee9e5417496c7e53e2f96b2feddbbddfde6b8792fcbadf07f1aade6ba87aaed Author: Matej Cepl Date: Wed Dec 4 22:11:19 2024 +0000 - Update to 0.3.9 * Merge #215: preload script wrappers on Windows to assist with a pip issue (thanks, Paul Moore). * Fix #220: Remove duplicated newline in shebang of windows launcher (thanks. A2uria). * Fix #230: Add handling for cross-compilation environments (thanks, Russell Keith-Magee). * Fix #224: Do not use the absolute path to cache wheel extensions (thanks, Stewart Miles). * Fix #222: Support mounting wheels that use extensions without an EXTENSIONS file (thanks, Stewart Miles). * Fix #225: Add support for wheel compatibility with the limited API (thanks, Stewart Miles). - Drop py313-interpreter-repr.patch, merged upstream OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-distlib?expand=0&rev=32 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/distlib-0.3.8.tar.gz b/distlib-0.3.8.tar.gz new file mode 100644 index 0000000..3d6250a --- /dev/null +++ b/distlib-0.3.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64 +size 609931 diff --git a/distlib-0.3.9.tar.gz b/distlib-0.3.9.tar.gz new file mode 100644 index 0000000..4cf2a6d --- /dev/null +++ b/distlib-0.3.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403 +size 613923 diff --git a/py313-interpreter-repr.patch b/py313-interpreter-repr.patch new file mode 100644 index 0000000..d26e002 --- /dev/null +++ b/py313-interpreter-repr.patch @@ -0,0 +1,22 @@ +From 1c08845b05d022692252ed45cb07e9cb9647caac Mon Sep 17 00:00:00 2001 +From: Vinay Sajip +Date: Wed, 14 Feb 2024 14:46:14 +0000 +Subject: [PATCH] Fix #214: Update representation of interpreter in test. + +--- + tests/test_scripts.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_scripts.py b/tests/test_scripts.py +index 5c38687..74ee647 100644 +--- a/tests/test_scripts.py ++++ b/tests/test_scripts.py +@@ -340,7 +340,7 @@ def test_script_run(self): + self.assertIn(b'

Current Working Directory:

', stdout) + self.assertIn(os.getcwd().encode('utf-8'), stdout) + else: +- self.assertIn(b'[Interpreter(id=0, isolated=None)]', stderr) ++ self.assertIn(b'[Interpreter(0)]', stderr) + self.assertEqual(p.returncode, 1) + + @unittest.skipUnless(os.name == 'posix', 'Test only valid for POSIX') diff --git a/python-distlib.changes b/python-distlib.changes new file mode 100644 index 0000000..e412631 --- /dev/null +++ b/python-distlib.changes @@ -0,0 +1,346 @@ +------------------------------------------------------------------- +Wed Dec 4 13:16:38 UTC 2024 - John Paul Adrian Glaubitz + +- Update to 0.3.9 + * Merge #215: preload script wrappers on Windows to assist with a pip issue (thanks, + Paul Moore). + * Fix #220: Remove duplicated newline in shebang of windows launcher (thanks. A2uria). + * Fix #230: Add handling for cross-compilation environments (thanks, Russell Keith-Magee). + * Fix #224: Do not use the absolute path to cache wheel extensions (thanks, Stewart Miles). + * Fix #222: Support mounting wheels that use extensions without an EXTENSIONS file (thanks, + Stewart Miles). + * Fix #225: Add support for wheel compatibility with the limited API (thanks, Stewart Miles). +- Drop py313-interpreter-repr.patch, merged upstream + +------------------------------------------------------------------- +Mon Jul 1 08:04:02 UTC 2024 - Dirk Müller + +- add py313-interpreter-repr.patch to fix testsuite with python + 3.13 + +------------------------------------------------------------------- +Mon Jul 1 06:03:36 UTC 2024 - Dirk Müller + +- depend on testsuite + +------------------------------------------------------------------- +Tue Dec 19 09:57:22 UTC 2023 - Dirk Müller + +- update to 0.3.8: + * Fix #209: use legacy version implementation for Python + versions. + * Fix #204: use symlinks in venv creation during test. + * Fix #208: handle deprecation removals in Python 3.13. + +------------------------------------------------------------------- +Tue Aug 8 11:07:21 UTC 2023 - Dirk Müller + +- update to 0.3.7: + * Handle newlines when parsing metadata. + * Use version comparison logic for python_full_version. + * Simplify code with a set comprehension. + * Fix shebang computation for source builds of Python. + * Extract tarfiles more safely by incorporating tarfile + filters. + * Check for 'has_cert' attribute before using it. + * Fix #203: Handle parsing of export entries to allow script + names such as "," or ",foo". + * Fix #200: Improve conformance to PEP440. + * In addition to the above, an SPDX license identifier is now + used. + +------------------------------------------------------------------- +Fri Apr 21 12:24:16 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:40:55 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Sat Oct 1 12:43:32 UTC 2022 - Dirk Müller + +- update to 0.3.6: + - scripts + - Fixed #175: Updated launcher executables to better handle the relationship + between launcher and child process in the Job API. + - database + - Fixed #170: Corrected implementation of ``get_required_dists()``. + - index + - Updated coverage pragmas for tests relating to obsolete PyPI APIs. + - locators + - Changed the default locator configuration. + - metadata + - Updates in support of PEP 643 / Metadata 2.2. + - scripts + - Updated launcher executables. Thanks to Michael Bikovitsky for his help with + the launcher changes. + - Fixed #164: Improved support for reproducible builds by allowing a fixed + date/time to be inserted into created .exe files. Thanks to Somber Night for the + patch. + - util + - Fixed #161: Updated test case. + - wheel + - Updated to write archive path of RECORD to RECORD instead of staging path. + Thanks to Pieter Pas for the patch. + - Fixed #169: Removed usage of deprecated imp module in favour of importlib. + - Fixed #172: Compute ABI correctly for Python < 3.8. + +------------------------------------------------------------------- +Sat Dec 11 12:07:02 UTC 2021 - Ben Greiner + +- actually drop remove-backports.patch + +------------------------------------------------------------------- +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 + +- update to 0.3.3: + * Removed splituser() function which wasn't used and is deprecated. + * Handle version comparisons correctly in environment markers. + * Handle a single trailing comma following a version. + * Fix incorrect handling of epochs. + * Reverted handling of tags for Python >= 3.10 + (use 310 rather than 3_10). This is because PEP 641 was rejected. + * removed unused regular expression + * allowed "Obsoletes" in more scenarios, to better handle faulty metadata + already on PyPI. + * added entry for SourcelessFileLoader to the finder registry. + * allowed a trailing comma in constraints, to better handle faulty metadata + already on PyPI +- drop python-distlib-2048-bit-key.patch (obsolete) + +------------------------------------------------------------------- +Wed Feb 10 19:44:20 UTC 2021 - Pedro Monreal + +- Update the test self-signed certificate to use 2048-bit key. +- Add python-distlib-2048-bit-key.patch + +------------------------------------------------------------------- +Thu Oct 8 03:44:52 UTC 2020 - Steve Kowalik + +- Update to 0.3.1: + * scripts + + Fixed #132: Added documentation to help with relative interpreter paths. + + Fixed #134: Allowed specifying a different target Python version when + generating scripts. + + Fixed #135: Exposed the ``enquote_executable`` function previously + implemented as an internal function. + + Addressed #138: Improved metadata support for newer metadata versions. + * wheel + + Changed the output of flags in entry point definitions. + + Stopped writing JSON metadata. Only old-style metadata is written now. +- Refreshed remove-backports.patch + +------------------------------------------------------------------- +Fri Mar 13 08:37:16 UTC 2020 - Tomáš Chvátal + +- Update to 0.3.0: + * small bugfixes +- Remove patch merged upstream: + * correct_large_version_number.patch + +------------------------------------------------------------------- +Fri Oct 25 07:14:15 CEST 2019 - Matej Cepl + +- Add correct_large_version_number.patch fixing bt#pypa/distlib#129 + +------------------------------------------------------------------- +Thu Oct 24 21:34:33 CEST 2019 - Matej Cepl + +- Skip test_abi tests. bt#pypa/distlib#129 + +------------------------------------------------------------------- +Fri Sep 13 08:55:00 UTC 2019 - Tomáš Chvátal + +- Update to 0.2.9.post0: + * updated pypi urls + * various small bugfixes +- Remove merged patches: + * pypi-url-update.patch + +------------------------------------------------------------------- +Thu Apr 4 12:22:48 UTC 2019 - John Vandenberg + +- Remove Windows executables + +------------------------------------------------------------------- +Mon Mar 25 11:31:30 UTC 2019 - John Vandenberg + +- Add upstream merged pypi-url-update.patch to replace pypi.python.org + with pypi.org + +------------------------------------------------------------------- +Wed Mar 6 11:12:52 UTC 2019 - John Vandenberg + +- Convert to single spec +- Activate test suite +- Change license to Python-2.0 to match sdist +- Update URL to https://bitbucket.org/pypa/distlib +- Remove unnecessary build dependency on python-devel +- Add fdupes +- Remove unnecessary backports with remove-backports.patch +- Update to v0.2.8 + * database + + Fixed #108: Updated metadata scan to look for the METADATA file as well + as the JSON formats. + * locators + + Handled wheel tags and platform-dependent downloads correctly + in SimpleScrapingLocator. + * metadata + + Updated documentation on testing to include information on + setting PYTHONHASHSEED. + * scripts + + Avoided unnecessary newlines in script preambles, which caused + problems with detecting encoding declarations. + * util + + Removed existing files (which might have been symlinks) before + overwriting. +- from v0.2.7 + * compat + + cache_from_source is now imported from importlib.util where + available. + * database + + InstalledDistributions now have a modules attribute which + is a list of top-level modules as read from top_level.txt, if that is in + the distribution info. + * locators + + Fixed #103: Thanks to Saulius Žemaitaitis for the patch. + * metadata + + Added support for PEP 566 / Metadata 1.3. + * scripts + + Updated launcher binaries. +- from v0.2.6 + * compat + + Updated to handle a case where sys.getfilesystemencoding() + returns None. + * database + + Eliminated a crash in EggInfoDistribution.list_distinfo_files() + which was caused by trying to open a non-existent file. + + Handled a case where an installed distribution didn't have 'Provides:' + metadata. + * locators + + SimpleScrapingLocator no longer fails prematurely when scraping + links due to invalid versions. + * markers + + Improved error messages issued when interpreting markers + * scripts + + Improved the shebangs written into installed scripts when the interpreter + path is very long or contains spaces (to cater for a limitation in shebang + line parsing on Linux) + + Updated launcher binaries. + * Numerous test refinements +- from v0.2.5 + * general + + Changed regular expressions to be compatible with 3.6 as regards escape + sequences. + + Closed some resource leaks related to XML-RPC proxies. + + Removed Python 2.6 from the support list. + * locators + + Made downloadability a factor in scoring URLs for preferences. + * markers + + Replaced the implementation with code which parses requirements in + accordance with PEP 508 and evaluates marker expressions according to + PEP 508. + * util + + Changed _csv_open to use utf-8 across all platforms on Python 3.x. + * wheel + + Changed to look for metadata in metadata.json as well as pydist.json. + * version + + Updated requirement parsing in version matchers to use the new + PEP 508-compliant code. + * Numerous test refinements +- from v0.2.4 + * compat + + Updated to not fail on import if SSL is unavailable. + * index + + Switch from using gpg in preference to gpg2 for signing. This is + to avoid gpg2's behaviour of prompting for passwords, which interferes + with the tests on some machines. + * locators + + Changed project name comparisons to follow PEP 503. + + Added errors queue to Locator. + * manifest + + Changed match logic to work under Python 3.6, due to differences in + how fnmatch.translate behaves. + * resources + + Updated finder registry logic to reflect changes in Python 3.6. + * scripts + + Fixed regular expression in generated script boilerplate. + * util + + Updated to not fail on import if SSL is unavailable. + + Added normalize_name for project name comparisons using PEP 503. + * tests + + Updated to skip certain tests if SSL is unavailable. + + Numerous other test refinements. +- from v0.2.3 + * util + + Changed get_executable to return Unicode rather than bytes. + + Fixed #84: Allow + character in output script names. + + Relaxed too-stringent test looking for application/json in headers. + * wheel + + sorted the entries in RECORD before writing to file. + * Numerous test refinements. +- from v0.2.2 + * database + + Added support for detecting distributions installed by wheel + versions >= 0.23 (which use metadata.json rather than pydist.json). + * locators + + Updated default PyPI URL to https://pypi.python.org/pypi + * metadata + + Updated to use different formatting for description field for V1.1 + metadata. + + Corrected "classifier" to "classifiers" in the mapping for V1.0 + metadata. + * scripts + + Improved support for Jython when quoting executables in output scripts. + * util + + Made the internal URL used for extended metadata fetches + configurable via a module attribute. + + Improved entry point parsing to handle leading spaces in + ini-format files. + * docs + + Numerous documentation updates, not detailed further here. + * tests + + renamed environment variable SKIP_SLOW to SKIP_ONLINE in tests and + applied to some more tests. + + Numerous other test refinements. +- from v0.2.1 + * locators + + Return a Distribution instance or None from ``locate()``. + + Skipped special keys when looking for versions. + + Improved behaviour of PyPIJSONLocator to be analogous to that of other + locators. + * resource + + Added resource iterator functionality. + * scripts + + Updated launchers to decode shebangs using UTF-8. This allows + non-ASCII pathnames to be correctly handled. + + Ensured that the executable written to shebangs is normcased. + + Changed ScriptMaker to work better under Jython. + * util + + Changed the mode setting method to work better under Jython. + + Changed get_executable() to return a normcased value. + * wheel + + Handled multiple-architecture wheel filenames correctly. + * docs + + Numerous documentation updates, not detailed further here. + * Numerous test refinements. + +------------------------------------------------------------------- +Sun Jul 5 13:13:42 UTC 2015 - tbechtold@suse.com + +- Initial packaging of v0.2.0 + diff --git a/python-distlib.spec b/python-distlib.spec new file mode 100644 index 0000000..59a5dfd --- /dev/null +++ b/python-distlib.spec @@ -0,0 +1,66 @@ +# +# spec file for package python-distlib +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-distlib +Version: 0.3.9 +Release: 0 +Summary: Distribution utilities +License: Python-2.0 +URL: https://github.com/pypa/distlib +Source: https://files.pythonhosted.org/packages/source/d/distlib/distlib-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module testsuite} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%python_subpackages + +%description +Python distribution utilities. + +%prep +%autosetup -p1 -n distlib-%{version} + +# 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 + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export LANG=en_US.UTF-8 +# 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}/distlib +%{python_sitelib}/distlib-%{version}*-info + +%changelog