Hello community, here is the log from the commit of package python-llvmlite for openSUSE:Factory checked in at 2018-01-13 21:48:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-llvmlite (Old) and /work/SRC/openSUSE:Factory/.python-llvmlite.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-llvmlite" Sat Jan 13 21:48:09 2018 rev:3 rq:563675 version:0.21.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-llvmlite/python-llvmlite.changes 2017-11-08 15:13:53.097831447 +0100 +++ /work/SRC/openSUSE:Factory/.python-llvmlite.new/python-llvmlite.changes 2018-01-13 21:48:09.872628509 +0100 @@ -1,0 +2,10 @@ +Thu Jan 11 19:18:11 UTC 2018 - [email protected] + +- Update to version 0.21.0 + * In this release, we upgrade to LLVM 5. + * Our build scripts now use conda-build 3. + * For our prebuilt binaries, GCC 7 toolchain is used on + unix-like systems + * The OSX minimum deployment target is 10.9. + +------------------------------------------------------------------- Old: ---- llvmlite-0.20.0.tar.gz New: ---- llvmlite-0.21.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-llvmlite.spec ++++++ --- /var/tmp/diff_new_pack.34npTJ/_old 2018-01-13 21:48:10.444601843 +0100 +++ /var/tmp/diff_new_pack.34npTJ/_new 2018-01-13 21:48:10.448601656 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-llvmlite # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,26 +20,26 @@ %bcond_without tests ExcludeArch: armv7l Name: python-llvmlite -Version: 0.20.0 +Version: 0.21.0 Release: 0 Summary: Lightweight wrapper around basic LLVM functionality License: BSD-2-Clause Group: Development/Languages/Python Url: http://llvmlite.pydata.org Source: https://files.pythonhosted.org/packages/source/l/llvmlite/llvmlite-%{version}.tar.gz -BuildRequires: clang4-devel +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: clang5-devel BuildRequires: cmake +BuildRequires: fdupes BuildRequires: glibc-devel -BuildRequires: llvm4-LTO-devel -BuildRequires: llvm4-devel -BuildRequires: llvm4-gold +BuildRequires: llvm5-LTO-devel +BuildRequires: llvm5-devel +BuildRequires: llvm5-gold BuildRequires: ncurses-devel -BuildRequires: zlib-devel -BuildRequires: fdupes -BuildRequires: python-rpm-macros -BuildRequires: %{python_module devel} -BuildRequires: %{python_module setuptools} BuildRequires: python-enum34 +BuildRequires: python-rpm-macros +BuildRequires: zlib-devel %ifpython2 Requires: python-enum34 %endif ++++++ llvmlite-0.20.0.tar.gz -> llvmlite-0.21.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/llvmlite-0.20.0/PKG-INFO new/llvmlite-0.21.0/PKG-INFO --- old/llvmlite-0.20.0/PKG-INFO 2017-09-08 20:50:42.000000000 +0200 +++ new/llvmlite-0.21.0/PKG-INFO 2017-12-08 17:20:53.000000000 +0100 @@ -1,12 +1,13 @@ Metadata-Version: 1.1 Name: llvmlite -Version: 0.20.0 +Version: 0.21.0 Summary: lightweight wrapper around basic LLVM functionality Home-page: http://llvmlite.pydata.org Author: Continuum Analytics, Inc. Author-email: [email protected] License: BSD Download-URL: https://github.com/numba/llvmlite +Description-Content-Type: UNKNOWN Description: UNKNOWN Platform: UNKNOWN Classifier: Development Status :: 4 - Beta diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/llvmlite-0.20.0/README.rst new/llvmlite-0.21.0/README.rst --- old/llvmlite-0.20.0/README.rst 2017-06-23 17:04:16.000000000 +0200 +++ new/llvmlite-0.21.0/README.rst 2017-12-08 17:02:59.000000000 +0100 @@ -62,7 +62,7 @@ llvmlite works with Python 2.7 and Python 3.4 or greater. -As of version 0.17.0, llvmlite requires LLVM 4.0. It does not support earlier +As of version 0.21.0, llvmlite requires LLVM 5.0. It does not support earlier or later versions of LLVM. Historical compatibility table: @@ -70,7 +70,8 @@ ================= ======================== llvmlite versions compatible LLVM versions ================= ======================== -0.17.0 - ... 4.0.x +0.21.0 - ... 5.0.x +0.17.0 - 0.20.0 4.0.x 0.16.0 - 0.17.0 3.9.x 0.13.0 - 0.15.0 3.8.x 0.9.0 - 0.12.1 3.7.x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/llvmlite-0.20.0/ffi/build.py new/llvmlite-0.21.0/ffi/build.py --- old/llvmlite-0.20.0/ffi/build.py 2017-03-28 20:16:54.000000000 +0200 +++ new/llvmlite-0.21.0/ffi/build.py 2017-12-08 17:02:59.000000000 +0100 @@ -52,7 +52,7 @@ # compatible with, the one which was used to compile LLVM... cmake # seems a bit lacking here. cmake_dir = os.path.join(here_dir, 'dummy') - # LLVM 4.0 needs VS 2015 minimum. + # LLVM 4.0+ needs VS 2015 minimum. for generator in ['Visual Studio 14 2015']: if is_64bit: generator += ' Win64' @@ -95,9 +95,9 @@ out = out.decode('latin1') print(out) - if not out.startswith('4.0.'): + if not out.startswith('5.0.'): msg = ( - "Building llvmlite requires LLVM 4.0.x. Be sure to " + "Building llvmlite requires LLVM 5.0.x. Be sure to " "set LLVM_CONFIG to the right executable path.\n" "Read the documentation at http://llvmlite.pydata.org/ for more " "information about building llvmlite.\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/llvmlite-0.20.0/ffi/executionengine.cpp new/llvmlite-0.21.0/ffi/executionengine.cpp --- old/llvmlite-0.20.0/ffi/executionengine.cpp 2017-03-02 22:50:47.000000000 +0100 +++ new/llvmlite-0.21.0/ffi/executionengine.cpp 2017-12-08 17:02:59.000000000 +0100 @@ -93,12 +93,6 @@ return create_execution_engine(M, TM, OutError); } -API_EXPORT(void *) -LLVMPY_GetPointerToGlobal(LLVMExecutionEngineRef EE, - LLVMValueRef Global) -{ - return LLVMGetPointerToGlobal(EE, Global); -} API_EXPORT(uint64_t) LLVMPY_GetGlobalValueAddress(LLVMExecutionEngineRef EE, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/llvmlite-0.20.0/ffi/value.cpp new/llvmlite-0.21.0/ffi/value.cpp --- old/llvmlite-0.20.0/ffi/value.cpp 2017-03-28 20:16:54.000000000 +0200 +++ new/llvmlite-0.21.0/ffi/value.cpp 2017-12-08 17:02:59.000000000 +0100 @@ -74,11 +74,18 @@ return (int)LLVMGetDLLStorageClass(Val); } +API_EXPORT(unsigned) +LLVMPY_GetEnumAttributeKindForName(const char *name, size_t len) +{ + /* zero is returned if no match */ + return LLVMGetEnumAttributeKindForName(name, len); +} + API_EXPORT(void) -LLVMPY_AddFunctionAttr(LLVMValueRef Fn, int Attr) +LLVMPY_AddFunctionAttr(LLVMValueRef Fn, unsigned AttrKind) { LLVMContextRef ctx = LLVMGetModuleContext(LLVMGetGlobalParent(Fn)); - LLVMAttributeRef attr_ref = LLVMCreateEnumAttribute(ctx, Attr, 0); + LLVMAttributeRef attr_ref = LLVMCreateEnumAttribute(ctx, AttrKind, 0); LLVMAddAttributeAtIndex(Fn, LLVMAttributeReturnIndex, attr_ref); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/llvmlite-0.20.0/llvmlite/_version.py new/llvmlite-0.21.0/llvmlite/_version.py --- old/llvmlite-0.20.0/llvmlite/_version.py 2017-09-08 20:50:42.000000000 +0200 +++ new/llvmlite-0.21.0/llvmlite/_version.py 2017-12-08 17:20:53.000000000 +0100 @@ -4,8 +4,8 @@ # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. -version_version = '0.20.0' -version_full = '9ee27e85786ac3b23d32c0e5d844f1157e69df37' +version_version = '0.21.0' +version_full = 'b993afd8dcbcf07a60f145c6f25b0c9c96772c5d' def get_versions(default={}, verbose=False): return {'version': version_version, 'full': version_full} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/llvmlite-0.20.0/llvmlite/binding/executionengine.py new/llvmlite-0.21.0/llvmlite/binding/executionengine.py --- old/llvmlite-0.20.0/llvmlite/binding/executionengine.py 2017-03-02 22:50:47.000000000 +0100 +++ new/llvmlite-0.21.0/llvmlite/binding/executionengine.py 2017-12-08 17:02:59.000000000 +0100 @@ -57,31 +57,21 @@ module._owned = True ffi.ObjectRef.__init__(self, ptr) - def get_pointer_to_function(self, gv): - warnings.warn(".get_pointer_to_function() is deprecated. Use " - ".get_function_address() instead.", DeprecationWarning) - ptr = ffi.lib.LLVMPY_GetPointerToGlobal(self, gv) - if ptr is None: - raise ValueError("Cannot find given global value %r" % (gv.name)) - return ptr - def get_function_address(self, name): """ Return the address of the function named *name* as an integer. + + It's a fatal error in LLVM if the symbol of *name* doesn't exist. """ - ptr = ffi.lib.LLVMPY_GetFunctionAddress(self, name.encode("ascii")) - if ptr is None: - raise ValueError("Cannot find given function %s" % name) - return ptr + return ffi.lib.LLVMPY_GetFunctionAddress(self, name.encode("ascii")) def get_global_value_address(self, name): """ Return the address of the global value named *name* as an integer. + + It's a fatal error in LLVM if the symbol of *name* doesn't exist. """ - ptr = ffi.lib.LLVMPY_GetGlobalValueAddress(self, name.encode("ascii")) - if ptr is None: - raise ValueError("Cannot find given global value %s" % name) - return ptr + return ffi.lib.LLVMPY_GetGlobalValueAddress(self, name.encode("ascii")) def add_global_mapping(self, gv, addr): # XXX unused? @@ -245,10 +235,6 @@ ffi.LLVMModuleRef ] -ffi.lib.LLVMPY_GetPointerToGlobal.argtypes = [ffi.LLVMExecutionEngineRef, - ffi.LLVMValueRef] -ffi.lib.LLVMPY_GetPointerToGlobal.restype = c_void_p - ffi.lib.LLVMPY_AddGlobalMapping.argtypes = [ffi.LLVMExecutionEngineRef, ffi.LLVMValueRef, c_void_p] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/llvmlite-0.20.0/llvmlite/binding/value.py new/llvmlite-0.21.0/llvmlite/binding/value.py --- old/llvmlite-0.20.0/llvmlite/binding/value.py 2017-03-02 22:50:47.000000000 +0100 +++ new/llvmlite-0.21.0/llvmlite/binding/value.py 2017-12-08 17:02:59.000000000 +0100 @@ -1,5 +1,4 @@ - -from ctypes import POINTER, c_char_p, c_int +from ctypes import POINTER, c_char_p, c_int, c_size_t, c_uint import enum from . import ffi @@ -28,37 +27,6 @@ linker_private_weak = 16 -class Attribute(enum.Enum): - # The LLVMAttribute enum from llvm-c/Core.h - - zext = 1 << 0 - sext = 1 << 1 - noreturn = 1 << 2 - inreg = 1 << 3 - structret = 1 << 4 - nounwind = 1 << 5 - noalias = 1 << 6 - byval = 1 << 7 - nest = 1 << 8 - readnone = 1 << 9 - readonly = 1 << 10 - noinline = 1 << 11 - alwaysinline = 1 << 12 - optimizeforsize = 1 << 13 - stackprotect = 1 << 14 - stackprotectreq = 1 << 15 - - nocapture = 1 << 21 - noredzone = 1 << 22 - noimplicitfloat = 1 << 23 - naked = 1 << 24 - inlinehint = 1 << 25 - - returnstwice = 1 << 29 - uwtable = 1 << 30 - nonlazybind = 1 << 31 - - class Visibility(enum.IntEnum): # The LLVMVisibility enum from llvm-c/Core.h @@ -134,11 +102,19 @@ ffi.lib.LLVMPY_SetDLLStorageClass(self, value) def add_function_attribute(self, attr): - """Only works on function value""" - # XXX unused? - if not isinstance(attr, Attribute): - attr = Attribute[attr] - ffi.lib.LLVMPY_AddFunctionAttr(self, attr.value) + """Only works on function value + + Parameters + ----------- + attr : str + attribute name + """ + attrname = str(attr) + attrval = ffi.lib.LLVMPY_GetEnumAttributeKindForName( + _encode_string(attrname), len(attrname)) + if attrval == 0: + raise ValueError('no such attribute {!r}'.format(attrname)) + ffi.lib.LLVMPY_AddFunctionAttr(self, attrval) @property def type(self): @@ -190,7 +166,10 @@ ffi.lib.LLVMPY_SetDLLStorageClass.argtypes = [ffi.LLVMValueRef, c_int] -ffi.lib.LLVMPY_AddFunctionAttr.argtypes = [ffi.LLVMValueRef, c_int] +ffi.lib.LLVMPY_GetEnumAttributeKindForName.argtypes = [c_char_p, c_size_t] +ffi.lib.LLVMPY_GetEnumAttributeKindForName.restype = c_uint + +ffi.lib.LLVMPY_AddFunctionAttr.argtypes = [ffi.LLVMValueRef, c_uint] ffi.lib.LLVMPY_IsDeclaration.argtypes = [ffi.LLVMValueRef] ffi.lib.LLVMPY_IsDeclaration.restype = c_int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/llvmlite-0.20.0/llvmlite/tests/test_binding.py new/llvmlite-0.21.0/llvmlite/tests/test_binding.py --- old/llvmlite-0.20.0/llvmlite/tests/test_binding.py 2017-05-26 19:59:45.000000000 +0200 +++ new/llvmlite-0.21.0/llvmlite/tests/test_binding.py 2017-12-08 17:02:59.000000000 +0100 @@ -297,7 +297,7 @@ def test_version(self): major, minor, patch = llvm.llvm_version_info - self.assertEqual((major, minor), (4, 0)) + self.assertEqual((major, minor), (5, 0)) self.assertIn(patch, range(10)) def test_check_jit_execution(self): @@ -750,7 +750,11 @@ def test_add_function_attribute(self): mod = self.module() fn = mod.get_function("sum") - fn.add_function_attribute("zext") + fn.add_function_attribute("nocapture") + with self.assertRaises(ValueError) as raises: + fn.add_function_attribute("zext") + self.assertEqual(str(raises.exception), "no such attribute 'zext'") + def test_module(self): mod = self.module()
