3cc183
%global pypi_name packaging
3cc183
3cc183
# Specify --without docs to prevent the dependency loop on python-sphinx
3cc183
# RHEL: Disabled due to missing deps
3cc183
%bcond_with docs
3cc183
3cc183
# Specify --without tests to prevent the dependency loop on python-pytest
3cc183
# RHEL: Disabled due to missing deps
3cc183
%bcond_with tests
3cc183
3cc183
%global python_wheelname %{pypi_name}-%{version}-py2.py3-none-any.whl
3cc183
3cc183
Name:           python-%{pypi_name}
3cc183
Version:        20.4
3cc183
Release:        4%{?dist}
3cc183
Summary:        Core utilities for Python packages
3cc183
3cc183
License:        BSD or ASL 2.0
3cc183
URL:            https://github.com/pypa/packaging
3cc183
Source0:        %{pypi_source}
3cc183
BuildArch:      noarch
3cc183
# Exclude i686 arch. Due to a modularity issue it's being added to the
3cc183
# x86_64 compose of CRB, but we don't want to ship it at all.
3cc183
# See: https://projects.engineering.redhat.com/browse/RCM-72605
3cc183
ExcludeArch:    i686
3cc183
3cc183
# Remove dependency on six to make package lighter, backported from upstream
3cc183
Patch1:         %{url}/commit/39a70cce.patch
3cc183
3cc183
BuildRequires:  python%{python3_pkgversion}-setuptools
3cc183
BuildRequires:  python%{python3_pkgversion}-devel
3cc183
BuildRequires:  python%{python3_pkgversion}-rpm-macros
3cc183
BuildRequires:  python%{python3_pkgversion}-pyparsing
3cc183
%if %{with tests}
3cc183
BuildRequires:  python%{python3_pkgversion}-pytest
3cc183
BuildRequires:  python%{python3_pkgversion}-pretend
3cc183
%endif
3cc183
%if %{with docs}
3cc183
BuildRequires:  python%{python3_pkgversion}-sphinx
3cc183
%endif
3cc183
3cc183
BuildRequires:  python%{python3_pkgversion}-pip
3cc183
BuildRequires:  python%{python3_pkgversion}-wheel
3cc183
3cc183
%description
3cc183
python-packaging provides core utilities for Python packages like utilities for
3cc183
dealing with versions, specifiers, markers etc.
3cc183
3cc183
%package -n python%{python3_pkgversion}-%{pypi_name}
3cc183
Summary:        %{summary}
3cc183
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
3cc183
3cc183
Requires:       python%{python3_pkgversion}-pyparsing
3cc183
3cc183
%description -n python%{python3_pkgversion}-%{pypi_name}
3cc183
python%{python3_pkgversion}-packaging provides core utilities for Python packages like utilities for
3cc183
dealing with versions, specifiers, markers etc.
3cc183
3cc183
%if %{with docs}
3cc183
%package -n python%{python3_pkgversion}-%{pypi_name}-doc
3cc183
Summary:        python-packaging documentation
3cc183
3cc183
%description -n python%{python3_pkgversion}-%{pypi_name}-doc
3cc183
Documentation for python-packaging
3cc183
%endif
3cc183
3cc183
%prep
3cc183
%autosetup -p1 -n %{pypi_name}-%{version}
3cc183
# Remove bundled egg-info
3cc183
rm -rf %{pypi_name}.egg-info
3cc183
3cc183
%build
3cc183
%py3_build_wheel
3cc183
3cc183
%if %{with docs}
3cc183
# generate html docs
3cc183
sphinx-build-3 docs html
3cc183
# remove the sphinx-build leftovers
3cc183
rm -rf html/.{doctrees,buildinfo}
3cc183
# Do not bundle fonts
3cc183
rm -rf html/_static/fonts/
3cc183
%endif
3cc183
3cc183
%install
3cc183
%py3_install_wheel %{python_wheelname}
3cc183
3cc183
%if %{with tests}
3cc183
%check
3cc183
%pytest
3cc183
%endif
3cc183
3cc183
%files -n python%{python3_pkgversion}-%{pypi_name}
3cc183
%license LICENSE LICENSE.APACHE LICENSE.BSD
3cc183
%doc README.rst CHANGELOG.rst CONTRIBUTING.rst
3cc183
%{python3_sitelib}/%{pypi_name}/
3cc183
%{python3_sitelib}/%{pypi_name}-*-info/
3cc183
3cc183
%if %{with docs}
3cc183
%files -n python%{python3_pkgversion}-%{pypi_name}-doc
3cc183
%doc html
3cc183
%license LICENSE LICENSE.APACHE LICENSE.BSD
3cc183
%endif
3cc183
3cc183
%changelog
3cc183
* Tue Jan 12 2021 Tomas Orsava <torsava@redhat.com> - 20.4-4
3cc183
- Convert from Fedora to the python39 module in RHEL8
3cc183
- Resolves: rhbz#1877430
3cc183
3cc183
* Fri Oct 02 2020 Miro Hrončok <mhroncok@redhat.com> - 20.4-3
3cc183
- Drop the dependency on six to make the package lighter
3cc183
3cc183
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 20.4-2
3cc183
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3cc183
3cc183
* Mon Jun 01 2020 Lumír Balhar <lbalhar@redhat.com> - 20.4-1
3cc183
- Update to 20.4 (#1838285)
3cc183
3cc183
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 20.3-3
3cc183
- Rebuilt for Python 3.9
3cc183
3cc183
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 20.3-2
3cc183
- Bootstrap for Python 3.9
3cc183
3cc183
* Fri Mar 06 2020 Lumír Balhar <lbalhar@redhat.com> - 20.3-1
3cc183
- Update to 20.3 (#1810738)
3cc183
3cc183
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 20.1-2
3cc183
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
3cc183
3cc183
* Mon Jan 27 2020 Lumír Balhar <lbalhar@redhat.com> - 20.1-1
3cc183
- Update to 20.1 (#1794865)
3cc183
3cc183
* Mon Jan 06 2020 Lumír Balhar <lbalhar@redhat.com> - 20.0-2
3cc183
- Ignore broken tests
3cc183
3cc183
* Mon Jan 06 2020 Lumír Balhar <lbalhar@redhat.com> - 20.0-1
3cc183
- Update to 20.0 (#1788012)
3cc183
3cc183
* Thu Sep 26 2019 Lumír Balhar <lbalhar@redhat.com> - 19.2-1
3cc183
- New upstream version 19.2 (bz#1742388)
3cc183
3cc183
* Mon Sep 23 2019 Lumír Balhar <lbalhar@redhat.com> - 19.0-6
3cc183
- Remove Python 2 subpackage
3cc183
- Make spec fedora-specific
3cc183
3cc183
* Mon Sep 02 2019 Miro Hrončok <mhroncok@redhat.com> - 19.0-5
3cc183
- Reduce Python 2 build time dependencies
3cc183
3cc183
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 19.0-4
3cc183
- Rebuilt for Python 3.8
3cc183
3cc183
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 19.0-3
3cc183
- Bootstrap for Python 3.8
3cc183
3cc183
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 19.0-2
3cc183
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3cc183
3cc183
* Mon Feb 04 2019 Lumír Balhar <lbalhar@redhat.com> - 19.0-1
3cc183
- New upstream version
3cc183
3cc183
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 17.1-2
3cc183
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3cc183
3cc183
* Tue Jul 31 2018 Charalampos Stratakis <cstratak@redhat.com> - 17.1-1
3cc183
- Update to 17.1
3cc183
3cc183
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-11
3cc183
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
3cc183
3cc183
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 16.8-10
3cc183
- Rebuilt for Python 3.7
3cc183
3cc183
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 16.8-9
3cc183
- Bootstrap for Python 3.7
3cc183
3cc183
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 16.8-8
3cc183
- Update Python 2 dependency declarations to new packaging standards
3cc183
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
3cc183
3cc183
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-7
3cc183
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3cc183
3cc183
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-6
3cc183
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3cc183
3cc183
* Wed Mar 22 2017 Lumir Balhar <lbalhar@redhat.com> - 16.8-5
3cc183
- Epel7 compatible spec/package
3cc183
3cc183
* Mon Feb 13 2017 Charalampos Stratakis <cstratak@redhat.com> - 16.8-4
3cc183
- Rebuild as wheel
3cc183
3cc183
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-3
3cc183
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
3cc183
3cc183
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 16.8-2
3cc183
- Rebuild for Python 3.6
3cc183
3cc183
* Wed Nov 02 2016 Lumir Balhar <lbalhar@redhat.com> - 16.8-1
3cc183
- New upstream version
3cc183
3cc183
* Fri Sep 16 2016 Lumir Balhar <lbalhar@redhat.com> - 16.7-1
3cc183
- Initial package.