Update to 0.2.3 release (rh#1311530)
- Added %license tag
This commit is contained in:
parent
9d27976e40
commit
952074b2dc
@ -1,18 +1,20 @@
|
|||||||
%global with_python3 1
|
%global srcname cpuinfo
|
||||||
%global module_name cpuinfo
|
%global sum Getting CPU info
|
||||||
|
|
||||||
Name: python-%{module_name}
|
Name: python-%{srcname}
|
||||||
Version: 0.2.3
|
Version: 0.2.3
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Getting CPU info
|
Summary: %{sum}
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/workhorsy/py-cpuinfo
|
URL: https://github.com/workhorsy/py-cpuinfo
|
||||||
Source0: https://pypi.python.org/packages/source/p/py-%{module_name}/py-%{module_name}-%{version}.tar.gz
|
Source0: https://pypi.python.org/packages/source/p/py-%{srcname}/py-%{srcname}-%{version}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Py-cpuinfo gets CPU info with pure Python. Py-cpuinfo should work without
|
Py-cpuinfo gets CPU info with pure Python. Py-cpuinfo should work without
|
||||||
@ -26,14 +28,12 @@ These approaches are used for getting info:
|
|||||||
isainfo and psrinfo
|
isainfo and psrinfo
|
||||||
Querying x86 CPUID register
|
Querying x86 CPUID register
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%package -n python3-%{module_name}
|
|
||||||
Summary: Getting CPU info
|
|
||||||
License: MIT
|
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: python3-setuptools
|
|
||||||
|
|
||||||
%description -n python3-%{module_name}
|
%package -n python2-%{srcname}
|
||||||
|
Summary: %{sum}
|
||||||
|
%{?python_provide:%python_provide python2-%{srcname}}
|
||||||
|
|
||||||
|
%description -n python2-%{srcname}
|
||||||
Py-cpuinfo gets CPU info with pure Python. Py-cpuinfo should work without
|
Py-cpuinfo gets CPU info with pure Python. Py-cpuinfo should work without
|
||||||
any extra programs or libraries, beyond what your OS provides.
|
any extra programs or libraries, beyond what your OS provides.
|
||||||
|
|
||||||
@ -45,69 +45,64 @@ These approaches are used for getting info:
|
|||||||
isainfo and psrinfo
|
isainfo and psrinfo
|
||||||
Querying x86 CPUID register
|
Querying x86 CPUID register
|
||||||
|
|
||||||
%endif
|
%package -n python3-%{srcname}
|
||||||
|
Summary: %{sum}
|
||||||
|
%{?python_provide:%python_provide python3-%{srcname}}
|
||||||
|
|
||||||
|
%description -n python3-%{srcname}
|
||||||
|
Py-cpuinfo gets CPU info with pure Python. Py-cpuinfo should work without
|
||||||
|
any extra programs or libraries, beyond what your OS provides.
|
||||||
|
|
||||||
|
These approaches are used for getting info:
|
||||||
|
Windows Registry
|
||||||
|
/proc/cpuinfo
|
||||||
|
sysctl
|
||||||
|
dmesg
|
||||||
|
isainfo and psrinfo
|
||||||
|
Querying x86 CPUID register
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n py-%{module_name}-%{version}
|
%setup -q -n py-%{srcname}-%{version}
|
||||||
rm -rf *.egg-info
|
rm -rf *.egg-info
|
||||||
|
|
||||||
sed -i -e '/^#!\//, 1d' cpuinfo/cpuinfo.py
|
#sed -i -e '/^#!\//, 1d' cpuinfo/cpuinfo.py
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
#find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
|
||||||
rm -rf %{py3dir}
|
|
||||||
cp -a . %{py3dir}
|
|
||||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
||||||
%endif
|
|
||||||
|
|
||||||
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python2} setup.py build
|
%py2_build
|
||||||
|
%py3_build
|
||||||
%if 0%{?with_python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
%{__python3} setup.py build
|
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if 0%{?with_python3}
|
%py2_install
|
||||||
pushd %{py3dir}
|
%py3_install
|
||||||
%{__python3} setup.py install --skip-build --root=%{buildroot}
|
|
||||||
cp -p %{buildroot}/%{_bindir}/cpuinfo %{buildroot}/%{_bindir}/cpuinfo-3
|
|
||||||
sed -i '1s|^#!python|#!%{__python3}|' %{buildroot}/%{_bindir}/cpuinfo-3
|
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%{__python2} setup.py install --skip-build --root=%{buildroot}
|
cp -p %{buildroot}/%{_bindir}/cpuinfo %{buildroot}/%{_bindir}/cpuinfo-3
|
||||||
|
#sed -i '1s|^#!python|#!%{__python3}|' %{buildroot}/%{_bindir}/cpuinfo-3
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python2} setup.py test
|
%{__python2} setup.py test
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
%{__python3} setup.py test
|
%{__python3} setup.py test
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n python-%{module_name}
|
%files -n python2-%{srcname}
|
||||||
%doc README.rst LICENSE ChangeLog
|
%doc README.rst ChangeLog
|
||||||
|
%license LICENSE
|
||||||
%{_bindir}/cpuinfo
|
%{_bindir}/cpuinfo
|
||||||
%{python2_sitelib}/%{module_name}/
|
%{python2_sitelib}/%{srcname}/
|
||||||
%{python2_sitelib}/py_%{module_name}-%{version}-py2.*.egg-info
|
%{python2_sitelib}/py_%{srcname}-%{version}-py2.*.egg-info
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%files -n python3-%{srcname}
|
||||||
%files -n python3-%{module_name}
|
%doc README.rst ChangeLog
|
||||||
%doc README.rst LICENSE ChangeLog
|
%license LICENSE
|
||||||
%{_bindir}/cpuinfo-3
|
%{_bindir}/cpuinfo-3
|
||||||
%{python3_sitelib}/%{module_name}/
|
%{python3_sitelib}/%{srcname}/
|
||||||
%{python3_sitelib}/py_%{module_name}-%{version}-py3.*.egg-info
|
%{python3_sitelib}/py_%{srcname}-%{version}-py3.*.egg-info
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Feb 25 2016 Parag Nemade <pnemade AT redhat DOT com> - 0.2.3-1
|
* Sat Apr 23 2016 Parag Nemade <pnemade AT redhat DOT com> - 0.2.3-1
|
||||||
- Update to 0.1.8 release (rh#1311530)
|
- Update to 0.2.3 release (rh#1311530)
|
||||||
|
- Added %%license tag
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-2
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user