Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package z3 for openSUSE:Factory checked in at 2025-05-30 14:39:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/z3 (Old) and /work/SRC/openSUSE:Factory/.z3.new.25440 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "z3" Fri May 30 14:39:44 2025 rev:44 rq:1281304 version:4.15.0 Changes: -------- --- /work/SRC/openSUSE:Factory/z3/z3.changes 2025-04-02 17:14:53.249185064 +0200 +++ /work/SRC/openSUSE:Factory/.z3.new.25440/z3.changes 2025-05-30 17:28:12.322414028 +0200 @@ -1,0 +2,11 @@ +Fri May 30 08:22:16 UTC 2025 - Jiri Slaby <jsl...@suse.cz> + +- add python-use-non-devel-so.patch (bsc#1243028) + +------------------------------------------------------------------- +Fri May 30 07:12:24 UTC 2025 - Jiri Slaby <jsl...@suse.cz> + +- update to 4.15.0 + * see: https://github.com/Z3Prover/z3/releases/tag/z3-4.15.0 + +------------------------------------------------------------------- Old: ---- z3-4.14.1.tar.gz New: ---- python-use-non-devel-so.patch z3-4.15.0.tar.gz BETA DEBUG BEGIN: New: - add python-use-non-devel-so.patch (bsc#1243028) BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ z3.spec ++++++ --- /var/tmp/diff_new_pack.O4bshN/_old 2025-05-30 17:28:12.814434405 +0200 +++ /var/tmp/diff_new_pack.O4bshN/_new 2025-05-30 17:28:12.818434571 +0200 @@ -1,7 +1,7 @@ # # spec file for package z3 # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,15 +16,16 @@ # -%define sover 4_14 +%define sover %(echo %version | sed 's@\\([0-9]*\\)\\.\\([0-9]*\\)\\..*@\\1_\\2@') Name: z3 -Version: 4.14.1 +Version: 4.15.0 Release: 0 Summary: Theorem prover from Microsoft Research License: MIT Group: Productivity/Scientific/Other URL: https://github.com/Z3Prover/z3/wiki Source0: https://github.com/Z3Prover/z3/archive/z3-%{version}.tar.gz +Patch0: python-use-non-devel-so.patch %if 0%{suse_version} < 1600 BuildRequires: gcc13-c++ %else @@ -33,7 +34,7 @@ BuildRequires: cmake BuildRequires: ninja BuildRequires: pkgconfig -BuildRequires: python3-devel +BuildRequires: python3 %if 0%{?suse_version} > 1600 BuildRequires: pkgconfig(gmpxx) %else @@ -83,7 +84,6 @@ export CXX=g++-13 %endif %cmake \ - -DPYTHON_EXECUTABLE=%{_bindir}/python3 \ -DZ3_BUILD_LIBZ3_SHARED=true \ -DZ3_USE_LIB_GMP=true \ -DZ3_BUILD_PYTHON_BINDINGS=true \ ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.O4bshN/_old 2025-05-30 17:28:12.850435896 +0200 +++ /var/tmp/diff_new_pack.O4bshN/_new 2025-05-30 17:28:12.854436062 +0200 @@ -1,5 +1,5 @@ -mtime: 1743503679 -commit: 7ccc3827eb5becf1b5d7a75e4ffade66eb23de9d6569845accc4419ce9f82b32 +mtime: 1748593522 +commit: f27a69259b39165def31925e884c2f7b7bbdfa7c4645c49d19800e91666f0f98 url: https://src.opensuse.org/jirislaby/d-t-s-z3.git revision: factory ++++++ build.specials.obscpio ++++++ ++++++ python-use-non-devel-so.patch ++++++ From: https://github.com/sertonix Patch-mainline: submitted https://github.com/Z3Prover/z3/issues/7518 Subject: Use sover for python bindings Don't use libz3.so, but use versioned lib like libz3.so.4.15.0 --- scripts/update_api.py | 33 +++++++++++++++++++++++++-------- src/api/python/CMakeLists.txt | 2 ++ 2 files changed, 27 insertions(+), 8 deletions(-) --- a/scripts/update_api.py +++ b/scripts/update_api.py @@ -1823,9 +1823,10 @@ del _lib del _default_dirs del _all_dirs del _ext +del _sover """) -def write_core_py_preamble(core_py): +def write_core_py_preamble(core_py, z3py_soversion): core_py.write( """ # Automatically generated file @@ -1842,6 +1843,11 @@ from .z3consts import * _file_manager = contextlib.ExitStack() atexit.register(_file_manager.close) +""" + ) + core_py.write("_sover=\"%s\"\n" % z3py_soversion) + core_py.write( +""" _ext = 'dll' if sys.platform in ('win32', 'cygwin') else 'dylib' if sys.platform == 'darwin' else 'so' _lib = None _z3_lib_resource = importlib_resources.files('z3').joinpath('lib') @@ -1877,7 +1883,7 @@ for d in _all_dirs: try: d = os.path.realpath(d) if os.path.isdir(d): - d = os.path.join(d, 'libz3.%s' % _ext) + d = os.path.join(d, 'libz3.%s.%s' % (_ext, _sover)) if os.path.isfile(d): _lib = ctypes.CDLL(d) break @@ -1888,24 +1894,24 @@ for d in _all_dirs: if _lib is None: # If all else failed, ask the system to find it. try: - _lib = ctypes.CDLL('libz3.%s' % _ext) + _lib = ctypes.CDLL('libz3.%s.%s' % (_ext, _sover)) except Exception as e: _failures += [e] pass if _lib is None: - print("Could not find libz3.%s; consider adding the directory containing it to" % _ext) + print("Could not find libz3.%s.%s; consider adding the directory containing it to" % (_ext, _sover)) print(" - your system's PATH environment variable,") print(" - the Z3_LIBRARY_PATH environment variable, or ") print(" - to the custom Z3_LIB_DIRS Python-builtin before importing the z3 module, e.g. via") if sys.version < '3': print(" import __builtin__") - print(" __builtin__.Z3_LIB_DIRS = [ '/path/to/z3/lib/dir' ] # directory containing libz3.%s" % _ext) + print(" __builtin__.Z3_LIB_DIRS = [ '/path/to/z3/lib/dir' ] # directory containing libz3.%s.%s" % (_ext, _sover)) else: print(" import builtins") - print(" builtins.Z3_LIB_DIRS = [ '/path/to/z3/lib/dir' ] # directory containing libz3.%s" % _ext) + print(" builtins.Z3_LIB_DIRS = [ '/path/to/z3/lib/dir' ] # directory containing libz3.%s.%s" % (_ext, _sover)) print(_failures) - raise Z3Exception("libz3.%s not found." % _ext) + raise Z3Exception("libz3.%s.%s not found." % (_ext, _sover)) if sys.version < '3': @@ -1970,6 +1976,7 @@ core_py = None def generate_files(api_files, api_output_dir=None, z3py_output_dir=None, + z3py_soversion=None, dotnet_output_dir=None, java_input_dir=None, java_output_dir=None, @@ -2026,7 +2033,7 @@ def generate_files(api_files, write_log_h_preamble(log_h) write_log_c_preamble(log_c) write_exe_c_preamble(exe_c) - write_core_py_preamble(core_py) + write_core_py_preamble(core_py, z3py_soversion) # FIXME: these functions are awful apiTypes.def_Types(api_files) @@ -2069,6 +2076,10 @@ def main(args): dest="z3py_output_dir", default=None, help="Directory to emit z3py files. If not specified no files are emitted.") + parser.add_argument("--z3py-soversion", + dest="z3py_soversion", + default=None, + help="SOVERSION for loading libz3 library.") parser.add_argument("--dotnet-output-dir", dest="dotnet_output_dir", default=None, @@ -2095,6 +2106,11 @@ def main(args): help="Directory to emit OCaml files. If not specified no files are emitted.") pargs = parser.parse_args(args) + if pargs.z3py_output_dir: + if pargs.z3py_soversion is None: + logging.error('--z3py-soversion must be specified') + return 1 + if pargs.java_output_dir: if pargs.java_package_name == None: logging.error('--java-package-name must be specified') @@ -2116,6 +2132,7 @@ def main(args): generate_files(api_files=pargs.api_files, api_output_dir=pargs.api_output_dir, z3py_output_dir=pargs.z3py_output_dir, + z3py_soversion=pargs.z3py_soversion, dotnet_output_dir=pargs.dotnet_output_dir, java_input_dir=pargs.java_input_dir, java_output_dir=pargs.java_output_dir, --- a/src/api/python/CMakeLists.txt +++ b/src/api/python/CMakeLists.txt @@ -36,6 +36,8 @@ add_custom_command(OUTPUT "${z3py_bindin COMMAND "${Python3_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/scripts/update_api.py" ${Z3_FULL_PATH_API_HEADER_FILES_TO_SCAN} + "--z3py-soversion" + ${Z3_VERSION_MAJOR}.${Z3_VERSION_MINOR} "--z3py-output-dir" "${z3py_bindings_build_dest}" DEPENDS ++++++ z3-4.14.1.tar.gz -> z3-4.15.0.tar.gz ++++++ ++++ 30535 lines of diff (skipped)