Drop python2 subpackage

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
f39
Igor Gnatenko 6 years ago
parent be4e60fb32
commit 4fc24420b5
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

@ -1,13 +1,8 @@
%global pypi_name semantic_version
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
Name: python-%{pypi_name}
Version: 2.6.0
Release: 8%{?dist}
Release: 9%{?dist}
Summary: Library implementing the 'SemVer' scheme
License: BSD
@ -21,43 +16,20 @@ in Python.
%description %{_description}
%package -n python2-%{pypi_name}
Summary: %{summary}
BuildRequires: python2-devel
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: python-setuptools
BuildRequires: python2-django
%else
BuildRequires: python2-setuptools
# Django doesn't have Python 2 support since 2.0
%endif
%{?python_provide:%python_provide python2-%{pypi_name}}
Provides: python-semantic-version
%description -n python2-%{pypi_name} %{_description}
Python 2 version.
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-django
#BuildRequires: python3-django
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name} %{_description}
Python 3 version
%endif
%package doc
Summary: Documentation for python-%{pypi_name}
%if %{with python3}
BuildRequires: python3-sphinx
%else
BuildRequires: python-sphinx
%endif
%description doc
%{summary}.
@ -71,47 +43,33 @@ rm -rf %{pypi_name}.egg-info
rm docs/credits.rst
%build
%py2_build
%if %{with python3}
%py3_build
%endif
# generate html docs
sphinx-build docs html
sphinx-build-%{python3_version} docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%py2_install
%if %{with python3}
%py3_install
%endif
%check
# Seems like it's just stuck in koji
#{__python2} setup.py test
%if %{with python3}
#{__python3} setup.py test
%endif
%files -n python2-%{pypi_name}
%license LICENSE
%doc README.rst ChangeLog
%{python2_sitelib}/%{pypi_name}/
%{python2_sitelib}/%{pypi_name}-*.egg-info/
%if %{with python3}
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst ChangeLog
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-*.egg-info/
%endif
%files doc
%license LICENSE
%doc html
%changelog
* Thu Jan 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.6.0-9
- Drop python2 subpackage
* Tue Jan 08 2019 Petr Viktorin <pviktori@redat.com> - 2.6.0-8
- Remove Fedora build dependency on a compatibility build of Django
- Use python3-sphinx on Fedora

Loading…
Cancel
Save