4 Commits

2 changed files with 21 additions and 11 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jun 9 10:46:06 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Fri May 30 14:13:03 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Jan 13 20:45:42 UTC 2024 - Dirk Müller <dmueller@suse.com> Sat Jan 13 20:45:42 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-libsass # spec file for package python-libsass
# #
# Copyright (c) 2024 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,8 +16,9 @@
# #
%{?sle15_python_module_pythons}
%define _name libsass-python %define _name libsass-python
%bcond_without libalternatives
%{?sle15_python_module_pythons}
Name: python-libsass Name: python-libsass
Version: 0.23.0 Version: 0.23.0
Release: 0 Release: 0
@@ -28,14 +29,16 @@ URL: https://github.com/sass/libsass-python
Source: https://github.com/sass/libsass-python/archive/%{version}.tar.gz Source: https://github.com/sass/libsass-python/archive/%{version}.tar.gz
BuildRequires: %{python_module Cython} BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libsass-devel >= 3.6.4 BuildRequires: libsass-devel >= 3.6.4
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-setuptools Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun):update-alternatives
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module Werkzeug} BuildRequires: %{python_module Werkzeug}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
@@ -52,11 +55,11 @@ with no Ruby stack at all!
%build %build
sed -i -e '/^#!\//, 1d' *.py sed -i -e '/^#!\//, 1d' *.py
export SYSTEM_SASS=true export SYSTEM_SASS=true
%python_build %pyproject_wheel
%install %install
export SYSTEM_SASS=true export SYSTEM_SASS=true
%python_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/pysassc %python_clone -a %{buildroot}%{_bindir}/pysassc
%{python_expand \ %{python_expand \
# We don't want to install tests # We don't want to install tests
@@ -68,11 +71,8 @@ rm %{buildroot}%{$python_sitearch}/sasstests.py \
%check %check
%pytest_arch sasstests.py %pytest_arch sasstests.py
%post %pre
%python_install_alternative pysassc %python_libalternatives_reset_alternative pysassc
%postun
%python_uninstall_alternative pysassc
%files %{python_files} %files %{python_files}
%python_alternative %{_bindir}/pysassc %python_alternative %{_bindir}/pysassc