[packages/python3-pyinstaller] - new

baggins baggins at pld-linux.org
Sun Aug 17 00:31:59 CEST 2025


commit 764b8cf7a51ed1d0dca34042ec3ebbf5043d8ee8
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Aug 17 02:31:34 2025 +0200

    - new

 bad-tests.patch          |  40 +++++++++++++++
 python3-pyinstaller.spec | 125 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 165 insertions(+)
---
diff --git a/python3-pyinstaller.spec b/python3-pyinstaller.spec
new file mode 100644
index 0000000..c7018c2
--- /dev/null
+++ b/python3-pyinstaller.spec
@@ -0,0 +1,125 @@
+#
+# Conditional build:
+%bcond_without	doc	# API documentation
+%bcond_without	tests	# unit tests
+
+%define		module	pyinstaller
+Summary:	-
+Summary(pl.UTF-8):	-
+Name:		python3-%{module}
+Version:	6.15.0
+Release:	0.1
+License:	GPL v2
+Group:		Libraries/Python
+Source0:	https://files.pythonhosted.org/packages/source/p/pyinstaller/%{module}-%{version}.tar.gz
+# Source0-md5:	9870de7e52f3be9ac85e3aef9a5fa5c0
+Patch0:		bad-tests.patch
+URL:		https://pyinstaller.org/
+BuildRequires:	python3-devel >= 1:3.2
+BuildRequires:	python3-setuptools >= 42.0.0
+%if %{with tests}
+BuildRequires:	python3-altgraph
+#BuildRequires:	python3-idlelib
+BuildRequires:	python3-packaging >= 22.0
+BuildRequires:	python3-pillow-qt
+BuildRequires:	python3-pyinstaller-hooks-contrib >= 2025.8
+BuildRequires:	python3-pytest-timeout
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	sphinx-pdg-3
+%endif
+Requires:	python3-modules >= 1:3.2
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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
+
+%package apidocs
+Summary:	API documentation for Python %{module} module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona %{module}
+Group:		Documentation
+BuildArch:	noarch
+
+%description apidocs
+API documentation for Python %{module} module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona %{module}.
+
+%prep
+%setup -q -n %{module}-%{version}
+%patch -P0 -p1
+
+# Needs graphics env
+%{__rm} tests/functional/test_{qt,splash}.py
+
+%build
+%py3_build
+
+%if %{with tests}
+# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=timeout \
+%{__python3} -m pytest tests
+%endif
+
+%if %{with doc}
+%{__make} -C doc html \
+	SPHINXBUILD=sphinx-build-3
+rm -rf docs/_build/html/_sources
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{py3_sitedir}
+
+%py3_install
+
+# This is arch-dependant, why it installs to py3_sitescriptdir?
+%{__mv} $RPM_BUILD_ROOT%{py3_sitescriptdir}/{PyInstaller,%{module}-%{version}-py*.egg-info} $RPM_BUILD_ROOT%{py3_sitedir}/
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc COPYING.txt README.rst
+%attr(755,root,root) %{_bindir}/pyi-archive_viewer
+%attr(755,root,root) %{_bindir}/pyi-bindepend
+%attr(755,root,root) %{_bindir}/pyi-grab_version
+%attr(755,root,root) %{_bindir}/pyi-makespec
+%attr(755,root,root) %{_bindir}/pyi-set_version
+%attr(755,root,root) %{_bindir}/pyinstaller
+%dir %{py3_sitedir}/PyInstaller
+%{py3_sitedir}/PyInstaller/*.py
+%{py3_sitedir}/PyInstaller/__pycache__
+%{py3_sitedir}/PyInstaller/archive
+%dir %{py3_sitedir}/PyInstaller/bootloader
+%dir %{py3_sitedir}/PyInstaller/bootloader/Darwin-64bit
+%attr(755,root,root) %{py3_sitedir}/PyInstaller/bootloader/Darwin-64bit/run*
+%dir %{py3_sitedir}/PyInstaller/bootloader/Linux-64bit-intel
+%attr(755,root,root) %{py3_sitedir}/PyInstaller/bootloader/Linux-64bit-intel/run*
+%dir %{py3_sitedir}/PyInstaller/bootloader/Windows-32bit-intel
+%attr(755,root,root) %{py3_sitedir}/PyInstaller/bootloader/Windows-32bit-intel/run*.exe
+%dir %{py3_sitedir}/PyInstaller/bootloader/Windows-64bit-intel
+%attr(755,root,root) %{py3_sitedir}/PyInstaller/bootloader/Windows-64bit-intel/run*.exe
+%{py3_sitedir}/PyInstaller/bootloader/images
+%{py3_sitedir}/PyInstaller/building
+%{py3_sitedir}/PyInstaller/depend
+%{py3_sitedir}/PyInstaller/fake-modules
+%{py3_sitedir}/PyInstaller/hooks
+%{py3_sitedir}/PyInstaller/isolated
+%{py3_sitedir}/PyInstaller/lib
+%{py3_sitedir}/PyInstaller/loader
+%{py3_sitedir}/PyInstaller/utils
+%{py3_sitedir}/%{module}-%{version}-py*.egg-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/_build/html/*
+%endif
diff --git a/bad-tests.patch b/bad-tests.patch
new file mode 100644
index 0000000..6fb0f52
--- /dev/null
+++ b/bad-tests.patch
@@ -0,0 +1,40 @@
+idlelib tries to run despite missing deps
+requests needs network
+
+--- pyinstaller-6.15.0/tests/functional/test_libraries.py.orig	2025-04-05 03:31:20.000000000 +0200
++++ pyinstaller-6.15.0/tests/functional/test_libraries.py	2025-08-16 21:06:12.803325532 +0200
+@@ -149,19 +149,6 @@
+     )
+ 
+ 
+-# The tkinter module may be available for import, but not actually importable due to missing shared libraries.
+-# Therefore, we need to use `can_import_module`-based skip decorator instead of `@importorskip`.
+- at importorskip('idlelib')
+- at pytest.mark.skipif(not can_import_module("tkinter"), reason="tkinter cannot be imported.")
+-def test_idlelib(pyi_builder):
+-    pyi_builder.test_source(
+-        """
+-        # This file depends on loading some icons, located based on __file__.
+-        import idlelib.tree
+-        """
+-    )
+-
+-
+ @importorskip('keyring')
+ @skipif(
+     is_linux,
+@@ -194,14 +181,6 @@
+         """)
+ 
+ 
+- at importorskip('requests')
+-def test_requests(pyi_builder, data_dir):
+-    # NOTE: including the `data_dir` fixture copies files needed by this test!
+-    # We collect the data into frozen application.
+-    add_data_arg = f"{data_dir / '*'}:."
+-    pyi_builder.test_script('pyi_lib_requests.py', pyi_args=['--add-data', add_data_arg])
+-
+-
+ @importorskip('urllib3.packages.six')
+ def test_urllib3_six(pyi_builder):
+     # Test for pre-safe-import urllib3.packages.six.moves.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pyinstaller.git/commitdiff/764b8cf7a51ed1d0dca34042ec3ebbf5043d8ee8



More information about the pld-cvs-commit mailing list