Blame SPECS/python3.11-packaging.spec

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