%global pypi_name mimeparse %global pypi_oname mimeparse %define version 0.1.3 %define python3 1 Name: python-%{pypi_name} Version: %{version} Release: %mkrel 1 Group: Development/Python Summary: A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges License: MIT URL: http://pypi.python.org/pypi/%{pypi_name} Source0: http://pypi.python.org/packages/source/c/%{pypi_oname}/%{pypi_oname}-%{version}.tar.gz BuildArch: noarch BuildRequires: pkgconfig(python) BuildRequires: python-setuptools %description A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges %if %python3 %package -n python3-%{pypi_name} Summary: A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges Group: Development/Python BuildRequires: pkgconfig(python3) BuildRequires: python3-setuptools %description -n python3-%{pypi_name} A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges %endif %prep %setup -q -n %{pypi_oname}-%{version} %apply_patches %if %python3 cp -a . %{py3dir} %endif %build %{__python} setup.py build %if %python3 pushd %{py3dir} %{__python3} setup.py build popd %endif %install %if %python3 pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} popd %endif %{__python} setup.py install -O1 --skip-build --root %{buildroot} %files %{python_sitelib}/%{pypi_name}* %{python_sitelib}/%{pypi_name}-%version-py2.7.egg-info %if %python3 %files -n python3-%{pypi_name} %{python3_sitelib}/%{pypi_name}* %{python3_sitelib}/%{pypi_name}-%version-py3.3.egg-info %{python3_sitelib}/__pycache__/mimeparse.* %endif %changelog * Mon Nov 04 2013 neoclust <neoclust> 0.1.3-1.mga4 + Revision: 549437 - imported package python-mimeparse