diff --git a/python-lesscpy.spec b/python-lesscpy.spec index 6f9c485..98cd107 100644 --- a/python-lesscpy.spec +++ b/python-lesscpy.spec @@ -1,5 +1,3 @@ -%global with_python3 1 - %global pypi_name lesscpy %if 0%{?rhel} > 7 @@ -45,7 +43,6 @@ Requires: python2-ply %description -n python2-lesscpy %_description %endif # with python2 -%if 0%{?with_python3} %package -n python3-lesscpy Summary: Lesscss compiler Requires: python3-ply @@ -60,59 +57,49 @@ A compiler written in python 3 for the lesscss language. For those of us not willing/able to have node.js installed in our environment. Not all features of lesscss are supported (yet). Some features wil probably never be supported (JavaScript evaluation). -%endif #with_python3 %prep %setup -q -n %{pypi_name}-%{version} -%if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} #fix utf8 encoding issue occurring only under py3 pushd %{py3dir} find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' popd -%endif %build %if %{with python2} %py2_build %endif # with python2 -%if 0%{?with_python3} + pushd %{py3dir} export LANG=en_US.utf8 env %py3_build popd -%endif # with_python3 %install %if %{with python2} %py2_install -%if 0%{?with_python3} rm %{buildroot}/%{_bindir}/lesscpy -%endif # with python3 %endif # with python2 -%if 0%{?with_python3} pushd %{py3dir} %py3_install # link for backwards compatibility. consider removal in Fedora 30+ ln -s ./lesscpy %{buildroot}/%{_bindir}/py3-lesscpy popd -%endif # with_python3 #%check #%%if %{with python2} #nosetests -v #%%endif # with python2 -#%%if 0%{?with_python3} #pushd %{py3dir} #nosetests-3.3 -v #popd -#%%endif # with_python3 %if %{with python2} %files -n python2-lesscpy @@ -121,15 +108,12 @@ popd %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif # with python2 -%if 0%{?with_python3} %files -n python3-lesscpy %doc LICENSE +%{_bindir}/lesscpy %{_bindir}/py3-lesscpy %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}*.egg-info -%endif # with_python3 - -%{_bindir}/lesscpy %changelog