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

128 lines
3.2 KiB

%global pypi_name semantic_version
%{!?_licensedir:%global license %%doc}
%if 0%{?fedora}
%global with_python3 1
%endif
Name: python-%{pypi_name}
Version: 2.5.0
Release: 1%{?dist}
Summary: A library implementing the 'SemVer' scheme
License: BSD
URL: https://github.com/rbarrois/python-semanticversion
Source0: https://pypi.python.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
%description
This small python library provides a few tools to handle semantic versioning
in Python
%package -n python2-%{pypi_name}
Summary: %{summary}
BuildRequires: python2-devel
BuildRequires: python-setuptools >= 0.8
%{?python_provide:%python_provide python2-%{pypi_name}}
Provides: python-semantic-version
%description -n python2-%{pypi_name}
This small python library provides a few tools to handle semantic versioning
in Python
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-setuptools >= 0.8
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
This small python library provides a few tools to handle semantic versioning
in Python
%endif
%package doc
Summary: Documentation for python-%{pypi_name}
BuildRequires: python-sphinx
%description doc
Documentation for python-%{pypi_name}
%prep
%setup -q -n %{pypi_name}-%{version}
# 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
%{__python2} setup.py build
%if 0%{?with_python3}
%{__python3} setup.py build
%endif
# generate html docs
sphinx-build docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
%if 0%{?with_python3}
%{__python3} setup.py install --skip-build --root %{buildroot}
%endif
%check
%{__python2} setup.py test
%if 0%{?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}-%{version}-py?.?.egg-info
%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst ChangeLog
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif
%files doc
%license LICENSE
%doc html
%changelog
* 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
* 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
* Wed Apr 01 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.4.1-1
- Upstream 2.4.1
* Mon Mar 30 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.3.1-1
- Initial package.