diff --git a/pip-api-0.0.14.tar.gz b/pip-api-0.0.14.tar.gz deleted file mode 100644 index 20a3db1..0000000 --- a/pip-api-0.0.14.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0bbad536c70f0dfdc88e6811418ab0e8ac1aece7cf6c69223ae602a6ebc2943b -size 108979 diff --git a/pip-api-0.0.30.tar.gz b/pip-api-0.0.30.tar.gz new file mode 100644 index 0000000..827ca3e --- /dev/null +++ b/pip-api-0.0.30.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a05df2c7aa9b7157374bcf4273544201a0c7bae60a9c65bcf84f3959ef3896f3 +size 112078 diff --git a/python-pip-api.changes b/python-pip-api.changes index 2474a34..f3d3e54 100644 --- a/python-pip-api.changes +++ b/python-pip-api.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Tue Feb 7 05:18:53 UTC 2023 - Steve Kowalik + +- Update to 0.0.30: + * Support editable project location (#148) + * Do not treat `--trusted-host` as a requirement (#136) + * Expose whether a requirement is editable (#131) + * Use correct long flag for requirements (#118) + * Support for hashed requirements (#126) + * Drop support for Python 3.6, test against pip==22.0.x (#127) + * Pass PIP_DISABLE_PIP_VERSION_CHECK to all invocations (#114) + * Support the --path parameter when calling pip list (#112) + * Add support for parsing URL requirements (#109) + * Allow installed_distributions to be filtered for global distributions (#103) + * Support Python 3.10 + * Allow requirement markers to be parsed (#99) + * Use pip list's JSON output for installed_distributions (#93) + * Drop support for Python 3.5 (#94) + * Add type hints (#97) + * Ensure environment vars are passed to subprocess call (#68) + * Drop support for Python 2.7 + * Add experimental PEP 650 support + * Fix issue with handling LegacyVersions (#66) + * Support Python 3.9 +- Add patch support-packaging-changes.patch: + * Drop a test parameter that doesn't work with our version of packaging. +- Include non-shipped test data as test-data.tar.gz. +- Switch to GitHub tarball for tests. +- Refresh unvendor.patch + ------------------------------------------------------------------- Mon Mar 16 10:09:16 UTC 2020 - Marketa Calabkova diff --git a/python-pip-api.spec b/python-pip-api.spec index 02a5403..0087778 100644 --- a/python-pip-api.spec +++ b/python-pip-api.spec @@ -1,7 +1,7 @@ # # spec file for package python-pip-api # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,16 +16,19 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pip-api -Version: 0.0.14 +Version: 0.0.30 Release: 0 Summary: The official unofficial pip API License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/di/pip-api -Source: https://files.pythonhosted.org/packages/source/p/pip-api/pip-api-%{version}.tar.gz +Source0: https://github.com/di/pip-api/releases/download/%{version}/pip-api-%{version}.tar.gz +Source1: test-data.tar.gz +# PATCH-FIX-OPENSUSE We do not want a vendored packaging. Patch0: unvendor.patch +# PATCH-FIX-OPENSUSE Remove a test parameter that is broken with our shipped +# packaging. +Patch1: support-packaging-changes.patch BuildRequires: %{python_module packaging >= 20.3} BuildRequires: %{python_module pip} BuildRequires: %{python_module pretend} @@ -34,7 +37,6 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module virtualenv} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-packaging >= 20.3 Requires: python-pip BuildArch: noarch %python_subpackages @@ -43,8 +45,7 @@ BuildArch: noarch The official unofficial pip API. %prep -%setup -q -n pip-api-%{version} -%patch0 -p1 +%autosetup -p1 -a 1 -n pip-api-%{version} rm -Rf ./pip_api/_vendor %build @@ -55,15 +56,13 @@ rm -Rf ./pip_api/_vendor %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# All the following download stuff using pip thus skip them: -# test_installed_distributions -# test_all_the_right_pips -# test_isolation -%pytest -v -k 'not (test_installed_distributions or test_all_the_right_pips or test_isolation)' +# Broken with current packaging +%pytest -k 'not test_installed_distributions_legacy_version' %files %{python_files} %doc README.md %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/pip_api +%{python_sitelib}/pip_api*info %changelog diff --git a/support-packaging-changes.patch b/support-packaging-changes.patch new file mode 100644 index 0000000..d406840 --- /dev/null +++ b/support-packaging-changes.patch @@ -0,0 +1,19 @@ +Index: pip-api-0.0.30/tests/test_parse_requirements.py +=================================================================== +--- pip-api-0.0.30.orig/tests/test_parse_requirements.py ++++ pip-api-0.0.30/tests/test_parse_requirements.py +@@ -75,14 +75,6 @@ PEP508_PIP_EXAMPLE_WHEEL_FILE = "file:// + "", + ), + ( +- # Version and URL can't be combined so this all gets parsed as a legacy version +- "pip==1.3.1@{url}\n".format(url=PEP508_PIP_EXAMPLE_URL), +- {"pip"}, +- None, +- "pip==1.3.1@" + PEP508_PIP_EXAMPLE_URL, # Note no extra space after @ +- "==1.3.1@" + PEP508_PIP_EXAMPLE_URL, +- ), +- ( + # VCS markers at the beginning of a URL get stripped away + "git+" + PEP508_PIP_EXAMPLE_EGG, + {"pip"}, diff --git a/test-data.tar.gz b/test-data.tar.gz new file mode 100644 index 0000000..453930a --- /dev/null +++ b/test-data.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41feb609dfdc13aa164278a72d6ecbceb7980543f9390cff78608e1ab5348ecb +size 2407 diff --git a/unvendor.patch b/unvendor.patch index 5619cbf..45c16a1 100644 --- a/unvendor.patch +++ b/unvendor.patch @@ -1,55 +1,59 @@ -Index: pip-api-0.0.10/pip_api/__init__.py +Index: pip-api-0.0.30/pip_api/__init__.py =================================================================== ---- pip-api-0.0.10.orig/pip_api/__init__.py -+++ pip-api-0.0.10/pip_api/__init__.py -@@ -1,6 +1,6 @@ +--- pip-api-0.0.30.orig/pip_api/__init__.py ++++ pip-api-0.0.30/pip_api/__init__.py +@@ -1,7 +1,7 @@ import sys -from pip_api._vendor.packaging import version as packaging_version +-from pip_api._vendor.packaging.version import Version +from packaging import version as packaging_version ++from packaging.version import Version # Import this now because we need it below from pip_api._version import version -Index: pip-api-0.0.10/pip_api/_hash.py +Index: pip-api-0.0.30/pip_api/_hash.py =================================================================== ---- pip-api-0.0.10.orig/pip_api/_hash.py -+++ pip-api-0.0.10/pip_api/_hash.py -@@ -1,4 +1,4 @@ --from pip_api._vendor.packaging.version import Version -+from packaging.version import Version +--- pip-api-0.0.30.orig/pip_api/_hash.py ++++ pip-api-0.0.30/pip_api/_hash.py +@@ -1,6 +1,6 @@ + import os + +-from pip_api._vendor.packaging.version import Version # type: ignore ++from packaging.version import Version # type: ignore import pip_api from pip_api._call import call -Index: pip-api-0.0.10/pip_api/_installed_distributions.py +Index: pip-api-0.0.30/pip_api/_installed_distributions.py =================================================================== ---- pip-api-0.0.10.orig/pip_api/_installed_distributions.py -+++ pip-api-0.0.10/pip_api/_installed_distributions.py -@@ -3,7 +3,7 @@ import re - import pip_api +--- pip-api-0.0.30.orig/pip_api/_installed_distributions.py ++++ pip-api-0.0.30/pip_api/_installed_distributions.py +@@ -7,7 +7,7 @@ import pip_api from pip_api._call import call + from pip_api.exceptions import PipError --from pip_api._vendor.packaging.version import Version -+from packaging.version import Version +-from pip_api._vendor.packaging.version import parse # type: ignore ++from packaging.version import parse # type: ignore class Distribution: -Index: pip-api-0.0.10/pip_api/_parse_requirements.py +Index: pip-api-0.0.30/pip_api/_parse_requirements.py =================================================================== ---- pip-api-0.0.10.orig/pip_api/_parse_requirements.py -+++ pip-api-0.0.10/pip_api/_parse_requirements.py -@@ -13,7 +13,7 @@ try: # py27 - except ImportError: - from urllib import pathname2url +--- pip-api-0.0.30.orig/pip_api/_parse_requirements.py ++++ pip-api-0.0.30/pip_api/_parse_requirements.py +@@ -14,7 +14,7 @@ from typing import Any, Dict, Optional, + from urllib.parse import urljoin, unquote, urlsplit + from urllib.request import pathname2url, url2pathname --from pip_api._vendor.packaging import requirements, specifiers -+from packaging import requirements, specifiers +-from pip_api._vendor.packaging import requirements, specifiers # type: ignore ++from packaging import requirements, specifiers # type: ignore from pip_api.exceptions import PipError -Index: pip-api-0.0.10/tests/conftest.py +Index: pip-api-0.0.30/tests/conftest.py =================================================================== ---- pip-api-0.0.10.orig/tests/conftest.py -+++ pip-api-0.0.10/tests/conftest.py +--- pip-api-0.0.30.orig/tests/conftest.py ++++ pip-api-0.0.30/tests/conftest.py @@ -6,7 +6,7 @@ import pytest import pretend import virtualenv @@ -59,3 +63,16 @@ Index: pip-api-0.0.10/tests/conftest.py import pip_api +Index: pip-api-0.0.30/tests/test_installed_distributions.py +=================================================================== +--- pip-api-0.0.30.orig/tests/test_installed_distributions.py ++++ pip-api-0.0.30/tests/test_installed_distributions.py +@@ -2,7 +2,7 @@ import os + import pytest + + import pip_api +-from pip_api._vendor.packaging.version import parse ++from packaging.version import parse + from pip_api.exceptions import PipError + +