Blame SPECS/python-semantic_version.spec

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