From b7329ef272597d25289f1a5daf68e0f2951ad8f7 Mon Sep 17 00:00:00 2001 From: Haikel Guemar Date: Jun 27 2016 12:42:16 +0000 Subject: Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- diff --git a/python-scss.spec b/python-scss.spec index 3e67026..c155c6e 100644 --- a/python-scss.spec +++ b/python-scss.spec @@ -1,11 +1,12 @@ -# 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)$ %global pypi_name pyScss +%global sname pyscss + +%if 0%{?fedora} +%global with_python3 1 +%endif Name: python-scss Version: 1.3.4 @@ -18,39 +19,97 @@ URL: https://github.com/Kronuz/pyScss # get source file with spectool -g python-scss.spec Source0: https://github.com/Kronuz/pyScss/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz + +%description +A Scss compiler for Python + +%package -n python2-%{sname} +Summary: A Scss compiler for Python BuildRequires: python2-devel +BuildRequires: python-setuptools BuildRequires: python-six BuildRequires: python-sphinx BuildRequires: pcre-devel Requires: python-six Requires: python-setuptools -%description +%{?python_provide:%python_provide python2-%{sname}} + +%description -n python2-%{sname} +A Scss compiler for Python + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: A Scss compiler for Python +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-six +Requires: python3-six +Requires: python3-setuptools + +%{?python_provide:%python_provide python3-%{sname}} + +%description -n python3-%{sname} A Scss compiler for Python +%endif %prep %setup -q -n %{pypi_name}-%{version} %build -CFLAGS="%{optflags}" %{__python} setup.py build +%py2_build +%py3_build +# build documentationx 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 +%py2_install +chmod +x %{buildroot}%{python2_sitearch}/scss/tool.py +mv %{buildroot}%{_bindir}/pyscss %{buildroot}%{_bindir}/pyscss-%{python2_version} +ln -s ./pyscss-%{python2_version} %{buildroot}%{_bindir}/pyscss-2 + +%if 0%{?with_python3} +%py3_install +chmod +x %{buildroot}%{python3_sitearch}/scss/tool.py +mv %{buildroot}%{_bindir}/pyscss %{buildroot}%{_bindir}/pyscss-%{python3_version} +ln -s ./pyscss-%{python3_version} %{buildroot}%{_bindir}/pyscss-3 +ln -s ./pyscss-%{python3_version} %{buildroot}%{_bindir}/pyscss +%endif + +# Manage EL7 case +%if !0%{?with_python3} +ln -s ./pyscss-%{python3_version} %{buildroot}%{_bindir}/pyscss +%endif + +# install man page 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}/* +%files -n python2-%{sname} +%doc DESCRIPTION README.rst +%license LICENSE +%{python2_sitearch}/* +%{_bindir}/pyscss-2 +%{_bindir}/pyscss-%{python2_version} +%if !0%{?with_python3} %{_bindir}/pyscss %{_mandir}/man1/pyscss.1.gz +%endif +%if 0%{?with_python3} +%files -n python3-%{sname} +%doc DESCRIPTION README.rst +%license LICENSE +%{python3_sitearch}/* +%{_bindir}/pyscss +%{_bindir}/pyscss-3 +%{_bindir}/pyscss-%{python3_version} +%{_mandir}/man1/pyscss.1.gz +%endif %changelog