-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cx_Freeze includes dist-info directories for excluded packages #1283
Comments
This behavior is by design. At least for a while. Do you have a real issue with this behavior? |
Sorry for taking a little while to respond. What I don't understand is why it still includes the metadata folder even if the package itself is not included. In my case, I am working on a program that has an option to print out all of the libraries that are bundled with it along with their licenses. Since cx_freeze is still including the metadata folders for some packages (in my case, For the time being, I have worked around this by adding my own functionality to my setup.py script that removes the |
I accept a PR for excludes_metadata option. |
Describe the bug
The distribution info (the *.dist-info folders) for packages that are specified with the
excludes
are still added to library.zipTo Reproduce
Note: I am using pytest as an example, but it works with any package
Create a simple dummy module (containing just
__main__.py
and__init__.py
) to build into a program.Create a virtual environment with cx_Freeze and pytest installed.
Create the following
setup.py
file for cx_freeze:Create the program by running
python setup.py build
Expected behavior
lib/library.zip should not contain the "pytest-6.2.5.dist-info" folder
Desktop (please complete the following information):
Additional context
I spent some tracing down the exact source of this issue. It appears to be in freezer.py, specifically the
Freezer._write_modules()
method. Starting around line 569, the program gets the distribution file metadata that was cached, and copies it all into the zip file, however, it does not check to see if any of the cached metadata is for a package that was excluded.The text was updated successfully, but these errors were encountered: