Blame python-reno.spec

561d011
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
36410ce
%global pypi_name reno
36410ce
36410ce
%if 0%{?fedora}
36410ce
%global with_python3 1
c5cf3ef
%endif
a175fe5
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
a175fe5
# Only reason to choose 24 is that that's what was in development when we made
a175fe5
# the switch for this package.  Fedora Policy was to have made this switch for
a175fe5
# Fedora 22.
a175fe5
%if 0%{?fedora} >= 24
a175fe5
%global default_python 3
a175fe5
%else
a175fe5
%global default_python 2
a175fe5
%endif
a175fe5
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}
Alan Pevec 825e7cb
Version:        2.0.3
a5ba0b0
Release:        5%{?dist}
Alan Pevec b7f5c28
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
36410ce
%package -n     python2-%{pypi_name}
Alan Pevec b7f5c28
Summary:        RElease NOtes manager
36410ce
%{?python_provide:%python_provide python2-%{pypi_name}}
36410ce
36410ce
BuildRequires:  python2-devel
Alan Pevec 57dca06
BuildRequires:  python2-dulwich
a5ba0b0
BuildRequires:  python2-setuptools
a5ba0b0
BuildRequires:  python2-pbr
a5ba0b0
BuildRequires:  python2-babel
a5ba0b0
BuildRequires:  python2-sphinx
Alan Pevec 57dca06
%if 0%{?fedora} > 27
a5ba0b0
BuildRequires:  python2-pyyaml
Alan Pevec 57dca06
# Until https://src.fedoraproject.org/rpms/python-dulwich/pull-request/3 is merged, we need this
Alan Pevec 57dca06
BuildRequires:  python2-certifi
Alan Pevec 57dca06
%else
Alan Pevec 57dca06
BuildRequires:  PyYAML
Alan Pevec 57dca06
%endif
Alan Pevec 57dca06
BuildRequires:  git
a5ba0b0
Alan Pevec 57dca06
Requires:	python2-pbr
Alan Pevec 57dca06
Requires:	python2-babel
Alan Pevec 57dca06
Requires:   python2-dulwich
Alan Pevec 57dca06
%if 0%{?fedora} > 27
Alan Pevec 57dca06
Requires:   python2-pyyaml
Alan Pevec 57dca06
# Until https://src.fedoraproject.org/rpms/python-dulwich/pull-request/3 is merged, we need this
Alan Pevec 57dca06
Requires:  python2-certifi
Alan Pevec 57dca06
%else
Alan Pevec 57dca06
Requires:   PyYAML
Alan Pevec 57dca06
%endif
Alan Pevec 57dca06
Requires:	python2-six
Alan Pevec 57dca06
Requires:   git
36410ce
36410ce
%description -n python2-%{pypi_name}
Alan Pevec 57dca06
%{common_desc}
36410ce
c5cf3ef
%if 0%{?with_python3}
Alan Pevec 57dca06
36410ce
%package -n     python3-%{pypi_name}
Alan Pevec b7f5c28
Summary:        RElease NOtes manager
36410ce
%{?python_provide:%python_provide python3-%{pypi_name}}
36410ce
36410ce
BuildRequires:  python3-devel
Alan Pevec 57dca06
BuildRequires:  python3-dulwich
Alan Pevec 57dca06
# Until https://src.fedoraproject.org/rpms/python-dulwich/pull-request/3 is merged, we need this
Alan Pevec 57dca06
BuildRequires:  python3-certifi
36410ce
BuildRequires:  python3-setuptools
36410ce
BuildRequires:  python3-pbr
36410ce
BuildRequires:  python3-babel
36410ce
BuildRequires:  python3-sphinx
36410ce
BuildRequires:  python3-PyYAML
Alan Pevec 57dca06
BuildRequires:  git
36410ce
Alan Pevec 57dca06
Requires:	python3-pbr
Alan Pevec 57dca06
Requires:	python3-babel
Alan Pevec 57dca06
Requires:   python3-dulwich
Alan Pevec 57dca06
# Until https://src.fedoraproject.org/rpms/python-dulwich/pull-request/3 is merged, we need this
Alan Pevec 57dca06
Requires:   python3-certifi
Alan Pevec 57dca06
Requires:	python3-PyYAML
Alan Pevec 57dca06
Requires:	python3-six
Alan Pevec 57dca06
Requires:   git
36410ce
36410ce
%description -n python3-%{pypi_name}
Alan Pevec 57dca06
%{common_desc}
36410ce
36410ce
%endif
36410ce
36410ce
%package -n python-%{pypi_name}-doc
cac6c7c
Summary:        Reno documentation
36410ce
%description -n python-%{pypi_name}-doc
cac6c7c
Documentation for Reno
36410ce
36410ce
%prep
Alan Pevec 57dca06
%autosetup -n %{pypi_name}-%{upstream_version}
36410ce
36410ce
%build
36410ce
%py2_build
c5cf3ef
%if 0%{?with_python3}
36410ce
%py3_build
36410ce
%endif
36410ce
36410ce
%install
c5cf3ef
%py2_install
c5cf3ef
mv %{buildroot}%{_bindir}/%{pypi_name} %{buildroot}%{_bindir}/python2-%{pypi_name}
c5cf3ef
c5cf3ef
%if 0%{?with_python3}
36410ce
%py3_install
c5cf3ef
mv %{buildroot}%{_bindir}/%{pypi_name} %{buildroot}%{_bindir}/python3-%{pypi_name}
a175fe5
%endif
36410ce
c5cf3ef
%if 0%{?default_python} >= 3
c5cf3ef
ln -s %{_bindir}/python3-%{pypi_name} %{buildroot}%{_bindir}/%{pypi_name}
c5cf3ef
%else
c5cf3ef
ln -s %{_bindir}/python2-%{pypi_name} %{buildroot}%{_bindir}/%{pypi_name}
a175fe5
%endif
a175fe5
Alan Pevec 57dca06
%if 0%{?with_docs}
cac6c7c
# generate html docs
Alan Pevec 57dca06
sphinx-build doc/source html
Alan Pevec 57dca06
# remove the sphinx-build leftovers
Alan Pevec 57dca06
rm -rf html/.{doctrees,buildinfo}
Alan Pevec 57dca06
%endif
36410ce
Alan Pevec b7f5c28
%files -n python2-%{pypi_name}
Alan Pevec 57dca06
%doc README.rst
36410ce
%license LICENSE
c5cf3ef
%if 0%{?default_python} <= 2
36410ce
%{_bindir}/%{pypi_name}
a175fe5
%endif
c5cf3ef
%{_bindir}/python2-%{pypi_name}
36410ce
%{python2_sitelib}/%{pypi_name}
Alan Pevec b7f5c28
%{python2_sitelib}/%{pypi_name}-*.egg-info
36410ce
c5cf3ef
%if 0%{?with_python3}
Alan Pevec b7f5c28
%files -n python3-%{pypi_name}
Alan Pevec 57dca06
%doc README.rst
36410ce
%license LICENSE
c5cf3ef
%if 0%{?default_python} >= 3
36410ce
%{_bindir}/%{pypi_name}
a175fe5
%endif
c5cf3ef
%{_bindir}/python3-%{pypi_name}
36410ce
%{python3_sitelib}/%{pypi_name}
Alan Pevec b7f5c28
%{python3_sitelib}/%{pypi_name}-*.egg-info
36410ce
%endif
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
a5ba0b0
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.3-5
a5ba0b0
- Update Python 2 dependency declarations to new packaging standards
a5ba0b0
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
a5ba0b0
5a6e5a4
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-4
5a6e5a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5a6e5a4
991f50f
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-3
991f50f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
991f50f
0f2da65
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-2
0f2da65
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0f2da65
Alan Pevec 825e7cb
* Fri Dec 23 2016 Alan Pevec <alan.pevec@redhat.com> 2.0.3-1
Alan Pevec 825e7cb
- Update to 2.0.3
Alan Pevec 825e7cb
975076c
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.8.0-2
975076c
- Rebuild for Python 3.6
975076c
Alan Pevec 37adcd4
* Tue Sep 13 2016 Alan Pevec <alan.pevec@redhat.com> 1.8.0-1
Alan Pevec 37adcd4
- Update to 1.8.0
Alan Pevec 37adcd4
b923d81
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-2
b923d81
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
b923d81
b8a4cb2
* Thu Apr 07 2016 Haikel Guemar <hguemar@fedoraproject.org> 1.6.2-1
b8a4cb2
- Update to 1.6.2
b8a4cb2
e1037e8
* Tue Mar 15 2016 Paul Belanger <pabelanger@redhat.com> - 1.6.0-1
e1037e8
- New upstream 1.6.0 release
e1037e8
4b24990
* Thu Feb 18 2016 Paul Belanger <pabelanger@redhat.com> - 1.5.0-1
4b24990
- New upstream 1.5.0 release
4b24990
- Fix rpmlint spelling-error warnings
4b24990
43a05b3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-3
43a05b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
43a05b3
c5cf3ef
* Sun Jan 24 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.3.1-2
c5cf3ef
- Simplify macros and reno CLI generation
c5cf3ef
- Fix build on EL7
c5cf3ef
cac6c7c
* Fri Jan 22 2016 Paul Belanger <pabelanger@redhat.com> 1.3.1-1
cac6c7c
- New upstream 1.3.1 release
cac6c7c
- Switch to setup.py build_sphinx to keep inline with upstream documentation
cac6c7c
  builds
cac6c7c
- Various rpmlint fixes
cac6c7c
2320606
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
2320606
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
2320606
a175fe5
* Thu Nov  5 2015 Toshio Kuratomi <toshio@fedoraproject.org> - 0.1.0-3
a175fe5
- Ship the reno script against python3 to comply with the python guidelines and
a175fe5
  solve the issue of the python3 package depending on /usr/bin/python2
a175fe5
36410ce
* Wed Sep 30 2015 Chandan Kumar <chkumar246@gmail.com> -0.1.0-2
36410ce
- Some cosmetic changes in spec file
36410ce
36410ce
* Wed Sep 30 2015 Chandan Kumar <chkumar246@gmail.com> - 0.1.0-1
36410ce
- Initial Package