%if 0%{?fedora} %global with_python3 1 %endif %global modname svg.path Name: python-svg-path Version: 1.0b1 Release: 1%{?dist} Summary: SVG path objects and parser Group: Development/Libraries License: CC0 URL: http://pypi.python.org/pypi/svg.path Source0: http://pypi.python.org/packages/source/s/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools Requires: python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif %description svg.path is a collection of objects that implement the different path commands in SVG, and a parser for SVG path definitions. %if 0%{?with_python3} %package -n python3-svg-path Summary: SVG path objects and parser Group: Development/Libraries Requires: python3-setuptools %description -n python3-svg-path svg.path is a collection of objects that implement the different path commands in SVG, and a parser for SVG path definitions. %endif %prep %setup -q -n %{modname}-%{version} # Remove bundled egg-info in case it exists rm -rf %%{modname}.egg-info %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %{__python} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif %install %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root=%{buildroot} popd %endif %{__python} setup.py install -O1 --skip-build --root=%{buildroot} %check %{__python} setup.py test %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py test popd %endif %files %doc README.rst CHANGES.txt CONTRIBUTORS.txt %{python_sitelib}/svg/ %{python_sitelib}/%{modname}-%{version}* %if 0%{?with_python3} %files -n python3-svg-path %doc README.rst CHANGES.txt CONTRIBUTORS.txt %{python3_sitelib}/svg/ %{python3_sitelib}/%{modname}-%{version}-* %endif %changelog * Mon Apr 15 2013 Ralph Bean - 1.0b1-1 - Initial package for Fedora