c727ea33 |
%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
f4d17450 |
Name: python-jsonpatch |
7404bf19 |
Version: 1.23
Release: 1%{?dist} |
f4d17450 |
Summary: Applying JSON Patches in Python
License: Modified BSD License
Group: Development/Languages/Python |
5c79acdb |
Url: https://pypi.python.org/pypi/jsonpatch
Source0: https://pypi.python.org/packages/be/c1/947048a839120acefc13a614280be3289db404901d1a2d49b6310c6d5757/jsonpatch-%{version}.tar.gz |
7404bf19 |
%define sha1 jsonpatch=6097861e88b94fd42fcc9713aa81d5f97b4cc350 |
f4d17450 |
BuildRequires: python2
BuildRequires: python2-libs
BuildRequires: python-setuptools |
d5255775 |
BuildRequires: python-jsonpointer |
f4d17450 |
Requires: python-jsonpointer
BuildArch: noarch
%description
Library to apply JSON Patches according to RFC 6902.
|
c727ea33 |
%package -n python3-jsonpatch
Summary: python-jsonpatch
BuildRequires: python3-devel
BuildRequires: python3-libs
Requires: python3-jsonpointer
%description -n python3-jsonpatch
|
f4d17450 |
%prep
%setup -n jsonpatch-%{version} |
c727ea33 |
rm -rf ../p3dir
cp -a . ../p3dir |
f4d17450 |
%build |
c727ea33 |
python2 setup.py build
pushd ../p3dir
python3 setup.py build
popd |
f4d17450 |
%install |
c727ea33 |
pushd ../p3dir
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
popd |
2d879f6b |
mv %{buildroot}/%{_bindir}/jsondiff %{buildroot}/%{_bindir}/jsondiff3
mv %{buildroot}/%{_bindir}/jsonpatch %{buildroot}/%{_bindir}/jsonpatch3 |
290361d9 |
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
f4d17450 |
|
d5255775 |
%check |
c727ea33 |
python2 ext_tests.py && python2 tests.py
pushd ../p3dir
python3 ext_tests.py && python3 tests.py
popd |
d5255775 |
|
f4d17450 |
%files
%defattr(-,root,root,-) |
c727ea33 |
%{python2_sitelib}/*
%{_bindir}/jsondiff
%{_bindir}/jsonpatch
%files -n python3-jsonpatch
%defattr(-,root,root)
%{python3_sitelib}/* |
290361d9 |
%{_bindir}/jsondiff3
%{_bindir}/jsonpatch3 |
f4d17450 |
%changelog |
7404bf19 |
* Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 1.23-1
- Update to version 1.23 |
2d879f6b |
* Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.15-4
- Separate python3 and python2 specific scripts in bin directory |
290361d9 |
* Thu Apr 27 2017 Sarah Choi <sarahc@vmware.com> 1.15-3
- Rename jsonpatch for python3 |
c727ea33 |
* Thu Apr 06 2017 Sarah Choi <sarahc@vmware.com> 1.15-2
- support python3 |
5c79acdb |
* Mon Apr 03 2017 Sarah Choi <sarahc@vmware.com> 1.15-1
- Update to 1.15 |
c727ea33 |
* Tue Oct 04 2016 ChangLee <changlee@vmware.com> 1.9-3 |
d5255775 |
- Modified %check |
c3a3fd12 |
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9-2
- GA - Bump release of all rpms |
f4d17450 |
* Wed Mar 04 2015 Mahmoud Bassiouny <mbassiouny@vmware.com> |
3cc43c92 |
- Initial packaging for Photon |