File allow-rc-versions.patch of Package python-psycopg2cffi

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:
openSUSE Build Service is sponsored by