14
0
Files
python-PyInstaller/python-PyInstaller.spec
Matej Cepl d9d2cf74cc Accepting request 1031633 from home:yarunachalam:branches:devel:languages:python
- Update to 5.6
  Features
  - Add official support for Python 3.11. (Note that PyInstaller v5.5 is also expected to work but
  - has only been tested with a pre-release of Python 3.11.) (#6783)
  Implement a new hook utility function, collect_delvewheel_libs_directory(), intended for dealing with external shared
  library in delvewheel-enabled PyPI wheels for Windows. (#7170)
  Bugfix
  - (macOS) Fix OpenCV (cv2) loader error in generated macOS .app bundles, caused by the relocation of package’s source .py files. (#7180)
  - (Windows) Improve compatibility with scipy 1.9.2, whose Windows wheels switched to delvewheel, and therefore have shared
    libraries located in external .libs directory. (#7168)
  - (Windows) Limit the DLL parent path preservation behavior from #7028 to files collected from site-packages directories
    (as returned by site.getsitepackages() and site.getusersitepackages()) instead of all paths in sys.path, to avoid unintended
    behavior in corner cases, such as sys.path containing the drive root or user’s home directory. (#7155)
  - Fix compatibility with PySide6 6.4.0, where the deprecated Qml2ImportsPath location key is not available anymore;
    use the new QmlImportsPath key when it is available. (#7164)
  - Prevent PyInstaller runtime hook for setuptools from attempting to override distutils with setuptools-provided
    version when setuptools is collected and its version is lower than 60.0. This both mimics the unfrozen behavior and
    prevents errors on versions between 50.0 and 60.0, where we do not explicitly collect setuptools._distutils. (#7172)
  Incompatible Changes
  - (macOS) In generated macOS .app bundles, the collected source .py files are not relocated from Contents/MacOS to Contents/Resources anymore,
    to avoid issues when the path to a .py file is supposed to resolve to the same directory as adjacent binary extensions.
    On the other hand, this change might result in regressions w.r.t. bundle signing and/or notarization. (#7180)
  Bootloader
  - (Windows) Update the bundled zlib sources to v1.2.13. (#7166)
- Update to 5.5  
  Features
  - (Windows) Support embedding multiple icons in the executable. (#7103)
  Bugfix
  - (Windows) Fix a regression introduced in PyInstaller 5.4 (#6925), where incorrect copy of python3.dll
    (and consequently an additional, incorrect copy of python3X.dll from the same directory) is collected when additional python

OBS-URL: https://build.opensuse.org/request/show/1031633
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyInstaller?expand=0&rev=20
2022-10-29 07:59:43 +00:00

134 lines
4.5 KiB
RPMSpec

#
# spec file for package python-PyInstaller
#
# Copyright (c) 2022 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
%bcond_without test
%define modname PyInstaller
Name: python-PyInstaller
Version: 5.6.1
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 devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(zlib)
Requires: python-devel
Requires: python-macholib >= 1.8
Requires: python-pefile >= 2017.8.1
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun):update-alternatives
Recommends: upx
%if %{with test}
BuildRequires: %{python_module Babel}
BuildRequires: %{python_module Django}
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module QtAwesome}
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module cryptography}
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module macholib >= 1.8}
BuildRequires: %{python_module opengl}
BuildRequires: %{python_module pefile >= 2017.8.1}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pycountry}
BuildRequires: %{python_module pyinstaller-hooks-contrib}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module qt5}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: upx
%if %{with python2}
BuildRequires: python-dis3
%endif
%endif
%ifpython2
Requires: python-dis3
%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"
%python_build
%install
%python_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
# https://github.com/pyinstaller/pyinstaller/commit/2df8314ffaedd95ddc9e2871237e2f2188d3735e
# the test is broken since 5.2
%pytest_arch -n auto tests/unit -k "not test_normalize_icon"
%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
%{python_sitearch}/*
%changelog