# 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))")} # Filter the _speedups.so provides that otherwise comes into the provides %global __provides_exclude_from ^(%{python_sitearch}/.*\\.so)$ # Github commit hash %global commit 85e8806e39e840c4402ee813c3e38fefaf9212b4 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global pypi_name pyScss Name: python-scss Version: 1.2.1 Release: 1%{?dist} Summary: A Scss compiler for Python License: MIT URL: https://github.com/Kronuz/pyScss Source0: https://github.com/Kronuz/pyScss/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz BuildRequires: python2-devel BuildRequires: python-six BuildRequires: python-sphinx BuildRequires: pcre-devel Requires: python-six Requires: python-setuptools %description A Scss compiler for Python %prep %setup -q -n %setup -q -n pyScss-%{commit} %build CFLAGS="%{optflags}" %{__python} setup.py build cd docs make SPHINXBUILD=sphinx-build man %install %{__python} setup.py install -O1 --skip-build --root %{buildroot} chmod +x %{buildroot}%{python_sitearch}/scss/tool.py mkdir -p %{buildroot}%{_mandir}/man1/ cp -ar docs/_build/man/pyscss.1 %{buildroot}%{_mandir}/man1/pyscss.1 %files %doc DESCRIPTION LICENSE README.rst %{python_sitearch}/* %{_bindir}/pyscss %{_mandir}/man1/pyscss.1.gz %changelog * Tue Oct 07 2014 Matthias Runge - 1.2.1-1 - update to 1.2.1 (rhbz#1148966) * Sun Aug 17 2014 Fedora Release Engineering - 1.2.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 1.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Tue Feb 25 2014 Patrick Uiterwijk - 1.2.0-3 - Require python-setuptools as thats needed for the binary to work * Wed Nov 06 2013 Patrick Uiterwijk - 1.2.0-2 - Buildrequire set to python2-devel - Added buildrequire pcre-devel - Changed URL to Source - Added -a to cp to retain timestamp * Thu Oct 17 2013 Patrick Uiterwijk - 1.2.0-1 - Initial packaging