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