Update psycopg2 to 2.0.13/postgresql 8.4.2

This commit is contained in:
Nate Coraor
2010-03-09 14:13:05 -05:00
parent 994f2acdea
commit b10c2324f5
6 changed files with 92 additions and 4 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ py2.6-linux-x86_64-ucs4 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linu
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
+3 -3
View File
@@ -17,7 +17,7 @@ Cheetah = 2.2.2
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 @@ boto = 1.8d
; 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 @@ pysam = _kanwei_90e03180969d
; 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
@@ -20,6 +20,7 @@ def prep_postgres( prepped, args ):
"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)" )
@@ -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() )
@@ -23,6 +23,7 @@ def prep_postgres( prepped, args ):
"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)" )
+1
View File
@@ -20,6 +20,7 @@ def prep_postgres( prepped, args ):
"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)" )