Fix python2 subpackage requiring python3 (RHBZ#1342501)

This commit is contained in:
Haikel Guemar 2016-06-27 12:13:29 +02:00
parent a5148e0007
commit 97de9ebc42

View File

@ -13,7 +13,7 @@
Name: python-%{pypi_name} Name: python-%{pypi_name}
Version: 0.9.0 Version: 0.9.0
Release: 3%{?dist} Release: 4%{?dist}
Summary: JSON Matching Expressions Summary: JSON Matching Expressions
License: MIT License: MIT
@ -21,12 +21,6 @@ URL: https://github.com/jmespath/jmespath.py
Source0: https://pypi.python.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz Source0: https://pypi.python.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif # with_python3
%description %description
JMESPath allows you to declaratively specify how to extract elements from JMESPath allows you to declaratively specify how to extract elements from
@ -37,6 +31,9 @@ Summary: JSON Matching Expressions
%{?el6:Provides: python-%{pypi_name}} %{?el6:Provides: python-%{pypi_name}}
%{?python_provide:%python_provide python2-%{pypi_name}} %{?python_provide:%python_provide python2-%{pypi_name}}
BuildRequires: python2-devel
BuildRequires: python-setuptools
%description -n python2-%{pypi_name} %description -n python2-%{pypi_name}
JMESPath allows you to declaratively specify how to extract elements from JMESPath allows you to declaratively specify how to extract elements from
a JSON document. a JSON document.
@ -46,6 +43,9 @@ a JSON document.
Summary: JSON Matching Expressions Summary: JSON Matching Expressions
%{?python_provide:%python_provide python3-%{pypi_name}} %{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-%{pypi_name} %description -n python3-%{pypi_name}
JMESPath allows you to declaratively specify how to extract elements from JMESPath allows you to declaratively specify how to extract elements from
a JSON document. a JSON document.
@ -64,13 +64,14 @@ rm -rf %{pypi_name}.egg-info
%install %install
%if 0%{?with_python3} %if 0%{?with_python3}
%py3_install %py3_install
cp %{buildroot}/%{_bindir}/jp.py %{buildroot}/%{_bindir}/jp.py-3 mv %{buildroot}/%{_bindir}/jp.py %{buildroot}/%{_bindir}/jp.py-%{python3_version}
ln -sf %{_bindir}/jp.py-3 %{buildroot}/%{_bindir}/jp.py-%{python3_version} ln -sf %{_bindir}/jp.py-%{python3_version} %{buildroot}/%{_bindir}/jp.py-3
%endif # with_python3 %endif # with_python3
%py2_install %py2_install
cp %{buildroot}/%{_bindir}/jp.py %{buildroot}/%{_bindir}/jp.py-2 mv %{buildroot}/%{_bindir}/jp.py %{buildroot}/%{_bindir}/jp.py-%{python2_version}
ln -sf %{_bindir}/jp.py-2 %{buildroot}/%{_bindir}/jp.py-%{python2_version} ln -sf %{_bindir}/jp.py-%{python2_version} %{buildroot}/%{_bindir}/jp.py-2
ln -sf %{_bindir}/jp.py-%{python2_version} %{buildroot}/%{_bindir}/jp.py
%files -n python2-%{pypi_name} %files -n python2-%{pypi_name}
@ -94,6 +95,9 @@ ln -sf %{_bindir}/jp.py-2 %{buildroot}/%{_bindir}/jp.py-%{python2_version}
%endif # with_python3 %endif # with_python3
%changelog %changelog
* Mon Jun 27 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 0.9.0-4
- Fix python2 subpackage requiring python3 (RHBZ#1342501)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-3 * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild