Fix python2 subpackage requiring python3 (RHBZ#1342501)
This commit is contained in:
parent
a5148e0007
commit
97de9ebc42
@ -13,7 +13,7 @@
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 0.9.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: JSON Matching Expressions
|
||||
|
||||
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
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-setuptools
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%endif # with_python3
|
||||
|
||||
%description
|
||||
JMESPath allows you to declaratively specify how to extract elements from
|
||||
@ -37,6 +31,9 @@ Summary: JSON Matching Expressions
|
||||
%{?el6:Provides: python-%{pypi_name}}
|
||||
%{?python_provide:%python_provide python2-%{pypi_name}}
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-setuptools
|
||||
|
||||
%description -n python2-%{pypi_name}
|
||||
JMESPath allows you to declaratively specify how to extract elements from
|
||||
a JSON document.
|
||||
@ -46,6 +43,9 @@ a JSON document.
|
||||
Summary: JSON Matching Expressions
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
JMESPath allows you to declaratively specify how to extract elements from
|
||||
a JSON document.
|
||||
@ -64,13 +64,14 @@ rm -rf %{pypi_name}.egg-info
|
||||
%install
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
cp %{buildroot}/%{_bindir}/jp.py %{buildroot}/%{_bindir}/jp.py-3
|
||||
ln -sf %{_bindir}/jp.py-3 %{buildroot}/%{_bindir}/jp.py-%{python3_version}
|
||||
mv %{buildroot}/%{_bindir}/jp.py %{buildroot}/%{_bindir}/jp.py-%{python3_version}
|
||||
ln -sf %{_bindir}/jp.py-%{python3_version} %{buildroot}/%{_bindir}/jp.py-3
|
||||
%endif # with_python3
|
||||
|
||||
%py2_install
|
||||
cp %{buildroot}/%{_bindir}/jp.py %{buildroot}/%{_bindir}/jp.py-2
|
||||
ln -sf %{_bindir}/jp.py-2 %{buildroot}/%{_bindir}/jp.py-%{python2_version}
|
||||
mv %{buildroot}/%{_bindir}/jp.py %{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}
|
||||
@ -94,6 +95,9 @@ ln -sf %{_bindir}/jp.py-2 %{buildroot}/%{_bindir}/jp.py-%{python2_version}
|
||||
%endif # with_python3
|
||||
|
||||
%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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user