python-semantic_version/python-semantic_version.spec

70 lines
1.4 KiB
RPMSpec
Raw Normal View History

2015-06-01 14:51:12 +00:00
%global pypi_name semantic_version
%global srcname python-semanticversion
2015-06-01 14:51:12 +00:00
Name: python-%{pypi_name}
Version: 2.10.0
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
Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
2015-06-01 14:51:12 +00:00
BuildArch: noarch
BuildRequires: make
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: sed
2015-06-01 14:51:12 +00:00
%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}
%description -n python3-%{pypi_name} %{_description}
2015-06-01 14:51:12 +00:00
%package doc
Summary: Documentation for python-%{pypi_name}
2015-06-01 14:51:12 +00:00
%description doc
%{summary}.
2015-06-01 14:51:12 +00:00
%prep
%autosetup -p1 -n %{srcname}-%{version}
# Drop unnecessary dependency
sed -i '/zest\.releaser\[recommended\]/d' setup.cfg
%generate_buildrequires
%pyproject_buildrequires -x doc
2015-06-01 14:51:12 +00:00
%build
%pyproject_wheel
2015-06-01 14:51:12 +00:00
# generate html docs
make -C docs html
2015-06-01 14:51:12 +00:00
# remove the sphinx-build leftovers
rm -rf docs/_build/html/.{doctrees,buildinfo}
2015-06-01 14:51:12 +00:00
%install
%pyproject_install
%pyproject_save_files %{pypi_name}
2015-06-01 14:51:12 +00:00
%check
%pytest
2015-06-01 14:51:12 +00:00
%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst ChangeLog CREDITS
2015-06-01 14:51:12 +00:00
%files doc
%license LICENSE
%doc docs/_build/html
2015-06-01 14:51:12 +00:00
%changelog
2022-12-30 16:19:20 +00:00
%autochangelog