ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/python.spec
(Generate patch)

Comparing COMP/CMSDIST/python.spec (file contents):
Revision 1.5 by eulisse, Mon Apr 24 22:22:12 2006 UTC vs.
Revision 1.22 by ratnik, Wed Apr 18 23:46:02 2007 UTC

# Line 1 | Line 1
1 < ### RPM external python 2.4.2
1 > ### RPM external python 2.4.3
2 > Requires: gcc-wrapper
3   ## INITENV +PATH PATH %i/bin
4   ## INITENV +PATH LD_LIBRARY_PATH %i/lib
5   # OS X patches and build fudging stolen from fink
6 < Requires: zlib expat openssl bz2lib
7 < # FIXME: readline, ncurses, crypt, various [ng]dbm, db-*, db[1-3],
6 > Requires: zlib expat openssl bz2lib db4 gdbm openssl
7 > # FIXME: readline, crypt
8   # FIXME: gmp, panel, tk/tcl, x11
9  
10   Source0: http://www.python.org/ftp/%n/%v/Python-%v.tgz
11 < #Patch0: python-osx
11 > Patch0: python-Include-pyport.h
12 > Patch1: python-Lib-plat-mac-applesingle.py
13 > Patch2: python-Lib-site.py
14 > Patch3: python-Mac-OSX-Makefile
15 > Patch4: python-Makefile.pre.in
16 > Patch5: python-configure
17 > Patch6: python-setup.py
18 >
19  
20   %prep
21   %setup -n Python-%v
22 + #%patch0
23 + #%patch1
24 + #%patch2
25 + #%patch3
26 + #%patch4
27 + #%patch5
28 + #%patch6
29   perl -p -i -e "s|#!.*/usr/local/bin/python|#!/usr/bin/env python|" Lib/cgi.py
30  
31   %ifos darwin
# Line 18 | Line 33 | perl -p -i -e "s|#!.*/usr/local/bin/pyth
33   %endif
34  
35   %build
36 + ## IMPORT gcc-wrapper
37   # Python is awkward about passing other include or library directories
38   # to it.  Basically there is no way to pass anything from configure to
39   # make, or down to python itself.  To get python detect the extensions
# Line 30 | Line 46 | perl -p -i -e "s|#!.*/usr/local/bin/pyth
46   # linked specifically, or could be built by ourselves, depending on
47   # whether we like to pick up system libraries or want total control.
48   mkdir -p %i/include %i/lib
49 < dirs="$ZLIB_ROOT $EXPAT_ROOT $OPENSSL_ROOT $BZ2LIB_ROOT"
49 > dirs="$ZLIB_ROOT $EXPAT_ROOT $OPENSSL_ROOT $BZ2LIB_ROOT $NCURSES_ROOT $DB4_ROOT $GDBM_ROOT"
50 > echo $dirs
51   for d in $dirs; do
52    for f in $d/include/*; do
53      [ -f $f ] || continue
# Line 44 | Line 61 | for d in $dirs; do
61    done
62   done
63  
64 < ./configure --prefix=%i --enable-shared --without-tk --disable-tk --without-readline
64 > ./configure --prefix=%i --enable-shared --without-tkinter --disable-tkinter --without-readline
65   make %makeprocesses
66  
67   %install
68   make install
69 < if [ $(uname) = Darwin ]; then
69 > %define pythonv %(echo %v | cut -d. -f 1,2)
70 >
71 > #if [ $(uname) = Darwin ]; then
72    # make install prefix=%i
73    # (cd Misc; /bin/rm -rf RPM)
74    # mkdir -p %i/share/doc/%n
75    # cp -R Demo Doc %i/share/doc/%n
76 <  # cp -R Misc Tools %i/lib/python2.3
77 <  cc -dynamiclib -all_load -single_module \
78 <    -framework System -framework CoreServices -framework Foundation \
79 <    %i/lib/python2.3/config/libpython2.3.a \
80 <    -o %i/lib/python2.3/config/libpython2.3.dylib \
81 <    -install_name %i/lib/python2.3/config/libpython2.3.dylib \
82 <    -current_version 2.3 -compatibility_version 2.3 -ldl
83 <  ln -s libpython2.3.dylib %i/lib/python2.3/config/libpython23.dylib # for boost
84 <  # (cd %i/lib/python2.3/config; mv Makefile Makefile.orig;
76 >  # cp -R Misc Tools %i/lib/python%{pythonv}
77 > #  gcc -dynamiclib -all_load -single_module \
78 > #    -framework System -framework CoreServices -framework Foundation \
79 > #    %i/lib/python%{pythonv}/config/libpython%{pythonv}.a \
80 > #    -undefined dynamic_lookup \
81 > #    -o %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \
82 > #    -install_name %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \
83 > #    -current_version %{pythonv} -compatibility_version %{pythonv} -ldl
84 > #  ln -s libpython%{pythonv}.dylib %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib # for boost
85 >  # (cd %i/lib/python%{pythonv}/config; mv Makefile Makefile.orig;
86    #  sed 's|-fno-common||g' < Makefile.orig > Makefile; /bin/rm -f Makefile.orig)
87 < fi
87 > #fi
88 >
89 > perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/idle \
90 >                    %{i}/bin/pydoc \
91 >                    %{i}/bin/smtpd.py \
92 >                    %{i}/lib/python2.4/bsddb/dbshelve.py \
93 >                    %{i}/lib/python2.4/test/test_bz2.py \
94 >                    %{i}/lib/python2.4/test/test_largefile.py \
95 >                    %{i}/lib/python2.4/test/test_optparse.py
96 > # boost.spec rfio.spec
97 > #
98 > #
99 > rm  `find %{i}/lib -maxdepth 1 -mindepth 1 ! -name '*python*'`
100 > rm  `find %{i}/include -maxdepth 1 -mindepth 1 ! -name '*python*'`
101 > %post
102 > find $RPM_INSTALL_PREFIX/%pkgrel/lib -type l | xargs ls -la | sed -e "s|.*[ ]\(/.*\) -> \(.*\)| \2 \1|;s|[ ]/[^ ]*/external| $RPM_INSTALL_PREFIX/%cmsplatf/external|g" | xargs -n2 ln -sf

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines