diff options
| author | Federico Di Gregorio <fog@initd.org> | 2009-02-22 23:39:13 +0100 |
|---|---|---|
| committer | Federico Di Gregorio <fog@initd.org> | 2009-02-22 23:39:13 +0100 |
| commit | 49bdaf92f6bf488ea19f3a0e4001d691c32fde5a (patch) | |
| tree | c137ed137c2d9bfd50d3645aa139575f2c200007 /setup.py | |
| parent | a6dff6c82a99c82c3cfd98ca382884d0cf643d35 (diff) | |
| parent | 9067bde8030eb22cbbd289c1a173af8e68956fc0 (diff) | |
| download | psycopg2-49bdaf92f6bf488ea19f3a0e4001d691c32fde5a.tar.gz | |
Merge from trunk
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -204,12 +204,11 @@ class psycopg_build_ext(build_ext): # *at least* PostgreSQL 7.4 is available (this is the only # 7.x series supported by psycopg 2) pgversion = self.get_pg_config("version").split()[1] - pgmajor, pgminor, pgpatch = pgversion.split('.') except: - pgmajor, pgminor, pgpatch = 7, 4, 0 - define_macros.append(("PG_MAJOR_VERSION", pgmajor)) - define_macros.append(("PG_MINOR_VERSION", pgminor)) - define_macros.append(("PG_PATCH_VERSION", pgpatch)) + pgversion = "7.4.0" + pgmajor, pgminor, pgpatch = pgversion.split('.') + define_macros.append(("PG_VERSION_HEX", "0x%02X%02X%02X" % + (int(pgmajor), int(pgminor), int(pgpatch)))) except Warning, w: if self.pg_config == self.DEFAULT_PG_CONFIG: sys.stderr.write("Warning: %s" % str(w)) |
