From 086ffd38f4091dbf1dc6bbabc28e0a0b02fd102d4844edfc845070217dda27f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 8 Jul 2025 08:27:41 +0000 Subject: [PATCH 1/2] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cx_Freeze?expand=0&rev=41 --- .gitattributes | 23 ++ .gitignore | 1 + 8.0.0.tar.gz | 3 + python-cx_Freeze.changes | 500 +++++++++++++++++++++++++++ python-cx_Freeze.spec | 103 ++++++ use-only-console-on-python-313.patch | 86 +++++ 6 files changed, 716 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 8.0.0.tar.gz create mode 100644 python-cx_Freeze.changes create mode 100644 python-cx_Freeze.spec create mode 100644 use-only-console-on-python-313.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/8.0.0.tar.gz b/8.0.0.tar.gz new file mode 100644 index 0000000..fa5b6bd --- /dev/null +++ b/8.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d9f70542cd78a366bbca8357b172bb9bed6d9f177a1cc4e89c030996465ead7 +size 3278876 diff --git a/python-cx_Freeze.changes b/python-cx_Freeze.changes new file mode 100644 index 0000000..1914db5 --- /dev/null +++ b/python-cx_Freeze.changes @@ -0,0 +1,500 @@ +------------------------------------------------------------------- +Tue Jul 8 08:26:51 UTC 2025 - Markéta Machová + +- Convert to libalternatives + +------------------------------------------------------------------- +Thu Apr 3 01:23:28 UTC 2025 - Steve Kowalik + +- Update to 8.0.0: + * Python 3.13 support. + * Python 3.13 free-threaded support for Linux and macOS. + * Download and extract the MSVC Redistributable files. + * Implement bases using PEP587 - Python Initialization Configuration. + * Drop Python 3.8 support. + * New and Improved hooks. + * Bug fixes and improvements. +- Add patch use-only-console-on-python-313.patch: + * Only build legacy console for Python 3.12 and earlier. +- Stop skipping Python 3.13, it's supported upstream. +- Normalize metadata directory name. + +------------------------------------------------------------------- +Thu Mar 20 07:52:59 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 7.2.10 + * doc: improve documentation on using pyproject.toml [ci skip] (#2792) + * doc: fix typo [ci skip] (#2793) + * tests: fix msi test (#2796) + * build(deps): update lief requirement from <=0.16.2,>=0.13.2 + to >=0.13.2,<=0.16.3 (#2795) + * hooks: fix shapely [windows] (#2797) + * fix: missing dlls in top directory [mingw] (#2799) + * build-wheel: use ubuntu 22.04 emulator to build ppc64le (#2805) + +------------------------------------------------------------------- +Mon Feb 3 13:40:37 UTC 2025 - Dirk Müller + +- update to 7.2.9: + * Bugfix release. + +- update to 7.2.8: + * Bugfix release. + +------------------------------------------------------------------- +Wed Dec 11 00:13:31 UTC 2024 - Steve Kowalik + +- Update to 7.2.7: + * bdist_rpm: drop rpm2_mode and refactor spec_file + * hooks: the optimized mode is the default for pip installations + * hooks: support numpy 2.0 + * Exit with non-zero exit code on exception + * hooks: improve scipy hooks + * hooks: fix matplotlib hooks used in zip_include_packages + * hooks: fix scipy hooks used in zip_include_packages + * linux: bdist_rpm depends on rpmbuild being installed + * chore: use pytest-datafiles to run tests in temporary path + * fix: zip_include_packages/zip_exclude_packages regression + * chore: use pytest-xdist to speed up the tests + * chore: drop support for python 3.7 + * parser: support for lief 0.14 ParserConfig + * chore: add basic support for Python 3.12 + * fix: bdist_rpm should generate only binaries [linux] + * samples: fix pydantic sample to work python < 3.10 + * hooks: fix the sentry_sdk hook + * hooks: move sklearn hook to a submodule + * hooks: add boto3 + * fix: bdist_rpm to pass tests in python 3.12b4 + * hooks: multiprocessing support for forkserver and spawn + * hooks: update sysconfig hook + * hooks: PySide2/6 - shiboken2/6 in zip_include_packages + * finder: add base modules at the end to simplify tests + * hooks: fix for pyqt [conda linux] + * hooks: move ssl hook to a submodule + * hooks: fix pyside2 webengine [conda linux] + * hooks: fix pyqt5 webengine [conda linux] + * module: ModuleHook class to support inheritance + * finder: improve scan code to detect packages using import call + * finder: cache_path holds where distribution data is saved + * module: propagate cache_path from the finder + * module: get the implicit imports of extensions in a stub file + * module: add a importshed for parsed stubs + * hooks: qt extension modules are detected using stubs + * module: search for the stub file already parsed in the distribution + * hooks: improve tzdata/zoneinfo/pytz hooks a bit for use in zip + * hooks: use module.exclude_names to filter missing modules + * build-wheel: add support for ppc64le binary wheels for py310+ + * hooks: add pycryptodomex and update pycryptodome + * hooks: add support for pandas 2.1.0 + * hooks: improve numpy and pandas hooks + * samples: small tweaks to demonstrate independent options + * hooks: fix numpy/scipy dylibs are included twice + * hooks: add RNS (Reticulum) + * hooks: add numpy 1.26 + * hooks: move tkinter and tz data to share folder + * fix: avoid false builtin modules developing in multi-environment + * parser: use the internal path instead of sys.path + * hooks: add tidylib + * parser: exclude LD_PRELOAD to not include triggered dependencies + * hooks: initialize blas [numpy conda-forge] + * bdist_deb: create an DEB distribution [new feature] + * chore: rewrite some imports as absolute + * hooks: add triton and support for pytorch 2.1 + * hooks: tweaks to the debugging of qt hooks + * hooks: adds anyio, pyarrow and tiktoken + * hooks: add yt_dlp + * hooks: add AV and PyAV + * bdist_appimage: build Linux AppImage format [new feature] + * setup script: extend executables keyword to support more types + * setup script: pre-defined values for base are valid in all OS + * setup script: add an extension to executable icon that is valid across OS + * freezer: improve/fixes validate_executable + * hooks: opencv-python - minor fixes + * hooks: add pyproj + * parser: minor fix to support lief 0.14 + * fix: incorrect metadata usage in install/install_exe + * freezer: remove dead code (not used in py38+) + * hooks: add easyocr and torchvision (also update skickit-image and pytorch) + * hooks: support tensorflow plugins + * chore: refactor internal modules + * chore: move License to the project root dir + * chore: generate multiple files for requirements + * test: add a linux binary wheel test in ci + * fix: coverage report usage and omit option + * initscripts: use of loader is deprecated + * parser: show what patchelf is doing if silent is off + * fix: regression in _pre_copy_hook (Linux) + * hooks: support numpy in python 3.12 +- Drop patch python312.patch, included upstream. + +------------------------------------------------------------------- +Fri Mar 22 19:36:23 UTC 2024 - Dirk Müller + +- update to 6.15.16: + * **Full Changelog**: https://github.com/marcelotduarte/cx_Free + ze/compare/6.15.15...6.15.16 + +------------------------------------------------------------------- +Wed Feb 21 08:52:26 UTC 2024 - Daniel Garcia + +- Add python312.patch, gh#marcelotduarte/cx_Freeze#1925 +- update to 6.15.15: + * **Full Changelog**: https://github.com/marcelotduarte/cx_Freeze/compare/6.15.13...6.15.15 + +------------------------------------------------------------------- +Tue Jan 30 12:27:28 UTC 2024 - Dirk Müller + +- update to 6.15.13: + * **Full Changelog**: https://github.com/marcelotduarte/cx_Free + ze/compare/6.15.12...6.15.13 + +------------------------------------------------------------------- +Wed Dec 27 10:04:06 UTC 2023 - Dirk Müller + +- update to 6.15.12: + * **Full Changelog**: https://github.com/marcelotduarte/cx_Free + ze/compare/6.15.11...6.15.12 + +------------------------------------------------------------------- +Sat Dec 2 14:07:50 UTC 2023 - Dirk Müller + +- update to 6.15.11: + * improve qt samples + * **Full Changelog**: https://github.com/marcelotduarte/cx_Free + ze/compare/6.15.10...6.15.11 + +------------------------------------------------------------------- +Tue Nov 14 15:48:27 UTC 2023 - Dirk Müller + +- update to 6.15.10: + https://github.com/marcelotduarte/cx_Freeze/compare/6.15.9...6.15.10 + +------------------------------------------------------------------- +Thu Oct 5 09:24:47 UTC 2023 - Dirk Müller + +- update to 6.15.9: + * https://github.com/marcelotduarte/cx_Freeze/compare/6.15.4...6.15.9 + +------------------------------------------------------------------- +Wed Jul 26 13:15:40 UTC 2023 - Bernhard Wiedemann + +- update to 6.15.4: + * fix a year 2038 issue + * various fixes + * hooks: multiprocessing support for forkserver and spawn + * hooks: add boto3 + * hooks: add py-cord (fork of discord) + * samples: add a new matplotlib sample using Tk + +------------------------------------------------------------------- +Wed May 3 16:45:46 UTC 2023 - Dirk Müller + +- 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 + +------------------------------------------------------------------- +Wed Mar 29 07:27:19 UTC 2023 - Steve Kowalik + +- Update to 6.14.7: + * Support to build musllinux wheels + * project: Improve patchelf dependency specification + * Include copy of cx_Freeze license with frozen applications + * Support Python 3.11 and set it as default in CI + * Drop python 3.6 + * build: setuptools has 'build' command since v62.4.0 + * finder: extend include_file_as_module to include submodule + * bases and initscripts: lowercase to remove pylint invalid-name + * freezer: copy package data using _copy_files to correctly parse dependencies + * Cleanup to support/test with python 3.11b3 + * feezer: use internal _create_directory (create the parents, verbose) + * Set the path to search for modules, and fix the path for built-in modules + * Compile base executables with generic names depending on SOABI + * Get rid of some calls to deprecated module distutils + * Support for using embedded manylinux static libraries + * Fix incorrect default bin path includes + * Use a self made requirements sync instead of piptools + * Add cached_property (and a compatible function) for planned use + * The built-in modules are determined based on the cx_Freeze build + * finder: use pep8 names (and enable pylint for it) + * Declare the new subpackage cx_Freeze.command + * Using a trick to get around a dependency on distutils. + * Implements Parser interface to create an abstraction to parse binary + * files + * Implements basic PEParser interface + * Helper to create and return a Path-like temporary directory + * Add a basic pyproject.toml for build and tools + * importlib.metadata is no longer provisional in Python 3.10 + * Prioritize importlib_metadata in versions lower than 3.10 + * Avoid error when cx_Freeze.util is not build yet + * Use helper TemporaryPath in module + * Implements ELFParser interface merging patchelf + * Extend Module.in_file_system to support an optimized mode + * Convert existing tests to pytest + increase coverage + * Fix relative path in dependencies, detected in miniconda linux + * Use pathlib everywhere + * Create permanent cx_Freeze/bases + * Enable python -m cx_Freeze syntax + * Starts freezing in a clean directory + * Improve metadata using importlib.metadata + * Improve copy dependent files relative to source module file + * Added support for Python 3.8. +- Drop patch remove-nose.patch, upstream moved to pytest. + +------------------------------------------------------------------- +Fri Sep 17 02:53:48 UTC 2021 - Steve Kowalik + +- Add remove-nose.patch: + * Use pytest rather than nose in one test case. + +------------------------------------------------------------------- +Wed May 27 09:36:53 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Fri Sep 13 14:55:04 UTC 2019 - Tomáš Chvátal + +- Conflict with python2-cx_Freeze as we are no longer update-alternatives + set up package but provide only py3 variant + +------------------------------------------------------------------- +Fri Sep 13 13:27:50 UTC 2019 - Jan Engelhardt + +- Use noun phrase. + +------------------------------------------------------------------- +Fri Sep 13 10:13:25 UTC 2019 - Tomáš Chvátal + +- Update to 6.0: + * Corrected support for Python 3.7 (PR #395). + * Use importlib and other Python 3 improvements (PR #484, PR #485, PR #486, PR #490). + * Fixed issue with @rpath causing file copy errors on macOS (PR #307). + * Replaced file() with open() and use context manager to ensure the file handle is closed and deleted (PR #348). + * Corrected invalid version handling in bdist_msi (PR #349, Issue #340). + * Corrected hook for clr module (PR #397, PR #444). + * Corrected documentation for compress option (PR #358). + * Ensure that the pythoncom and pywintypes DLLs are found in the lib directory and not in the base directory (Issue #332). + * Always copy dependent files to root directory on macOS (PR #365). + * Skip self referencing archive on macOS (PR #364, Issue #304). + * Include doc directory in source distribution (PR #394, Issue #376). + * Force msilib module to be reloaded in order to allow for the generation of multiple MSI packages in a single session (PR #419). + * Added hook for PyQt5.QtPrintSupport module (PR #401). + * Added ability to include an icon on the add/remove program window that pops up during installation (PR #387). + * Prevent spurious errors from being printed during building on macOS by checking to see that a file is a Mach-O binary before adding it to the list of files it is checking the reference of (PR #342, Issue #268). + * Avoid otool bug on macOS Yosemite (PR #297, Issue #292). + * Added ability to specify environment variables that should be created when an MSI package is installed (PR #266). + * Added support for including resources in an app bundle for macOS (PR #423). + * Added absolute reference path option for macOS packages (PR #424). + * Added CFBundle identifier for macOS packages (PR #427, Issue #426). + * Added hook for copying SSL DLLs for Python 3.7+ on Windows (PR #470). + * Added -municode flag when building on Windows with mingw32 (PR #468). + * Added hook for pycparser (PR #446). + * Fixed hook for zmq so it doesn’t fail when there is no bundled libzmq library in the installed pyzmq package (PR #442). + * Print error when fetching dependent files fails (PR #435). + * Make executable writable before adding the icon (PR #430, Issue #368). + * Dropped support for RPM and MSI packages for cx_Freeze itself since these are no longer supported by PyPI. + * Fix building console app with mingw32 (PR #475). + * Force inclusion of the unicodedata module which is used by the socket module, and possibly others (PR #476). + * Added hook for asyncio package (PR #477). + * Added hook for idna package (PR #478). + * Added hook for pkg_resources package (PR #481). + * Added hook for gevent (PR #495). + * Force .exe extension to be included on Windows, so that the same setup code can be used on both Linux and Windows (PR #489). + * Added hook for Pillow (PR #491). + * Improved hook for tkinter (PR #493). + * Avoid attempting to check for dependent files on Windows when the file is not an executable or DLL (PR #492). + * Ensure that only executable files are checked for dependencies in order to avoid spurious errors when checking for dependent files. + * Improved hook for matplotlib. + * Dropped support for Python 2.x. Use cx_Freeze 5 for Python 2.x support. + * Instead of depending on the built-in functionality of searching for a zip file that looks like pythonxx.zip (which is disabled on some platforms like Ubuntu), set the Python path to include a subdirectory called “lib” and a zip file “lib/library.zip” on all platforms. + * Do not create version resource when version is omitted (PR #279). + * Ensure the sqlite3 DLL is loaded in the same directory as the module which depends on it (Issue #296). + +------------------------------------------------------------------- +Fri May 18 21:12:54 UTC 2018 - jengelh@inai.de + +- Add limitations of CX_Freeze to the descriptions. + +------------------------------------------------------------------- +Wed May 9 03:01:39 UTC 2018 - toddrme2178@gmail.com + +- Update to 5.1.1 + * See changelog at https://github.com/anthony-tuininga/cx_Freeze/blob/5.1.1/doc/releasenotes.rst +- Add license file + +------------------------------------------------------------------- +Wed Oct 18 16:42:45 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version +- Update to 5.1 + * See changelog at https://github.com/anthony-tuininga/cx_Freeze/blob/5.1/doc/releasenotes.rst + +------------------------------------------------------------------- +Tue Jan 14 18:55:40 UTC 2014 - termim@gmail.com + +- Update to 4.3.2: + * note: This version supports Python 2.4 and above. If you need Python + 2.3 support, please use cx_Freeze 4.2.3. + * Added support for Python 3.4. + * Added hooks for PyQt4, PyQt5 and PySide to handle their plugins. + * Added support for creating a shortcut/alias to the Applications + directory within distributed DMG files for OS X. + * Improve missing modules output. + * Avoid polluting the extension module namespace when using the bootstrap + module to load the extension. + * Added support for using setuptools and pip if such tools are available. + * Added first tests; nose and mock are required to run them. + * Remove --bundle-iconfile in favor of --iconfile as a more generic + method of including the icon for bdist_mac. + * Documentation improved and FAQ added. + * Converted samples to follow PEP 8. +- Bugs fixed: + * cxfreeze-quickstart failed if the default base was not used + * scripts frozen with Python 3 fail with an ImportError trying to import + the re module + * fix bug where after a first attempt to find a module failed, the second + attempt would erroneously succeed + * stop attempting to load a module by a name that is not a valid Python + identifier +- Update to 4.3.1: + * note: This version supports Python 2.4 and above. If you need Python + 2.3 support, please use cx_Freeze 4.2.3. + * Added support for the final release of Python 3.3. + * Added support for copying the MSVC runtime DLLs and manifest if desired + by using the --include-msvcr switch. Thanks to Almar Klein for the + initial patch. + * Clarified the documentation on the --replace-paths option. Thanks to + Thomas Kluyver for the patch. +- Bugs fixed: + * Producing a Mac distribution failed with a variable reference. + * Freezing a script using PyQt on a Mac failed with a type error. + * Version number reported was incorrect. + * Correct paths during installation on Windows. +- Update to 4.3: + * note: This version supports Python 2.4 and above. If you need Python + 2.3 support, please use cx_Freeze 4.2.3. + * Added options to build Mac OS X application bundles and DMG packages + using ``bdist_mac`` and ``bdist_dmg`` distutils commands. Written by + Rob Reilink. + * The documentation is now using Sphinx, and is `available on + ReadTheDocs.org + `_. + * Added support for Python 3.3 which uses a different compiled file + format than earlier versions of Python. + * Added support for Windows services which start automatically and which + are capable of monitoring changes in sessions such as lock and unlock. + * New ``cxfreeze-quickstart`` wizard to create a basic ``setup.py`` file. + Initially written by Thomas Kluyver. + * Included files under their original name can now be passed to + ``include_files`` as a tuple with an empty second element. Written by + r_haritonov. + * File inclusions/exclusions can now be specified using a full path, or a + shared library name with a version number suffix. +- Bugs fixed: + * Messagebox display of certain errors in Windows GUI applications with + Python 3. + * Running Windows GUI applications in a path containing non-ASCII + characters. + * Calculate the correct filename for the Python shared library in Python + 3.2. + * Including a package would not include the packages within that package, + only the modules within that package. + +------------------------------------------------------------------- +Fri May 4 08:57:17 UTC 2012 - toddrme2178@gmail.com + +- Fix for rpmlint warnings +- Update license + +------------------------------------------------------------------- +Mon Apr 30 14:13:38 UTC 2012 - toddrme2178@gmail.com + +- Split python 3 version into a seperate spec file + +------------------------------------------------------------------- +Wed Dec 7 14:43:04 UTC 2011 - saschpe@suse.de + +- Define python3_sitearch for openSUSE-11.3 and 11.4 + +------------------------------------------------------------------- +Wed Dec 7 10:28:46 UTC 2011 - saschpe@suse.de + +- Provides/obsoletes for python3-cx_freeze + +------------------------------------------------------------------- +Mon Dec 5 12:28:35 UTC 2011 - toddrme2178@gmail.com + +- Renamed the package to match the upstream naming +- Cleaned up spec file formatting +- Added a python 3 version of the package + +------------------------------------------------------------------- +Sun Mar 20 02:36:44 UTC 2011 - alexandre@exatati.com.br + +- Update to 4.2.3: + - Added support for Python 3.2. + - Added hook for datetime module which implicitly imports the time module. + - Fixed hook for tkinter in Python 3.x. + - Always include the zlib module since the zipimport module requires + it, even when compression is not taking place. + - Added sample for a tkinter application. +- Regenerated spec file. + +------------------------------------------------------------------- +Mon Dec 27 01:11:08 UTC 2010 - alexandre@exatati.com.br + +- Update to 4.2.2: + - Added support for namespace packages which are loaded implicitly upon + startup by injection into sys.modules. + - Added support for a Zope sample which makes use of namespace packages. + - Use the Microsoft compiler on Windows for Python 2.6 and up as some + strange behaviors were identified with Python 2.7 when compiled using + mingw32. + - Eliminate warning about -mwindows when using the Microsoft compiler for + building the Win32GUI base executable. + - Added support for creating version resources on Windows. + - Ensure that modules that are not truly required for bootstrapping are not + included in the frozen modules compiled in to the executable; otherwise, + * cannot be found at + runtime. This problem only seems to be present in Python 2.7.1 but it is a + good improvement for earlier releases of Python as well. + - Added support for setting the description for Windows services. + - Added hook for using the widget plugins which are part of the PyQt4.uic + package. + - Added additional hooks to remove spurious errors about missing modules + and to force inclusion of implicitly imported modules (twitter module + *. + - Fixed support for installing frozen executables under Python 3.x on + Windows. + - Removed optional import of setuptools which is not a complete drop-in + replacement for distutils and if found, replaces distutils with itself, + resulting in some distutils features not being available; for those who + require or prefer the use of setuptools, import it in your setup.py. + +------------------------------------------------------------------- +Sun Oct 17 11:21:14 UTC 2010 - alexandre@exatati.com.br + +- Update to 4.2.1. + +------------------------------------------------------------------- +Wed Jul 21 01:56:37 UTC 2010 - alexandre@exatati.com.br + +- Update to 4.2. + +------------------------------------------------------------------- +Wed Jan 6 11:27:45 UTC 2010 - alexandre@exatati.com.br + +- Update to 4.1.2. + +------------------------------------------------------------------- +Mon Dec 21 10:57:44 UTC 2009 - alexandre@exatati.com.br + +- Updated to 4.1.1. + +------------------------------------------------------------------- +Wed Jul 29 17:45:29 UTC 2009 - alexandre@exatati.com.br + +- Updated to 4.1. diff --git a/python-cx_Freeze.spec b/python-cx_Freeze.spec new file mode 100644 index 0000000..1bfc27a --- /dev/null +++ b/python-cx_Freeze.spec @@ -0,0 +1,103 @@ +# +# spec file for package python-cx_Freeze +# +# 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define oldpython python +%bcond_without libalternatives +Name: python-cx_Freeze +Version: 8.0.0 +Release: 0 +Summary: Scripts to create standalone executables from Python scripts +License: Python-2.0 +URL: https://github.com/anthony-tuininga/cx_Freeze +Source: https://github.com/anthony-tuininga/cx_Freeze/archive/%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#marcelotduarte/cx_Freeze#2842 +Patch0: use-only-console-on-python-313.patch +BuildRequires: %{python_module base >= 3.9} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module filelock >= 3.12.3} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module packaging >= 24} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest-datafiles} +BuildRequires: %{python_module pytest-mock} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools >= 65} +BuildRequires: %{python_module tomli >= 2.0.1 if %python-base < 3.11} +BuildRequires: %{python_module wheel} +BuildRequires: alts +BuildRequires: chrpath +BuildRequires: fdupes +BuildRequires: patchelf +BuildRequires: python-rpm-macros +Requires: alts +Requires: patchelf +Requires: python-filelock >= 3.12 +Requires: python-packaging >= 24 +Requires: python-setuptools >= 65 +# we provide same binary like the deprecated py2 variant +Conflicts: %{oldpython}-cx_Freeze +%if 0%{python_version_nodots} < 311 +Requires: python-tomli >= 2.0.1 +%endif +%python_subpackages + +%description +CX_Freeze is a set of scripts and modules for turning Python scripts +into executables in much the same way that py2exe and py2app do. + +It works by bundling Python executables and libraries from the local +Python installation. As such, the distribution produced by CX_Freeze +shares the very same dependencies. System libraries are not bundled +however, so additional dependencies may need to be manually installed +before being able to run "cx-frozen" executables that were created by +other systems. + +%prep +%autosetup -p1 -n cx_Freeze-%{version} +sed -i -e '/^#!\//, 1d' samples/*/*.py +sed -i -e 's/-nauto//' pyproject.toml +chmod a-x cx_Freeze/initscripts/*.py + +%build +export CFLAGS="%{optflags}" +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/cxfreeze-quickstart +%python_clone -a %{buildroot}%{_bindir}/cxfreeze +%python_expand chrpath -d %{buildroot}%{$python_sitearch}/cx_Freeze/bases/console* +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +# bdist_rpm is not long for this world, and it always execs the default Python +%pytest_arch -k 'not (test_command_bdist_rpm or test_command_build_exe or test_command_build or test_bdist_appimage)' + +%pre +%python_libalternatives_reset_alternative cxfreeze-quickstart +%python_libalternatives_reset_alternative cxfreeze + +%files %{python_files} +%doc README.md +%license doc/src/license.rst +%python_alternative %{_bindir}/cxfreeze +%python_alternative %{_bindir}/cxfreeze-quickstart +%{python_sitearch}/cx_Freeze +%{python_sitearch}/cx_[Ff]reeze-%{version}.dist-info + +%changelog diff --git a/use-only-console-on-python-313.patch b/use-only-console-on-python-313.patch new file mode 100644 index 0000000..c70e6fb --- /dev/null +++ b/use-only-console-on-python-313.patch @@ -0,0 +1,86 @@ +From 4d1325fedc01defcc5053672fc8eeb47ef81db57 Mon Sep 17 00:00:00 2001 +From: Marcelo Duarte +Date: Fri, 21 Mar 2025 18:27:46 -0300 +Subject: [PATCH] fix: use only console based on PEP587 on Python 3.13 + +--- + cx_Freeze/executable.py | 11 +++-------- + setup.py | 6 +----- + tests/test_executables.py | 8 +------- + 3 files changed, 5 insertions(+), 20 deletions(-) + +diff --git a/cx_Freeze/executable.py b/cx_Freeze/executable.py +index b19b50555..56cc0f041 100644 +--- a/cx_Freeze/executable.py ++++ b/cx_Freeze/executable.py +@@ -11,7 +11,6 @@ + from typing import TYPE_CHECKING + + from cx_Freeze._compat import ( +- ABI_THREAD, + EXE_SUFFIX, + IS_MACOS, + IS_MINGW, +@@ -75,14 +74,10 @@ def base(self) -> Path: + + @base.setter + def base(self, name: str | Path | None) -> None: +- # The default base is the legacy console, except for Python 3.13t and +- # Python 3.13 on macOS, that supports only the new console ++ # The default base is the legacy console, except for ++ # Python 3.13, that supports only the new console + version = sys.version_info[:2] +- if ( +- version <= (3, 13) +- and ABI_THREAD == "" +- and not (IS_MACOS and version == (3, 13)) +- ): ++ if version < (3, 13): + name = name or "console_legacy" + else: + name = name or "console" +diff --git a/setup.py b/setup.py +index 7185a255a..8278a42f4 100644 +--- a/setup.py ++++ b/setup.py +@@ -285,11 +285,7 @@ def get_extensions() -> list[Extension]: + optional=optional, + ) + ] +- if ( +- version <= (3, 13) +- and abi_thread == "" +- and not (IS_MACOS and version == (3, 13)) +- ): ++ if version < (3, 13): + extensions += [ + Extension( + "cx_Freeze.bases.console_legacy", +diff --git a/tests/test_executables.py b/tests/test_executables.py +index cdba2c9de..7e95bf161 100644 +--- a/tests/test_executables.py ++++ b/tests/test_executables.py +@@ -12,10 +12,8 @@ + + from cx_Freeze import Executable + from cx_Freeze._compat import ( +- ABI_THREAD, + BUILD_EXE_DIR, + EXE_SUFFIX, +- IS_MACOS, + IS_MINGW, + IS_WINDOWS, + ) +@@ -242,11 +240,7 @@ def test_executables( + ("icon.ico", "icon.icns", "icon.png", "icon.svg"), + ), + ] +-if ( +- sys.version_info[:2] <= (3, 13) +- and ABI_THREAD == "" +- and not (IS_MACOS and sys.version_info[:2] == (3, 13)) +-): ++if sys.version_info[:2] < (3, 13): + TEST_VALID_PARAMETERS += [ + ("base", None, "console_legacy-"), + ("base", "console_legacy", "console_legacy-"), From a5b931808f7da67d2987349b199c51b362c32871fc957d452bb14415d401893a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 2 Sep 2025 15:40:04 +0000 Subject: [PATCH 2/2] skip the failing test OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cx_Freeze?expand=0&rev=42 --- python-cx_Freeze.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python-cx_Freeze.spec b/python-cx_Freeze.spec index 1bfc27a..b6084a7 100644 --- a/python-cx_Freeze.spec +++ b/python-cx_Freeze.spec @@ -1,7 +1,7 @@ # # spec file for package python-cx_Freeze # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -86,7 +86,8 @@ export CFLAGS="%{optflags}" %check # bdist_rpm is not long for this world, and it always execs the default Python -%pytest_arch -k 'not (test_command_bdist_rpm or test_command_build_exe or test_command_build or test_bdist_appimage)' +# test_bdist_deb_simple_pyproject runs the binary, which is currently complicated with libalternatives: https://github.com/openSUSE/python-rpm-macros/pull/196 +%pytest_arch -k 'not (test_command_bdist_rpm or test_command_build_exe or test_command_build or test_bdist_appimage or test_bdist_deb_simple_pyproject)' %pre %python_libalternatives_reset_alternative cxfreeze-quickstart