Skip to content
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

avoid installing __pycache__ directories #906

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

minrk
Copy link
Contributor

@minrk minrk commented Mar 29, 2023

the current prometheus wheels include __pycache__ directories in their package data files.

Copy link
Member

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! When I am testing this out it appears to work for the source distribution, and I am still seeing the various compiled python files added to the wheel. It appears that MANIFEST.in only applies to the source distribution.

I am happy to merge this as it is a definite improvement but do you want to take a stab at that as well? If not I will work on adding some methods for cleaning the repo before building for the next release.

@minrk
Copy link
Contributor Author

minrk commented Mar 30, 2023

How do you build your wheels? I couldn't find it to test with. I tested with the current standard python3 -m build . and it didn't include any pycache files in sdist or wheel, nor did python3 setup.py bdist_wheel (setuptools 65.6.3). So maybe it's less the manifest and more the release process that's doing it?

@csmarchbanks
Copy link
Member

I was testing with python3 setup.py sdist bdist_wheel which I have been using in the past and still seems to add the __pycache__ directories on my machine (if they are present), even on the most recent version of setuptools. However, it looks like using python3 -m build does not include the __pycache__ files so I will move to using that in future releases!

@csmarchbanks csmarchbanks merged commit 8bbd16f into prometheus:master Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants