python-jsonpatch/python-jsonpatch.spec

152 lines
4.3 KiB
RPMSpec
Raw Normal View History

2013-10-09 21:56:22 +00:00
%global pypi_name jsonpatch
%if 0%{?fedora}
%global with_python3 1
%endif
2013-10-09 21:56:22 +00:00
Name: python-%{pypi_name}
Version: 1.14
2016-12-11 20:58:46 +00:00
Release: 2%{?dist}
2013-10-09 21:56:22 +00:00
Summary: Applying JSON Patches in Python
License: BSD
URL: https://github.com/stefankoegl/%{github_name}
2013-10-11 22:15:28 +00:00
#Source0: https://pypi.python.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
# pypi tarball does not contain README.md and tests.py
Source0: https://pypi.io/packages/source/j/jsonpatch/%{pypi_name}-%{version}.tar.gz
2013-10-09 21:56:22 +00:00
BuildArch: noarch
%description
Library to apply JSON Patches according to RFC 6902 - Python 2 build.
%package -n python2-%{pypi_name}
Summary: Applying JSON Patches in Python 2
2013-10-09 21:56:22 +00:00
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-jsonpointer
2013-10-14 22:07:01 +00:00
Requires: python-jsonpointer
2013-10-09 21:56:22 +00:00
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
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
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
Library to apply JSON Patches according to RFC 6902 - Python 3 build.
%endif
2013-10-09 21:56:22 +00:00
%prep
%setup -qn %{pypi_name}-%{version}
2013-10-09 21:56:22 +00:00
%build
%py2_build
2013-10-09 21:56:22 +00:00
%if 0%{?with_python3}
LANG=en_US.utf8 %py3_build
%endif
2013-10-09 21:56:22 +00:00
%install
%py2_install
for bin in jsondiff jsonpatch; do
mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/$bin-%{python2_version}
ln -s ./$bin-%{python2_version} %{buildroot}%{_bindir}/$bin-2
%if !0%{?with_python3}
ln -s ./$bin-%{python2_version} %{buildroot}%{_bindir}/$bin
%endif
done;
2013-10-09 21:56:22 +00:00
%if 0%{?with_python3}
LANG=en_US.utf8 %py3_install
for bin in jsondiff jsonpatch; do
mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/$bin-%{python3_version}
ln -s ./$bin-%{python3_version} %{buildroot}%{_bindir}/$bin-3
ln -s ./$bin-%{python3_version} %{buildroot}%{_bindir}/$bin
done;
%endif
2013-10-09 21:56:22 +00:00
%check
%{__python2} tests.py
2013-10-09 21:56:22 +00:00
%if 0%{?with_python3}
%{__python3} tests.py
%endif
%files -n python2-%{pypi_name}
2014-07-31 15:14:44 +00:00
%doc README.md
%license COPYING
%if !0%{?with_python3}
%{_bindir}/jsondiff
%{_bindir}/jsonpatch
%endif
%{_bindir}/jsondiff-2*
%{_bindir}/jsonpatch-2*
%{python2_sitelib}/%{pypi_name}.py*
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
2013-10-09 21:56:22 +00:00
%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%doc README.md
%license COPYING
%{_bindir}/jsondiff
%{_bindir}/jsonpatch
%{_bindir}/jsondiff-3*
%{_bindir}/jsonpatch-3*
%{python3_sitelib}/%{pypi_name}.py*
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif
2013-10-09 21:56:22 +00:00
%changelog
2016-12-11 20:58:46 +00:00
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.14-2
- Rebuild for Python 3.6
* Mon Sep 5 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.14-1
- Upstream 1.14
- Update to latest python packaging guidelines
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Aug 29 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2-5
- Introduce python3- subpackage.
2014-07-31 15:14:44 +00:00
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 1.2-4
- fix license handling
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2013-10-14 22:07:01 +00:00
* Tue Oct 15 2013 Alan Pevec <apevec@gmail.com> - 1.2-2
- add runtime dep on jsonpointer
2013-10-11 22:15:28 +00:00
* Fri Oct 11 2013 Alan Pevec <apevec@gmail.com> - 1.2-1
- Update to 1.2
2013-10-09 21:56:22 +00:00
* Fri Sep 13 2013 Alan Pevec <apevec@gmail.com> - 1.1-2
- review feedback: move %%check section, add missing build requirements
* Mon Jul 01 2013 Alan Pevec <apevec@gmail.com> - 1.1-1
- Initial package.