marcelotduarte / cx_Freeze

cx_Freeze creates standalone executables from Python scripts, with the same performance, is cross-platform and should work on any platform that Python itself works on.
https://marcelotduarte.github.io/cx_Freeze/
Other
1.33k stars 217 forks source link

Flag to prevent library.zip creation #2313

Closed Mx772 closed 4 months ago

Mx772 commented 6 months ago

Prerequisite

Describe the bug Feature I see in the past it was possible to generate directory that didn't include library.zip such as this gist: https://gist.github.com/CountChu/c07cff7c1db062b24463a60a35eebe1e using create_shared_zip=false.

But on the latest version, I can't seem to reproduce this via any method of configuration.

I thought one of these might do it:

"zip_exclude_packages": ["*"],
"no_compress": True,

To Reproduce Steps to reproduce the behavior (a setup.py or a minimal code sample will be good) Any setup.py to my knowledge

Expected behavior A clear and concise description of what you expected to happen.

A way to prevent library.zip from generating. (Possibly having the files be external to the zip,etc)

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

While uploading to some third-party sites, they prevent nested zips (One such being nexusMods).

As a result, this fails. Unpacking/moving the files causes failures, so I'd love if there was a way to flag to just have them unzipped and referenced loosely.

If there is some flag/config I'm missing please let me know!

marcelotduarte commented 5 months ago

I see in the past it was possible to generate directory that didn't include library.zip such as this gist: https://gist.github.com/CountChu/c07cff7c1db062b24463a60a35eebe1e using create_shared_zip=false.

I had never seen this option.

I thought one of these might do it:

"zip_exclude_packages": ["*"],
"no_compress": True,

It is possible to implement an option like this, it will be useful when using bdist_appimage too, because I don't see the need for a zip inside the AppImage which is also a zip.

marcelotduarte commented 5 months ago

@Mx772 I just implemented a new option zip_filename that works along with no_compress. Use: "no_compress": True, "zip_filename": None,

You can test the patch in the latest development build (cx_Freeze 7.1.0.dev13): pip install --force --no-cache --pre --extra-index-url https://marcelotduarte.github.io/packages/ cx_Freeze For conda-forge the command is: conda install -y --no-channel-priority -S -c https://marcelotduarte.github.io/packages/conda cx_Freeze

Please test and give feedback.

marcelotduarte commented 4 months ago

Documentation

marcelotduarte commented 4 months ago

Release 7.1.0 is out! Documentation