# 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: 0.1.7 Release: 1%{?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}} %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 %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 Sep 01 2015 Haïkel Guémar - 0.1.7-1 - Initial package.