# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %global mod_name Flask-Imgur Name: python-flask-imgur Version: 0.1 Release: 1%{?dist} Summary: Upload images straight to Imgur in your Flask app License: BSD URL: https://github.com/exaroth/flask-imgur Source0: https://pypi.python.org/packages/source/F/%{mod_name}/%{mod_name}-0.1.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %description This is simple flask extension allowing uploading images straight to Imgur image hosting service. %prep %setup -qn %{mod_name}-%{version} %build # Remove CFLAGS=... for noarch packages (unneeded) #CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build %{__python2} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %files %doc # For noarch packages: sitelib %{python_sitelib}/* # For arch-specific packages: sitearch #%{python_sitearch}/* %changelog * Fri Oct 24 2014 Walter Danilo Vargas - 0.1-1 - Initial Packaging