2018-05-09 03:43:29 +00:00
#
# spec file for package python-cx_Freeze
#
2025-09-02 15:40:04 +00:00
# Copyright (c) 2025 SUSE LLC and contributors
2018-05-09 03:43:29 +00:00
#
# 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.
- 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).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cx_Freeze?expand=0&rev=5
2019-09-13 10:28:08 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2018-05-09 03:43:29 +00:00
#
2019-09-13 14:55:24 +00:00
%define oldpython python
2025-07-08 08:27:41 +00:00
%bcond_without libalternatives
2018-05-09 03:43:29 +00:00
Name : python-cx_Freeze
2025-03-31 05:26:28 +00:00
Version : 8.0.0
2018-05-09 03:43:29 +00:00
Release : 0
2019-09-13 13:31:30 +00:00
Summary : Scripts to create standalone executables from Python scripts
2018-05-09 03:43:29 +00:00
License : Python-2.0
- 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).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cx_Freeze?expand=0&rev=5
2019-09-13 10:28:08 +00:00
URL : https://github.com/anthony-tuininga/cx_Freeze
Source : https://github.com/anthony-tuininga/cx_Freeze/archive/%{version} .tar.gz
2025-03-31 05:26:28 +00:00
# PATCH-FIX-UPSTREAM gh#marcelotduarte/cx_Freeze#2842
Patch0 : use-only-console-on-python-313.patch
2024-12-11 00:13:48 +00:00
BuildRequires : %{python_module base >= 3.9}
2018-05-09 03:43:29 +00:00
BuildRequires : %{python_module devel}
2024-12-11 00:13:48 +00:00
BuildRequires : %{python_module filelock >= 3.12.3}
2023-03-29 07:29:26 +00:00
BuildRequires : %{python_module hatchling}
2024-12-11 00:13:48 +00:00
BuildRequires : %{python_module packaging >= 24}
2023-03-29 07:29:26 +00:00
BuildRequires : %{python_module pip}
2024-12-11 00:13:48 +00:00
BuildRequires : %{python_module pytest-datafiles}
2023-03-29 07:29:26 +00:00
BuildRequires : %{python_module pytest-mock}
- 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).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cx_Freeze?expand=0&rev=5
2019-09-13 10:28:08 +00:00
BuildRequires : %{python_module pytest}
2024-12-11 00:13:48 +00:00
BuildRequires : %{python_module setuptools >= 65}
BuildRequires : %{python_module tomli >= 2.0.1 if %python-base < 3.11}
2023-03-29 07:29:26 +00:00
BuildRequires : %{python_module wheel}
2025-07-08 08:27:41 +00:00
BuildRequires : alts
2018-05-09 03:43:29 +00:00
BuildRequires : chrpath
BuildRequires : fdupes
2023-03-29 07:29:26 +00:00
BuildRequires : patchelf
2018-05-09 03:43:29 +00:00
BuildRequires : python-rpm-macros
2025-07-08 08:27:41 +00:00
Requires : alts
2024-12-11 00:13:48 +00:00
Requires : patchelf
Requires : python-filelock >= 3.12
Requires : python-packaging >= 24
Requires : python-setuptools >= 65
2025-07-08 08:27:41 +00:00
# we provide same binary like the deprecated py2 variant
Conflicts : %{oldpython} -cx_Freeze
2024-12-11 00:13:48 +00:00
%if 0%{python_version_nodots} < 311
Requires : python-tomli >= 2.0.1
%endif
2018-05-09 03:43:29 +00:00
%python_subpackages
%description
2018-06-06 12:04:49 +00:00
CX_Freeze is a set of scripts and modules for turning Python scripts
2018-05-09 03:43:29 +00:00
into executables in much the same way that py2exe and py2app do.
2018-06-06 12:04:49 +00:00
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 " c x - f r o z e n " executables that were created by
other systems.
2018-05-09 03:43:29 +00:00
%prep
2023-03-29 07:29:26 +00:00
%autosetup -p1 -n cx_Freeze-%{version}
sed -i -e '/^#!\//, 1d' samples/*/*.py
2023-07-26 14:15:10 +00:00
sed -i -e 's/-nauto//' pyproject.toml
2018-05-09 03:43:29 +00:00
chmod a-x cx_Freeze/initscripts/*.py
%build
export CFLAGS=" %{optflags} "
2023-03-29 07:29:26 +00:00
%pyproject_wheel
2018-05-09 03:43:29 +00:00
%install
2023-03-29 07:29:26 +00:00
%pyproject_install
2020-05-27 14:46:06 +00:00
%python_clone -a %{buildroot} %{_bindir} /cxfreeze-quickstart
%python_clone -a %{buildroot} %{_bindir} /cxfreeze
2023-03-29 07:29:26 +00:00
%python_expand chrpath -d %{buildroot} %{$python_sitearch}/cx_Freeze/bases/console*
2018-05-09 03:43:29 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitearch}
%check
2023-03-29 07:29:26 +00:00
# bdist_rpm is not long for this world, and it always execs the default Python
2025-09-02 15:40:04 +00:00
# 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)'
2018-05-09 03:43:29 +00:00
2025-07-08 08:27:41 +00:00
%pre
%python_libalternatives_reset_alternative cxfreeze-quickstart
%python_libalternatives_reset_alternative cxfreeze
2020-05-27 14:46:06 +00:00
2018-05-09 03:43:29 +00:00
%files %{python_files}
%doc README.md
- 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).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cx_Freeze?expand=0&rev=5
2019-09-13 10:28:08 +00:00
%license doc/src/license.rst
2020-05-27 14:46:06 +00:00
%python_alternative %{_bindir} /cxfreeze
%python_alternative %{_bindir} /cxfreeze-quickstart
2023-03-29 07:29:26 +00:00
%{python_sitearch} /cx_Freeze
2025-04-03 01:24:04 +00:00
%{python_sitearch} /cx_[Ff]reeze-%{version} .dist-info
2018-05-09 03:43:29 +00:00
%changelog