You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
python-semantic_version/python-semantic_version.spec

70 lines
1.4 KiB

10 years ago
%global pypi_name semantic_version
%global srcname python-semanticversion
10 years ago
Name: python-%{pypi_name}
Version: 2.10.0
Release: %autorelease
Summary: Library implementing the 'SemVer' scheme
10 years ago
License: BSD
URL: https://github.com/rbarrois/python-semanticversion
Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
10 years ago
BuildArch: noarch
BuildRequires: make
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: sed
10 years ago
%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}
10 years ago
%package doc
Summary: Documentation for python-%{pypi_name}
10 years ago
%description doc
%{summary}.
10 years ago
%prep
%autosetup -p1 -n %{srcname}-%{version}
# Drop unnecessary dependency
sed -i '/zest\.releaser\[recommended\]/d' setup.cfg
%generate_buildrequires
%pyproject_buildrequires -x doc
10 years ago
%build
%pyproject_wheel
10 years ago
# generate html docs
make -C docs html
10 years ago
# remove the sphinx-build leftovers
rm -rf docs/_build/html/.{doctrees,buildinfo}
10 years ago
%install
%pyproject_install
%pyproject_save_files %{pypi_name}
10 years ago
%check
%pytest
10 years ago
%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst ChangeLog CREDITS
10 years ago
%files doc
%license LICENSE
%doc docs/_build/html
10 years ago
%changelog
%autochangelog