15
0

Compare commits

4 Commits

2 changed files with 23 additions and 12 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Jun 4 14:32:35 UTC 2025 - Felix Stegmeier <felix.stegmeier@suse.com>
- fix usage of libalternatives
-------------------------------------------------------------------
Fri May 16 12:22:18 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
-------------------------------------------------------------------
Wed May 27 09:36:50 UTC 2020 - Petr Gajdos <pgajdos@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-cppclean
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,7 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without libalternatives
Name: python-cppclean
Version: 0.13
Release: 0
@@ -25,12 +25,14 @@ License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/myint/cppclean
Source: https://github.com/myint/cppclean/archive/v%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: bash
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires: alts
BuildArch: noarch
%python_subpackages
@@ -45,26 +47,25 @@ considerable extra compiles increasing the edit-compile-run cycle.
%setup -q -n cppclean-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/cppclean
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_expand PYTHON=%{__$python} bash test.bash
%post
%python_install_alternative cppclean
%postun
%python_uninstall_alternative cppclean
%pre
# Removing old update-alternatives entries.
%python_libalternatives_reset_alternative cppclean
%files %{python_files}
%license COPYING
%doc README.rst
%python_alternative %{_bindir}/cppclean
%{python_sitelib}/*
%{python_sitelib}/cpp
%{python_sitelib}/cppclean-%{version}*-info
%changelog