details: http://www.bx.psu.edu/hg/galaxy/rev/a719c6971613 changeset: 3497:a719c6971613 user: Nate Coraor nate@bx.psu.edu date: Tue Mar 09 14:13:05 2010 -0500 description: Update psycopg2 to 2.0.13/postgresql 8.4.2
diffstat:
dist-eggs.ini | 2 +- eggs.ini | 6 +- scripts/scramble/scripts/psycopg2-linux.py | 1 + scripts/scramble/scripts/psycopg2-macosx.py | 85 ++++++++++++++++++++++++++++ scripts/scramble/scripts/psycopg2-solaris.py | 1 + scripts/scramble/scripts/psycopg2.py | 1 + 6 files changed, 92 insertions(+), 4 deletions(-)
diffs (162 lines):
diff -r 5f7ace3195b7 -r a719c6971613 dist-eggs.ini --- a/dist-eggs.ini Tue Mar 09 13:54:30 2010 -0500 +++ b/dist-eggs.ini Tue Mar 09 14:13:05 2010 -0500 @@ -22,7 +22,7 @@ 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.6-macosx-10.3-fat-ucs2 = medeski.bx.psu.edu /usr/local/bin/python2.6 -py2.6-macosx-10.6-universal-ucs2 = lion.bx.psu.edu /usr/bin/python2.6 +py2.6-macosx-10.6-universal-ucs2 = bach.bx.psu.edu /usr/bin/python2.6 py2.4-solaris-2.10-i86pc_32-ucs2 = thumper.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-i86pc_32-ucs2/bin/python2.4 py2.5-solaris-2.10-i86pc_32-ucs2 = thumper.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-i86pc_32-ucs2/bin/python2.5 py2.6-solaris-2.10-i86pc_32-ucs2 = thumper.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-i86pc_32-ucs2/bin/python2.6 diff -r 5f7ace3195b7 -r a719c6971613 eggs.ini --- a/eggs.ini Tue Mar 09 13:54:30 2010 -0500 +++ b/eggs.ini Tue Mar 09 14:13:05 2010 -0500 @@ -17,7 +17,7 @@ DRMAA_python = 0.2 MySQL_python = 1.2.3c1 pbs_python = 2.9.4 -psycopg2 = 2.0.6 +psycopg2 = 2.0.13 pycrypto = 2.0.1 pysam = 0.1.1 pysqlite = 2.5.6 @@ -56,7 +56,7 @@
; extra version information [tags] -psycopg2 = _8.2.6_static +psycopg2 = _8.4.2_static pysqlite = _3.6.17_static MySQL_python = _5.1.41_static bx_python = _dev_3b9d30e47619 @@ -68,5 +68,5 @@ ; the wiki page above [source] MySQL_python = mysql-5.1.41 -psycopg2 = postgresql-8.2.6 +psycopg2 = postgresql-8.4.2 pysqlite = sqlite-amalgamation-3_6_17 diff -r 5f7ace3195b7 -r a719c6971613 scripts/scramble/scripts/psycopg2-linux.py --- a/scripts/scramble/scripts/psycopg2-linux.py Tue Mar 09 13:54:30 2010 -0500 +++ b/scripts/scramble/scripts/psycopg2-linux.py Tue Mar 09 14:13:05 2010 -0500 @@ -20,6 +20,7 @@ "Configuring postgres (./configure)" )
# compile + run( "make ../../src/include/utils/fmgroids.h", os.path.join( pg_srcdir, 'src', 'backend' ), "Compiling fmgroids.h (cd src/backend; make ../../src/include/utils/fmgroids.h)" ) run( "make", os.path.join( pg_srcdir, 'src', 'interfaces', 'libpq' ), "Compiling libpq (cd src/interfaces/libpq; make)" ) run( "make", os.path.join( pg_srcdir, 'src', 'bin', 'pg_config' ), "Compiling pg_config (cd src/bin/pg_config; make)" )
diff -r 5f7ace3195b7 -r a719c6971613 scripts/scramble/scripts/psycopg2-macosx.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/scramble/scripts/psycopg2-macosx.py Tue Mar 09 14:13:05 2010 -0500 @@ -0,0 +1,85 @@ +import os, sys, shutil +from distutils.sysconfig import get_config_var + +def prep_postgres( prepped, args ): + + pg_version = args['version'] + pg_srcdir = os.path.join( os.getcwd(), "postgresql-%s" % pg_version ) + + # set up environment + os.environ['CC'] = get_config_var('CC') + os.environ['CFLAGS'] = get_config_var('CFLAGS') + os.environ['LDFLAGS'] = get_config_var('LDFLAGS') + + if '-fPIC' not in os.environ['CFLAGS']: + os.environ['CFLAGS'] += ' -fPIC' + + # run configure + run( "./configure --prefix=%s/postgres --disable-dependency-tracking --enable-static --disable-shared --without-readline --with-thread-safety" % os.getcwd(), + os.path.join( os.getcwd(), "postgresql-%s" % pg_version ), + "Configuring postgres (./configure)" ) + + # compile + run( "make ../../src/include/utils/fmgroids.h", os.path.join( pg_srcdir, 'src', 'backend' ), "Compiling fmgroids.h (cd src/backend; make ../../src/include/utils/fmgroids.h)" ) + run( "make all-static-lib", os.path.join( pg_srcdir, 'src', 'interfaces', 'libpq' ), "Compiling libpq (cd src/interfaces/libpq; make)" ) + run( "make", os.path.join( pg_srcdir, 'src', 'bin', 'pg_config' ), "Compiling pg_config (cd src/bin/pg_config; make)" ) + + # install + run( "make install-lib-static", os.path.join( pg_srcdir, 'src', 'interfaces', 'libpq' ), "Compiling libpq (cd src/interfaces/libpq; make install)" ) + run( "make install", os.path.join( pg_srcdir, 'src', 'bin', 'pg_config' ), "Compiling pg_config (cd src/bin/pg_config; make install)" ) + run( "make install", os.path.join( pg_srcdir, 'src', 'include' ), "Compiling pg_config (cd src/include; make install)" ) + + # manually install some headers + run( "cp libpq-fe.h %s" % os.path.join( os.getcwd(), 'postgres', 'include' ), os.path.join( pg_srcdir, 'src', 'interfaces', 'libpq' ), "Installing libpq-fe.h" ) + run( "cp libpq-events.h %s" % os.path.join( os.getcwd(), 'postgres', 'include' ), os.path.join( pg_srcdir, 'src', 'interfaces', 'libpq' ), "Installing libpq-fe.h" ) + run( "cp libpq-int.h %s" % os.path.join( os.getcwd(), 'postgres', 'include', 'internal' ), os.path.join( pg_srcdir, 'src', 'interfaces', 'libpq' ), "Installing libpq-fe.h" ) + run( "cp pqexpbuffer.h %s" % os.path.join( os.getcwd(), 'postgres', 'include', 'internal' ), os.path.join( pg_srcdir, 'src', 'interfaces', 'libpq' ), "Installing libpq-fe.h" ) + + # create prepped archive + print "%s(): Creating prepped archive for future builds at:" % sys._getframe().f_code.co_name + print " ", prepped + compress( prepped, + 'postgres/bin', + 'postgres/include', + 'postgres/lib' ) + +if __name__ == '__main__': + + # change back to the build dir + if os.path.dirname( sys.argv[0] ) != "": + os.chdir( os.path.dirname( sys.argv[0] ) ) + + # find setuptools + sys.path.append( os.path.abspath( os.path.join( '..', '..', '..', 'lib' ) ) ) + from scramble_lib import * + + tag = get_tag() + + pg_version = ( tag.split( "_" ) )[1] + pg_archive_base = os.path.join( archives, "postgresql-%s" % pg_version ) + pg_archive = get_archive( pg_archive_base ) + pg_archive_prepped = os.path.join( archives, "postgresql-%s-%s.tar.gz" % ( pg_version, platform_noucs ) ) + + # clean up any existing stuff (could happen if you run scramble.py by hand) + clean( [ 'postgresql-%s' % pg_version ] ) + + # unpack postgres + unpack_dep( pg_archive, pg_archive_prepped, prep_postgres, dict( version=pg_version ) ) + + # localize setup.cfg + if not os.path.exists( 'setup.cfg.orig' ): + shutil.copy( 'setup.cfg', 'setup.cfg.orig' ) + f = open( 'setup.cfg', 'a' ) + f.write( '\npg_config=postgres/bin/pg_config\n' ) + f.close() + + # tag + me = sys.argv[0] + sys.argv = [ me ] + if tag is not None: + sys.argv.append( "egg_info" ) + sys.argv.append( "--tag-build=%s" %tag ) + sys.argv.append( "bdist_egg" ) + + # go + execfile( "setup.py", globals(), locals() ) diff -r 5f7ace3195b7 -r a719c6971613 scripts/scramble/scripts/psycopg2-solaris.py --- a/scripts/scramble/scripts/psycopg2-solaris.py Tue Mar 09 13:54:30 2010 -0500 +++ b/scripts/scramble/scripts/psycopg2-solaris.py Tue Mar 09 14:13:05 2010 -0500 @@ -23,6 +23,7 @@ "Configuring postgres (./configure)" )
# compile + run( "gmake ../../src/include/utils/fmgroids.h", os.path.join( pg_srcdir, 'src', 'backend' ), "Compiling fmgroids.h (cd src/backend; gmake ../../src/include/utils/fmgroids.h)" ) run( "gmake", os.path.join( pg_srcdir, 'src', 'interfaces', 'libpq' ), "Compiling libpq (cd src/interfaces/libpq; gmake)" ) run( "gmake", os.path.join( pg_srcdir, 'src', 'bin', 'pg_config' ), "Compiling pg_config (cd src/bin/pg_config; gmake)" )
diff -r 5f7ace3195b7 -r a719c6971613 scripts/scramble/scripts/psycopg2.py --- a/scripts/scramble/scripts/psycopg2.py Tue Mar 09 13:54:30 2010 -0500 +++ b/scripts/scramble/scripts/psycopg2.py Tue Mar 09 14:13:05 2010 -0500 @@ -20,6 +20,7 @@ "Configuring postgres (./configure)" )
# compile + run( "make ../../src/include/utils/fmgroids.h", os.path.join( pg_srcdir, 'src', 'backend' ), "Compiling fmgroids.h (cd src/backend; make ../../src/include/utils/fmgroids.h)" ) run( "make", os.path.join( pg_srcdir, 'src', 'interfaces', 'libpq' ), "Compiling libpq (cd src/interfaces/libpq; make)" ) run( "make", os.path.join( pg_srcdir, 'src', 'bin', 'pg_config' ), "Compiling pg_config (cd src/bin/pg_config; make)" )