File support-clang9.patch of Package python-llvmlite

Index: llvmlite-0.30.0/ffi/build.py
===================================================================
--- llvmlite-0.30.0.orig/ffi/build.py
+++ llvmlite-0.30.0/ffi/build.py
@@ -109,8 +109,8 @@ def main_posix(kind, library_ext):
 
     out = out.decode('latin1')
     print(out)
-    if not (out.startswith('8.0.') or out.startswith('7.0.')
-            or out.startswith('7.1.')):
+    if not (out.startswith('9.0.') or out.startswith('8.0.')
+            or out.startswith('7.0.') or out.startswith('7.1.')):
         msg = (
             "Building llvmlite requires LLVM 7.0+ Be sure to "
             "set LLVM_CONFIG to the right executable path.\n"
Index: llvmlite-0.30.0/llvmlite/tests/test_binding.py
===================================================================
--- llvmlite-0.30.0.orig/llvmlite/tests/test_binding.py
+++ llvmlite-0.30.0/llvmlite/tests/test_binding.py
@@ -363,7 +363,7 @@ class TestMisc(BaseTest):
     def test_version(self):
         major, minor, patch = llvm.llvm_version_info
         # one of these can be valid
-        valid = [(8, 0), (7, 0), (7, 1)]
+        valid = [(9,0), (8, 0), (7, 0), (7, 1)]
         self.assertIn((major, minor), valid)
         self.assertIn(patch, range(10))
 
@@ -552,7 +552,7 @@ class TestModuleRef(BaseTest):
         with self.assertRaises(RuntimeError) as cm:
             llvm.parse_bitcode(b"")
         self.assertIn("LLVM bitcode parsing error", str(cm.exception))
-        self.assertIn("Invalid bitcode signature", str(cm.exception))
+        self.assertIn("file too small to contain bitcode header", str(cm.exception))
 
     def test_bitcode_roundtrip(self):
         # create a new context to avoid struct renaming
openSUSE Build Service is sponsored by