%global pypi_name semantic_version Name: python-%{pypi_name} Version: 2.8.4 Release: %autorelease Summary: Library implementing the 'SemVer' scheme License: BSD URL: https://github.com/rbarrois/python-semanticversion Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz 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 %package doc Summary: Documentation for python-%{pypi_name} BuildRequires: python3-sphinx BuildRequires: python3-sphinx_rtd_theme %description doc %{summary}. %prep %autosetup -n semantic_version-%{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 %py3_build # generate html docs sphinx-build-%{python3_version} docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install %py3_install %check # Seems like it's just stuck in koji #{__python3} setup.py test %files -n python3-%{pypi_name} %license LICENSE %doc README.rst ChangeLog %{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}-*.egg-info/ %files doc %license LICENSE %doc html %changelog %autochangelog