python-semantic_version/python-semantic_version.spec

72 lines
1.6 KiB
RPMSpec
Raw Normal View History

2015-06-01 14:51:12 +00:00
%global pypi_name semantic_version
2015-06-01 14:51:12 +00:00
Name: python-%{pypi_name}
2020-02-20 11:13:45 +00:00
Version: 2.8.4
2022-12-30 16:19:20 +00:00
Release: %autorelease
Summary: Library implementing the 'SemVer' scheme
2015-06-01 14:51:12 +00:00
License: BSD
URL: https://github.com/rbarrois/python-semanticversion
Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
2015-06-01 14:51:12 +00:00
BuildArch: noarch
%global _description \
This small python library provides a few tools to handle semantic versioning\
in Python.
%description %{_description}
%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
2015-06-01 14:51:12 +00:00
%package doc
Summary: Documentation for python-%{pypi_name}
BuildRequires: python3-sphinx
BuildRequires: python3-sphinx_rtd_theme
2015-06-01 14:51:12 +00:00
%description doc
%{summary}.
2015-06-01 14:51:12 +00:00
%prep
2020-02-20 11:25:19 +00:00
%autosetup -n semantic_version-%{version}
2015-06-01 14:51:12 +00:00
# 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
%py3_build
2015-06-01 14:51:12 +00:00
# generate html docs
sphinx-build-%{python3_version} docs html
2015-06-01 14:51:12 +00:00
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%py3_install
2015-06-01 14:51:12 +00:00
%check
# Seems like it's just stuck in koji
#{__python3} setup.py test
2015-06-01 14:51:12 +00:00
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst ChangeLog
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-*.egg-info/
2015-06-01 14:51:12 +00:00
%files doc
%license LICENSE
%doc html
%changelog
2022-12-30 16:19:20 +00:00
%autochangelog