Blame SPECS/python-semantic_version.spec

24e62a
%global pypi_name semantic_version
24e62a
%{!?_licensedir:%global license %%doc}
24e62a
24e62a
Name:           python-%{pypi_name}
24e62a
Version:        2.4.2
24e62a
Release:        2%{?dist}
24e62a
Summary:        A library implementing the 'SemVer' scheme
24e62a
24e62a
License:        BSD
24e62a
URL:            https://github.com/rbarrois/python-semanticversion
24e62a
Source0:        https://pypi.python.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
24e62a
BuildArch:      noarch
24e62a
24e62a
BuildRequires:  python2-devel
24e62a
BuildRequires:  python-setuptools >= 0.8
24e62a
24e62a
Provides:       python-semantic-version
24e62a
24e62a
%description
24e62a
This small python library provides a few tools to handle semantic versioning
24e62a
in Python
24e62a
24e62a
%package doc
24e62a
Summary:    Documentation for python-%{pypi_name}
24e62a
24e62a
BuildRequires:  python-sphinx
24e62a
24e62a
%description doc
24e62a
Documentation for python-%{pypi_name}
24e62a
24e62a
24e62a
%prep
24e62a
%setup -q -n %{pypi_name}-%{version}
24e62a
# Remove bundled egg-info
24e62a
rm -rf %{pypi_name}.egg-info
24e62a
# documentation builds due to broken symlink
24e62a
# https://github.com/rbarrois/python-semanticversion/issues/20
24e62a
rm docs/credits.rst
24e62a
24e62a
24e62a
%build
24e62a
%{__python2} setup.py build
24e62a
24e62a
# generate html docs
24e62a
sphinx-build docs html
24e62a
# remove the sphinx-build leftovers
24e62a
rm -rf html/.{doctrees,buildinfo}
24e62a
24e62a
24e62a
24e62a
%install
24e62a
%{__python2} setup.py install --skip-build --root %{buildroot}
24e62a
24e62a
24e62a
%check
24e62a
%{__python2} setup.py test
24e62a
24e62a
24e62a
%files
24e62a
%license LICENSE
24e62a
%doc README.rst ChangeLog
24e62a
%{python2_sitelib}/%{pypi_name}
24e62a
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
24e62a
24e62a
%files doc
24e62a
%license LICENSE
24e62a
%doc html
24e62a
24e62a
%changelog
24e62a
* Wed Jun 13 2018 David Cantrell <dcantrell@redhat.com> - 2.4.2-2
24e62a
- Rebuild
24e62a
24e62a
* Wed May 30 2018 David Shea <dshea@redhat.com> - 2.4.2-1
24e62a
- Initial import for Red Hat Enterprise Linux 7
24e62a
  Resolves: rhbz#1548042