Changeset 1132:59232d37161b
- Timestamp:
- 03/28/08 17:22:10
(9 months ago)
- Author:
- Nate Coraor <nate@bx.psu.edu>
- branch:
- default
- convert_revision:
- svn:9bcadc22-80f8-0310-8a53-c8f022958886/galaxy/trunk@2491
- Message:
pbs_python egg changed from static to dynamic for the reasons explained
here:
http://g2.trac.bx.psu.edu/wiki/ClusteringGalaxy#Anoteonlibtorque
Also includes a rather ridiculous fix for compiling a fat dynamic
libtorque on OS X due to some autoconf/libtool weirdness.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1125 |
r1132 |
|
| 47 | 47 | psycopg2 = _8.2.6_static |
|---|
| 48 | 48 | pysqlite = _3.5.4_static |
|---|
| 49 | | pbs_python = _2.1.8_static |
|---|
| | 49 | pbs_python = _2.1.8 |
|---|
| 50 | 50 | MySQL_python = _5.0.51a_static |
|---|
| 51 | 51 | python_lzo = _static |
|---|
| r1125 |
r1132 |
|
| 76 | 76 | fn = ( orig_fn.split( os.path.sep, 1 ) )[1] |
|---|
| 77 | 77 | abs_fn = os.path.join( dir, fn ) |
|---|
| | 78 | # could break things |
|---|
| | 79 | if "ez_setup" in abs_fn: |
|---|
| | 80 | continue |
|---|
| 78 | 81 | if not os.access( os.path.dirname( abs_fn ), os.F_OK ): |
|---|
| 79 | 82 | os.makedirs( os.path.dirname( abs_fn ) ) |
|---|
| 80 | | if os.path.basename( abs_fn ) == "ez_setup.py": |
|---|
| 81 | | continue |
|---|
| 82 | 83 | otf = open( abs_fn, "wb" ) |
|---|
| 83 | 84 | otf.write( z.read( orig_fn ) ) |
|---|
| … | … | |
| 93 | 94 | if fn == "": |
|---|
| 94 | 95 | continue |
|---|
| 95 | | if os.path.basename( abs_fn ) == "ez_setup.py": |
|---|
| | 96 | # could break things |
|---|
| | 97 | if "ez_setup" in abs_fn: |
|---|
| 96 | 98 | continue |
|---|
| 97 | 99 | if fn.endswith( os.path.sep ): |
|---|
| r1125 |
r1132 |
|
| 66 | 66 | # install |
|---|
| 67 | 67 | print "build_torque(): Installing Torque (make install_lib)" |
|---|
| 68 | | p = subprocess.Popen( args = "make install_lib", shell = True, cwd = os.path.join( os.getcwd(), "torque-%s" %TORQUE_VERSION) ) |
|---|
| | 68 | p = subprocess.Popen( args = "make DESTDIR=%s/torque install_lib" %os.getcwd(), shell = True, cwd = os.path.join( os.getcwd(), "torque-%s" %TORQUE_VERSION) ) |
|---|
| 69 | 69 | r = p.wait() |
|---|
| 70 | 70 | if r != 0: |
|---|
| … | … | |
| 104 | 104 | TORQUE_BINARY_ARCHIVE = os.path.abspath( os.path.join( "..", "..", "..", "archives", "torque-%s-%s.tar.bz2" %( TORQUE_VERSION, pkg_resources.get_platform() ) ) ) |
|---|
| 105 | 105 | TORQUE_URL = "http://www.clusterresources.com/downloads/torque/torque-%s.tar.gz" %TORQUE_VERSION |
|---|
| 106 | | # there's no need to have a completely separate build script for this |
|---|
| 107 | | if pkg_resources.get_platform() == "macosx-10.3-fat": |
|---|
| 108 | | CONFIGURE = "CFLAGS='-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc' " |
|---|
| 109 | | CONFIGURE += "LDFLAGS='-arch i386 -arch ppc' " |
|---|
| 110 | | CONFIGURE += "LD='gcc -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -nostartfiles -arch i386 -arch ppc' " |
|---|
| 111 | | CONFIGURE += "./configure --prefix=%s/torque --disable-shared --disable-dependency-tracking --without-tcl --without-tk" %os.getcwd() |
|---|
| 112 | | else: |
|---|
| 113 | | CONFIGURE = "CFLAGS='-fPIC' ./configure --prefix=%s/torque --disable-shared --without-tcl --without-tk" %os.getcwd() |
|---|
| | 106 | CONFIGURE = "CFLAGS='-fPIC' ./configure --prefix=/usr/local --without-tcl --without-tk" |
|---|
| 114 | 107 | |
|---|
| 115 | 108 | # clean, in case you're running this by hand from a dirty module source dir |
|---|
| … | … | |
| 123 | 116 | |
|---|
| 124 | 117 | print "scramble_it(): Running pbs_python configure script" |
|---|
| 125 | | p = subprocess.Popen( args = "sh configure --with-pbsdir=torque/lib", shell = True ) |
|---|
| | 118 | p = subprocess.Popen( args = "sh configure --with-pbsdir=torque/usr/local/lib", shell = True ) |
|---|
| 126 | 119 | r = p.wait() |
|---|
| 127 | 120 | if r != 0: |
|---|
| … | … | |
| 142 | 135 | i.close() |
|---|
| 143 | 136 | o.close() |
|---|
| 144 | | # need to change this to an extern declaration |
|---|
| 145 | | file = os.path.join( "src", "log.h" ) |
|---|
| 146 | | print "build_torque(): Patching", file |
|---|
| 147 | | if not os.access( "%s.orig" %file, os.F_OK ): |
|---|
| 148 | | shutil.copyfile( file, "%s.orig" %file ) |
|---|
| 149 | | i = open( "%s.orig" %file, "r" ) |
|---|
| 150 | | o = open( file, "w" ) |
|---|
| 151 | | for line in i.readlines(): |
|---|
| 152 | | if line == 'char *msg_daemonname = "pbs_python";\n': |
|---|
| 153 | | line = 'extern char *msg_daemonname;\n' |
|---|
| 154 | | print >>o, line, |
|---|
| 155 | | i.close() |
|---|
| 156 | | o.close() |
|---|
| 157 | 137 | |
|---|
| 158 | 138 | # tag |
|---|