Blame SPECS/python3.11-packaging.spec

d768a6
%global __python3 /usr/bin/python3.11
d768a6
%global python3_pkgversion 3.11
d768a6
d768a6
%global pypi_name packaging
d768a6
d768a6
# Tests are disabled in RHEL because we don't have python-pretend.
d768a6
# Specify --with tests to enable them.
d768a6
%bcond_with tests
d768a6
d768a6
Name:           python%{python3_pkgversion}-%{pypi_name}
d768a6
Version:        21.3
d768a6
Release:        1%{?dist}
d768a6
Summary:        Core utilities for Python packages
d768a6
d768a6
License:        BSD or ASL 2.0
d768a6
URL:            https://github.com/pypa/packaging
d768a6
Source0:        %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
d768a6
d768a6
# Correctly parse ELF for musllinux on Big Endian
d768a6
# Merged upstream
d768a6
Patch:          https://github.com/pypa/packaging/pull/538.patch
d768a6
d768a6
BuildArch:      noarch
d768a6
d768a6
BuildRequires:  python%{python3_pkgversion}-devel
d768a6
BuildRequires:  python%{python3_pkgversion}-rpm-macros
d768a6
BuildRequires:  python%{python3_pkgversion}-setuptools
d768a6
d768a6
# Upstream uses nox for testing.
d768a6
%if %{with tests}
d768a6
BuildRequires:  python%{python3_pkgversion}-pytest
d768a6
BuildRequires:  python%{python3_pkgversion}-pretend
d768a6
%endif
d768a6
d768a6
# On RHEL8 we need to manually specify the runtime requirements.
d768a6
# On RHEL9 they are auto-generated but we keep them for consistency.
d768a6
Requires:       python%{python3_pkgversion}dist(pyparsing)
d768a6
d768a6
%global _description %{expand:
d768a6
python-packaging provides core utilities for Python packages like utilities for
d768a6
dealing with versions, specifiers, markers etc.}
d768a6
d768a6
%description %_description
d768a6
d768a6
%prep
d768a6
%autosetup -p1 -n %{pypi_name}-%{version}
d768a6
d768a6
%build
d768a6
%py3_build
d768a6
d768a6
%install
d768a6
%py3_install
d768a6
d768a6
%if %{with tests}
d768a6
%check
d768a6
%pytest
d768a6
%endif
d768a6
d768a6
d768a6
%files -n python%{python3_pkgversion}-%{pypi_name}
d768a6
%license LICENSE LICENSE.APACHE LICENSE.BSD
d768a6
%doc README.rst CHANGELOG.rst CONTRIBUTING.rst
d768a6
%{python3_sitelib}/%{pypi_name}/
d768a6
%{python3_sitelib}/%{pypi_name}-*-info/
d768a6
d768a6
d768a6
%changelog
d768a6
* Fri Nov 25 2022 Charalampos Stratakis <cstratak@redhat.com> - 21.3-1
d768a6
- Initial package
d768a6
- Fedora contributions by:
d768a6
      # Charalampos Stratakis <cstratak@redhat.com>
d768a6
      # Iryna Shcherbina <shcherbina.iryna@gmail.com>
d768a6
      # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>
d768a6
      # Lumir Balhar <lbalhar@redhat.com>
d768a6
      # Miro Hrončok <miro@hroncok.cz>
d768a6
      # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>