Blame python-reno.spec

e750b7e
# Macros for py2/py3 compatibility
e750b7e
%if 0%{?fedora} || 0%{?rhel} > 7
e750b7e
%global pyver %{python3_pkgversion}
e750b7e
%else
e750b7e
%global pyver 2
e750b7e
%endif
e750b7e
%global pyver_bin python%{pyver}
b590a24
%global pyver_sitelib %{expand:%{python%{pyver}_sitelib}}
b590a24
%global pyver_install %{expand:%{py%{pyver}_install}}
b590a24
%global pyver_build %{expand:%{py%{pyver}_build}}
e750b7e
# End of macros for py2/py3 compatibility
561d011
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
36410ce
%global pypi_name reno
36410ce
Alan Pevec 57dca06
# Currently, we cannot generate reno docs from a tarball due to
Alan Pevec 57dca06
# https://bugs.launchpad.net/reno/+bug/1520096
Alan Pevec 57dca06
%global with_docs 0
Alan Pevec 57dca06
Alan Pevec 57dca06
%global common_desc \
Alan Pevec 57dca06
Reno is a release notes manager for storing \
Alan Pevec 57dca06
release notes in a git repository and then building documentation from them. \
Alan Pevec 57dca06
\
Alan Pevec 57dca06
Managing release notes for a complex project over a long period \
Alan Pevec 57dca06
of time with many releases can be time consuming and error prone. Reno \
Alan Pevec 57dca06
helps automate the hard parts.
36410ce
36410ce
Name:           python-%{pypi_name}
e901678
Version:        2.11.3
e901678
Release:        1%{?dist}
e750b7e
Summary:        Release NOtes manager
36410ce
36410ce
License:        ASL 2.0
36410ce
URL:            http://www.openstack.org/
879daff
Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
36410ce
BuildArch:      noarch
36410ce
36410ce
%description
Alan Pevec 57dca06
%{common_desc}
36410ce
e750b7e
%package -n     python%{pyver}-%{pypi_name}
Alan Pevec b7f5c28
Summary:        RElease NOtes manager
e750b7e
%{?python_provide:%python_provide python%{pyver}-%{pypi_name}}
e750b7e
%if %{pyver} == 3
1960359
Obsoletes: python2-%{pypi_name} < %{version}-%{release}
e750b7e
%endif
36410ce
e750b7e
BuildRequires:  python%{pyver}-devel
e750b7e
BuildRequires:  python%{pyver}-dulwich
e750b7e
BuildRequires:  python%{pyver}-setuptools
e750b7e
BuildRequires:  python%{pyver}-pbr
e750b7e
BuildRequires:  python%{pyver}-babel
e750b7e
BuildRequires:  python%{pyver}-sphinx
Alan Pevec 57dca06
BuildRequires:  git
36410ce
e750b7e
# Handle python2 exception
e750b7e
%if %{pyver} == 2
e750b7e
BuildRequires:  PyYAML
e750b7e
%else
Alan Pevec 57dca06
# Until https://src.fedoraproject.org/rpms/python-dulwich/pull-request/3 is merged, we need this
e750b7e
BuildRequires:  python%{pyver}-certifi
e750b7e
BuildRequires:  python%{pyver}-PyYAML
e750b7e
%endif
e750b7e
e750b7e
Requires:  python%{pyver}-pbr
e750b7e
Requires:  python%{pyver}-babel
e750b7e
Requires:  python%{pyver}-dulwich
e750b7e
Requires:  python%{pyver}-six
e750b7e
Requires:  git
e750b7e
e750b7e
# Handle python2 exception
e750b7e
%if %{pyver} == 2
e750b7e
Requires:  PyYAML
e750b7e
%else
e750b7e
Requires:  python%{pyver}-PyYAML
e750b7e
# Until https://src.fedoraproject.org/rpms/python-dulwich/pull-request/3 is merged, we need this
e750b7e
Requires:  python%{pyver}-certifi
e750b7e
%endif
36410ce
e750b7e
%description -n python%{pyver}-%{pypi_name}
Alan Pevec 57dca06
%{common_desc}
36410ce
36410ce
%package -n python-%{pypi_name}-doc
e750b7e
Summary:        reno documentation
36410ce
%description -n python-%{pypi_name}-doc
e750b7e
Documentation for reno
36410ce
36410ce
%prep
Alan Pevec 57dca06
%autosetup -n %{pypi_name}-%{upstream_version}
36410ce
36410ce
%build
e750b7e
%{pyver_build}
36410ce
36410ce
%install
e750b7e
%{pyver_install}
a175fe5
Alan Pevec 57dca06
%if 0%{?with_docs}
cac6c7c
# generate html docs
e750b7e
sphinx-build-%{pyver} doc/source html
e750b7e
# remove the sphinx-build-%{pyver} leftovers
Alan Pevec 57dca06
rm -rf html/.{doctrees,buildinfo}
Alan Pevec 57dca06
%endif
36410ce
e750b7e
%files -n python%{pyver}-%{pypi_name}
Alan Pevec 57dca06
%doc README.rst
36410ce
%license LICENSE
36410ce
%{_bindir}/%{pypi_name}
e750b7e
%{pyver_sitelib}/%{pypi_name}
e750b7e
%{pyver_sitelib}/%{pypi_name}-*.egg-info
36410ce
36410ce
%files -n python-%{pypi_name}-doc
Alan Pevec 57dca06
%if 0%{?with_docs}
Alan Pevec 57dca06
%doc html
Alan Pevec 57dca06
%endif
Alan Pevec b7f5c28
%license LICENSE
36410ce
36410ce
%changelog
e901678
* Wed Nov 06 2019 Alfredo Moralejo <amoralej@redhat.com> 2.11.3-1
e901678
- Update to upstream version 2.11.3
e901678
006996b
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.11.2-4
006996b
- Rebuilt for Python 3.8.0rc1 (#1748018)
006996b
4ac28d5
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.11.2-3
4ac28d5
- Rebuilt for Python 3.8
4ac28d5
40b1e67
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.2-2
40b1e67
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
40b1e67
e750b7e
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 2.11.2-1
e750b7e
- Update to 2.11.2
36410ce