1
0

Compare commits

4 Commits

2 changed files with 22 additions and 11 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jun 9 10:28:23 UTC 2025 - Markéta Machová <mmachova@suse.com>
- convert to libalternatives
-------------------------------------------------------------------
Fri May 30 13:37:16 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 2 10:42:43 UTC 2023 - pgajdos@suse.com Mon Oct 2 10:42:43 UTC 2023 - pgajdos@suse.com

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-lesscpy # spec file for package python-lesscpy
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,7 @@
# #
%bcond_without libalternatives
Name: python-lesscpy Name: python-lesscpy
Version: 0.15.1 Version: 0.15.1
Release: 0 Release: 0
@@ -25,15 +26,17 @@ URL: https://github.com/lesscpy/lesscpy
Source: https://files.pythonhosted.org/packages/source/l/lesscpy/lesscpy-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/l/lesscpy/lesscpy-%{version}.tar.gz
# https://github.com/lesscpy/lesscpy/pull/126 # https://github.com/lesscpy/lesscpy/pull/126
Patch0: python-lesscpy-no-six.patch Patch0: python-lesscpy-no-six.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module ply} BuildRequires: %{python_module ply}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-ply Requires: python-ply
Requires: python-setuptools Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -52,18 +55,16 @@ This program uses PLY (Python Lex-Yacc) to tokenize/parse the input.
rm test/test_{bootstrap3,less,issues}.py rm test/test_{bootstrap3,less,issues}.py
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/lesscpy %python_clone -a %{buildroot}%{_bindir}/lesscpy
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%post %pre
%python_install_alternative lesscpy # removing old update-alternatives entries
%python_libalternatives_reset_alternative lesscpy
%postun
%python_uninstall_alternative lesscpy
%check %check
%pytest %pytest
@@ -73,6 +74,6 @@ rm test/test_{bootstrap3,less,issues}.py
%doc README.rst %doc README.rst
%python_alternative %{_bindir}/lesscpy %python_alternative %{_bindir}/lesscpy
%{python_sitelib}/lesscpy %{python_sitelib}/lesscpy
%{python_sitelib}/lesscpy-%{version}-py*.egg-info %{python_sitelib}/lesscpy-%{version}*-info
%changelog %changelog