[hg] galaxy 2363: Fixes for native Leopard Python eggs
details: http://www.bx.psu.edu/hg/galaxy/rev/feb4f5dab9cf changeset: 2363:feb4f5dab9cf user: Nate Coraor <nate@bx.psu.edu> date: Wed Apr 22 14:43:54 2009 -0400 description: Fixes for native Leopard Python eggs 3 file(s) affected in this change: dist-eggs.ini eggs.ini scripts/scramble/scripts/MySQL_python.py diffs (96 lines): diff -r 8c93a7c02c27 -r feb4f5dab9cf dist-eggs.ini --- a/dist-eggs.ini Wed Apr 22 12:36:17 2009 -0400 +++ b/dist-eggs.ini Wed Apr 22 14:43:54 2009 -0400 @@ -17,6 +17,7 @@ py2.5-linux-x86_64-ucs4 = herbie.bx.psu.edu /depot/projects/pythons/linux-x86_64-ucs4/bin/python2.5 py2.4-macosx-10.3-fat-ucs2 = medeski.bx.psu.edu /usr/local/bin/python2.4 py2.5-macosx-10.3-fat-ucs2 = medeski.bx.psu.edu /usr/local/bin/python2.5 +py2.5-macosx-10.5-i386-ucs2 = lion.bx.psu.edu /usr/bin/python2.5 py2.4-solaris-2.11-i86pc-ucs2 = victory.bx.psu.edu /depot/projects/pythons/solaris-2.11-i86pc-ucs2/bin/python2.4 py2.5-solaris-2.11-i86pc-ucs2 = victory.bx.psu.edu /depot/projects/pythons/solaris-2.11-i86pc-ucs2/bin/python2.5 py2.4-solaris-2.10-sun4u-ucs2 = v880.bx.psu.edu /depot/projects/pythons/solaris-2.10-sun4u-ucs2/bin/python2.4 @@ -27,7 +28,7 @@ py2.5-linux = py2.5-linux-i686-ucs2 py2.5-linux-i686-ucs4 py2.5-linux-x86_64-ucs2 py2.5-linux-x86_64-ucs4 linux = py2.4-linux py2.5-linux py2.4-macosx = py2.4-macosx-10.3-fat-ucs2 -py2.5-macosx = py2.5-macosx-10.3-fat-ucs2 +py2.5-macosx = py2.5-macosx-10.3-fat-ucs2 py2.5-macosx-10.5-i386-ucs2 macosx = py2.4-macosx py2.5-macosx py2.4-solaris = py2.4-solaris-2.11-i86pc-ucs2 py2.4-solaris-2.10-sun4u-ucs2 py2.5-solaris = py2.5-solaris-2.11-i86pc-ucs2 py2.5-solaris-2.10-sun4u-ucs2 diff -r 8c93a7c02c27 -r feb4f5dab9cf eggs.ini --- a/eggs.ini Wed Apr 22 12:36:17 2009 -0400 +++ b/eggs.ini Wed Apr 22 14:43:54 2009 -0400 @@ -70,7 +70,7 @@ DRMAA_python = http://gridengine.sunsource.net/files/documents/7/36/DRMAA-python-0.2.tar.gz MySQL_python = http://superb-west.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-... http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz pbs_python = http://ftp.sara.nl/pub/outgoing/pbs_python-2.9.4.tar.gz -psycopg2 = http://initd.org/pub/software/psycopg/PSYCOPG-2-0/psycopg2-2.0.6.tar.gz http://ftp8.us.postgresql.org/postgresql/source/v8.2.6/postgresql-8.2.6.tar.... +psycopg2 = http://initd.org/pub/software/psycopg/PSYCOPG-2-0/psycopg2-2.0.6.tar.gz ftp://ftp-archives.postgresql.org/pub/source/v8.2.6/postgresql-8.2.6.tar.bz2 pycrypto = http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz pysqlite = http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/pysqlite-2.3.5.tar... http://www.sqlite.org/sqlite-source-3_5_4.zip python_lzo = http://www.oberhumer.com/opensource/lzo/download/LZO-v1/python-lzo-1.08.tar.... http://www.oberhumer.com/opensource/lzo/download/LZO-v1/lzo-1.08.tar.gz diff -r 8c93a7c02c27 -r feb4f5dab9cf scripts/scramble/scripts/MySQL_python.py --- a/scripts/scramble/scripts/MySQL_python.py Wed Apr 22 12:36:17 2009 -0400 +++ b/scripts/scramble/scripts/MySQL_python.py Wed Apr 22 14:43:54 2009 -0400 @@ -43,7 +43,7 @@ print "build_mysql(): Installing mysql (make install) failed" sys.exit( 1 ) # pack - print "build_mysql(): Creating binary mysql archive for future builds of psycopg2" + print "build_mysql(): Creating binary mysql archive for future builds of MySQL_python" t = tarfile.open( MYSQL_BINARY_ARCHIVE, "w:bz2" ) t.add( "mysql/bin/mysql_config" ) t.add( "mysql/include" ) @@ -57,14 +57,10 @@ # find setuptools scramble_lib = os.path.join( "..", "..", "..", "lib" ) sys.path.append( scramble_lib ) -try: - from setuptools import * - import pkg_resources -except: - from ez_setup import use_setuptools - use_setuptools( download_delay=8, to_dir=scramble_lib ) - from setuptools import * - import pkg_resources +from ez_setup import use_setuptools +use_setuptools( download_delay=8, to_dir=scramble_lib ) +from setuptools import * +import pkg_resources # get the tag if os.access( ".galaxy_tag", os.F_OK ): @@ -100,7 +96,7 @@ # patch file = "site.cfg" -print "scramble_it(): Patching", file +print "scramble(): Patching", file if not os.access( "%s.orig" %file, os.F_OK ): shutil.copyfile( file, "%s.orig" %file ) i = open( "%s.orig" %file, "r" ) @@ -112,6 +108,23 @@ i.close() o.close() +if pkg_resources.get_platform() == 'macosx-10.5-i386': + file = "_mysql.c" + print "scramble(): Patching", file + if not os.access( "%s.orig" %file, os.F_OK ): + shutil.copyfile( file, "%s.orig" %file ) + i = open( "%s.orig" %file, "r" ) + o = open( file, "w" ) + for line in i: + if line == '#ifndef uint\n': + # skip 3 lines + i.next() + i.next() + line = i.next() + print >>o, line, + i.close() + o.close() + # tag me = sys.argv[0] sys.argv = [ me ]
participants (1)
-
Nate Coraor