-
The below application will show a warning dialog "Failed to remove temporary directory" when built on Windows 11 (Intel) and then run on Windows 11 ARM.
requirements.txt
psutil_bug.pyimport subprocess
import psutil # This import, though unused, causes the onefile cleanup warning
if __name__ == '__main__':
subprocess.Popen(['calc.exe']) psutil_bug.spec# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(
['psutil_bug.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='psutil-bug',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=True,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
) |
Beta Was this translation helpful? Give feedback.
Answered by
rokm
Oct 18, 2024
Replies: 1 comment 7 replies
-
Can you build with |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmm, if spawned
calc.exe
is not holding reference to those DLLs (e.g., ifpsutil
was somehow injecting its extension into spawned child processes) then it looks like a timing issue (maybe something induced by x86_64 emulation on arm64 system?).I was planning to add a retry loop with 1-second delays anyway (see here), which should also take care of this. If you are comfortable with modifyi…