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

__pycache__ and *.pyc included in (PyPi) source tarball #1275

Closed
matbryan52 opened this issue Jun 22, 2022 · 1 comment · Fixed by #1276
Closed

__pycache__ and *.pyc included in (PyPi) source tarball #1275

matbryan52 opened this issue Jun 22, 2022 · 1 comment · Fixed by #1276
Assignees
Labels
infra Test/Build/Release infrastructure
Milestone

Comments

@matbryan52
Copy link
Member

While looking into #1271 I think I've found that the PyPi .tar.gz (and probably also the .whl) contain all the .pyc files.

from https://files.pythonhosted.org/packages/17/a4/20eb6a06158774138afbd4118e2800d1e0db54fd5a8136025cd723535ee3/libertem-0.9.2.tar.gz

image

From my understanding .pyc is OS+Python version specific so I think this just inflates the bundle size?

I can reproduce this when running python -m build and python setup.py sdist locally.

@matbryan52 matbryan52 added the infra Test/Build/Release infrastructure label Jun 22, 2022
@matbryan52 matbryan52 added this to the 0.10 milestone Jun 22, 2022
@sk1p
Copy link
Member

sk1p commented Jun 22, 2022

From my understanding .pyc is OS+Python version specific so I think this just inflates the bundle size?

Yeah, agreed.

Something like this should fix the issue, although I haven't checked if this still includes everything important:

diff --git a/MANIFEST.in b/MANIFEST.in
index ab29f94f..1260f363 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,8 @@
-graft src
+graft src/libertem/web/client/
 include LICENSE
 include README.rst
 graft client
 prune client/node_modules
 prune client/build
 prune client/coverage
+global-exclude *.pyc __pycache__

Still includes the built client, such that people don't need to build the client if they just install from sdist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Test/Build/Release infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants