14
0
Files
python-PyInstaller/python-PyInstaller.spec

115 lines
3.8 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package python-PyInstaller
#
- update to 6.13.0: * Extend analysis code so that when extension module is encountered, it checks for the presence of an adjacent .py or .pyi file, and if present, attempt to perform import analysis on such accompanying source/interface file. (:issue:`9084`) * Fix detection of setuptools-vendored modules (i.e., not packages) in the PyInstaller.utils.hooks.setuptools.SetuptoolsInfo hook utility class; for example, the setuptools/_vendor/typing_extensions.py module. (:issue:`9102`) * Add hook for PyQt6.QtStateMachine that was introduced in PyQt6 v6.8.1. (:issue:`9019`) * Fix ModuleNotFoundError for scipy when provided by Debian's python3-scipy package. (:issue:`9069`) * Update hook for PyGObject (gi) and associated helper code to support changes made in PyGObject v3.52 (switch from girepository-1.0 to girepository-2.0). (:issue:`9055`) * On POSIX systems other than macOS, use POSIX semaphore API instead of SysV semaphore API to synchronize onefile parent and child process. This restores the ability to compile bootloader under Termux, where sys/sem.h (and the SysV semaphore API) is unavailable due to deliberate lack of support for it in the underlying Android base. (:issue:`9089`) * Extend the :ref:`module_collection_mode <package collection mode>` setting from :issue:`6945` to also apply to modules collected into base_library.zip archive. Implement discovery of source .py files for modules in base_library.zip at run- time. This allows collection and discovery of source .py OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=30
2025-04-28 16:41:34 +00:00
# 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/
#
%{?sle15_python_module_pythons}
%bcond_without test
%define modname PyInstaller
Name: python-PyInstaller
- update to 6.13.0: * Extend analysis code so that when extension module is encountered, it checks for the presence of an adjacent .py or .pyi file, and if present, attempt to perform import analysis on such accompanying source/interface file. (:issue:`9084`) * Fix detection of setuptools-vendored modules (i.e., not packages) in the PyInstaller.utils.hooks.setuptools.SetuptoolsInfo hook utility class; for example, the setuptools/_vendor/typing_extensions.py module. (:issue:`9102`) * Add hook for PyQt6.QtStateMachine that was introduced in PyQt6 v6.8.1. (:issue:`9019`) * Fix ModuleNotFoundError for scipy when provided by Debian's python3-scipy package. (:issue:`9069`) * Update hook for PyGObject (gi) and associated helper code to support changes made in PyGObject v3.52 (switch from girepository-1.0 to girepository-2.0). (:issue:`9055`) * On POSIX systems other than macOS, use POSIX semaphore API instead of SysV semaphore API to synchronize onefile parent and child process. This restores the ability to compile bootloader under Termux, where sys/sem.h (and the SysV semaphore API) is unavailable due to deliberate lack of support for it in the underlying Android base. (:issue:`9089`) * Extend the :ref:`module_collection_mode <package collection mode>` setting from :issue:`6945` to also apply to modules collected into base_library.zip archive. Implement discovery of source .py files for modules in base_library.zip at run- time. This allows collection and discovery of source .py OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=30
2025-04-28 16:41:34 +00:00
Version: 6.13.0
Release: 0
Summary: Bundle a Python application and all its dependencies into a single package
License: GPL-2.0-only
URL: https://www.pyinstaller.org
Source: https://github.com/pyinstaller/pyinstaller/archive/refs/tags/v%{version}.tar.gz#/pyinstaller-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
Accepting request 1228779 from home:mcalabkova:branches:devel:languages:python - Update to 6.11.1 * Add automatic binary vs. data file (re)classification step to the analysis process. * Add support for specifying hash randomization seed via hash_seed=<value> run-time option when building the application. * Allow spec files to take custom command line parameters. * Implement pass-through for Python’s X-options via PyInstaller’s run-time options mechanism. * The PyInstaller.utils.hooks.collect_all() hook utility function now attempts to translate the given importable package name into distribution name before attempting to collect metadata. * Removed support for building LSB-compliant bootloader, due to lack of support for LSB (Linux Standard Base) in contemporary linux distributions. * All of onedir build’s contents except for the executable are now moved into a sub-directory (called _internal by default). sys._MEIPASS is adjusted to point to this _internal directory. Assumptions that os.path.dirname(sys.executable) == sys._MEIPASS will break. * PyInstaller-frozen applications are not affected by the PYTHONUTF8 environment variable anymore. To permanently enable or disable the UTF8 mode, use the X utf8_mode=1 or X utf_mode=0 run-time option when building the application. * Remove bytecode encryption (--key and cipher options). * Allow users to re-enable the old onedir layout (without contents directory) by settings the --contents-directory option * If the argcomplete Python module is installed, PyInstaller will use it enable tab completion for its CLI tools. PyInstaller CLIs can still be used without this optional dependency. * Optimize the automatic binary-vs-data classification by avoiding objdump based check on files that do not have ELF signature. * Collect .hmac files accompanying shared libraries, if such files are OBS-URL: https://build.opensuse.org/request/show/1228779 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=28
2024-12-06 17:52:22 +00:00
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(zlib)
Accepting request 1098148 from home:mcalabkova:branches:devel:languages:python - Update to 5.13.0 * Allow controlling the build log level (--log-level) via a PYI_LOG_LEVEL environment variable. * Fixes an issue with gi shared libraries not being packaged if they don’t have version suffix and are in a special location set by LD_LIBRARY_PATH instead of a typical library path. * The deprecated PEP-302 find_module() and load_module() methods have been removed from PyInstaller’s FrozenImporter. * Compile the collected GLib schema files using glib-schema-compiler instead of collecting the pre-compiled gschemas.compiled. * The archive_viewer utility has been rewritten with modified command-line interface (--log has been renamed to --list) and with changed output formatting. * Extend PySide6 hooks for PySide6 6.5.0 compatibility. * Ensure that binaries that are manually specified in the .spec file (or via corresponding --add-binary or --collect-binaries command-line switches) undergo the binary dependency analysis, so their dependencies are automatically collected. * Remove the use of the TOC class in the analysis / build process, and use plain list instances instead. * Attempt to fix compatibility of PyInstaller’s PyiFrozenImporter with importlib.util.LazyLoader. * Add support for Python 3.12. * Limit the import of collected packages prior to performing binary dependency analysis to only Windows, where it is actually useful. OBS-URL: https://build.opensuse.org/request/show/1098148 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=26
2023-07-12 08:25:50 +00:00
Requires: python-altgraph
Accepting request 1228779 from home:mcalabkova:branches:devel:languages:python - Update to 6.11.1 * Add automatic binary vs. data file (re)classification step to the analysis process. * Add support for specifying hash randomization seed via hash_seed=<value> run-time option when building the application. * Allow spec files to take custom command line parameters. * Implement pass-through for Python’s X-options via PyInstaller’s run-time options mechanism. * The PyInstaller.utils.hooks.collect_all() hook utility function now attempts to translate the given importable package name into distribution name before attempting to collect metadata. * Removed support for building LSB-compliant bootloader, due to lack of support for LSB (Linux Standard Base) in contemporary linux distributions. * All of onedir build’s contents except for the executable are now moved into a sub-directory (called _internal by default). sys._MEIPASS is adjusted to point to this _internal directory. Assumptions that os.path.dirname(sys.executable) == sys._MEIPASS will break. * PyInstaller-frozen applications are not affected by the PYTHONUTF8 environment variable anymore. To permanently enable or disable the UTF8 mode, use the X utf8_mode=1 or X utf_mode=0 run-time option when building the application. * Remove bytecode encryption (--key and cipher options). * Allow users to re-enable the old onedir layout (without contents directory) by settings the --contents-directory option * If the argcomplete Python module is installed, PyInstaller will use it enable tab completion for its CLI tools. PyInstaller CLIs can still be used without this optional dependency. * Optimize the automatic binary-vs-data classification by avoiding objdump based check on files that do not have ELF signature. * Collect .hmac files accompanying shared libraries, if such files are OBS-URL: https://build.opensuse.org/request/show/1228779 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=28
2024-12-06 17:52:22 +00:00
Requires: python-packaging >= 22.0
Requires: python-pyinstaller-hooks-contrib >= 2024.0
Accepting request 1098148 from home:mcalabkova:branches:devel:languages:python - Update to 5.13.0 * Allow controlling the build log level (--log-level) via a PYI_LOG_LEVEL environment variable. * Fixes an issue with gi shared libraries not being packaged if they don’t have version suffix and are in a special location set by LD_LIBRARY_PATH instead of a typical library path. * The deprecated PEP-302 find_module() and load_module() methods have been removed from PyInstaller’s FrozenImporter. * Compile the collected GLib schema files using glib-schema-compiler instead of collecting the pre-compiled gschemas.compiled. * The archive_viewer utility has been rewritten with modified command-line interface (--log has been renamed to --list) and with changed output formatting. * Extend PySide6 hooks for PySide6 6.5.0 compatibility. * Ensure that binaries that are manually specified in the .spec file (or via corresponding --add-binary or --collect-binaries command-line switches) undergo the binary dependency analysis, so their dependencies are automatically collected. * Remove the use of the TOC class in the analysis / build process, and use plain list instances instead. * Attempt to fix compatibility of PyInstaller’s PyiFrozenImporter with importlib.util.LazyLoader. * Add support for Python 3.12. * Limit the import of collected packages prior to performing binary dependency analysis to only Windows, where it is actually useful. OBS-URL: https://build.opensuse.org/request/show/1098148 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=26
2023-07-12 08:25:50 +00:00
Requires: python-setuptools >= 42.0.0
Requires(post): update-alternatives
Accepting request 1228779 from home:mcalabkova:branches:devel:languages:python - Update to 6.11.1 * Add automatic binary vs. data file (re)classification step to the analysis process. * Add support for specifying hash randomization seed via hash_seed=<value> run-time option when building the application. * Allow spec files to take custom command line parameters. * Implement pass-through for Python’s X-options via PyInstaller’s run-time options mechanism. * The PyInstaller.utils.hooks.collect_all() hook utility function now attempts to translate the given importable package name into distribution name before attempting to collect metadata. * Removed support for building LSB-compliant bootloader, due to lack of support for LSB (Linux Standard Base) in contemporary linux distributions. * All of onedir build’s contents except for the executable are now moved into a sub-directory (called _internal by default). sys._MEIPASS is adjusted to point to this _internal directory. Assumptions that os.path.dirname(sys.executable) == sys._MEIPASS will break. * PyInstaller-frozen applications are not affected by the PYTHONUTF8 environment variable anymore. To permanently enable or disable the UTF8 mode, use the X utf8_mode=1 or X utf_mode=0 run-time option when building the application. * Remove bytecode encryption (--key and cipher options). * Allow users to re-enable the old onedir layout (without contents directory) by settings the --contents-directory option * If the argcomplete Python module is installed, PyInstaller will use it enable tab completion for its CLI tools. PyInstaller CLIs can still be used without this optional dependency. * Optimize the automatic binary-vs-data classification by avoiding objdump based check on files that do not have ELF signature. * Collect .hmac files accompanying shared libraries, if such files are OBS-URL: https://build.opensuse.org/request/show/1228779 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=28
2024-12-06 17:52:22 +00:00
Requires(postun): update-alternatives
Recommends: upx
%if %{with test}
Accepting request 1098148 from home:mcalabkova:branches:devel:languages:python - Update to 5.13.0 * Allow controlling the build log level (--log-level) via a PYI_LOG_LEVEL environment variable. * Fixes an issue with gi shared libraries not being packaged if they don’t have version suffix and are in a special location set by LD_LIBRARY_PATH instead of a typical library path. * The deprecated PEP-302 find_module() and load_module() methods have been removed from PyInstaller’s FrozenImporter. * Compile the collected GLib schema files using glib-schema-compiler instead of collecting the pre-compiled gschemas.compiled. * The archive_viewer utility has been rewritten with modified command-line interface (--log has been renamed to --list) and with changed output formatting. * Extend PySide6 hooks for PySide6 6.5.0 compatibility. * Ensure that binaries that are manually specified in the .spec file (or via corresponding --add-binary or --collect-binaries command-line switches) undergo the binary dependency analysis, so their dependencies are automatically collected. * Remove the use of the TOC class in the analysis / build process, and use plain list instances instead. * Attempt to fix compatibility of PyInstaller’s PyiFrozenImporter with importlib.util.LazyLoader. * Add support for Python 3.12. * Limit the import of collected packages prior to performing binary dependency analysis to only Windows, where it is actually useful. OBS-URL: https://build.opensuse.org/request/show/1098148 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=26
2023-07-12 08:25:50 +00:00
BuildRequires: %{python_module altgraph}
Accepting request 1228779 from home:mcalabkova:branches:devel:languages:python - Update to 6.11.1 * Add automatic binary vs. data file (re)classification step to the analysis process. * Add support for specifying hash randomization seed via hash_seed=<value> run-time option when building the application. * Allow spec files to take custom command line parameters. * Implement pass-through for Python’s X-options via PyInstaller’s run-time options mechanism. * The PyInstaller.utils.hooks.collect_all() hook utility function now attempts to translate the given importable package name into distribution name before attempting to collect metadata. * Removed support for building LSB-compliant bootloader, due to lack of support for LSB (Linux Standard Base) in contemporary linux distributions. * All of onedir build’s contents except for the executable are now moved into a sub-directory (called _internal by default). sys._MEIPASS is adjusted to point to this _internal directory. Assumptions that os.path.dirname(sys.executable) == sys._MEIPASS will break. * PyInstaller-frozen applications are not affected by the PYTHONUTF8 environment variable anymore. To permanently enable or disable the UTF8 mode, use the X utf8_mode=1 or X utf_mode=0 run-time option when building the application. * Remove bytecode encryption (--key and cipher options). * Allow users to re-enable the old onedir layout (without contents directory) by settings the --contents-directory option * If the argcomplete Python module is installed, PyInstaller will use it enable tab completion for its CLI tools. PyInstaller CLIs can still be used without this optional dependency. * Optimize the automatic binary-vs-data classification by avoiding objdump based check on files that do not have ELF signature. * Collect .hmac files accompanying shared libraries, if such files are OBS-URL: https://build.opensuse.org/request/show/1228779 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=28
2024-12-06 17:52:22 +00:00
BuildRequires: %{python_module packaging >= 22.0}
BuildRequires: %{python_module psutil}
Accepting request 1228779 from home:mcalabkova:branches:devel:languages:python - Update to 6.11.1 * Add automatic binary vs. data file (re)classification step to the analysis process. * Add support for specifying hash randomization seed via hash_seed=<value> run-time option when building the application. * Allow spec files to take custom command line parameters. * Implement pass-through for Python’s X-options via PyInstaller’s run-time options mechanism. * The PyInstaller.utils.hooks.collect_all() hook utility function now attempts to translate the given importable package name into distribution name before attempting to collect metadata. * Removed support for building LSB-compliant bootloader, due to lack of support for LSB (Linux Standard Base) in contemporary linux distributions. * All of onedir build’s contents except for the executable are now moved into a sub-directory (called _internal by default). sys._MEIPASS is adjusted to point to this _internal directory. Assumptions that os.path.dirname(sys.executable) == sys._MEIPASS will break. * PyInstaller-frozen applications are not affected by the PYTHONUTF8 environment variable anymore. To permanently enable or disable the UTF8 mode, use the X utf8_mode=1 or X utf_mode=0 run-time option when building the application. * Remove bytecode encryption (--key and cipher options). * Allow users to re-enable the old onedir layout (without contents directory) by settings the --contents-directory option * If the argcomplete Python module is installed, PyInstaller will use it enable tab completion for its CLI tools. PyInstaller CLIs can still be used without this optional dependency. * Optimize the automatic binary-vs-data classification by avoiding objdump based check on files that do not have ELF signature. * Collect .hmac files accompanying shared libraries, if such files are OBS-URL: https://build.opensuse.org/request/show/1228779 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=28
2024-12-06 17:52:22 +00:00
BuildRequires: %{python_module pyinstaller-hooks-contrib >= 2024.0}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
BuildRequires: upx
%endif
%python_subpackages
%description
PyInstaller bundles a Python application and all its dependencies into a single
package. The user can run the packaged app without installing a Python
interpreter or any modules.
%prep
%setup -q -n pyinstaller-%{version}
%autopatch -p1
chmod a-x PyInstaller/utils/hooks/__init__.py
# Force build of bootloader
rm -r PyInstaller/bootloader
%build
# -Wno-stringop-overflow only needed on ppc64
export CFLAGS="%{optflags} -Wno-stringop-truncation -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable -Wno-stringop-overflow"
%pyproject_wheel
%install
%pyproject_install
%{python_expand # Relocate to sitearch
if [ "%{$python_sitearch}" != "%{$python_sitelib}" ]; then
mkdir -p %{buildroot}%{$python_sitearch}
mv %{buildroot}%{$python_sitelib}/* %{buildroot}%{$python_sitearch}
fi
%fdupes %{buildroot}%{$python_sitearch}
}
%python_clone -a %{buildroot}%{_bindir}/pyinstaller
%python_clone -a %{buildroot}%{_bindir}/pyi-archive_viewer
%python_clone -a %{buildroot}%{_bindir}/pyi-bindepend
%python_clone -a %{buildroot}%{_bindir}/pyi-grab_version
%python_clone -a %{buildroot}%{_bindir}/pyi-makespec
%python_clone -a %{buildroot}%{_bindir}/pyi-set_version
%if %{with test}
%check
export LANG=en_US.UTF-8
Accepting request 1228779 from home:mcalabkova:branches:devel:languages:python - Update to 6.11.1 * Add automatic binary vs. data file (re)classification step to the analysis process. * Add support for specifying hash randomization seed via hash_seed=<value> run-time option when building the application. * Allow spec files to take custom command line parameters. * Implement pass-through for Python’s X-options via PyInstaller’s run-time options mechanism. * The PyInstaller.utils.hooks.collect_all() hook utility function now attempts to translate the given importable package name into distribution name before attempting to collect metadata. * Removed support for building LSB-compliant bootloader, due to lack of support for LSB (Linux Standard Base) in contemporary linux distributions. * All of onedir build’s contents except for the executable are now moved into a sub-directory (called _internal by default). sys._MEIPASS is adjusted to point to this _internal directory. Assumptions that os.path.dirname(sys.executable) == sys._MEIPASS will break. * PyInstaller-frozen applications are not affected by the PYTHONUTF8 environment variable anymore. To permanently enable or disable the UTF8 mode, use the X utf8_mode=1 or X utf_mode=0 run-time option when building the application. * Remove bytecode encryption (--key and cipher options). * Allow users to re-enable the old onedir layout (without contents directory) by settings the --contents-directory option * If the argcomplete Python module is installed, PyInstaller will use it enable tab completion for its CLI tools. PyInstaller CLIs can still be used without this optional dependency. * Optimize the automatic binary-vs-data classification by avoiding objdump based check on files that do not have ELF signature. * Collect .hmac files accompanying shared libraries, if such files are OBS-URL: https://build.opensuse.org/request/show/1228779 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=28
2024-12-06 17:52:22 +00:00
%pytest_arch -n auto tests/unit
%endif
%post
%{python_install_alternative pyinstaller pyi-archive_viewer pyi-bindepend pyi-grab_version pyi-makespec pyi-set_version}
%postun
%python_uninstall_alternative pyinstaller
%files %{python_files}
%doc README.rst doc/CHANGES.rst
%license COPYING.txt
%python_alternative %{_bindir}/pyinstaller
%python_alternative %{_bindir}/pyi-archive_viewer
%python_alternative %{_bindir}/pyi-bindepend
%python_alternative %{_bindir}/pyi-grab_version
%python_alternative %{_bindir}/pyi-makespec
%python_alternative %{_bindir}/pyi-set_version
Accepting request 1228779 from home:mcalabkova:branches:devel:languages:python - Update to 6.11.1 * Add automatic binary vs. data file (re)classification step to the analysis process. * Add support for specifying hash randomization seed via hash_seed=<value> run-time option when building the application. * Allow spec files to take custom command line parameters. * Implement pass-through for Python’s X-options via PyInstaller’s run-time options mechanism. * The PyInstaller.utils.hooks.collect_all() hook utility function now attempts to translate the given importable package name into distribution name before attempting to collect metadata. * Removed support for building LSB-compliant bootloader, due to lack of support for LSB (Linux Standard Base) in contemporary linux distributions. * All of onedir build’s contents except for the executable are now moved into a sub-directory (called _internal by default). sys._MEIPASS is adjusted to point to this _internal directory. Assumptions that os.path.dirname(sys.executable) == sys._MEIPASS will break. * PyInstaller-frozen applications are not affected by the PYTHONUTF8 environment variable anymore. To permanently enable or disable the UTF8 mode, use the X utf8_mode=1 or X utf_mode=0 run-time option when building the application. * Remove bytecode encryption (--key and cipher options). * Allow users to re-enable the old onedir layout (without contents directory) by settings the --contents-directory option * If the argcomplete Python module is installed, PyInstaller will use it enable tab completion for its CLI tools. PyInstaller CLIs can still be used without this optional dependency. * Optimize the automatic binary-vs-data classification by avoiding objdump based check on files that do not have ELF signature. * Collect .hmac files accompanying shared libraries, if such files are OBS-URL: https://build.opensuse.org/request/show/1228779 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=28
2024-12-06 17:52:22 +00:00
%{python_sitearch}/PyInstaller
%{python_sitearch}/pyinstaller-%{version}*info
%changelog