commit e66416133bcefb4fa9ca8a5287e625017750de8e
Author: Elan Ruusamäe <[email protected]>
Date:   Wed Jan 30 11:53:08 2013 +0200

    up to 2.4.10, enable tests

 python-ldap.spec | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)
---
diff --git a/python-ldap.spec b/python-ldap.spec
index 7e45828..321ca2b 100644
--- a/python-ldap.spec
+++ b/python-ldap.spec
@@ -1,7 +1,12 @@
+#
+# Conditional build:
+%bcond_without tests   # do not perform "make test"
+
+%define        module  ldap
 Summary:       LDAP Module for Python
 Summary(pl.UTF-8):     Moduł LDAP dla Pythona
-Name:          python-ldap
-Version:       2.4.9
+Name:          python-%{module}
+Version:       2.4.10
 Release:       1
 Epoch:         1
 License:       Public Domain
@@ -15,7 +20,7 @@ BuildRequires:        openldap-devel >= 2.4.6
 BuildRequires: python-devel >= 1:2.5
 BuildRequires: python-modules
 BuildRequires: rpm-pythonprov
-%pyrequires_eq python-modules
+Requires:      python-modules
 Provides:      ldapmodule
 Obsoletes:     ldapmodule
 Obsoletes:     python-ldapmodule
@@ -32,16 +37,21 @@ Moduł ten umożliwia dostęp do bibliotek LDAP.
 %patch0 -p1
 
 %build
-python setup.py build
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags}" \
+%{__python} setup.py build
+
+%{?with_tests:%{__python} setup.py test}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+#PYTHONPATH=$RPM_BUILD_ROOT%{py_sitedir}
+%{__python} setup.py install \
+       --skip-build \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
 
-PYTHONPATH=$RPM_BUILD_ROOT%{py_sitedir}
-export PYTHONPATH
-
-python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" | xargs rm
+%py_postclean
 
 %clean
 rm -rf $RPM_BUILD_ROOT
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-ldap.git/commitdiff/fec0f30948819a44d4ff37b5c581c04156ab6356

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to