Introduce python3- subpackage.
from Bohuslav Kabrda
This commit is contained in:
parent
e306d066aa
commit
b6e23b3794
@ -2,10 +2,11 @@
|
|||||||
%global github_name python-json-patch
|
%global github_name python-json-patch
|
||||||
%global commit f6f3cd235337209fc96b71316215a40d1cd3026c
|
%global commit f6f3cd235337209fc96b71316215a40d1cd3026c
|
||||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||||
|
%global with_python3 1
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 1.2
|
Version: 1.2
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Applying JSON Patches in Python
|
Summary: Applying JSON Patches in Python
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -21,20 +22,50 @@ BuildRequires: python-jsonpointer
|
|||||||
Requires: python-jsonpointer
|
Requires: python-jsonpointer
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Library to apply JSON Patches according to RFC 6902.
|
Library to apply JSON Patches according to RFC 6902 - Python 2 build.
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%package -n python3-%{pypi_name}
|
||||||
|
Summary: Applying JSON Patches in Python 3
|
||||||
|
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-jsonpointer
|
||||||
|
Requires: python3-jsonpointer
|
||||||
|
|
||||||
|
%description -n python3-%{pypi_name}
|
||||||
|
Library to apply JSON Patches according to RFC 6902 - Python 3 build.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn %{github_name}-%{commit}
|
%setup -qn %{github_name}-%{commit}
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
rm -rf %{py3dir}
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
LANG=en_US.utf8 %{__python3} setup.py build
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install --skip-build --root %{buildroot}
|
%{__python} setup.py install --skip-build --root %{buildroot}
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
LANG=en_US.utf8 %{__python3} setup.py install --skip-build --root %{buildroot}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python} tests.py
|
%{__python} tests.py
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%{__python3} tests.py
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{!?_licensedir:%global license %%doc}
|
%{!?_licensedir:%global license %%doc}
|
||||||
@ -42,7 +73,20 @@ Library to apply JSON Patches according to RFC 6902.
|
|||||||
%{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}
|
||||||
|
%files -n python3-%{pypi_name}
|
||||||
|
%doc README.md
|
||||||
|
%{!?_licensedir:%global license %%doc}
|
||||||
|
%license COPYING
|
||||||
|
%{python3_sitelib}/%{pypi_name}.py*
|
||||||
|
%{python3_sitelib}/__pycache__/*
|
||||||
|
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 29 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2-5
|
||||||
|
- Introduce python3- subpackage.
|
||||||
|
|
||||||
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 1.2-4
|
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 1.2-4
|
||||||
- fix license handling
|
- fix license handling
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user