From 275ef13225658e182b5c1b5fab4454de967b7262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 12 Jun 2018 12:20:24 +0200 Subject: [PATCH] /usr/bin/lesscpy is Python 3 According to the guidelines: https://fedoraproject.org/wiki/Packaging:Python#Executables_in_.2Fusr.2Fbin If the executables provide the same functionality independent of whether they are run on top of Python 2 or Python 3, then only the Python 3 version of the executable should be packaged. I left /usr/bin/py3-lesscpy around as a symblink for backwards compatibility. Consider removal in F30+. --- python-lesscpy.spec | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/python-lesscpy.spec b/python-lesscpy.spec index a3e8b4f..4acb941 100644 --- a/python-lesscpy.spec +++ b/python-lesscpy.spec @@ -8,7 +8,7 @@ Name: python-%{pypi_name} Version: 0.13.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lesscss compiler License: MIT @@ -79,15 +79,18 @@ popd %install +%{__python} setup.py install --skip-build --root %{buildroot} + %if 0%{?with_python3} +rm %{buildroot}/%{_bindir}/lesscpy pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} -mv %{buildroot}/%{_bindir}/lesscpy %{buildroot}/%{_bindir}/py3-lesscpy + +# link for backwards compatibility. consider removal in Fedora 30+ +ln -s ./lesscpy %{buildroot}/%{_bindir}/py3-lesscpy popd %endif # with_python3 -%{__python} setup.py install --skip-build --root %{buildroot} - #%check #nosetests -v @@ -101,7 +104,6 @@ popd %doc LICENSE %{python_sitelib}/%{pypi_name} %{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info -%{_bindir}/lesscpy %if 0%{?with_python3} %files -n python3-lesscpy %doc LICENSE @@ -109,9 +111,13 @@ popd %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}*.egg-info %endif # with_python3 +%{_bindir}/lesscpy %changelog +* Tue Jun 12 2018 Miro HronĨok - 0.13.0-2 +- /usr/bin/lesscpy is Python 3 + * Mon Jun 11 2018 Christian Heimes - 0.13.0-1 - New upstream release 0.13.0, resolves rhbz#1584773