Update to latest python guidelines
This commit is contained in:
parent
099af041fc
commit
8c25b4b5b4
@ -7,81 +7,100 @@
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 1.10
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Resolve JSON Pointers in Python
|
||||
|
||||
License: BSD
|
||||
URL: https://github.com/stefankoegl/%{github_name}
|
||||
Source0: https://pypi.python.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
||||
Source0: https://pypi.io/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
%endif
|
||||
|
||||
|
||||
%description
|
||||
Library to resolve JSON Pointers according to RFC 6901.
|
||||
|
||||
%package -n python2-%{pypi_name}
|
||||
Summary: Resolve JSON Pointers in Python
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-setuptools
|
||||
|
||||
%{?python_provide:%python_provide python2-%{pypi_name}}
|
||||
|
||||
%description -n python2-%{pypi_name}
|
||||
Library to resolve JSON Pointers according to RFC 6901.
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{pypi_name}
|
||||
Summary: Resolve JSON Pointers in Python
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
Library to resolve JSON Pointers according to RFC 6901.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n %{pypi_name}-%{version}
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -ar . %{py3dir}
|
||||
%endif
|
||||
|
||||
%build
|
||||
%{__python} setup.py build
|
||||
%py2_build
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
LC_ALL=en_US.UTF-8 \
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
LC_ALL=en_US.UTF-8 %py3_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
LC_ALL=en_US.UTF-8 \
|
||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||
popd
|
||||
%py2_install
|
||||
mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{python2_version}
|
||||
ln -s ./jsonpointer-%{python2_version} %{buildroot}%{_bindir}/jsonpointer-2
|
||||
%if !0%{?with_python3}
|
||||
ln -s ./jsonpointer-%{python2_version} %{buildroot}%{_bindir}/jsonpointer
|
||||
%endif
|
||||
%{__python} setup.py install --skip-build --root %{buildroot}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
LC_ALL=en_US.UTF-8 %py3_install
|
||||
mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{python3_version}
|
||||
ln -s ./jsonpointer-%{python3_version} %{buildroot}%{_bindir}/jsonpointer-3
|
||||
ln -s ./jsonpointer-%{python3_version} %{buildroot}%{_bindir}/jsonpointer
|
||||
%endif
|
||||
|
||||
|
||||
%check
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} tests.py
|
||||
popd
|
||||
%endif
|
||||
%{__python} tests.py
|
||||
|
||||
%files
|
||||
%files -n python2-%{pypi_name}
|
||||
%doc README.md AUTHORS
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
%if !0%{?with_python3}
|
||||
%{_bindir}/jsonpointer
|
||||
%endif
|
||||
%{_bindir}/jsonpointer-2*
|
||||
%{python_sitelib}/%{pypi_name}.py*
|
||||
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{pypi_name}
|
||||
%doc README.md AUTHORS
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
%{_bindir}/jsonpointer
|
||||
%{_bindir}/jsonpointer-3*
|
||||
%{python3_sitelib}/__pycache__/*
|
||||
%{python3_sitelib}/%{pypi_name}.py*
|
||||
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Sep 5 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.10-4
|
||||
- Update to latest python guidelines
|
||||
|
||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-3
|
||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user