# Created by pyp2rpm-1.0.0 %global pypi_name py %define version 1.4.12 Name: python-py Version: %{version} Release: %mkrel 2 Group: Development/Python Summary: Python 2 Library with cross-python path, ini-parsing, io, code, log facilities License: MIT URL: http://pylib.org/ Source0: http://pypi.python.org/packages/source/p/py/py-%{version}.zip Patch0: py-1.4.12-doc.patch BuildArch: noarch BuildRequires: python-devel BuildRequires: python-sphinx %description The py lib is a Python development support library featuring the following tools and modules: * py.path: uniform local and svn path objects * py.apipkg: explicit API control and lazy-importing * py.iniconfig: easy parsing of .ini files * py.code: dynamic code generation and introspection * py.path: uniform local and svn path objects %package -n python3-py Summary: Python 3 library with cross-python path, ini-parsing, io, code, log facilities Group: Development/Python BuildRequires: python3 BuildRequires: python3-setuptools %description -n python3-py The py lib is a Python development support library featuring the following tools and modules: * py.path: uniform local and svn path objects * py.apipkg: explicit API control and lazy-importing * py.iniconfig: easy parsing of .ini files * py.code: dynamic code generation and introspection * py.path: uniform local and svn path objects %package doc Summary: Documentation for py Group: Development/Python BuildArch: noarch %description doc This package contains documentation for py, Python library with cross-python path, ini-parsing, io, code, log facilities. %prep %setup -q -c # Remove bundled egg-info rm -rf %{pypi_name}.egg-info mv %{pypi_name}-%{version} python2 pushd python2 %apply_patches popd cp -r python2 python3 %build pushd python2 python setup.py build # generate html docs sphinx-build doc html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} popd pushd python3 python3 setup.py build popd %install rm -rf %{buildroot} pushd python2 python setup.py install --root=%{buildroot} --compile --optimize=2 popd pushd python3 python3 setup.py install --root=%{buildroot} --compile --optimize=2 popd %files %doc python2/README.txt python2/LICENSE %{python_sitelib}/%{pypi_name} %{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python3-py %doc python2/README.txt python2/LICENSE %{python3_sitelib}/*egg-info %{python3_sitelib}/%{pypi_name} %files doc %doc python2/html python2/README.txt python2/LICENSE %changelog * Sun Jan 13 2013 umeabot <umeabot> 1.4.12-2.mga3 + Revision: 379289 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Dec 25 2012 philippem <philippem> 1.4.12-1.mga3 + Revision: 334960 - add Python 3 version + joequant <joequant> - imported package python-py