mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-10 19:16:34 +03:00
Merge pull request #504 from fogzot/pgversion-fix
Fixed version regexp to match "10devel"
This commit is contained in:
commit
9448576ba6
4
setup.py
4
setup.py
|
@ -417,10 +417,12 @@ class psycopg_build_ext(build_ext):
|
|||
pgversion = "7.4.0"
|
||||
|
||||
verre = re.compile(
|
||||
r"(\d+)\.(\d+)(?:(?:\.(\d+))|(devel|(alpha|beta|rc)\d+))")
|
||||
r"(\d+)(?:\.(\d+))?(?:(?:\.(\d+))|(devel|(?:alpha|beta|rc)\d+))?")
|
||||
m = verre.match(pgversion)
|
||||
if m:
|
||||
pgmajor, pgminor, pgpatch = m.group(1, 2, 3)
|
||||
if pgminor is None or not pgminor.isdigit():
|
||||
pgminor = 0
|
||||
if pgpatch is None or not pgpatch.isdigit():
|
||||
pgpatch = 0
|
||||
pgmajor = int(pgmajor)
|
||||
|
|
Loading…
Reference in New Issue
Block a user