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