120 lines
3.2 KiB
RPMSpec
120 lines
3.2 KiB
RPMSpec
%global pypi_name jsonpointer
|
|
%global github_name python-json-pointer
|
|
|
|
%if 0%{?fedora} > 12
|
|
%global with_python3 1
|
|
%endif
|
|
|
|
Name: python-%{pypi_name}
|
|
Version: 1.10
|
|
Release: 2%{?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
|
|
|
|
BuildArch: noarch
|
|
BuildRequires: python2-devel
|
|
%if 0%{?with_python3}
|
|
BuildRequires: python3-devel
|
|
%endif
|
|
|
|
%description
|
|
Library to resolve JSON Pointers according to RFC 6901.
|
|
|
|
%if 0%{?with_python3}
|
|
%package -n python3-%{pypi_name}
|
|
Summary: Resolve JSON Pointers in Python
|
|
%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
|
|
%if 0%{?with_python3}
|
|
pushd %{py3dir}
|
|
LC_ALL=en_US.UTF-8 \
|
|
%{__python3} setup.py build
|
|
popd
|
|
%endif
|
|
|
|
%install
|
|
%if 0%{?with_python3}
|
|
pushd %{py3dir}
|
|
LC_ALL=en_US.UTF-8 \
|
|
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
popd
|
|
%endif
|
|
%{__python} setup.py install --skip-build --root %{buildroot}
|
|
|
|
%check
|
|
%if 0%{?with_python3}
|
|
pushd %{py3dir}
|
|
%{__python3} tests.py
|
|
popd
|
|
%endif
|
|
%{__python} tests.py
|
|
|
|
%files
|
|
%doc README.md AUTHORS
|
|
%{!?_licensedir:%global license %%doc}
|
|
%license COPYING
|
|
%{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
|
|
%{python3_sitelib}/__pycache__/*
|
|
%{python3_sitelib}/%{pypi_name}.py*
|
|
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
%endif
|
|
|
|
%changelog
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
* Sat Dec 19 2015 Alan Pevec <alan.pevec@redhat.com> 1.10-1
|
|
- Update to 1.10
|
|
|
|
* Sat Nov 14 2015 Tonet Jallo <tonet666p@gmail.com> - 1.9-4
|
|
- Moved a line from files section to python3 files section
|
|
|
|
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
|
* Fri Aug 07 2015 Alan Pevec <apevec@gmail.com> - 1.9-2
|
|
- Update to 1.9
|
|
|
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-7
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 1.0-6
|
|
- fix license handling
|
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.0-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
|
|
|
* Wed Feb 5 2014 Thomas Spura <tomspur@fedoraproject.org> - 1.0-3
|
|
- add python3 subpackage (#1061622)
|
|
|
|
* Thu Sep 05 2013 Alan Pevec <apevec@gmail.com> - 1.0-2
|
|
- add AUTHORS to docs
|
|
|
|
* Mon Jul 01 2013 Alan Pevec <apevec@gmail.com> - 1.0-1
|
|
- Initial package.
|