forked from pool/python-py-cpuinfo
Accepting request 419647 from home:TheBlackCat:branches:devel:languages:python
Python 2 version of python3-py-cpuinfo. Needed by python-tables. OBS-URL: https://build.opensuse.org/request/show/419647 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py-cpuinfo?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
py-cpuinfo-0.2.3.tar.gz
Normal file
3
py-cpuinfo-0.2.3.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f6a016fdbc4e7fadf2d519090fcb4fa9d0831bad4e85245d938e5c2fe7623ca6
|
||||||
|
size 21033
|
15
python-py-cpuinfo.changes
Normal file
15
python-py-cpuinfo.changes
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 16 15:46:46 UTC 2016 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Initial python 2 version.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 16 15:42:24 UTC 2016 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Implement update-alternatives
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 5 03:04:57 UTC 2016 - arun@gmx.de
|
||||||
|
|
||||||
|
- initial version
|
||||||
|
|
84
python-py-cpuinfo.spec
Normal file
84
python-py-cpuinfo.spec
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-py-cpuinfo
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 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 http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: python-py-cpuinfo
|
||||||
|
Version: 0.2.3
|
||||||
|
Release: 0
|
||||||
|
Summary: Get CPU info with pure Python 2 & 3
|
||||||
|
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-devel
|
||||||
|
BuildRequires: python-setuptools
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(preun): update-alternatives
|
||||||
|
|
||||||
|
%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 does not require any compilation(C/C++, assembly, et
|
||||||
|
cetera) to use. It works on Linux, OS X, Windows, BSD, Solaris,
|
||||||
|
Cygwin, Haiku, and BeagleBone. It currently only works 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 setup.py build
|
||||||
|
|
||||||
|
%install
|
||||||
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
|
||||||
|
# Prepare for update-alternatives usage
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
|
mv %{buildroot}%{_bindir}/cpuinfo %{buildroot}%{_bindir}/cpuinfo-%{py_ver}
|
||||||
|
ln -s -f %{_sysconfdir}/alternatives/cpuinfo %{buildroot}%{_bindir}/cpuinfo
|
||||||
|
|
||||||
|
%post
|
||||||
|
%_sbindir/update-alternatives \
|
||||||
|
--install %{_bindir}/cpuinfo cpuinfo %{_bindir}/cpuinfo-%{py_ver} 30
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
|
%_sbindir/update-alternatives --remove cpuinfo %{_bindir}/cpuinfo-%{py_ver}
|
||||||
|
fi
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc README.rst LICENSE ChangeLog
|
||||||
|
%{_bindir}/cpuinfo
|
||||||
|
%{_bindir}/cpuinfo-%{py_ver}
|
||||||
|
%ghost %{_sysconfdir}/alternatives/cpuinfo
|
||||||
|
%{python_sitelib}/*
|
||||||
|
|
||||||
|
%changelog
|
Reference in New Issue
Block a user