diff --git a/.gitignore b/.gitignore index 4914d07..d70c921 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /semantic_version-2.5.0.tar.gz /semantic_version-2.6.0.tar.gz /semantic_version-2.8.4.tar.gz +/python-semanticversion-2.10.0.tar.gz diff --git a/python-semantic_version.spec b/python-semantic_version.spec index 8ef33d2..c61b363 100644 --- a/python-semantic_version.spec +++ b/python-semantic_version.spec @@ -1,71 +1,69 @@ %global pypi_name semantic_version +%global srcname python-semanticversion Name: python-%{pypi_name} -Version: 2.8.4 +Version: 2.10.0 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 +Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz + BuildArch: noarch +BuildRequires: make +BuildRequires: python3-devel +BuildRequires: python3-pytest +BuildRequires: sed -%global _description \ -This small python library provides a few tools to handle semantic versioning\ -in Python. +%global _description %{expand: +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 +%autosetup -p1 -n %{srcname}-%{version} + +# Drop unnecessary dependency +sed -i '/zest\.releaser\[recommended\]/d' setup.cfg + +%generate_buildrequires +%pyproject_buildrequires -x doc %build -%py3_build +%pyproject_wheel + # generate html docs -sphinx-build-%{python3_version} docs html +make -C docs html # remove the sphinx-build leftovers -rm -rf html/.{doctrees,buildinfo} +rm -rf docs/_build/html/.{doctrees,buildinfo} %install -%py3_install +%pyproject_install +%pyproject_save_files %{pypi_name} %check -# Seems like it's just stuck in koji -#{__python3} setup.py test +%pytest -%files -n python3-%{pypi_name} +%files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE -%doc README.rst ChangeLog -%{python3_sitelib}/%{pypi_name}/ -%{python3_sitelib}/%{pypi_name}-*.egg-info/ +%doc README.rst ChangeLog CREDITS %files doc %license LICENSE -%doc html +%doc docs/_build/html %changelog %autochangelog diff --git a/sources b/sources index 649461b..343c752 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (semantic_version-2.8.4.tar.gz) = 2ed9a8ae03384731865c0b160a9bc92f9c877b610a4ecf15c30969886f15e7cdf77cf384997f96126a8a77534e032c70f587c835fe288fe4ab3e9e2061cb6f47 +SHA512 (python-semanticversion-2.10.0.tar.gz) = e060dd60db62663c6ebf21fdca33b2390d9bbad15fbdfa504221ab646426f09168caf00e79cee7ed4ef442c23fd587c9e421aa744990101ea626b58f4e320242