commit c9e0d93920b029f1da1e7b6b4b3d66008f168e92be21568c9a81321f3bb21ada Author: Adrian Schröter Date: Fri May 3 21:45:24 2024 +0200 Sync from SUSE:SLFO:Main python-packaging revision f9a88018c60b5764ec89bc88a35cce55 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/_multibuild b/_multibuild new file mode 100644 index 0000000..d0dc7ba --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + test + primary + diff --git a/packaging-23.1.tar.gz b/packaging-23.1.tar.gz new file mode 100644 index 0000000..d973418 --- /dev/null +++ b/packaging-23.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f +size 134240 diff --git a/python-packaging.changes b/python-packaging.changes new file mode 100644 index 0000000..22f0e63 --- /dev/null +++ b/python-packaging.changes @@ -0,0 +1,453 @@ +------------------------------------------------------------------- +Fri Apr 21 12:28:53 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Sat Apr 15 10:28:14 UTC 2023 - Dirk Müller + +- update to 23.1 + * chore: add typed classifier + * Improve parser error messaging around mistakes in/around + version specifiers + * Upgrade to latest mypy + * Delete print() from test_tags + * Update our linters + * Improve error for local version label with unsupported operators + * Parse raw metadata + * Handle prefix match with zeros at end of prefix correctly + * Relax typing of _key on _BaseVersion + * Replace spaces in platform names with underscores + * Import underlying parser function as an underscored variable + +------------------------------------------------------------------- +Thu Apr 13 22:42:50 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Thu Mar 9 16:39:58 UTC 2023 - Dirk Müller + +- Don't use :primary multibuild flavor for non-Tumbleweed + * accomodates special SLE15 projects defininig extra flavors but + not building for primary python3 + +------------------------------------------------------------------- +Fri Jan 13 15:27:09 UTC 2023 - Ben Greiner + +- Update to v23.0 + * Remove unused LPAREN token from tokenizer by @hrnciar in #630 + * Reorganise the project layout and version management by + @pradyunsg in #626 + * Correctly handle non-normalised specifiers in requirements by + @pradyunsg in #634 + * Use stable Python 3.11 in tests by @153957 in #641 + * Fix typing for specifiers.BaseSpecifier.filter() by @henryiii + in #643 + * Correctly handle trailing whitespace on URL requirements by + @pradyunsg in #642 + * refactor _generic_api to use EXT_SUFFIX by @mattip in #607 + * Allow "extra" to be None in the marker environment by + @pradyunsg in #650 + * Fix typos by @kianmeng in #648 + * Update changelog for release by @pradyunsg in #656 + +------------------------------------------------------------------- +Fri Dec 30 10:16:41 UTC 2022 - Ben Greiner + +- Update to v22.0 + * Fix compatible version specifier incorrectly strip trailing '0' + by @kasium in #493 + * Remove support for Python 3.6 by @abravalheri in #500 + * Use concurrency limit in ci by @blink1073 in #510 + * Fix issue link in changelog. by @bdice in #509 + * chore: test with PyPy 3.8 & 3.9 by @mayeut in #512 + * Accept locally installed prereleases by @q0w in #515 + * Always run GHA workflows when they change by @mayeut in #516 + * Add __hash__/__eq__ to requirements by @abravalheri in #499 + * Upgrade to setup-python v3 and use caching for GHA by + @brettcannon in #521 + * allow pre-release versions in marker evaluation by @graingert + in #523 + * Error out from workflow on missing interpreter by @mayeut in + #525 + * chore: update pre-commit config to the latest repos' versions + by @mayeut in #534 + * chore: remove Windows PyPy 3.9 workaround on GHA by @mayeut in + #533 + * Use pipx to run nox / build in GHA workflows by @mayeut in #517 + * Run tests with all PyPy versions locally by @mayeut in #535 + * Adhere to PEP 685 when evaluating markers with extras by + @hroncok in #545 + * chore: update mypy and move to toml by @henryiii in #547 + * Normalize extra comparison in markers for output by + @brettcannon in #549 + * Evaluate markers under environment with empty "extra" by + @MrMino in #550 + * Do not set extra in default_environment() by @sbidoul in #554 + * Update extlinks strings to use a format string by @mayeut in + #555 + * Update CI test workflow to use setup-python@v4 by @mayeut in + #556 + * CI: Update actions/* to their latest major versions by @mayeut + in #557 + * Fix a spelling mistake by @venthur in #558 + * fix: macOS platform tags with old macOS SDK by @mayeut in #513 + * Correctly parse ELF for musllinux on Big Endian by @uranusjr in + #538 + * A metadata module with a data class for core metadata by + @brettcannon in #518 + * Document utils.NormalizedName by @brettcannon in #565 + * Drop LegacySpecifier and LegacyVersion by @pradyunsg in #407 + * Move metadata, versions and specifiers API documentation to + sphinx.ext.autodoc by @pradyunsg in #572 + * Demonstrate behaviour of SpecifierSet.__iter__ by @hauntsaninja + in #575 + * Handwritten parser for parsing requirements by @hrnciar in #484 + * Add changelog entry for removal of pyparsing dependency by + @hroncok in #581 + * Use Iterator instead of Iterable for specifier filter methods + by @ichard26 in #584 + * Better output on linter failure by @henryiii in #478 + * Add a "cpNNN-none-any" tag by @joonis in #541 + * Document exceptions raised by functions in utils by @MrMino in + #544 + * Refactor ELF parsing logic to standlone class by @uranusjr in + #553 + * Forbid prefix version matching on pre-release/post-release + segments by @mayeut in #563 + * Update coverage to >=5.0.0 by @mayeut in #586 + * Normalize specifier version for prefix matching by @mayeut in + #561 + * Add python 3.11 by @mayeut in #587 + * Fix prefix version matching by @mayeut in #564 + * Remove duplicate namedtuple by @layday in #589 + * Update changelog by @pradyunsg in #595 + * Change email-related fields in Metadata to str by @brettcannon + in #596 + * Add versionchanged for 21.3 by @brettcannon in #599 + * refactor: use flit as a backend by @henryiii in #546 + * Remove packaging.metadata by @pradyunsg in #603 + * Refactor nox requirements to use requirements files (#601) by + @strokirk in #609 + * Improve Requirement/Marker parser with context-sensitive + tokenisation by @pradyunsg in #624 +- The new usage of the flit-core backend simplifies the bootstrap +- Remove old-distro shims: This one requires Python 3.7+, thus + all non-Tumbleweed backports or future distros must provide the + primary_python macro and similar themselves. +- Drop fix-big-endian-build.patch upstreamed gh#pypa/packaging#538 + +------------------------------------------------------------------- +Mon Aug 1 07:44:59 UTC 2022 - Ben Greiner + +- BuildIgnore python3-packaging for primary bootstrap. + +------------------------------------------------------------------- +Thu Jul 21 11:16:04 UTC 2022 - Ben Greiner + +- Refine build and runtime requirements for primary and non-primary + builds + +------------------------------------------------------------------- +Thu Jul 21 10:16:17 UTC 2022 - John Paul Adrian Glaubitz + +- Update in SLE-15 (bsc#1199282, jsc#PM-3243, jsc#SLE-24629) + +------------------------------------------------------------------- +Fri Jul 15 12:30:44 UTC 2022 - Ben Greiner + +- Split primary flavor in multibuild for possible inclusion into + Ring0 + +------------------------------------------------------------------- +Thu Jul 14 13:13:54 UTC 2022 - Ben Greiner + +- Setuptools itself does not depend on packaging anymore, only for + pythondistdeps.py, That dependency will move to + python-rpm-packaging soon. -- boo#1178257 +- Use "setuptools" for building again. + * Python 3.12 will drop the distutils fallback + * Use the python-base vendored pip in a venv + * Drop no-legacyversion-warning.patch +- Remove nonsensical python362 flavor check. + +------------------------------------------------------------------- +Sun May 29 09:22:42 UTC 2022 - John Paul Adrian Glaubitz + +- Add patch to fix testsuite on big-endian targets + + fix-big-endian-build.patch + +------------------------------------------------------------------- +Mon Apr 25 07:56:29 UTC 2022 - Hui-Zhi Zhao + +- Ignore python3.6.2 since the test doesn't support it. + +------------------------------------------------------------------- +Wed Nov 24 15:16:45 UTC 2021 - Matthias Fehring + +- update to 21.3: + * Add a pp3-none-any tag (gh#pypa/packaging#311) + * Replace the blank pyparsing 3 exclusion with a 3.0.5 exclusion + (gh#pypa/packaging#481), (gh#pypa/packaging#486) + * Fix a spelling mistake (gh#pypa/packaging#479) + +------------------------------------------------------------------- +Sat Nov 6 18:30:50 UTC 2021 - Dirk Müller + +- update to 21.2: + * Update documentation entry for 21.1. + * Update pin to pyparsing to exclude 3.0.0. + * PEP 656: musllinux support + * Drop support for Python 2.7, Python 3.4 and Python 3.5. + * Replace distutils usage with sysconfig + * Add support for zip files in ``parse_sdist_filename`` + * Use cached ``_hash`` attribute to short-circuit tag equality comparisons + * Specify the default value for the ``specifier`` argument to ``SpecifierSet`` + * Proper keyword-only "warn" argument in packaging.tags + * Correctly remove prerelease suffixes from ~= check + * Fix type hints for ``Version.post`` and ``Version.dev`` + * Use typing alias ``UnparsedVersion`` + * Improve type inference for ``packaging.specifiers.filter()`` + * Tighten the return type of ``canonicalize_version()`` + +------------------------------------------------------------------- +Thu Jun 17 17:28:43 UTC 2021 - Ben Greiner + +- Add Provides: for python*dist(packaging): work around boo#1186870 +- skip tests failing because of no-legacyversion-warning.patch + +------------------------------------------------------------------- +Sat May 1 21:03:52 UTC 2021 - Dirk Müller + +- add no-legacyversion-warning.patch to restore compatibility with 20.4 + +------------------------------------------------------------------- +Tue Feb 2 01:02:21 UTC 2021 - Dirk Müller + +- update to 20.9: + * Run [isort](https://pypi.org/project/isort/) over the code base (:issue:`377`) + * Add support for the ``macosx_10_*_universal2`` platform tags (:issue:`379`) + * Introduce ``packaging.utils.parse_wheel_filename()`` and ``parse_sdist_filename()`` + +------------------------------------------------------------------- +Sun Dec 20 09:37:07 UTC 2020 - Dirk Müller + +- update to 20.8: + * Revert back to setuptools for compatibility purposes for some Linux distros (:issue:`363`) + * Do not insert an underscore in wheel tags when the interpreter version number + is more than 2 digits (:issue:`372`) + * Fix flit configuration, to include LICENSE files (:issue:`357`) + * Make `intel` a recognized CPU architecture for the `universal` macOS platform tag (:issue:`361`) + * Add some missing type hints to `packaging.requirements` (issue:`350`) + * Officially support Python 3.9 (:issue:`343`) + * Deprecate the ``LegacyVersion`` and ``LegacySpecifier`` classes (:issue:`321`) + * Handle ``OSError`` on non-dynamic executables when attempting to resolve + the glibc version string. + +------------------------------------------------------------------- +Tue Jun 2 16:35:59 UTC 2020 - Dirk Mueller + +- update to 20.4: + * Canonicalize version before comparing specifiers. (:issue:`282`) + * Change type hint for ``canonicalize_name`` to return + ``packaging.utils.NormalizedName``. + This enables the use of static typing tools (like mypy) to detect mixing of + normalized and un-normalized names. + +------------------------------------------------------------------- +Tue May 5 07:23:22 UTC 2020 - Tomáš Chvátal + +- Ignore clamav scan as it bogusly calls one file to be infected + while it is just a testcase of malformed binary: + #!BuildIgnore: post-build-checks-malwarescan + +------------------------------------------------------------------- +Wed Mar 11 14:37:16 UTC 2020 - Marketa Calabkova + +- Update to 20.3 + * Fix a bug that caused a 32-bit OS that runs on a 64-bit ARM CPU + (e.g. ARM-v8, aarch64), to report the wrong bitness. +- Drop already upstreamed patch issue_254.patch + +------------------------------------------------------------------- +Mon Feb 10 14:51:38 UTC 2020 - Ondřej Súkup + +- add issue_254.patch to fix tests under non-x86_64 pplatforms + +------------------------------------------------------------------- +Wed Feb 5 13:45:06 UTC 2020 - Ondřej Súkup + +- Update to 20.1 + * Fix a bug caused by reuse of an exhausted iterator. + * Add type hints + * Add proper trove classifiers for PyPy support + * Scale back depending on ctypes for manylinux support detection + * Use sys.implementation.name where appropriate for packaging.tags + * Expand upon the API provded by packaging.tags + * Officially support Python 3.8 + * Add major, minor, and micro aliases to packaging.version.Version + * Properly mark packaging has being fully typed by adding a py.typed file + +------------------------------------------------------------------- +Tue Oct 8 09:22:51 UTC 2019 - Tomáš Chvátal + +- Update to 19.2: + * Many buildsystem tweaks to accomodate for distribution shipping +- Remove all the merged patches: + * 0001-Fix-test-failures-test_linux_platforms_manylinux-for.patch + * 0002-Fix-check-for-64-bit-OS.patch + * 0003-Add-additional-test-to-get-100-branch-coverage.patch + * 0004-Fix-test_macos_version_detection-failure-on-32-bit-L.patch + * 0005-Drop-dependency-on-attrs.patch + +------------------------------------------------------------------- +Mon Aug 19 08:15:30 UTC 2019 - Dan Čermák + +- Remove dependency on attrs + Add: 0005-Drop-dependency-on-attrs.patch + this fixes bsc#1144506 + +------------------------------------------------------------------- +Thu Aug 15 08:35:19 UTC 2019 - Tomáš Chvátal + +- Fix a bit the multibuild conversion +- Remove the attrs from the deps as they are no longer needed + +------------------------------------------------------------------- +Thu Aug 8 11:41:45 UTC 2019 - Dan Čermák + +- Enable tests via _multibuild + Add patches from https://github.com/pypa/packaging/pull/176: + * 0001-Fix-test-failures-test_linux_platforms_manylinux-for.patch + * 0002-Fix-check-for-64-bit-OS.patch + * 0003-Add-additional-test-to-get-100-branch-coverage.patch + * 0004-Fix-test_macos_version_detection-failure-on-32-bit-L.patch + (these fix the tests on non-x86 platforms and can be dropped on the next + release) + +------------------------------------------------------------------- +Thu Aug 8 10:24:07 UTC 2019 - Dan Čermák + +- Add Requires:python-attrs as this is a new dependency + this fixes bsc#1144506 + +------------------------------------------------------------------- +Tue Aug 6 04:58:54 UTC 2019 - Thomas Bechtold + +- update to 19.1: + * Add the ``packaging.tags`` module. + * Correctly handle two-digit versions in ``python_version`` + +------------------------------------------------------------------- +Sat Mar 9 04:56:34 UTC 2019 - John Vandenberg + +- Fix check that egg-info is a directory to work with %check enabled, + and better explain how it works +- Remove unnecessary build dependency on base +- Re-add test dependency on pyparsing with minimum version defined upstream, + and replace inline comment with GitHub issue URL +- Add LICENSE.APACHE LICENSE.BSD to %license +- Update to v19.0 + * Fix string representation of PEP 508 direct URL requirements with markers. + * Better handling of file URLs + This allows for using ``file:///absolute/path``, which was previously + prevented due to the missing ``netloc`` + This allows for all file URLs that ``urlunparse`` turns back into the + original URL to be valid +- from v18.0 + * Improve error messages when invalid requirements are given + +------------------------------------------------------------------- +Fri Dec 28 08:49:34 UTC 2018 - Martin Pluskal + +- Drop pyparsing dependency as its not needed and creates circular + dependency on older distributions +- Reduce amount of duplicities + +------------------------------------------------------------------- +Thu Mar 22 20:37:57 UTC 2018 - toddrme2178@gmail.com + +- Update to version 17.1 + * Fix utils.canonicalize_version when supplying non PEP 440 versions. +- Update to version 17.0 + * Drop support for python 2.6, 3.2, and 3.3. + * Define minimal pyparsing version to 2.0.2 (#91). + * Add epoch, release, pre, dev, and post attributes to Version and LegacyVersion (#34). + * Add Version().is_devrelease and LegacyVersion().is_devrelease to make it easy to determine if a release is a development release. + * Add utils.canonicalize_version to canonicalize version strings or Version instances (#121). + +------------------------------------------------------------------- +Tue May 2 08:41:19 UTC 2017 - dmueller@suse.com + +- fix pyparsing requirement + +------------------------------------------------------------------- +Thu Feb 23 11:45:52 UTC 2017 - jmatejek@suse.com + +- update for single-spec +- drop setuptools dependency, as this is itself now a dependency + of setuptools +- run tests conditionally, to minimize dependency tree +- ensure egg-info is a directory (distutils would install it as file) + +------------------------------------------------------------------- +Fri Dec 2 17:55:31 UTC 2016 - tbechtold@suse.com + +- update to 16.8: + * Fix markers that utilize ``in`` so that they render correctly. + * Fix an erroneous test on Python RC releases. + +------------------------------------------------------------------- +Wed May 25 10:55:53 UTC 2016 - tbechtold@suse.com + +- update to 16.7: + * Add support for the deprecated ``python_implementation`` marker which was + an undocumented setuptools marker in addition to the newer markers. + * Add support for the deprecated, PEP 345 environment markers in addition to + the newer markers. + +------------------------------------------------------------------- +Tue Mar 8 13:59:53 UTC 2016 - tbechtold@suse.com + +- update to 16.5: + * Fix a regression in parsing requirements with whitespaces between the comma + separators. + * Fix a regression in parsing requirements like ``foo (==4)``. + * Fix a bug where ``packaging.requirements:Requirement`` was overly strict when + matching legacy requirements. + * Add a function that implements the name canonicalization from PEP 503. + * Implement requirement specifiers from PEP 508. + * Relicense so that packaging is available under *either* the Apache License, + Version 2.0 or a 2 Clause BSD license. + * Support installation of packaging when only distutils is available. + * Fix ``==`` comparison when there is a prefix and a local version in play. + (:issue:`41`). + * Implement environment markers from PEP 508. +- Adjust Requires according to requires.txt + +------------------------------------------------------------------- +Tue Aug 11 07:05:29 UTC 2015 - tbechtold@suse.com + +- update to 15.3: + * Normalize post-release spellings for rev/r prefixes. :issue:`35` + +------------------------------------------------------------------- +Thu Jun 25 04:01:09 UTC 2015 - tbechtold@suse.com + +- update to 15.2: + * Fix an error where the arbitary specifier (``===``) was not correctly + allowing pre-releases when it was being used. + * Expose the specifier and version parts through properties on the + ``Specifier`` classes. + * Allow iterating over the ``SpecifierSet`` to get access to all of the + ``Specifier`` instances. + * Allow testing if a version is contained within a specifier via the ``in`` + operator. + + +------------------------------------------------------------------- +Thu Apr 23 18:45:03 UTC 2015 - tbechtold@suse.com + +- Initial packaging + diff --git a/python-packaging.spec b/python-packaging.spec new file mode 100644 index 0000000..396a3f3 --- /dev/null +++ b/python-packaging.spec @@ -0,0 +1,130 @@ +# +# spec file +# +# 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 +# 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/ +# + + +%define modname packaging +# in order to avoid rewriting for subpackage generator +%define mypython python +%global flavor @BUILD_FLAVOR@%{nil} +%if 0%{?suse_version} >= 1550 +%if "%{flavor}" == "primary" +# this one is goes into Ring0: Bootstrap for primary python stack +%define pprefix %{primary_python} +%define pythons %{primary_python} +# Avoid cycle with python-rpm-packaging requiring python3-packaging +#!BuildIgnore: python3-packaging +%endif +%if "%{flavor}" == "" +# The rest is in Ring1 +%define pprefix python +%{expand:%%define skip_%{primary_python} 1} +BuildRequires: python3-packaging +%endif +%else +# backport and option d projects for 15.X having one or more python in the buildset don't need the Ring split for bootstrap +%if "%{flavor}" == "primary" +%define python_module() invalid-multibuild-flavor-for-15.X +ExclusiveArch: do-not-build +%else +%define pprefix python +%endif +%{?sle15_python_module_pythons} +%endif +%if "%{flavor}" == "test" +%define pprefix python +%define psuffix -test +%bcond_without test +%else +%bcond_with test +%endif + +Name: %{pprefix}-packaging%{?psuffix} +Version: 23.1 +Release: 0 +Summary: Core utilities for Python packages +License: Apache-2.0 AND BSD-2-Clause +URL: https://packaging.pypa.io/ +#SourceRepository: https://github.com/pypa/packaging +Source: https://files.pythonhosted.org/packages/source/p/packaging/packaging-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.7} +# python-flit-core is bootstrapped in Ring0 as well +BuildRequires: %{python_module flit-core >= 3.3} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +#!BuildIgnore: post-build-checks-malwarescan +BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module packaging = %{version}} +BuildRequires: %{python_module pretend} +BuildRequires: %{python_module pytest >= 6.2} +%endif +%if "%{flavor}" == "primary" +# See boo#1186870, we can't provide ourselves to pythondistdeps.py +Provides: %{mypython}%{python_version}dist(%{modname}) = %{version}-%{release} +Provides: %{mypython}3-%{modname} = %{version}-%{release} +Provides: %{mypython}3dist(%{modname}) = %{version}-%{release} +Obsoletes: %{mypython}3-%{modname} < %{version}-%{release} +Requires: %{mypython}(abi) = %{python_version} +%endif +%python_subpackages + +%description +Reusable core utilities for various Python Packaging interoperability specifications. + +This library provides utilities that implement the interoperability specifications +which have clearly one correct behaviour (eg: PEP 440) or benefit greatly from having +a single shared implementation (eg: PEP 425). + +%prep +%autosetup -p1 -n packaging-%{version} + +%if !%{with test} +%build +%{python_expand # build using pythonXX-base bundled pip with the installed flit-core backend +$python -m venv venv-%{$python_bin_suffix} --system-site-packages +venv-%{$python_bin_suffix}/bin/pip wheel %{pyproject_wheel_args} . +} +%endif + +%if !%{with test} +%install +%{python_expand # install wheel (into venv sitelib) and move to buildroot system sitelib +venv-%{$python_bin_suffix}/bin/pip install %{pyproject_install_args} packaging==%{version} +venvsite=%{buildroot}${PWD}/venv-%{$python_bin_suffix}/lib/python%{$python_bin_suffix}/site-packages +mkdir -p %{buildroot}%{$python_sitelib} +mv ${venvsite}/packaging* %{buildroot}%{$python_sitelib}/ +pushd %{buildroot} +rmdir -p $(realpath --relative-to ${PWD} ${venvsite}) +popd +%fdupes %{buildroot}%{$python_sitelib} +} +%endif + +%if %{with test} +%check +%pytest +%endif + +%if !%{with test} +%files %{python_files} +%license LICENSE LICENSE.APACHE LICENSE.BSD +%doc README.rst +%{python_sitelib}/packaging +%{python_sitelib}/packaging-%{version}.dist-info +%endif + +%changelog