Blame SPECS/python3.11-packaging.spec

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