[python-plumbum/el6] Modified to meet EL5/EL6 requirements

Lorenzo Dalrio lorenzodalrio at fedoraproject.org
Tue Mar 5 09:54:33 UTC 2013


commit 712692ab0bcd81964adcd685203ff0ac313e220a
Author: Lorenzo Dalrio <lorenzo.dalrio at gmail.com>
Date:   Tue Mar 5 09:12:28 2013 +0100

    Modified to meet EL5/EL6 requirements

 python-plumbum.spec |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/python-plumbum.spec b/python-plumbum.spec
index fb278b2..c849610 100644
--- a/python-plumbum.spec
+++ b/python-plumbum.spec
@@ -1,17 +1,26 @@
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+
 %global pypi_name plumbum
+
+%if 0%{?fedora} > 12 || 0%{?rhel} > 7
 %global with_python3 1
+%global __python3 python3
+%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%endif
 
 Name:           python-%{pypi_name}
 Version:        1.1.0
 Release:        2%{?dist}
 Summary:        Shell combinators library
 
+Group:          Development/Languages
 License:        MIT
 URL:            https://github.com/tomerfiliba/plumbum
 Source0:        http://pypi.python.org/packages/source/p/plumbum/plumbum-%{version}.tar.gz
 # https://github.com/tomerfiliba/plumbum/pull/55
 Patch0:         plumbum-1.1.0-fix-print-for-p3.patch
 Patch1:         plumbum-1.1.0-add-__path__-to-LocalModule.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
 BuildRequires:  python-devel
@@ -75,14 +84,18 @@ popd
 
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
 
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %files
+%defattr(-,root,root,-)
 %doc LICENSE README.rst
 %{python_sitelib}/%{pypi_name}
 %{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
 
 %if 0%{?with_python3}
 %files -n python3-%{pypi_name}
+%defattr(-,root,root,-)
 %doc LICENSE README.rst
 %{python3_sitelib}/%{pypi_name}
 %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
@@ -90,6 +103,9 @@ popd
 
 
 %changelog
+* Mon Mar 04 2013 Lorenzo Dalrio <lorenzo.dalrio at gmail.com> - 1.1.0-3
+- Modified to make it build on EL5 and EL6.
+
 * Fri Feb 08 2013 Bohuslav Kabrda <bkabrda at redhat.com> - 1.1.0-2
 - Patch the Python 3.3 module subclass error.
 


More information about the scm-commits mailing list