From 97de9ebc42ed820ee4b32a2801141df0706d0a61 Mon Sep 17 00:00:00 2001 From: Haikel Guemar Date: Mon, 27 Jun 2016 12:13:29 +0200 Subject: [PATCH] Fix python2 subpackage requiring python3 (RHBZ#1342501) --- python-jmespath.spec | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/python-jmespath.spec b/python-jmespath.spec index ce0dec3..6655f43 100644 --- a/python-jmespath.spec +++ b/python-jmespath.spec @@ -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 - 0.9.0-4 +- Fix python2 subpackage requiring python3 (RHBZ#1342501) + * Thu Feb 04 2016 Fedora Release Engineering - 0.9.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild