Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-cx_Freeze for openSUSE:Factory checked in at 2023-05-04 17:10:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cx_Freeze (Old) and /work/SRC/openSUSE:Factory/.python-cx_Freeze.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cx_Freeze" Thu May 4 17:10:46 2023 rev:7 rq:1084466 version:6.14.9 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cx_Freeze/python-cx_Freeze.changes 2023-03-29 23:27:49.135655444 +0200 +++ /work/SRC/openSUSE:Factory/.python-cx_Freeze.new.1533/python-cx_Freeze.changes 2023-05-04 17:11:07.112556067 +0200 @@ -1,0 +2,9 @@ +Wed May 3 16:45:46 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 6.14.9: + * support unbundled setuptools + * hooks: include a qt.conf for pyside2-webengine to work + * hooks: add pyimagej and jpype + * hooks: add librosa and lazy_loader hooks + +------------------------------------------------------------------- Old: ---- 6.14.7.tar.gz New: ---- 6.14.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cx_Freeze.spec ++++++ --- /var/tmp/diff_new_pack.oi40kp/_old 2023-05-04 17:11:07.644559181 +0200 +++ /var/tmp/diff_new_pack.oi40kp/_new 2023-05-04 17:11:07.652559228 +0200 @@ -18,7 +18,7 @@ %define oldpython python Name: python-cx_Freeze -Version: 6.14.7 +Version: 6.14.9 Release: 0 Summary: Scripts to create standalone executables from Python scripts License: Python-2.0 ++++++ 6.14.7.tar.gz -> 6.14.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/.bumpversion.cfg new/cx_Freeze-6.14.9/.bumpversion.cfg --- old/cx_Freeze-6.14.7/.bumpversion.cfg 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/.bumpversion.cfg 2023-04-08 21:01:02.000000000 +0200 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 6.14.7 +current_version = 6.14.9 commit = True parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))? serialize = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/Makefile new/cx_Freeze-6.14.9/Makefile --- old/cx_Freeze-6.14.7/Makefile 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/Makefile 2023-04-08 21:01:02.000000000 +0200 @@ -54,21 +54,27 @@ .PHONY: tests tests: install - pip uninstall -y cx_Freeze && pip install -e . --no-build-isolation --no-deps + pip uninstall -y cx_Freeze || true + pip install -e . --no-build-isolation --no-deps python -m pytest .PHONY: cov cov: - python -m pytest -m "not long" --cov="cx_Freeze" --cov-report=html + @rm -rf ./htmlcov/ + python -m pytest --cov="cx_Freeze" --cov-report=html --cov-report=xml python -m webbrowser -t ./htmlcov/index.html .PHONY: release release: - @echo "# Run:\nbump2version --verbose --sign-tags release\ngit push origin main --tags" + @echo \ + "# Run:\nbump2version --verbose --sign-tags release\n"\ + "git push origin main --tags" .PHONY: release-patch release-patch: - @echo "# Run:\nbump2version --verbose --sign-tags patch --new-version=X.XX.X\ngit push origin main --tags" + @echo \ + "# Run:\nbump2version --verbose --sign-tags patch --new-version=X.XX.X\n"\ + "git push origin `git branch --show-current` --tags" .PHONY: release-dev release-dev: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/ci/requirements.py new/cx_Freeze-6.14.9/ci/requirements.py --- old/cx_Freeze-6.14.7/ci/requirements.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/ci/requirements.py 2023-04-08 21:01:02.000000000 +0200 @@ -6,9 +6,12 @@ from pathlib import Path try: - import tomllib + from tomllib import load as toml_load except ImportError: - from setuptools.extern import tomli as tomllib + try: + from setuptools.extern.tomli import load as toml_load + except ImportError: + from tomli import load as toml_load def main(): @@ -19,7 +22,7 @@ print("pyproject.toml not found", file=sys.stderr) sys.exit(1) with pyproject_toml.open("rb") as file: - config = tomllib.load(file) + config = toml_load(file) root_dir = pyproject_toml.parent requirements = root_dir / "requirements.txt" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/__init__.py new/cx_Freeze-6.14.9/cx_Freeze/__init__.py --- old/cx_Freeze-6.14.7/cx_Freeze/__init__.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/__init__.py 2023-04-08 21:01:02.000000000 +0200 @@ -43,7 +43,7 @@ __all__.append(bdist_rpm.__name__) -__version__ = "6.14.7" +__version__ = "6.14.9" def setup(**attrs): # pylint: disable=missing-function-docstring diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/_compat.py new/cx_Freeze-6.14.9/cx_Freeze/_compat.py --- old/cx_Freeze-6.14.7/cx_Freeze/_compat.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/_compat.py 2023-04-08 21:01:02.000000000 +0200 @@ -9,9 +9,18 @@ if sys.version_info >= (3, 10): import importlib.metadata as importlib_metadata else: - from setuptools.extern import importlib_metadata + try: + from setuptools.extern import importlib_metadata + except ImportError: + import importlib_metadata -__all__ = ["cached_property", "importlib_metadata"] +try: + # pylint: disable-next=ungrouped-imports + from setuptools.extern import packaging +except ImportError: + import packaging + +__all__ = ["cached_property", "importlib_metadata", "packaging"] __all__ += ["PLATFORM", "IS_LINUX", "IS_MACOS", "IS_MINGW", "IS_WINDOWS"] __all__ += ["IS_CONDA"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/command/_bdist_msi.py new/cx_Freeze-6.14.9/cx_Freeze/command/_bdist_msi.py --- old/cx_Freeze-6.14.7/cx_Freeze/command/_bdist_msi.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/command/_bdist_msi.py 2023-04-08 21:01:02.000000000 +0200 @@ -32,9 +32,7 @@ from setuptools import Command from setuptools.errors import OptionError -# pylint: disable-next=no-name-in-module -from setuptools.extern.packaging import version as packaging_version - +from .._compat import packaging from ._pydialog import PyDialog @@ -224,7 +222,7 @@ version = metadata.get_version() # ProductVersion must be strictly numeric # XXX need to deal with prerelease versions - base_version = packaging_version.Version(version).base_version + base_version = packaging.version.Version(version).base_version # Prefix ProductName with Python x.y, so that # it sorts together with the other Python packages # in Add-Remove-Programs (APR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/command/bdist_msi.py new/cx_Freeze-6.14.9/cx_Freeze/command/bdist_msi.py --- old/cx_Freeze-6.14.7/cx_Freeze/command/bdist_msi.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/command/bdist_msi.py 2023-04-08 21:01:02.000000000 +0200 @@ -12,9 +12,7 @@ from setuptools.errors import OptionError -# pylint: disable-next=no-name-in-module -from setuptools.extern.packaging import version as packaging_version - +from .._compat import packaging from ._bdist_msi import bdist_msi from ._pydialog import PyDialog @@ -1030,7 +1028,7 @@ author = self.distribution.metadata.get_contact() or "UNKNOWN" version = self.target_version or self.distribution.get_version() # ProductVersion must be strictly numeric - base_version = packaging_version.Version(version).base_version + base_version = packaging.version.Version(version).base_version # msilib is reloaded in order to reset the "_directories" global member # in that module. That member is used by msilib to prevent any two diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/freezer.py new/cx_Freeze-6.14.9/cx_Freeze/freezer.py --- old/cx_Freeze-6.14.7/cx_Freeze/freezer.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/freezer.py 2023-04-08 21:01:02.000000000 +0200 @@ -789,10 +789,15 @@ source, target, copy_dependent_files=False, include_mode=True ) for dependent_source in self.get_dependent_files(source): - dependent_target = target_dir / dependent_source.name - self._copy_file( - dependent_source, dependent_target, copy_dependent_files=True - ) + if IS_MINGW: + if self._should_copy_file(dependent_source): + self._copy_top_dependency(dependent_source) + else: + self._copy_file( + source=dependent_source, + target=target_dir / dependent_source.name, + copy_dependent_files=True, + ) def _pre_copy_hook(self, source: Path, target: Path) -> tuple[Path, Path]: """Prepare the source and target paths. Also, adjust the target of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/hooks/__init__.py new/cx_Freeze-6.14.9/cx_Freeze/hooks/__init__.py --- old/cx_Freeze-6.14.7/cx_Freeze/hooks/__init__.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/hooks/__init__.py 2023-04-08 21:01:02.000000000 +0200 @@ -234,9 +234,31 @@ finder.include_module("idna.idnadata") -def load_lxml(finder: ModuleFinder, module: Module) -> None: - """The lxml package uses an extension.""" - finder.include_module("lxml._elementpath") +def load_imagej(finder: ModuleFinder, module: Module) -> None: + """The pyimagej package requires its metadata.""" + module.update_distribution("pyimagej") + + +def load_jpype(finder: ModuleFinder, module: Module) -> None: + """The JPype1 package requires its binary.""" + source = module.file.parent.parent / "org.jpype.jar" + if source.exists(): + finder.include_files( + source, f"lib/{source.name}", copy_dependent_files=False + ) + + +def load_lazy_loader(finder: ModuleFinder, module: Module) -> None: + """Use load_lazy_loader 0.2+ to work with .pyc files.""" + if module.distribution.version < "0.2": + raise SystemExit( + "Please upgrade 'lazy_loader>=0.2' to support cx_Freeze" + ) + + +def load_librosa(finder: ModuleFinder, module: Module) -> None: + """The librosa must be loaded as package.""" + finder.include_package("librosa") def load_llvmlite(finder: ModuleFinder, module: Module) -> None: @@ -245,6 +267,11 @@ finder.exclude_module("llvmlite.tests") +def load_lxml(finder: ModuleFinder, module: Module) -> None: + """The lxml package uses an extension.""" + finder.include_module("lxml._elementpath") + + def load_Numeric(finder: ModuleFinder, module: Module) -> None: """The Numeric module optionally loads the dotblas module; ignore the error if this modules does not exist.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/hooks/_qthooks.py new/cx_Freeze-6.14.9/cx_Freeze/hooks/_qthooks.py --- old/cx_Freeze-6.14.7/cx_Freeze/hooks/_qthooks.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/hooks/_qthooks.py 2023-04-08 21:01:02.000000000 +0200 @@ -66,7 +66,7 @@ source_paths.setdefault("DataPath", prefix_path) source_paths.setdefault("LibrariesPath", prefix_path / "lib") source_paths.setdefault("SettingsPath", ".") - if name == "PySide6" and IS_WINDOWS and not IS_CONDA: + if name in ("PySide2", "PySide6") and IS_WINDOWS and not IS_CONDA: source_paths["BinariesPath"] = prefix_path source_paths["LibraryExecutablesPath"] = prefix_path @@ -85,7 +85,7 @@ for key, source in source_paths.items(): if key == "SettingsPath": # Check for SettingsPath first target = Path("Contents/Resources" if IS_MACOS else ".") - elif name == "PySide6" and IS_WINDOWS and not IS_CONDA: + elif name in ("PySide2", "PySide6") and IS_WINDOWS and not IS_CONDA: target = target_base / source.relative_to(prefix_path) elif key in ("ArchDataPath", "DataPath", "PrefixPath"): target = target_base @@ -385,12 +385,15 @@ def load_qt_qtwebenginewidgets(finder: ModuleFinder, module: Module) -> None: """Include module dependency, data and plugins.""" name = _qt_implementation(module) + finder.include_module(f"{name}.QtNetwork") + finder.include_module(f"{name}.QtPrintSupport") finder.include_module(f"{name}.QtWebChannel") finder.include_module(f"{name}.QtWebEngineCore") finder.include_module(f"{name}.QtWidgets") - finder.include_module(f"{name}.QtPrintSupport") with suppress(ImportError): - finder.include_module(f"{name}.QtWebEngineQuick") + finder.include_module(f"{name}.QtWebEngine") # qt5 + with suppress(ImportError): + finder.include_module(f"{name}.QtWebEngineQuick") # qt6 copy_qt_files(finder, name, "LibrariesPath", "*WebEngineWidgets.*") copy_qt_files(finder, name, "PluginsPath", "webview") copy_qt_files(finder, name, "PluginsPath", "xcbglintegrations") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/hooks/numpy.py new/cx_Freeze-6.14.9/cx_Freeze/hooks/numpy.py --- old/cx_Freeze-6.14.7/cx_Freeze/hooks/numpy.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/hooks/numpy.py 2023-04-08 21:01:02.000000000 +0200 @@ -1,53 +1,40 @@ """A collection of functions which are triggered automatically by finder when -numpy package is included.""" +numpy package is included. +""" # pylint: disable=unused-argument - from __future__ import annotations +import json import os import sys from importlib.machinery import EXTENSION_SUFFIXES from pathlib import Path +from textwrap import dedent -from .._compat import IS_MINGW, IS_WINDOWS +from .._compat import IS_CONDA, IS_MINGW, IS_WINDOWS from ..finder import ModuleFinder from ..module import Module +# The sample/pandas is used to test. +# Using pip (pip install numpy) in Windows/Linux/macOS from pypi (w/ OpenBLAS) +# And using cgohlke/numpy-mkl.whl, numpy 1.23.5+mkl in windows: +# https://github.com/cgohlke/numpy-mkl.whl/releases/download/v2023.1.4/numpy-1.23.5+mkl-cp311-cp311-win_amd64.whl +# +# Read the numpy documentation, especially if using conda-forge and MKL: +# https://numpy.org/install/#numpy-packages--accelerated-linear-algebra-libraries +# +# For conda-forge we can use the default installation with MKL: +# conda install -c conda-forge numpy +# Or use OpenBLAS: +# conda install -c conda-forge blas=*=openblas numpy -def load_numpy(finder: ModuleFinder, module: Module) -> None: - """The numpy must be loaded as a package; support for pypi version and - numpy+mkl version - tested with 1.19.5+mkl, 1.20.3+mkl, 1.21.0+mkl, - 1.21.1+mkl, 1.21.2+mkl and 1.21.2 from conda-forge.""" - finder.include_package("numpy") - - if IS_WINDOWS or IS_MINGW: - numpy_dir = module.path[0] - # numpy+mkl from: https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy - libs_dir = numpy_dir / "DLLs" - if not libs_dir.is_dir(): - # numpy+mkl from conda-forge - libs_dir = Path(sys.base_prefix, "Library", "bin") - if libs_dir.is_dir(): - dest_dir = Path("lib", "numpy_mkl") - for path in libs_dir.glob("mkl_*.dll"): - finder.include_files(path, dest_dir / path.name) - for path in libs_dir.glob("lib*.dll"): - finder.include_files(path, dest_dir / path.name) - finder.add_constant("MKL_PATH", os.fspath(dest_dir)) - finder.exclude_module("numpy.DLLs") - - # do not check dependencies already handled - extension = EXTENSION_SUFFIXES[0] - for path in numpy_dir.rglob(f"*{extension}"): - finder.exclude_dependent_files(path) - # support for old versions (numpy <= 1.18.2) - if module.in_file_system == 0: - # copy any file at site-packages/numpy/.libs - libs_dir = numpy_dir / ".libs" - if libs_dir.is_dir(): - finder.include_files(libs_dir, "lib") +def load_numpy(finder: ModuleFinder, module: Module) -> None: # noqa: ARG001 + """The numpy must be loaded as a package. + Supported pypi and conda-forge versions (tested from 1.21.2 to 1.24.2). + """ + finder.include_package("numpy") # exclude the tests finder.exclude_module("numpy.compat.tests") finder.exclude_module("numpy.core.tests") @@ -65,10 +52,89 @@ finder.exclude_module("numpy.typing.tests") -def load_numpy_core_numerictypes(finder: ModuleFinder, module: Module) -> None: +def load_numpy__distributor_init(finder: ModuleFinder, module: Module) -> None: + """Fix the location of dependent files in Windows.""" + if not (IS_WINDOWS or IS_MINGW): + # In Linux and macOS it is detected correctly. + return + + # patch the code when necessary + code_string = module.file.read_text(encoding="utf-8") + + # installed from pypi, using zip_include_packages we must fix it + numpy_dir = module.file.parent + libs_dir = numpy_dir / ".libs" + if libs_dir.is_dir(): + if module.in_file_system == 0: # zip_include_packages + # copy any file at site-packages/numpy/.libs + finder.include_files(libs_dir, "lib/numpy/.libs") + else: + # cgohlke/numpy-mkl.whl, numpy 1.23.5+mkl + libs_dir = numpy_dir / "DLLs" + if libs_dir.is_dir(): + finder.exclude_module("numpy.DLLs") + finder.include_files(libs_dir, "lib/numpy/DLLs") + # conda-forge + elif IS_CONDA: + prefix = Path(sys.prefix) + conda_meta = prefix / "conda-meta" + packages = ["libblas", "libcblas", "liblapack"] + blas_options = ["libopenblas", "mkl"] + packages += blas_options + files_to_copy: list[Path] = [] + for package in packages: + try: + pkg = next(conda_meta.glob(f"{package}-*.json")) + except StopIteration: + continue + files = json.loads(pkg.read_text(encoding="utf-8"))["files"] + files_to_copy += [ + prefix / file + for file in files + if file.lower().endswith(".dll") + ] + blas = package + for source in files_to_copy: + finder.include_files(source, f"lib/{blas}/{source.name}") + numpy_blas = f""" + def init_numpy_blas(): + import os + + blas_path = os.path.join( + os.path.dirname(os.path.dirname(__file__)), "{blas}" + ) + try: + os.add_dll_directory(blas_path) + except (OSError, AttributeError): + pass + env_path = os.environ.get("PATH", "").split(os.pathsep) + if blas_path not in env_path: + env_path.insert(0, blas_path) + os.environ["PATH"] = os.pathsep.join(env_path) + + init_numpy_blas() + """ + code_string += dedent(numpy_blas) + + # do not check dependencies already handled + extension = EXTENSION_SUFFIXES[0] + for file in numpy_dir.rglob(f"*{extension}"): + finder.exclude_dependent_files(file) + + if module.in_file_system == 0: + code_string = code_string.replace( + "__file__", "__file__.replace('library.zip/', '')" + ) + module.code = compile(code_string, os.fspath(module.file), "exec") + + +def load_numpy_core_numerictypes( + finder: ModuleFinder, module: Module # noqa: ARG001 +) -> None: """The numpy.core.numerictypes module adds a number of items to itself dynamically; define these to avoid spurious errors about missing - modules.""" + modules. + """ module.global_names.update( [ "bool_", @@ -88,44 +154,56 @@ def load_numpy_distutils_command_scons( - finder: ModuleFinder, module: Module + finder: ModuleFinder, module: Module # noqa: ARG001 ) -> None: """The numpy.distutils.command.scons module optionally imports the numscons - module; ignore the error if the module cannot be found.""" + module; ignore the error if the module cannot be found. + """ module.ignore_names.add("numscons") def load_numpy_distutils_misc_util( - finder: ModuleFinder, module: Module + finder: ModuleFinder, module: Module # noqa: ARG001 ) -> None: """The numpy.distutils.misc_util module optionally imports the numscons - module; ignore the error if the module cannot be found.""" + module; ignore the error if the module cannot be found. + """ module.ignore_names.add("numscons") def load_numpy_distutils_system_info( - finder: ModuleFinder, module: Module + finder: ModuleFinder, module: Module # noqa: ARG001 ) -> None: """The numpy.distutils.system_info module optionally imports the Numeric - module; ignore the error if the module cannot be found.""" + module; ignore the error if the module cannot be found. + """ module.ignore_names.add("Numeric") -def load_numpy_f2py___version__(finder: ModuleFinder, module: Module) -> None: +def load_numpy_f2py___version__( + finder: ModuleFinder, module: Module # noqa: ARG001 +) -> None: """The numpy.f2py.__version__ module optionally imports the __svn_version__ - module; ignore the error if the module cannot be found.""" + module; ignore the error if the module cannot be found. + """ module.ignore_names.add("__svn_version__") -def load_numpy_linalg(finder: ModuleFinder, module: Module) -> None: +def load_numpy_linalg( + finder: ModuleFinder, module: Module # noqa: ARG001 +) -> None: """The numpy.linalg module implicitly loads the lapack_lite module; make - sure this happens.""" + sure this happens. + """ finder.include_module("numpy.linalg.lapack_lite") -def load_numpy_random_mtrand(finder: ModuleFinder, module: Module) -> None: +def load_numpy_random_mtrand( + finder: ModuleFinder, module: Module # noqa: ARG001 +) -> None: """The numpy.random.mtrand module is an extension module and the numpy module imports * from this module; define the list of global names available to this module in order to avoid spurious errors about missing - modules.""" + modules. + """ module.global_names.update(["rand", "randn"]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/hooks/pyside2/__init__.py new/cx_Freeze-6.14.9/cx_Freeze/hooks/pyside2/__init__.py --- old/cx_Freeze-6.14.7/cx_Freeze/hooks/pyside2/__init__.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/hooks/pyside2/__init__.py 2023-04-08 21:01:02.000000000 +0200 @@ -5,10 +5,11 @@ import os -from ..._compat import IS_CONDA, IS_WINDOWS +from ..._compat import IS_CONDA, IS_LINUX, IS_WINDOWS from ...common import get_resource_file_path from ...finder import ModuleFinder from ...module import Module +from .._qthooks import copy_qt_files from .._qthooks import load_qt_qt as load_pyside2_qt from .._qthooks import load_qt_qtcharts as load_pyside2_qtcharts from .._qthooks import ( @@ -63,23 +64,17 @@ resource = get_resource_file_path("hooks/pyside2", "resource", ".py") finder.include_file_as_module(resource, "PySide2._cx_freeze_resource") - # Include a copy of qt.conf (works for pyside2 wheels on windows) - if IS_WINDOWS: - qt_conf = get_resource_file_path("hooks/pyside2", "qt", ".conf") - if qt_conf: - finder.include_files(qt_conf, "qt.conf") + # Include a copy of qt.conf (used by webengine) + if IS_WINDOWS or IS_LINUX: + copy_qt_files(finder, "PySide2", "LibraryExecutablesPath", "qt.conf") # Inject code to init - code_string = module.file.read_text() - code_string += """ -# cx_Freeze patch start -try: - import PySide2._cx_freeze_resource -except ImportError: - pass -import PySide2._cx_freeze_qt_debug -# cx_Freeze patch end -""" + code_string = module.file.read_text(encoding="utf-8") + code_string += "\n# cx_Freeze patch start\n" + if IS_CONDA: + code_string += "import PySide2._cx_freeze_resource\n" + code_string += "import PySide2._cx_freeze_qt_debug\n" + code_string += "# cx_Freeze patch end\n" module.code = compile(code_string, os.fspath(module.file), "exec") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/initscripts/__startup__.py new/cx_Freeze-6.14.9/cx_Freeze/initscripts/__startup__.py --- old/cx_Freeze-6.14.7/cx_Freeze/initscripts/__startup__.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/initscripts/__startup__.py 2023-04-08 21:01:02.000000000 +0200 @@ -70,12 +70,8 @@ add_to_path = os.path.join(frozen_dir, "lib") if add_to_path not in search_path: search_path.insert(0, add_to_path) - # add numpy+mkl to the PATH - if hasattr(BUILD_CONSTANTS, "MKL_PATH"): - add_to_path = os.path.join(frozen_dir, BUILD_CONSTANTS.MKL_PATH) - search_path.append(os.path.normpath(add_to_path)) # add to dll search path (or to path) - env_path = os.environ["PATH"].split(os.pathsep) + env_path = os.environ.get("PATH", "").split(os.pathsep) if IS_MINGW: env_path = [os.path.normpath(entry) for entry in env_path] for directory in search_path: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/cx_Freeze/winversioninfo.py new/cx_Freeze-6.14.9/cx_Freeze/winversioninfo.py --- old/cx_Freeze-6.14.7/cx_Freeze/winversioninfo.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/cx_Freeze/winversioninfo.py 2023-04-08 21:01:02.000000000 +0200 @@ -8,8 +8,7 @@ from pathlib import Path from struct import calcsize, pack -# pylint: disable-next=no-name-in-module -from setuptools.extern.packaging import version as packaging_version +from ._compat import packaging try: from win32verstamp import stamp as version_stamp @@ -48,7 +47,7 @@ CX_FREEZE_STAMP = "internal" -class Version(packaging_version.Version): +class Version(packaging.version.Version): """A valid PEP440 version.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/doc/src/conf.py new/cx_Freeze-6.14.9/doc/src/conf.py --- old/cx_Freeze-6.14.7/doc/src/conf.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/doc/src/conf.py 2023-04-08 21:01:02.000000000 +0200 @@ -51,7 +51,7 @@ # built documents. # # The full version, including alpha/beta/rc tags. -release = "6.14.7" +release = "6.14.9" # The short X.Y version. version = ".".join(release.split(".")[:2]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/pyproject.toml new/cx_Freeze-6.14.9/pyproject.toml --- old/cx_Freeze-6.14.7/pyproject.toml 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/pyproject.toml 2023-04-08 21:01:02.000000000 +0200 @@ -8,7 +8,7 @@ [project] name = "cx_Freeze" -version = "6.14.7" +version = "6.14.9" description = "Create standalone executables from Python scripts" authors = [{name = "Anthony Tuininga", email = "anthony.tuini...@gmail.com"}] maintainers = [{name = "Marcelo Duarte", email = "marcelotdua...@users.noreply.github.com"}] @@ -36,12 +36,13 @@ keywords = ["cx-freeze cxfreeze cx_Freeze freeze python"] requires-python = ">=3.7.4" dependencies = [ - "setuptools>=61.2,<68", + "setuptools>=62.6,<68", "cx_Logging>=3.1 ;sys_platform == 'win32'", "lief>=0.12.0 ;sys_platform == 'win32'", "patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'x86_64'", "patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'i686'", "patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'aarch64'", + "patchelf>=0.17.2.1 ;sys_platform == 'linux' and platform_machine == 'armv7l'", "patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'ppc64le'", "patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 's390x'", ] @@ -157,6 +158,7 @@ testpaths = ["tests"] filterwarnings = [ "ignore::DeprecationWarning:distutils.*", + "ignore::DeprecationWarning:pkg_resources.*", "ignore::DeprecationWarning:setuptools.*", ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/requirements-dev.txt new/cx_Freeze-6.14.9/requirements-dev.txt --- old/cx_Freeze-6.14.7/requirements-dev.txt 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/requirements-dev.txt 2023-04-08 21:01:02.000000000 +0200 @@ -1,11 +1,12 @@ --extra-index-url https://marcelotduarte.github.io/packages/ -setuptools>=61.2,<68 +setuptools>=62.6,<68 cx_Logging>=3.1 ;sys_platform == 'win32' lief>=0.12.0 ;sys_platform == 'win32' patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'x86_64' patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'i686' patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'aarch64' +patchelf>=0.17.2.1 ;sys_platform == 'linux' and platform_machine == 'armv7l' patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'ppc64le' patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 's390x' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/requirements.txt new/cx_Freeze-6.14.9/requirements.txt --- old/cx_Freeze-6.14.7/requirements.txt 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/requirements.txt 2023-04-08 21:01:02.000000000 +0200 @@ -1,10 +1,11 @@ --extra-index-url https://marcelotduarte.github.io/packages/ -setuptools>=61.2,<68 +setuptools>=62.6,<68 cx_Logging>=3.1 ;sys_platform == 'win32' lief>=0.12.0 ;sys_platform == 'win32' patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'x86_64' patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'i686' patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'aarch64' +patchelf>=0.17.2.1 ;sys_platform == 'linux' and platform_machine == 'armv7l' patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'ppc64le' patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 's390x' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/tests/test_winmsvcr.py new/cx_Freeze-6.14.9/tests/test_winmsvcr.py --- old/cx_Freeze-6.14.7/tests/test_winmsvcr.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/tests/test_winmsvcr.py 2023-04-08 21:01:02.000000000 +0200 @@ -2,9 +2,14 @@ from __future__ import annotations +import sys + +import pytest + from cx_Freeze.winmsvcr import FILES +@pytest.mark.skipif(sys.platform != "win32", reason="Windows tests") def test_files(): """Test winmsvcr.FILES""" expected = ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cx_Freeze-6.14.7/tests/test_winversioninfo.py new/cx_Freeze-6.14.9/tests/test_winversioninfo.py --- old/cx_Freeze-6.14.7/tests/test_winversioninfo.py 2023-03-12 09:16:08.000000000 +0100 +++ new/cx_Freeze-6.14.9/tests/test_winversioninfo.py 2023-04-08 21:01:02.000000000 +0200 @@ -3,11 +3,14 @@ # pylint: disable=unused-import from __future__ import annotations -import pytest # noqa +import sys + +import pytest from cx_Freeze.winversioninfo import Version, VersionInfo +@pytest.mark.skipif(sys.platform != "win32", reason="Windows tests") class TestVersionInfo: """Test VersionInfo class."""