You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
python-semantic_version/python-semantic_version.spec

154 lines
4.1 KiB

10 years ago
%global pypi_name semantic_version
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
10 years ago
Name: python-%{pypi_name}
Version: 2.6.0
Release: 6%{?dist}
Summary: Library implementing the 'SemVer' scheme
10 years ago
License: BSD
URL: https://github.com/rbarrois/python-semanticversion
Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
10 years ago
BuildArch: noarch
%global _description \
This small python library provides a few tools to handle semantic versioning\
in Python.
%description %{_description}
%package -n python2-%{pypi_name}
Summary: %{summary}
10 years ago
BuildRequires: python2-devel
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: python-setuptools
BuildRequires: python2-django
%else
BuildRequires: python2-setuptools
BuildRequires: python2-django1.11
%endif
%{?python_provide:%python_provide python2-%{pypi_name}}
10 years ago
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
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name} %{_description}
Python 3 version
%endif
10 years ago
%package doc
Summary: Documentation for python-%{pypi_name}
10 years ago
BuildRequires: python-sphinx
%description doc
%{summary}.
10 years ago
%prep
%autosetup -n python-semanticversion-%{version}
10 years ago
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# documentation builds due to broken symlink
# https://github.com/rbarrois/python-semanticversion/issues/20
rm docs/credits.rst
%build
%py2_build
%if %{with python3}
%py3_build
%endif
10 years ago
# generate html docs
sphinx-build docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%py2_install
%if %{with python3}
%py3_install
%endif
10 years ago
%check
# Seems like it's just stuck in koji
#{__python2} setup.py test
%if %{with python3}
#{__python3} setup.py test
%endif
10 years ago
%files -n python2-%{pypi_name}
10 years ago
%license LICENSE
%doc README.rst ChangeLog
%{python2_sitelib}/%{pypi_name}/
%{python2_sitelib}/%{pypi_name}-*.egg-info/
10 years ago
%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
10 years ago
%files doc
%license LICENSE
%doc html
%changelog
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-6
- Rebuilt for Python 3.7
* Tue May 29 2018 Javier Peña <jpena@redhat.com> - 2.6.0-5
- Fix build due to Django dependency (bz#1556267)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Jan 28 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.6.0-1
- Update to 2.6.0
- Make package to comply guidelines
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-3
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Feb 24 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 2.5.0-1
- Upstream 2.5.0
- Add python3 subpackage
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
10 years ago
* Fri Jul 03 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.4.2-1
- Upstream 2.4.2
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
10 years ago
* Wed Apr 01 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.4.1-1
10 years ago
- Upstream 2.4.1
* Mon Mar 30 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.3.1-1
- Initial package.