%global srcname werkzeug %global osrcname Werkzeug Name: python-%{srcname} Version: 0.9.4 Release: %mkrel 7 Summary: The Swiss Army knife of Python web development Group: Development/Python License: BSD URL: http://werkzeug.pocoo.org/ Source0: https://pypi.python.org/packages/source/W/%{osrcname}/%{osrcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: python3-devel BuildRequires: python3-setuptools %description The Swiss Army knife of Python web development %package -n python3-werkzeug Summary: The Swiss Army knife of Python web development Group: Development/Python BuildRequires: python3-devel BuildRequires: python3-setuptools %description -n python3-werkzeug The Swiss Army knife of Python 3 web development %prep %setup -q -n %{osrcname}-%{version} %{__sed} -i 's/\r//' LICENSE %{__sed} -i '1d' werkzeug/testsuite/multipart/collect.py cp -a . %{py3dir} find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' %build %{__python} setup.py build find examples/ -name '*.py' -executable | xargs chmod -x find examples/ -name '*.png' -executable | xargs chmod -x pushd %{py3dir} %{__python3} setup.py build find examples/ -name '*.py' -executable | xargs chmod -x find examples/ -name '*.png' -executable | xargs chmod -x popd %install %{__python} setup.py install -O1 --skip-build --root %{buildroot} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root %{buildroot} popd %files %{python_sitelib}/%{srcname}* %{python_sitelib}/%{osrcname}* %files -n python3-werkzeug %{python3_sitelib}/*