# Created by pyp2rpm-2.0.0
%global pypi_name jsonpath-rw-ext
%global sname jsonpath_rw_ext
%if 0%{?fedora}
%global with_python3 1
%endif
Name: python-%{pypi_name}
Version: 1.0.0
Release: 2%{?dist}
Summary: Extensions for JSONPath RW
License: ASL 2.0
URL: https://github.com/sileht/python-jsonpath-rw-ext
Source0: https://pypi.python.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-pbr
BuildRequires: python-sphinx
%description
Extensions for JSONPath RW
%package -n python2-%{pypi_name}
Summary: Extensions for JSONPath RW
%{?python_provide:%python_provide python2-%{pypi_name}}
Requires: python-babel >= 1.3
Requires: python-jsonpath-rw >= 1.2
%description -n python2-%{pypi_name}
Extensions for JSONPath RW
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: Extensions for JSONPath RW
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pbr
BuildRequires: python3-sphinx
Requires: python3-babel >= 1.3
Requires: python3-jsonpath-rw >= 1.2
%description -n python3-%{pypi_name}
Extensions for JSONPath RW
%endif
%package -n python-%{pypi_name}-doc
Summary: jsonpath-rw-ext documentation
%description -n python-%{pypi_name}-doc
Documentation for jsonpath-rw-ext
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%{__python2} setup.py build
%if 0%{?with_python3}
%{__python3} setup.py build
%endif
# generate html docs
sphinx-build doc/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%if 0%{?with_python3}
%{__python3} setup.py install --skip-build --root %{buildroot}
%endif
%{__python2} setup.py install --skip-build --root %{buildroot}
%files -n python2-%{pypi_name}
%license LICENSE
%doc doc/source/readme.rst README.rst
%{python2_sitelib}/%{sname}
%{python2_sitelib}/*.egg-info
%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%license LICENSE
%doc doc/source/readme.rst README.rst
%{python3_sitelib}/%{sname}
%{python3_sitelib}/*.egg-info
%endif
%files -n python-%{pypi_name}-doc
%doc html
%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu May 05 2016 Pradeep Kilambi <pkilambi@redhat.com> - 1.0.0-1
- Rebase to 1.0.0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.7-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Tue Sep 01 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.1.7-1
- Initial package.