python-jsonpointer/python-jsonpointer.spec

145 lines
4.1 KiB
RPMSpec
Raw Normal View History

2013-09-12 18:38:31 +00:00
%global pypi_name jsonpointer
%global github_name python-json-pointer
2014-02-05 10:54:11 +00:00
%if 0%{?fedora} > 12
%global with_python3 1
%endif
2013-09-12 18:38:31 +00:00
Name: python-%{pypi_name}
2015-12-18 23:50:23 +00:00
Version: 1.10
2016-12-11 16:45:10 +00:00
Release: 5%{?dist}
2013-09-12 18:38:31 +00:00
Summary: Resolve JSON Pointers in Python
License: BSD
URL: https://github.com/stefankoegl/%{github_name}
2016-09-05 17:07:18 +00:00
Source0: https://pypi.io/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
2013-09-12 18:38:31 +00:00
BuildArch: noarch
2016-09-05 17:07:18 +00:00
2013-09-12 18:38:31 +00:00
%description
Library to resolve JSON Pointers according to RFC 6901.
2016-09-05 17:07:18 +00:00
%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.
2014-02-05 10:54:11 +00:00
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: Resolve JSON Pointers in Python
2016-09-05 17:07:18 +00:00
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%{?python_provide:%python_provide python3-%{pypi_name}}
2014-02-05 10:54:11 +00:00
%description -n python3-%{pypi_name}
Library to resolve JSON Pointers according to RFC 6901.
%endif
2013-09-12 18:38:31 +00:00
%prep
2015-08-06 16:31:17 +00:00
%setup -q -n %{pypi_name}-%{version}
2013-09-12 18:38:31 +00:00
%build
2016-09-05 17:07:18 +00:00
%py2_build
2014-02-05 10:54:11 +00:00
%if 0%{?with_python3}
2016-09-05 17:07:18 +00:00
LC_ALL=en_US.UTF-8 %py3_build
2014-02-05 10:54:11 +00:00
%endif
2013-09-12 18:38:31 +00:00
%install
2016-09-05 17:07:18 +00:00
%py2_install
mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{python2_version}
ln -s ./jsonpointer-%{python2_version} %{buildroot}%{_bindir}/jsonpointer-2
%if !0%{?with_python3}
ln -s ./jsonpointer-%{python2_version} %{buildroot}%{_bindir}/jsonpointer
%endif
2014-02-05 10:54:11 +00:00
%if 0%{?with_python3}
2016-09-05 17:07:18 +00:00
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
2014-02-05 10:54:11 +00:00
%endif
2016-09-05 17:07:18 +00:00
2013-09-12 18:38:31 +00:00
%check
2014-02-05 10:54:11 +00:00
%if 0%{?with_python3}
%{__python3} tests.py
%endif
2013-09-12 18:38:31 +00:00
%{__python} tests.py
2016-09-05 17:07:18 +00:00
%files -n python2-%{pypi_name}
2014-07-31 15:17:56 +00:00
%doc README.md AUTHORS
%license COPYING
2016-09-05 17:07:18 +00:00
%if !0%{?with_python3}
%{_bindir}/jsonpointer
%endif
%{_bindir}/jsonpointer-2*
2013-09-12 18:38:31 +00:00
%{python_sitelib}/%{pypi_name}.py*
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
2014-02-05 10:54:11 +00:00
%if 0%{?with_python3}
%files -n python3-%{pypi_name}
2014-07-31 15:17:56 +00:00
%doc README.md AUTHORS
%license COPYING
%{_bindir}/jsonpointer
2016-09-05 17:07:18 +00:00
%{_bindir}/jsonpointer-3*
2014-02-05 10:54:11 +00:00
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{pypi_name}.py*
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif
2013-09-12 18:38:31 +00:00
%changelog
2016-12-11 16:45:10 +00:00
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.10-5
- Rebuild for Python 3.6
2016-09-05 17:07:18 +00:00
* 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
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2015-12-18 23:50:23 +00:00
* 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
2015-08-07 08:42:01 +00:00
* 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
2014-07-31 15:17:56 +00:00
* 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
2014-02-05 10:54:11 +00:00
* Wed Feb 5 2014 Thomas Spura <tomspur@fedoraproject.org> - 1.0-3
- add python3 subpackage (#1061622)
2013-09-12 18:38:31 +00:00
* 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.