mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-18 10:00:31 +03:00
Fixed setup script to handle PostgreSQL devel version strings
This commit is contained in:
parent
825a60eec5
commit
850423d8fc
9
setup.py
9
setup.py
|
@ -206,7 +206,14 @@ class psycopg_build_ext(build_ext):
|
||||||
pgversion = self.get_pg_config("version").split()[1]
|
pgversion = self.get_pg_config("version").split()[1]
|
||||||
except:
|
except:
|
||||||
pgversion = "7.4.0"
|
pgversion = "7.4.0"
|
||||||
pgmajor, pgminor, pgpatch = pgversion.split('.')
|
|
||||||
|
try:
|
||||||
|
pgmajor, pgminor, pgpatch = pgversion.split('.')
|
||||||
|
except:
|
||||||
|
# Mm.. development version?
|
||||||
|
pgmajor, pgminor = pgversion.replace("devel", "").split('.')
|
||||||
|
pgminor = 0
|
||||||
|
|
||||||
define_macros.append(("PG_VERSION_HEX", "0x%02X%02X%02X" %
|
define_macros.append(("PG_VERSION_HEX", "0x%02X%02X%02X" %
|
||||||
(int(pgmajor), int(pgminor), int(pgpatch))))
|
(int(pgmajor), int(pgminor), int(pgpatch))))
|
||||||
except Warning, w:
|
except Warning, w:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user