From: <gha...@us...> - 2006-06-02 13:47:36
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25909 Modified Files: setup.py Log Message: Use pg_config on *all* platforms, not just win32. Index: setup.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/setup.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** setup.py 1 Jun 2006 14:38:18 -0000 1.26 --- setup.py 2 Jun 2006 13:47:25 -0000 1.27 *************** *** 45,48 **** --- 45,49 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 02JUN2006 gh Use pg_config on all platforms. | # 01JUN2006 gh Removed RPM-specific hack. Use pg_config on win32. | # 26SEP2005 gh Changed win32 build process to use MSVC.NET (needed | *************** *** 89,95 **** def main(): - # Set this to 1 if you need to use your own settings - USE_CUSTOM = 0 - # Default settings, may be overriden for specific platforms pypgsql_rt_dirs = None --- 90,93 ---- *************** *** 105,153 **** "port/strtok.c"] ! if USE_CUSTOM: ! include_dirs = YOUR_LIST_HERE ! library_dirs = YOUR_LIST_HERE ! elif sys.platform == "linux2": ! include_dirs = ["/usr/include", "/usr/local/pgsql/include", "/usr/include/postgresql"] ! library_dirs = ["/usr/lib"] ! elif sys.platform[:8] == "unixware": ! LOCALBASE = os.environ.get('LOCALBASE', '/usr/local/pgsql') ! include_dirs = ['%s/include' % LOCALBASE] ! library_dirs = ['%s/lib' % LOCALBASE] ! pypgsql_rt_dirs = library_dirs ! elif sys.platform[:8] == "openunix": ! LOCALBASE = os.environ.get('LOCALBASE', '/usr/local/pgsql') ! include_dirs = ['%s/include' % LOCALBASE] ! library_dirs = ['%s/lib' % LOCALBASE] ! pypgsql_rt_dirs = library_dirs ! elif sys.platform == "freebsd4": ! LOCALBASE = os.environ.get('LOCALBASE', '/usr/local') ! include_dirs = ['%s/include' % LOCALBASE] ! library_dirs = ['%s/lib' % LOCALBASE] ! elif sys.platform == "openbsd3": ! LOCALBASE = os.environ.get('LOCALBASE', '/usr/local') ! include_dirs = ['%s/include/postgresql' % LOCALBASE] ! library_dirs = ['%s/lib' % LOCALBASE] ! elif sys.platform == "netbsd1": ! LOCALBASE = os.environ.get('LOCALBASE', '/usr/pkg') ! include_dirs = ['%s/include/pgsql' % LOCALBASE] ! library_dirs = ['%s/lib' % LOCALBASE] ! elif sys.platform == "cygwin": ! include_dirs = ["/usr/include/postgresql"] ! library_dirs = ["/usr/lib"] ! elif sys.platform == "darwin": # Mac OS X ! include_dirs = ["/usr/local/pgsql/include"] ! library_dirs = ["/usr/local/pgsql/lib"] optional_libs += ["ssl", "crypto"] elif sys.platform == "win32": ! include_dirs = [os.popen("pg_config --includedir").read().strip()] ! library_dirs = [os.popen("pg_config --libdir").read().strip() + "/ms"] ! #optional_libs += ["wsock32", "advapi32"] ! optional_libs = ["libpq", "wsock32", "advapi32"] # , "shfolder"] modname="pyPgSQL.libpq.libpq" - else: - # Assume a Unixish system - include_dirs = ["/usr/local/include", "/usr/local/pgsql/include"] - library_dirs = ["/usr/local/lib", "/usr/local/pgsql/lib"] # patch distutils if it can't cope with the "classifiers" keyword --- 103,115 ---- "port/strtok.c"] ! include_dirs = [os.popen("pg_config --includedir").read().strip()] ! library_dirs = [os.popen("pg_config --libdir").read().strip()] ! ! if sys.platform == "darwin": # Mac OS X optional_libs += ["ssl", "crypto"] elif sys.platform == "win32": ! library_dirs[0] = library_dirs[0] + "/ms" ! optional_libs = ["libpq", "wsock32", "advapi32"] modname="pyPgSQL.libpq.libpq" # patch distutils if it can't cope with the "classifiers" keyword |