37b9be
# Tests are disabled to remove the test dependencies
37b9be
# Specify --with tests to run the tests on e.g. EPEL
37b9be
%bcond_with tests
37b9be
37b9be
%global pypi_name packaging
37b9be
37b9be
# Specify --with bootstrap to build in bootstrap mode
37b9be
# This mode is needed, because python3-rpm-generators need packaging
37b9be
# When bootstrapping, disable tests and docs as well.
37b9be
%bcond_with bootstrap
37b9be
37b9be
%if %{without bootstrap}
37b9be
# Specify --without docs to prevent the dependency loop on python-sphinx
37b9be
%bcond_without docs
37b9be
37b9be
%else
37b9be
%bcond_with docs
37b9be
%endif
37b9be
37b9be
Name:           python-%{pypi_name}
37b9be
Version:        20.9
6e0015
Release:        5%{?dist}
37b9be
Summary:        Core utilities for Python packages
37b9be
37b9be
License:        BSD or ASL 2.0
37b9be
URL:            https://github.com/pypa/packaging
37b9be
Source0:        %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
37b9be
BuildArch:      noarch
37b9be
37b9be
BuildRequires:  python%{python3_pkgversion}-devel
37b9be
BuildRequires:  pyproject-rpm-macros
37b9be
37b9be
%if %{with bootstrap}
37b9be
BuildRequires:  python%{python3_pkgversion}-setuptools
37b9be
%endif
37b9be
37b9be
# Upstream uses nox for testing, we specify the test deps manually as well.
37b9be
%if %{with tests}
37b9be
BuildRequires:  python%{python3_pkgversion}-pytest
37b9be
BuildRequires:  python%{python3_pkgversion}-pretend
37b9be
%endif
37b9be
%if %{with docs}
37b9be
BuildRequires:  python%{python3_pkgversion}-sphinx
37b9be
%endif
37b9be
37b9be
37b9be
%global _description %{expand:
37b9be
python-packaging provides core utilities for Python packages like utilities for
37b9be
dealing with versions, specifiers, markers etc.}
37b9be
37b9be
%description %_description
37b9be
37b9be
37b9be
%package -n python%{python3_pkgversion}-%{pypi_name}
37b9be
Summary:        %{summary}
37b9be
37b9be
# This is kept for compatibility with Fedora < 33 only:
37b9be
%py_provides    python%{python3_pkgversion}-%{pypi_name}
37b9be
37b9be
%if %{with bootstrap}
37b9be
Provides:       python%{python3_pkgversion}dist(packaging) = %{version}
37b9be
Provides:       python%{python3_version}dist(packaging) = %{version}
37b9be
Requires:       python%{python3_version}dist(pyparsing)
37b9be
%endif
37b9be
37b9be
%description -n python%{python3_pkgversion}-%{pypi_name}  %_description
37b9be
37b9be
37b9be
%if %{with docs}
37b9be
%package -n python-%{pypi_name}-doc
37b9be
Summary:        python-packaging documentation
37b9be
37b9be
%description -n python-%{pypi_name}-doc
37b9be
Documentation for python-packaging
37b9be
%endif
37b9be
37b9be
37b9be
%prep
37b9be
%autosetup -p1 -n %{pypi_name}-%{version}
37b9be
37b9be
# Do not use furo as HTML theme in docs
37b9be
# furo is not available in Fedora
37b9be
sed -i '/html_theme = "furo"/d' docs/conf.py
37b9be
37b9be
%if %{without bootstrap}
37b9be
%generate_buildrequires
37b9be
%pyproject_buildrequires -r
37b9be
%endif
37b9be
37b9be
37b9be
%build
37b9be
%if %{with bootstrap}
37b9be
%py3_build
37b9be
%else
37b9be
%pyproject_wheel
37b9be
%endif
37b9be
37b9be
%if %{with docs}
37b9be
# generate html docs
37b9be
sphinx-build-3 docs html
37b9be
# remove the sphinx-build leftovers
37b9be
rm -rf html/.{doctrees,buildinfo}
37b9be
# Do not bundle fonts
37b9be
rm -rf html/_static/fonts/
37b9be
%endif
37b9be
37b9be
37b9be
%install
37b9be
%if %{with bootstrap}
37b9be
%py3_install
37b9be
echo '%{python3_sitelib}/packaging*' > %{pyproject_files}
37b9be
%else
37b9be
%pyproject_install
37b9be
%pyproject_save_files %{pypi_name}
37b9be
%endif
37b9be
37b9be
37b9be
%if %{with tests}
37b9be
%check
37b9be
%pytest
37b9be
%endif
37b9be
37b9be
37b9be
%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
37b9be
%license LICENSE LICENSE.APACHE LICENSE.BSD
37b9be
%doc README.rst CHANGELOG.rst CONTRIBUTING.rst
37b9be
37b9be
37b9be
%if %{with docs}
37b9be
%files -n python-%{pypi_name}-doc
37b9be
%doc html
37b9be
%license LICENSE LICENSE.APACHE LICENSE.BSD
37b9be
%endif
37b9be
37b9be
37b9be
%changelog
6e0015
* Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 20.9-5
6e0015
- Add automatically generated Obsoletes tag with the python39- prefix
6e0015
  for smoother upgrade from RHEL8
6e0015
- Related: rhbz#1990421
6e0015
37b9be
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com>
37b9be
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
37b9be
  Related: rhbz#1991688
37b9be
37b9be
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com>
37b9be
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
37b9be
37b9be
* Mon Mar 08 2021 Charalampos Stratakis <cstratak@redhat.com> - 20.9-2
37b9be
- Disable tests on RHEL9 to remove the test dependencies
37b9be
37b9be
* Mon Feb 01 2021 Lumír Balhar <lbalhar@redhat.com> - 20.9-1
37b9be
- Update to 20.9
37b9be
Resolves: rhbz#1922545
37b9be
37b9be
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 20.8-2
37b9be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
37b9be
37b9be
* Mon Dec 14 2020 Lumír Balhar <lbalhar@redhat.com> - 20.8-1
37b9be
- Update to 20.8 (#1906985)
37b9be
37b9be
* Mon Nov 30 2020 Lumír Balhar <lbalhar@redhat.com> - 20.7-1
37b9be
- Update to 20.7 (#1902369)
37b9be
37b9be
* Fri Oct 02 2020 Miro Hrončok <mhroncok@redhat.com> - 20.4-3
37b9be
- Drop the dependency on six to make the package lighter
37b9be
37b9be
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 20.4-2
37b9be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
37b9be
37b9be
* Mon Jun 01 2020 Lumír Balhar <lbalhar@redhat.com> - 20.4-1
37b9be
- Update to 20.4 (#1838285)
37b9be
37b9be
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 20.3-3
37b9be
- Rebuilt for Python 3.9
37b9be
37b9be
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 20.3-2
37b9be
- Bootstrap for Python 3.9
37b9be
37b9be
* Fri Mar 06 2020 Lumír Balhar <lbalhar@redhat.com> - 20.3-1
37b9be
- Update to 20.3 (#1810738)
37b9be
37b9be
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 20.1-2
37b9be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
37b9be
37b9be
* Mon Jan 27 2020 Lumír Balhar <lbalhar@redhat.com> - 20.1-1
37b9be
- Update to 20.1 (#1794865)
37b9be
37b9be
* Mon Jan 06 2020 Lumír Balhar <lbalhar@redhat.com> - 20.0-2
37b9be
- Ignore broken tests
37b9be
37b9be
* Mon Jan 06 2020 Lumír Balhar <lbalhar@redhat.com> - 20.0-1
37b9be
- Update to 20.0 (#1788012)
37b9be
37b9be
* Thu Sep 26 2019 Lumír Balhar <lbalhar@redhat.com> - 19.2-1
37b9be
- New upstream version 19.2 (bz#1742388)
37b9be
37b9be
* Mon Sep 23 2019 Lumír Balhar <lbalhar@redhat.com> - 19.0-6
37b9be
- Remove Python 2 subpackage
37b9be
- Make spec fedora-specific
37b9be
37b9be
* Mon Sep 02 2019 Miro Hrončok <mhroncok@redhat.com> - 19.0-5
37b9be
- Reduce Python 2 build time dependencies
37b9be
37b9be
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 19.0-4
37b9be
- Rebuilt for Python 3.8
37b9be
37b9be
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 19.0-3
37b9be
- Bootstrap for Python 3.8
37b9be
37b9be
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 19.0-2
37b9be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
37b9be
37b9be
* Mon Feb 04 2019 Lumír Balhar <lbalhar@redhat.com> - 19.0-1
37b9be
- New upstream version
37b9be
37b9be
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 17.1-2
37b9be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
37b9be
37b9be
* Tue Jul 31 2018 Charalampos Stratakis <cstratak@redhat.com> - 17.1-1
37b9be
- Update to 17.1
37b9be
37b9be
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-11
37b9be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
37b9be
37b9be
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 16.8-10
37b9be
- Rebuilt for Python 3.7
37b9be
37b9be
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 16.8-9
37b9be
- Bootstrap for Python 3.7
37b9be
37b9be
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 16.8-8
37b9be
- Update Python 2 dependency declarations to new packaging standards
37b9be
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
37b9be
37b9be
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-7
37b9be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
37b9be
37b9be
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-6
37b9be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
37b9be
37b9be
* Wed Mar 22 2017 Lumir Balhar <lbalhar@redhat.com> - 16.8-5
37b9be
- Epel7 compatible spec/package
37b9be
37b9be
* Mon Feb 13 2017 Charalampos Stratakis <cstratak@redhat.com> - 16.8-4
37b9be
- Rebuild as wheel
37b9be
37b9be
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-3
37b9be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
37b9be
37b9be
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 16.8-2
37b9be
- Rebuild for Python 3.6
37b9be
37b9be
* Wed Nov 02 2016 Lumir Balhar <lbalhar@redhat.com> - 16.8-1
37b9be
- New upstream version
37b9be
37b9be
* Fri Sep 16 2016 Lumir Balhar <lbalhar@redhat.com> - 16.7-1
37b9be
- Initial package.