]> git.pld-linux.org Git - packages/python-py-cpuinfo.git/blame - python-py-cpuinfo.spec
rebuild with python 3.10
[packages/python-py-cpuinfo.git] / python-py-cpuinfo.spec
CommitLineData
70e92c41
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Get CPU info with pure Python 2
8Summary(pl.UTF-8): Pobieranie informacji o CPU w czystym Pythonie 2
9Name: python-py-cpuinfo
08203024 10Version: 8.0.0
eecebf32 11Release: 3
70e92c41
JB
12License: MIT
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/py-cpuinfo/
15Source0: https://files.pythonhosted.org/packages/source/p/py-cpuinfo/py-cpuinfo-%{version}.tar.gz
08203024 16# Source0-md5: cf3bec89839a0bf18c5f6c1c18aaee10
70e92c41
JB
17URL: https://github.com/workhorsy/py-cpuinfo
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.7
20BuildRequires: python-setuptools
21%endif
22%if %{with python3}
23BuildRequires: python3-modules >= 1:3.2
24BuildRequires: python3-setuptools
25%endif
26BuildRequires: rpm-pythonprov
27BuildRequires: rpmbuild(macros) >= 1.714
28Requires: python-modules >= 1:2.7
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33Py-cpuinfo gets CPU info with pure Python. Py-cpuinfo should work
34without any extra programs or libraries, beyond what your OS provides.
35It does not require any compilation (C/C++, assembly, et cetera) to
36use. It works with Python 2 and 3.
37
38%description -l pl.UTF-8
39Py-cpuinfo pobiera informacje o CPU z poziomu czystego Pythona.
40Powinien działać bez dodatkowych programów czy bibliotek, tylko z tym,
41co udostępnia system operacyjny. Nie wymaga żadnej kompilacji (C/C++,
42asemblera itp.). Działa z Pythonem 2 i 3.
43
44%package -n python3-py-cpuinfo
45Summary: Get CPU info with pure Python 3
46Summary(pl.UTF-8): Pobieranie informacji o CPU w czystym Pythonie 3
47Group: Libraries/Python
48Requires: python3-modules >= 1:3.2
49
50%description -n python3-py-cpuinfo
51Py-cpuinfo gets CPU info with pure Python. Py-cpuinfo should work
52without any extra programs or libraries, beyond what your OS provides.
53It does not require any compilation (C/C++, assembly, et cetera) to
54use. It works with Python 2 and 3.
55
56%description -n python3-py-cpuinfo -l pl.UTF-8
57Py-cpuinfo pobiera informacje o CPU z poziomu czystego Pythona.
58Powinien działać bez dodatkowych programów czy bibliotek, tylko z tym,
59co udostępnia system operacyjny. Nie wymaga żadnej kompilacji (C/C++,
60asemblera itp.). Działa z Pythonem 2 i 3.
61
62%prep
63%setup -q -n py-cpuinfo-%{version}
64
65%build
66%if %{with python2}
ff1159f4
JB
67%py_build
68
69%if %{with tests}
70%{__python} test_suite.py
71%endif
70e92c41
JB
72%endif
73
74%if %{with python3}
ff1159f4
JB
75%py3_build
76
77%if %{with tests}
78%{__python3} test_suite.py
79%endif
70e92c41
JB
80%endif
81
82%install
83rm -rf $RPM_BUILD_ROOT
84
85%if %{with python2}
86%py_install
87%{__mv} $RPM_BUILD_ROOT%{_bindir}/cpuinfo{,-py2}
88
89%py_postclean
90%endif
91
92%if %{with python3}
93%py3_install
94%{__mv} $RPM_BUILD_ROOT%{_bindir}/cpuinfo{,-py3}
95%endif
96
97%clean
98rm -rf $RPM_BUILD_ROOT
99
100%if %{with python2}
101%files
102%defattr(644,root,root,755)
103%doc ChangeLog LICENSE README.rst
104%attr(755,root,root) %{_bindir}/cpuinfo-py2
105%{py_sitescriptdir}/cpuinfo
106%{py_sitescriptdir}/py_cpuinfo-%{version}-py*.egg-info
107%endif
108
109%if %{with python3}
110%files -n python3-py-cpuinfo
111%defattr(644,root,root,755)
112%doc ChangeLog LICENSE README.rst
113%attr(755,root,root) %{_bindir}/cpuinfo-py3
114%{py3_sitescriptdir}/cpuinfo
115%{py3_sitescriptdir}/py_cpuinfo-%{version}-py*.egg-info
116%endif
This page took 0.088707 seconds and 4 git commands to generate.