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