Upgrade to 0.9.4.

Drop python2 subpackage and fix unversioned command to use python3.
This commit is contained in:
Kevin Fenzi 2019-07-24 16:40:45 -07:00
parent 376e4bd1c2
commit 600f2304ed

View File

@ -1,14 +1,8 @@
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
%global pypi_name jmespath
Name: python-%{pypi_name}
Version: 0.9.3
Release: 2%{?dist}
Version: 0.9.4
Release: 1%{?dist}
Summary: JSON Matching Expressions
License: MIT
@ -20,30 +14,10 @@ BuildArch: noarch
JMESPath allows you to declaratively specify how to extract elements from
a JSON document.
%package -n python2-%{pypi_name}
Summary: JSON Matching Expressions
%{?el6:Provides: python-%{pypi_name}}
%{?python_provide:%python_provide python2-%{pypi_name}}
BuildRequires: python2-devel
BuildRequires: python2-mock
BuildRequires: python2-nose
BuildRequires: python2-setuptools
%if 0%{?rhel} && 0%{?rhel} < 7
BuildRequires: python-ordereddict
# tests specifically import simplejson as json if python version is 2.6
BuildRequires: python-simplejson
BuildRequires: python-unittest2
%endif # rhel < 7
%description -n python2-%{pypi_name}
JMESPath allows you to declaratively specify how to extract elements from
a JSON document.
%if %{with python3}
%package -n python3-%{pypi_name}
Summary: JSON Matching Expressions
%{?python_provide:%python_provide python3-%{pypi_name}}
%{?python_provide:%python_provide python-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-mock
@ -53,56 +27,32 @@ BuildRequires: python3-setuptools
%description -n python3-%{pypi_name}
JMESPath allows you to declaratively specify how to extract elements from
a JSON document.
%endif # with python3
%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info
%build
%py2_build
%if %{with python3}
%py3_build
%endif # with python3
%install
%if %{with python3}
%py3_install
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
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
%check
nosetests
%if %{with python3}
nosetests-%{python3_version}
%endif # with python3
%files -n python2-%{pypi_name}
%doc README.rst
%license LICENSE.txt
%{_bindir}/jp.py
%{_bindir}/jp.py-2
%{_bindir}/jp.py-%{python2_version}
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%if %{with python3}
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE.txt
%{_bindir}/jp.py-3
%{_bindir}/jp.py-%{python3_version}
%{_bindir}/jp.py
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif # with python3
%changelog
* Wed Jul 24 2019 Kevin Fenzi <kevin@scrye.com> - 0.9.4-1
- Upgrade to 0.9.4.
- Drop python2 subpackage and fix unversioned command to use python3.
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild