mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 20:23:45 +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]
|
||||
except:
|
||||
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" %
|
||||
(int(pgmajor), int(pgminor), int(pgpatch))))
|
||||
except Warning, w:
|
||||
|
|
Loading…
Reference in New Issue
Block a user