File python-semver.spec of Package python-semver
#
# spec file for package python-semver
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-semver
Version: 3.0.2
Release: 0
License: BSD3
Summary: Python helper for Semantic Versioning
Url: https://github.com/k-bx/python-semver
Group: Development/Libraries/Python
Source: semver-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
A Python module for semantic versioning (http://semver.org/). Simplifies comparing versions.
%prep
%setup -q -n semver-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/pysemver
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative pysemver
%postun
%python_uninstall_alternative pysemver
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGELOG.rst CONTRIBUTING.rst CONTRIBUTORS README.rst release-procedure.md SUPPORT.md
%license LICENSE.txt
%{python_sitelib}/*
%python_alternative %{_bindir}/pysemver
%changelog