[python-cpuinfo] Resolves:rh#1178548, follow dnf way to use py3 binary

Parag Nemade pnemade at fedoraproject.org
Tue Feb 3 16:42:17 UTC 2015


commit dd4a5ac026162acc86f6d9792fd691e686a939c5
Author: Parag Nemade <pnemade at redhat.com>
Date:   Tue Feb 3 22:12:01 2015 +0530

    Resolves:rh#1178548, follow dnf way to use py3 binary

 python-cpuinfo.spec |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/python-cpuinfo.spec b/python-cpuinfo.spec
index 989d079..84a8405 100644
--- a/python-cpuinfo.spec
+++ b/python-cpuinfo.spec
@@ -3,7 +3,7 @@
 
 Name:           python-%{module_name}
 Version:        0.1.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Getting CPU info
 
 License:        MIT
@@ -74,6 +74,8 @@ popd
 %if 0%{?with_python3}
 pushd %{py3dir}
 %{__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
 
@@ -97,13 +99,16 @@ popd
 %if 0%{?with_python3}
 %files -n python3-%{module_name}
 %doc README.rst LICENSE ChangeLog
-%{_bindir}/cpuinfo
+%{_bindir}/cpuinfo-3
 %{python3_sitelib}/%{module_name}/
 %{python3_sitelib}/py_%{module_name}-%{version}-py3.*.egg-info
 %endif
 
 
 %changelog
+* Tue Feb 03 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.1.2-3
+- Resolves:rh#1178548, follow dnf way to use py3 binary
+
 * Fri Oct 03 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.1.2-2
 - Clean the spec to follow py3 guidelines
 


More information about the scm-commits mailing list