forked from pool/python-psycopg2cffi
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psycopg2cffi?expand=0&rev=6
20 lines
882 B
Diff
20 lines
882 B
Diff
Index: psycopg2cffi-2.9.0/psycopg2cffi/_impl/_build_libpq.py
|
|
===================================================================
|
|
--- psycopg2cffi-2.9.0.orig/psycopg2cffi/_impl/_build_libpq.py
|
|
+++ psycopg2cffi-2.9.0/psycopg2cffi/_impl/_build_libpq.py
|
|
@@ -152,10 +152,12 @@ Please add the directory containing pg_c
|
|
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)
|
|
+ pgmajor, pgminor, pgpatch = m.group(1, 3, 4)
|
|
+ if pgminor is None or not pgminor.isdigit():
|
|
+ pgminor = 0
|
|
if pgpatch is None or not pgpatch.isdigit():
|
|
pgpatch = 0
|
|
else:
|