1
0
python-py-cpuinfo/python-py-cpuinfo.spec
Tomáš Chvátal d251dc02a6 Accepting request 704760 from home:mcalabkova:branches:devel:languages:python
- update to version 5.0.0
  * Fixed Bug #117: Remove PyInstaller hacks
  * Fixed Bug #108: Client script runs multiple times without __main__
  * Fixed Bug #113: Add option to return results in json
  * Fixed Bug #110: Always tries to run wmic in get_system_info.py
  v4.0.0
  * Fixed Bug #80: Broken when using Pyinstaller
  * Fixed Bug #77: Get L1, L2, and L3 cache info from lscpu
  * Fixed Bug #79: Byte formats are inconsistent
  * Fixed Bug #81: Byte formatter breaks on non strings
  * Fixed Bug #95: Include if Python is 32 or 64 bit in get_system_info
  * Fixed Bug #87: lscpu gets brand field twice
  * Fixed Bug #96: Include Python version in output
  * Fixed Bug #85: CPUID HZ measurement is scaled wrong
  * Fixed Bug #100: Officially drop support for Python 2.6
  * Fixed Bug #101: Made it only check the dmesg boot log on Linux
  v3.3.0
  * Fixed Bug #72: Fails to parse invalid CPUID result.
- removed remove-arch-check.patch -- testsuite runs

OBS-URL: https://build.opensuse.org/request/show/704760
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py-cpuinfo?expand=0&rev=11
2019-05-23 09:25:31 +00:00

85 lines
2.4 KiB
RPMSpec

#
# spec file for package python-py-cpuinfo
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without tests
Name: python-py-cpuinfo
Version: 5.0.0
Release: 0
Summary: Python library and tool to get CPU info
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 setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Py-cpuinfo gets CPU info with pure Python. Py-cpuinfo should work
without any extra programs or libraries, beyond what your OS
provides. It supports Linux, OS X, Windows, BSD, Solaris,
Cygwin, Haiku, and BeagleBone, but only on x86 and some ARM CPUs.
These approaches are used for getting info:
1. Windows Registry (Windows)
2. /proc/cpuinfo (Linux)
3. sysctl (OS X)
4. dmesg (Unix/Linux)
5. isainfo and kstat (Solaris)
6. cpufreq-info (BeagleBone)
7. lscpu (Unix/Linux)
8. sysinfo (Haiku)
9. Querying the CPUID register (Intel X86 CPUs)
%prep
%setup -q -n py-cpuinfo-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# Prepare for update-alternatives usage
%python_clone -a %{buildroot}%{_bindir}/cpuinfo
%if %{with tests}
%check
%python_exec test_suite.py
%endif
%post
%python_install_alternative cpuinfo
%preun
%python_uninstall_alternative cpuinfo
%files %{python_files}
%license LICENSE
%doc README.rst ChangeLog
%python_alternative %{_bindir}/cpuinfo
%{python_sitelib}/*
%changelog