| |
@@ -1,23 +1,10 @@
|
| |
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
| |
%global pypi_name reno
|
| |
|
| |
- %if 0%{?fedora}
|
| |
- %global with_python3 1
|
| |
- %endif
|
| |
-
|
| |
# Currently, we cannot generate reno docs from a tarball due to
|
| |
# https://bugs.launchpad.net/reno/+bug/1520096
|
| |
%global with_docs 0
|
| |
|
| |
- # Only reason to choose 24 is that that's what was in development when we made
|
| |
- # the switch for this package. Fedora Policy was to have made this switch for
|
| |
- # Fedora 22.
|
| |
- %if 0%{?fedora} >= 24
|
| |
- %global default_python 3
|
| |
- %else
|
| |
- %global default_python 2
|
| |
- %endif
|
| |
-
|
| |
%global common_desc \
|
| |
Reno is a release notes manager for storing \
|
| |
release notes in a git repository and then building documentation from them. \
|
| |
@@ -28,7 +15,7 @@
|
| |
|
| |
Name: python-%{pypi_name}
|
| |
Version: 2.9.2
|
| |
- Release: 4%{?dist}
|
| |
+ Release: 5%{?dist}
|
| |
Summary: RElease NOtes manager
|
| |
|
| |
License: ASL 2.0
|
| |
@@ -39,46 +26,10 @@
|
| |
%description
|
| |
%{common_desc}
|
| |
|
| |
- %package -n python2-%{pypi_name}
|
| |
- Summary: RElease NOtes manager
|
| |
- %{?python_provide:%python_provide python2-%{pypi_name}}
|
| |
-
|
| |
- BuildRequires: python2-devel
|
| |
- BuildRequires: python2-dulwich
|
| |
- BuildRequires: python2-setuptools
|
| |
- BuildRequires: python2-pbr
|
| |
- BuildRequires: python2-babel
|
| |
- BuildRequires: python2-sphinx
|
| |
- %if 0%{?fedora} > 27
|
| |
- BuildRequires: python2-pyyaml
|
| |
- # Until https://src.fedoraproject.org/rpms/python-dulwich/pull-request/3 is merged, we need this
|
| |
- BuildRequires: python2-certifi
|
| |
- %else
|
| |
- BuildRequires: PyYAML
|
| |
- %endif
|
| |
- BuildRequires: git
|
| |
-
|
| |
- Requires: python2-pbr
|
| |
- Requires: python2-babel
|
| |
- Requires: python2-dulwich
|
| |
- %if 0%{?fedora} > 27
|
| |
- Requires: python2-pyyaml
|
| |
- # Until https://src.fedoraproject.org/rpms/python-dulwich/pull-request/3 is merged, we need this
|
| |
- Requires: python2-certifi
|
| |
- %else
|
| |
- Requires: PyYAML
|
| |
- %endif
|
| |
- Requires: python2-six
|
| |
- Requires: git
|
| |
-
|
| |
- %description -n python2-%{pypi_name}
|
| |
- %{common_desc}
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
-
|
| |
%package -n python3-%{pypi_name}
|
| |
Summary: RElease NOtes manager
|
| |
%{?python_provide:%python_provide python3-%{pypi_name}}
|
| |
+ Obsoletes: python2-%{pypi_name} < %{version}-%{release}
|
| |
|
| |
BuildRequires: python3-devel
|
| |
BuildRequires: python3-dulwich
|
| |
@@ -103,8 +54,6 @@
|
| |
%description -n python3-%{pypi_name}
|
| |
%{common_desc}
|
| |
|
| |
- %endif
|
| |
-
|
| |
%package -n python-%{pypi_name}-doc
|
| |
Summary: Reno documentation
|
| |
%description -n python-%{pypi_name}-doc
|
| |
@@ -114,54 +63,27 @@
|
| |
%autosetup -n %{pypi_name}-%{upstream_version}
|
| |
|
| |
%build
|
| |
- %py2_build
|
| |
- %if 0%{?with_python3}
|
| |
%py3_build
|
| |
- %endif
|
| |
|
| |
%install
|
| |
- %py2_install
|
| |
- mv %{buildroot}%{_bindir}/%{pypi_name} %{buildroot}%{_bindir}/python2-%{pypi_name}
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
%py3_install
|
| |
- mv %{buildroot}%{_bindir}/%{pypi_name} %{buildroot}%{_bindir}/python3-%{pypi_name}
|
| |
- %endif
|
| |
|
| |
- %if 0%{?default_python} >= 3
|
| |
- ln -s %{_bindir}/python3-%{pypi_name} %{buildroot}%{_bindir}/%{pypi_name}
|
| |
- %else
|
| |
- ln -s %{_bindir}/python2-%{pypi_name} %{buildroot}%{_bindir}/%{pypi_name}
|
| |
- %endif
|
| |
+ ln -s ./%{pypi_name} %{buildroot}%{_bindir}/python3-%{pypi_name}
|
| |
|
| |
%if 0%{?with_docs}
|
| |
# generate html docs
|
| |
- sphinx-build doc/source html
|
| |
+ sphinx-build-3 doc/source html
|
| |
# remove the sphinx-build leftovers
|
| |
rm -rf html/.{doctrees,buildinfo}
|
| |
%endif
|
| |
|
| |
- %files -n python2-%{pypi_name}
|
| |
- %doc README.rst
|
| |
- %license LICENSE
|
| |
- %if 0%{?default_python} <= 2
|
| |
- %{_bindir}/%{pypi_name}
|
| |
- %endif
|
| |
- %{_bindir}/python2-%{pypi_name}
|
| |
- %{python2_sitelib}/%{pypi_name}
|
| |
- %{python2_sitelib}/%{pypi_name}-*.egg-info
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
%files -n python3-%{pypi_name}
|
| |
%doc README.rst
|
| |
%license LICENSE
|
| |
- %if 0%{?default_python} >= 3
|
| |
%{_bindir}/%{pypi_name}
|
| |
- %endif
|
| |
%{_bindir}/python3-%{pypi_name}
|
| |
%{python3_sitelib}/%{pypi_name}
|
| |
%{python3_sitelib}/%{pypi_name}-*.egg-info
|
| |
- %endif
|
| |
|
| |
%files -n python-%{pypi_name}-doc
|
| |
%if 0%{?with_docs}
|
| |
@@ -170,6 +92,9 @@
|
| |
%license LICENSE
|
| |
|
| |
%changelog
|
| |
+ * Wed Feb 27 2019 Yatin Karel <ykarel@redhat.com> - 2.9.2-5
|
| |
+ - Drop python2 package
|
| |
+
|
| |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.2-4
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
| |
|
| |