python-semantic_version/python-semantic_version.spec
2020-01-13 09:28:43 -05:00

79 lines
2.2 KiB
RPMSpec

%global with_tests 0%{?_with_tests:0}
Name: python-semantic_version
Version: 2.6.0
Release: 9
Summary: Plugin for implementing the semantic version
License: BSD
URL: https://github.com/rbarrois/python-semanticversion
Source0: https://github.com/rbarrois/python-semanticversion/archive/v%{version}/semantic_version-%{version}.tar.gz
BuildArch: noarch
%description
This small python library provides a few tools to handle semantic versioning in Python.
%package -n python2-semantic_version
Summary: Plugin for implementing the semantic version
BuildRequires: python2-devel python2-setuptools
Provides: python-semantic-version
%{?python_provide:%python_provide python2-semantic_version}
%description -n python2-semantic_version
This small python library provides a few tools to handle semantic versioning in Python.
%package -n python3-semantic_version
Summary: Plugin for implementing the semantic version
BuildRequires: python3-devel python3-setuptools
%{?python_provide:%python_provide python3-semantic_version}
%description -n python3-semantic_version
This small python library provides a few tools to handle semantic versioning in Python.
%package help
Summary: Documentation for python-semantic_version
BuildRequires: python-sphinx
Provides: python-semantic_version-doc = %{version}-%{release}
Obsoletes: python-semantic_version-doc < %{version}-%{release}
%description help
Plugin for implementing the semantic version.
%prep
%autosetup -n python-semanticversion-%{version}
rm -rf semantic_version.egg-info
rm docs/credits.rst
%build
%py2_build
%py3_build
sphinx-build docs html
rm -rf html/.{doctrees,buildinfo}
%install
%py2_install
%py3_install
%check
%if %{with_tests}
%{__python2} setup.py test
%{__python3} setup.py test
%endif
%files -n python2-semantic_version
%license LICENSE
%{python2_sitelib}/semantic_version*/
%files -n python3-semantic_version
%license LICENSE
%{python3_sitelib}/semantic_version*/
%files help
%license LICENSE
%doc html
%changelog
* Mon Jan 13 2020 Lei Zhang <ricky.z@huawei.com> - 2.6.0-9
- remove django build depend
* Tue Jan 09 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.6.0-8
- Package init