Blame SPECS/python3.11-packaging.spec

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