Revision: | 1.23 |
Committed: | Mon Mar 12 11:35:09 2012 UTC (13 years, 1 month ago) by lat |
Branch: | MAIN |
CVS Tags: | TW20121025a, bld_1350485088_PHEDEX-lifecycle_slc5_amd64_gcc461, HG1207d, TW20120727a, TW20120726a, TW20120725a, TW20120724c, TW20120724b, TW20120724a, TW20120720a, TW20120719a, TW20120718a, HG1207c, TW20120704c, TW20120704b, TW20120704a, TW20120702c, TW20120702b, TW20120702a, TW20120621c, TW20120621a, TW20120620a, HG1207b, HG1207a, HG1206d, TW20120607a, TW20120606a, HG1206c, HG1206b, bld_1337784158_cmsweb-analytics_slc5_amd64_gcc461, bld_1337783687_cmsweb-analytics_slc5_amd64_gcc461, HG1206a, HG1205g, HG1205f, HG1205e, HG1205d, bld_1335521675_crabhb_slc5_amd64_gcc461, HG1205c, TW20120421b, TW20120421a, bld_1334854417_PHEDEX-combined-agents_slc5_amd64_gcc461, HG1205b, bld_1334681121_PHEDEX-combined-agents_slc5_amd64_gcc461, HG1205a, HG1204h, HG1204g, HG1204f, HG1204e, HG1204d, dieHG1204d, HG1204c, HG1204b |
Changes since 1.22: | +8 -4 lines |
Log Message: | Prevent matplotlib setup.py from using pkg-config and system paths so it doesn't pick up libz, libpng, libpython and freetype from system. |
# | User | Rev | Content |
---|---|---|---|
1 | elmer | 1.15 | ### RPM external py2-matplotlib 1.0.1 |
2 | lat | 1.18 | ## INITENV +PATH PYTHONPATH %i/$PYTHON_LIB_SITE_PACKAGES |
3 | elmer | 1.15 | Source: http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-%{realversion}/matplotlib-%{realversion}.tar.gz |
4 | lat | 1.22 | Requires: py2-pytz py2-numpy py2-python-dateutil zlib libpng freetype |
5 | elmer | 1.15 | |
6 | lat | 1.1 | %prep |
7 | elmer | 1.15 | %setup -n matplotlib-%{realversion} |
8 | lat | 1.23 | perl -p -i -e '/^import sys/ && print "for v in basedir.values(): v[:] = []\n"' setupext.py |
9 | eulisse | 1.16 | |
10 | diego | 1.14 | cat >> setup.cfg <<- EOF |
11 | [build_ext] | ||
12 | lat | 1.23 | include_dirs = $FREETYPE_ROOT/include/freetype2:$FREETYPE_ROOT/include:$LIBPNG_ROOT/include:$ZLIB_ROOT/include:/usr/X11R6/include:/usr/X11R6/include/freetype2 |
13 | library_dirs = $FREETYPE_ROOT/lib:$LIBPNG_ROOT/lib:$ZLIB_ROOT/lib:/usr/X11/lib | ||
14 | lat | 1.22 | |
15 | [gui_support] | ||
16 | gtk = False | ||
17 | gtkagg = False | ||
18 | tkagg = False | ||
19 | wxagg = False | ||
20 | macosx = False | ||
21 | diego | 1.14 | EOF |
22 | |||
23 | lat | 1.23 | mkdir no-pkg-config |
24 | (echo '#!/bin/sh'; echo 'exit 1') > no-pkg-config/pkg-config | ||
25 | chmod +x no-pkg-config/pkg-config | ||
26 | lat | 1.22 | |
27 | lat | 1.1 | %build |
28 | lat | 1.23 | PATH=$PWD/no-pkg-config:$PATH \ |
29 | elmer | 1.15 | python setup.py build |
30 | diego | 1.14 | |
31 | lat | 1.1 | %install |
32 | lat | 1.5 | python -c 'import numpy' |
33 | lat | 1.23 | PATH=$PWD/no-pkg-config:$PATH \ |
34 | lat | 1.1 | python setup.py install --prefix=%i |
35 | diego | 1.14 | find %i -name '*.egg-info' -exec rm {} \; |
36 | diego | 1.19 | |
37 | # No need for test files | ||
38 | rm -rf %i/$PYTHON_LIB_SITE_PACKAGES/matplotlib/tests |