ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/python-ldap.spec
Revision: 1.12
Committed: Fri Mar 29 10:14:16 2013 UTC (12 years, 1 month ago) by davidlt
Branch: MAIN
CVS Tags: eulisse_20130330_1130-62X-armv7hl-dev, davidlt_20130330_1130-62X-armv7hl-dev, davidlt_arm_6, davidlt_arm_5, davidlt_arm_4, davidlt_arm_3, davidlt_arm_2, davidlt_arm_1, HEAD
Changes since 1.11: +13 -5 lines
Log Message:
On Fedora make sure site-packages directory is already created before installing.

File Contents

# Content
1 ### RPM external python-ldap 2.4.10
2 ## INITENV +PATH PYTHONPATH %{i}/${PYTHON_LIB_SITE_PACKAGES}
3
4 Source: http://pypi.python.org/packages/source/p/%{n}/%{n}-%{realversion}.tar.gz
5 Requires: python openssl openldap
6
7 %define isfc %(case %{cmsplatf} in (fc*) echo 1 ;; (*) echo 0 ;; esac)
8
9 %prep
10 %setup -q -n %{n}-%{realversion}
11
12 %build
13 sed -i'' "s:\(library_dirs =\)\(.*\):\1 ${OPENSSL_ROOT}\/lib ${PYTHON_ROOT}\/lib ${OPENLDAP_ROOT}\/lib:g" setup.cfg
14 sed -i'' "s:\(include_dirs =\)\(.*\):\1 ${OPENSSL_ROOT}\/include ${PYTHON_ROOT}\/include ${OPENLDAP_ROOT}\/include:g" setup.cfg
15 sed -i'' "s:\(defines = \)\(.*\):\1 HAVE_TLS HAVE_LIBLDAP_R:g" setup.cfg
16
17 python setup.py build
18
19 %install
20
21 %if %isfc
22 mkdir -p %{i}/${PYTHON_LIB_SITE_PACKAGES}
23 export PYTHONPATH=%{i}/${PYTHON_LIB_SITE_PACKAGES}:${PYTHONPATH}
24 %endif
25
26 python setup.py install --skip-build --prefix=%{i}