ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/py2-memcached.spec
Revision: 1.6
Committed: Mon May 23 15:59:45 2011 UTC (13 years, 11 months ago) by lat
Branch: MAIN
CVS Tags: TW20110627a, TW20110623b, TW20110623a, HG1106e, builder_2011-06-17_14-52-14_cmsweb, builder_2011-06-16_19-08-24_wmagent, builder_2011-06-16_16-09-02_wmagent, builder_2011-06-15_16-54-18_wmagent, builder_2011-06-10_23-58-54_cmsweb, HG1106d, builder_2011-06-07_22-07-15_reqmgr, builder_2011-05-31_01-23-03_cmsweb, builder_2011-05-31_00-51-28_cmsweb, HG1106c, TW20110530a, TW20110527b, TW20110527a, TW20110525a, TW20110524b, TW20110524a, builder_2011-05-24_10-10-21_cmsweb, HG1106b
Changes since 1.5: +0 -2 lines
Log Message:
Remove post-install changes to .py files as it prevents python from using
byte compile .pyc files. Update only strictly minimal set of files, which
are normally scripts in 'bin' directory - and which don't have .pyc files.

File Contents

# User Rev Content
1 valya 1.1 ### RPM external py2-memcached 1.43
2     ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
3    
4     Source: ftp://ftp.tummy.com/pub/python-memcached/old-releases/python-memcached-%realversion.tar.gz
5 valya 1.3
6 diego 1.5 Requires: python memcached py2-setuptools
7 valya 1.3
8     %prep
9 valya 1.1 %setup -n python-memcached-%realversion
10 valya 1.3
11 valya 1.1 %build
12 diego 1.5 python setup.py build
13 valya 1.3
14 valya 1.1 %install
15 diego 1.5 python setup.py install --prefix=%i --single-version-externally-managed --record=/dev/null
16     find %i -name '*.egg-info' -exec rm {} \;
17 valya 1.1
18 diego 1.5 # Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment.
19 valya 1.4 mkdir -p %i/etc/profile.d
20 diego 1.5 : > %i/etc/profile.d/dependencies-setup.sh
21     : > %i/etc/profile.d/dependencies-setup.csh
22     for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do
23     root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root
24     if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then
25     echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
26     echo "test X\$$root != X || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
27     fi
28 valya 1.4 done
29    
30     %post
31 diego 1.5 %{relocateConfig}etc/profile.d/dependencies-setup.*sh