11
0

6 Commits

Author SHA256 Message Date
09e4f1fa30 Accepting request 1299209 from devel:languages:python
- Convert to libalternatives on SLE-16-based and newer systems only

OBS-URL: https://build.opensuse.org/request/show/1299209
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-py-cpuinfo?expand=0&rev=12
2025-08-14 09:36:08 +00:00
48f3cada5c - Convert to libalternatives on SLE-16-based and newer systems only
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py-cpuinfo?expand=0&rev=26
2025-08-13 09:58:20 +00:00
a0ea384726 Accepting request 1284238 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1284238
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-py-cpuinfo?expand=0&rev=11
2025-06-11 14:20:05 +00:00
ffa26234f2 - Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py-cpuinfo?expand=0&rev=24
2025-06-09 15:09:03 +00:00
6eced3c855 Accepting request 1282318 from devel:languages:python
- Convert to pip-based build

OBS-URL: https://build.opensuse.org/request/show/1282318
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-py-cpuinfo?expand=0&rev=10
2025-06-04 18:27:00 +00:00
5eda906ecc - Convert to pip-based build
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py-cpuinfo?expand=0&rev=22
2025-06-03 12:39:26 +00:00
2 changed files with 35 additions and 5 deletions

View File

@@ -1,3 +1,18 @@
-------------------------------------------------------------------
Wed Aug 13 09:53:29 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
-------------------------------------------------------------------
Mon Jun 9 15:08:49 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Tue Jun 3 12:39:03 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
-------------------------------------------------------------------
Fri Apr 21 12:30:13 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-py-cpuinfo
#
# Copyright (c) 2023 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
@@ -17,6 +17,11 @@
%bcond_without tests
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-py-cpuinfo
Version: 9.0.0
@@ -26,11 +31,18 @@ License: MIT
Group: Development/Languages/Python
URL: https://github.com/workhorsy/py-cpuinfo
Source: https://files.pythonhosted.org/packages/source/p/py-cpuinfo/py-cpuinfo-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
%endif
BuildArch: noarch
%python_subpackages
@@ -57,13 +69,13 @@ These approaches are used for getting info:
sed -i '1{ /^#!/d; }' cpuinfo/*.py
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# Prepare for update-alternatives usage
# Prepare for alts usage
%python_clone -a %{buildroot}%{_bindir}/cpuinfo
%if %{with tests}
@@ -71,6 +83,9 @@ sed -i '1{ /^#!/d; }' cpuinfo/*.py
%python_exec test_suite.py
%endif
%pre
%python_libalternatives_reset_alternative cpuinfo
%post
%python_install_alternative cpuinfo