Details
Description
Pyside6-deploy creates an executable called "pyside_app_demo.exe" (instead of "window.exe" or "main.exe" depending on main entry point file name). I assume that it is the default project name, and it can be changed by initializing configuration file and then specifying appropriate name.
It appears that pyside6-deploy has some trouble cleaning up after it's done. There is a permission error regarding an entry called "deployment". Apparently, it is a read-only directory, so it's not possible to remove it without enforcing this action (like using rm -rf).
Here is a log of my actions:
(.env) PS C:\Users\user\dev\python\gui\hello> pyside6-deploy main.py [DEPLOY] Executed file created in C:\Users\user\OneDrive\dev\python\gui\hello\pyside_app_demo.exe Traceback (most recent call last): File "C:\Users\user\.env\Lib\site-packages\PySide6\scripts\deploy.py", line 214, in <module> main(args.main_file, args.name, args.config_file, args.init, args.loglevel, args.dry_run, File "C:\Users\user\.env\Lib\site-packages\PySide6\scripts\deploy.py", line 169, in main cleanup(config=config) File "C:\Users\user\.env\Lib\site-packages\PySide6\scripts\deploy_lib\deploy_util.py", line 27, in cleanup shutil.rmtree(config.generated_files_path) File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree return _rmtree_unsafe(path, onexc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 629, in _rmtree_unsafe onexc(os.rmdir, fullname, err) File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 627, in _rmtree_unsafe os.rmdir(fullname) PermissionError: [WinError 5] Access is denied: 'C:\\Users\\user\\OneDrive\\dev\\python\\gui\\hello\\deployment\\main.build\\static_src'
Here is how my directory looks like:
(.env) PS C:\Users\user\dev\python\gui\hello> ls Directory: C:\Users\user\dev\python\gui\hello Mode LastWriteTime Length Name ---- ------------- ------ ---- dar--l 12/18/2024 10:22 AM deployment -a---l 12/17/2024 11:41 PM 400 main.py -a---l 12/18/2024 10:21 AM 2542 pysidedeploy.spec -a---l 12/18/2024 10:22 AM 25789440 pyside_app_demo.exe -a---l 12/17/2024 11:35 PM 2394 untitled.py -a---l 12/17/2024 11:33 PM 1193 untitled.ui
Note the "deployment" entry. It has a read-only flag and therefore cannot be removed. All subdirectories inside "deployment" are read-only as well.