Blame SPECS/python-jsonpointer.spec

c3c2db
%global pypi_name jsonpointer
c3c2db
%global github_name python-json-pointer
c3c2db
c3c2db
%if 0%{?fedora} || 0%{?rhel} > 7
c3c2db
# Enable python3 build by default
c3c2db
%bcond_without python3
c3c2db
%else
c3c2db
%bcond_with python3
c3c2db
%endif
c3c2db
c3c2db
%if 0%{?rhel} > 7
c3c2db
# Disable python2 build by default
c3c2db
%bcond_with python2
c3c2db
%else
c3c2db
%bcond_without python2
c3c2db
%endif
c3c2db
c3c2db
Name:           python-%{pypi_name}
c3c2db
Version:        1.10
c3c2db
Release:        11%{?dist}
c3c2db
Summary:        Resolve JSON Pointers in Python
c3c2db
c3c2db
License:        BSD
c3c2db
URL:            https://github.com/stefankoegl/%{github_name}
c3c2db
Source0:        https://pypi.io/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
c3c2db
c3c2db
BuildArch:      noarch
c3c2db
c3c2db
c3c2db
%description
c3c2db
Library to resolve JSON Pointers according to RFC 6901.
c3c2db
c3c2db
%if %{with python2}
c3c2db
%package -n python2-%{pypi_name}
c3c2db
Summary:        Resolve JSON Pointers in Python
c3c2db
c3c2db
BuildRequires:  python2-devel
c3c2db
BuildRequires:  python2-setuptools
c3c2db
c3c2db
%{?python_provide:%python_provide python2-%{pypi_name}}
c3c2db
c3c2db
%description -n python2-%{pypi_name}
c3c2db
Library to resolve JSON Pointers according to RFC 6901.
c3c2db
%endif # with python2
c3c2db
c3c2db
%if %{with python3}
c3c2db
%package -n python3-%{pypi_name}
c3c2db
Summary:        Resolve JSON Pointers in Python
c3c2db
c3c2db
BuildRequires:  python3-devel
c3c2db
BuildRequires:  python3-setuptools
c3c2db
c3c2db
%{?python_provide:%python_provide python3-%{pypi_name}}
c3c2db
c3c2db
%description -n python3-%{pypi_name}
c3c2db
Library to resolve JSON Pointers according to RFC 6901.
c3c2db
%endif # with python3
c3c2db
c3c2db
%prep
c3c2db
%setup -q -n %{pypi_name}-%{version}
c3c2db
c3c2db
%build
c3c2db
%if %{with python2}
c3c2db
%py2_build
c3c2db
%endif # with python2
c3c2db
%if %{with python3}
c3c2db
LC_ALL=en_US.UTF-8 %py3_build
c3c2db
%endif # with python3
c3c2db
c3c2db
%install
c3c2db
%if %{with python2}
c3c2db
%py2_install
c3c2db
mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{python2_version}
c3c2db
ln -s ./jsonpointer-%{python2_version} %{buildroot}%{_bindir}/jsonpointer-2
c3c2db
%if %{without python3}
c3c2db
ln -s ./jsonpointer-%{python2_version} %{buildroot}%{_bindir}/jsonpointer
c3c2db
%endif # without python3
c3c2db
%endif # with python2
c3c2db
c3c2db
%if %{with python3}
c3c2db
LC_ALL=en_US.UTF-8 %py3_install
c3c2db
mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{python3_version}
c3c2db
ln -s ./jsonpointer-%{python3_version} %{buildroot}%{_bindir}/jsonpointer-3
c3c2db
ln -s ./jsonpointer-%{python3_version} %{buildroot}%{_bindir}/jsonpointer
c3c2db
%endif # with python3
c3c2db
c3c2db
c3c2db
%check
c3c2db
%if %{with python3}
c3c2db
%{__python3} tests.py
c3c2db
%endif # with python3
c3c2db
%if %{with python2}
c3c2db
%{__python2} tests.py
c3c2db
%endif # with python2
c3c2db
c3c2db
%if %{with python2}
c3c2db
%files -n python2-%{pypi_name}
c3c2db
%doc README.md AUTHORS
c3c2db
%license COPYING
c3c2db
%if %{without python3}
c3c2db
%{_bindir}/jsonpointer
c3c2db
%endif # without python3
c3c2db
%{_bindir}/jsonpointer-2*
c3c2db
%{python2_sitelib}/%{pypi_name}.py*
c3c2db
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
c3c2db
%endif # with python2
c3c2db
c3c2db
%if %{with python3}
c3c2db
%files -n python3-%{pypi_name}
c3c2db
%doc README.md AUTHORS
c3c2db
%license COPYING
c3c2db
%{_bindir}/jsonpointer
c3c2db
%{_bindir}/jsonpointer-3*
c3c2db
%{python3_sitelib}/__pycache__/*
c3c2db
%{python3_sitelib}/%{pypi_name}.py*
c3c2db
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
c3c2db
%endif # with python3
c3c2db
c3c2db
%changelog
c3c2db
* Tue Apr 03 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.10-11
c3c2db
- Conditionalize the Python 2 subpackage and don't build it on EL > 7
c3c2db
c3c2db
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.10-10
c3c2db
- Update Python 2 dependency declarations to new packaging standards
c3c2db
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
c3c2db
c3c2db
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-9
c3c2db
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c3c2db
c3c2db
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 1.10-8
c3c2db
- Cleanup spec file conditionals
c3c2db
c3c2db
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-7
c3c2db
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c3c2db
c3c2db
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-6
c3c2db
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c3c2db
c3c2db
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.10-5
c3c2db
- Rebuild for Python 3.6
c3c2db
c3c2db
* Mon Sep  5 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.10-4
c3c2db
- Update to latest python guidelines
c3c2db
c3c2db
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-3
c3c2db
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
c3c2db
c3c2db
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-2
c3c2db
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c3c2db
c3c2db
* Sat Dec 19 2015 Alan Pevec <alan.pevec@redhat.com> 1.10-1
c3c2db
- Update to 1.10
c3c2db
c3c2db
* Sat Nov 14 2015 Tonet Jallo <tonet666p@gmail.com> - 1.9-4
c3c2db
- Moved a line from files section to python3 files section
c3c2db
c3c2db
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-3
c3c2db
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
c3c2db
c3c2db
* Fri Aug 07 2015 Alan Pevec <apevec@gmail.com> - 1.9-2
c3c2db
- Update to 1.9
c3c2db
c3c2db
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-7
c3c2db
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c3c2db
c3c2db
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 1.0-6
c3c2db
- fix license handling
c3c2db
c3c2db
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
c3c2db
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c3c2db
c3c2db
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.0-4
c3c2db
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
c3c2db
c3c2db
* Wed Feb  5 2014 Thomas Spura <tomspur@fedoraproject.org> - 1.0-3
c3c2db
- add python3 subpackage (#1061622)
c3c2db
c3c2db
* Thu Sep 05 2013 Alan Pevec <apevec@gmail.com> - 1.0-2
c3c2db
- add AUTHORS to docs
c3c2db
c3c2db
* Mon Jul 01 2013 Alan Pevec <apevec@gmail.com> - 1.0-1
c3c2db
- Initial package.