Blame SPECS/python-semantic_version.spec

00afc5
%global pypi_name semantic_version
00afc5
%if 0%{?rhel} && 0%{?rhel} <= 7
00afc5
%bcond_with python3
00afc5
%else
00afc5
%bcond_without python3
00afc5
%endif
00afc5
00afc5
%if 0%{?rhel} > 7
00afc5
# Disable python2 build by default
00afc5
%bcond_with python2
00afc5
%else
00afc5
%bcond_without python2
00afc5
%endif
00afc5
00afc5
Name:           python-%{pypi_name}
00afc5
Version:        2.6.0
00afc5
Release:        5%{?dist}
00afc5
Summary:        Library implementing the 'SemVer' scheme
00afc5
00afc5
License:        BSD
00afc5
URL:            https://github.com/rbarrois/python-semanticversion
00afc5
Source0:        %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
00afc5
BuildArch:      noarch
00afc5
00afc5
Patch1:         0001-Fix-django-tests.patch
00afc5
00afc5
%global _description \
00afc5
This small python library provides a few tools to handle semantic versioning\
00afc5
in Python.
00afc5
00afc5
%description %{_description}
00afc5
00afc5
%if %{with python2}
00afc5
%package -n     python2-%{pypi_name}
00afc5
Summary:        %{summary}
00afc5
BuildRequires:  python2-devel
00afc5
%if 0%{?rhel} && 0%{?rhel} <= 7
00afc5
BuildRequires:  python-setuptools
00afc5
%else
00afc5
BuildRequires:  python2-setuptools
00afc5
%endif
00afc5
#BuildRequires:  python2-django
00afc5
%{?python_provide:%python_provide python2-%{pypi_name}}
00afc5
Provides:       python-semantic-version
00afc5
00afc5
%description -n python2-%{pypi_name} %{_description}
00afc5
00afc5
Python 2 version.
00afc5
%endif # with python2
00afc5
00afc5
%if 0%{?with_python3}
00afc5
%package -n     python3-%{pypi_name}
00afc5
Summary:        %{summary}
00afc5
BuildRequires:  python3-devel
00afc5
BuildRequires:  python3-setuptools
00afc5
#BuildRequires:  python3-django
00afc5
%{?python_provide:%python_provide python3-%{pypi_name}}
00afc5
00afc5
%description -n python3-%{pypi_name} %{_description}
00afc5
00afc5
Python 3 version
00afc5
%endif
00afc5
00afc5
%package doc
00afc5
Summary:        Documentation for python-%{pypi_name}
00afc5
BuildRequires:  python3-sphinx
00afc5
00afc5
%description doc
00afc5
%{summary}.
00afc5
00afc5
%prep
00afc5
%autosetup -p1 -n python-semanticversion-%{version}
00afc5
# Remove bundled egg-info
00afc5
rm -rf %{pypi_name}.egg-info
00afc5
# documentation builds due to broken symlink
00afc5
# https://github.com/rbarrois/python-semanticversion/issues/20
00afc5
rm docs/credits.rst
00afc5
00afc5
%build
00afc5
%if %{with python2}
00afc5
%py2_build
00afc5
%endif # with python2
00afc5
%if %{with python3}
00afc5
%py3_build
00afc5
%endif
00afc5
# generate html docs
00afc5
sphinx-build-3 docs html
00afc5
# remove the sphinx-build leftovers
00afc5
rm -rf html/.{doctrees,buildinfo}
00afc5
00afc5
%install
00afc5
%if %{with python2}
00afc5
%py2_install
00afc5
%endif # with python2
00afc5
%if %{with python3}
00afc5
%py3_install
00afc5
%endif
00afc5
00afc5
%check
00afc5
%if %{with python2}
00afc5
%{__python2} setup.py test
00afc5
%endif # with python2
00afc5
%if %{with python3}
00afc5
%{__python3} setup.py test
00afc5
%endif
00afc5
00afc5
%if %{with python2}
00afc5
%files -n python2-%{pypi_name}
00afc5
%license LICENSE
00afc5
%doc README.rst ChangeLog
00afc5
%{python2_sitelib}/%{pypi_name}/
00afc5
%{python2_sitelib}/%{pypi_name}-*.egg-info/
00afc5
%endif # with python2
00afc5
00afc5
%if %{with python3}
00afc5
%files -n python3-%{pypi_name}
00afc5
%license LICENSE
00afc5
%doc README.rst ChangeLog
00afc5
%{python3_sitelib}/%{pypi_name}/
00afc5
%{python3_sitelib}/%{pypi_name}-*.egg-info/
00afc5
%endif
00afc5
00afc5
%files doc
00afc5
%license LICENSE
00afc5
%doc html
00afc5
00afc5
%changelog
00afc5
* Wed Jul 18 2018 Brian C. Lane <bcl@redhat.com> - 2.6.0-5
00afc5
- Enable tests
00afc5
- Fix django test, it should be skipped when django is not installed
00afc5
00afc5
* Wed Jul 18 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.6.0-4
00afc5
- Conditionalize the python2 subpackage
00afc5
- Use python3-sphinx for docs
00afc5
- Remove django dependency
00afc5
00afc5
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-3
00afc5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
00afc5
00afc5
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-2
00afc5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
00afc5
00afc5
* Sat Jan 28 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.6.0-1
00afc5
- Update to 2.6.0
00afc5
- Make package to comply guidelines
00afc5
00afc5
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-3
00afc5
- Rebuild for Python 3.6
00afc5
00afc5
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
00afc5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
00afc5
00afc5
* Wed Feb 24 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 2.5.0-1
00afc5
- Upstream 2.5.0
00afc5
- Add python3 subpackage
00afc5
00afc5
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-2
00afc5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
00afc5
00afc5
* Fri Jul 03 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.4.2-1
00afc5
- Upstream 2.4.2
00afc5
00afc5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-2
00afc5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
00afc5
00afc5
* Wed Apr 01 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.4.1-1
00afc5
- Upstream 2.4.1
00afc5
00afc5
* Mon Mar 30 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.3.1-1
00afc5
- Initial package.