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

Wagtail packaging fixes #8030

Merged
merged 3 commits into from
Feb 28, 2022
Merged

Conversation

thibaudcolas
Copy link
Member

@thibaudcolas thibaudcolas commented Feb 23, 2022

This contains two unrelated changes:

I grouped them together basically because the testing steps are identical: run python setup.py sdist bdist_wheel. Make sure to rm -rf build *.egg-info dist so setuptools reliably determines which files are to be included without any caching.

Before/after on file size:

-8.4M	dist/wagtail-2.17a0-py3-none-any.zip
+8.3M	dist/wagtail-2.17a0-py3-none-any.zip
-5.7M	dist/wagtail-2.17a0.tar.gz
+5.5M	dist/wagtail-2.17a0.tar.gz

This is a pretty small difference but IMHO still worthwhile.

Here are the files / folders that will no longer be included, based on diffing the wheel’s contents (output of `find before/after:

wagtail/admin/static/wagtailadmin/fonts/wagtail-icomoon.json
wagtail/snippets/static_src
wagtail/images/static_src
wagtail/admin/static_src
wagtail/contrib/settings/static_src
wagtail/contrib/typed_table_block/static_src
wagtail/contrib/styleguide/static_src
wagtail/contrib/modeladmin/static_src
wagtail/search/static_src
wagtail/users/static_src
wagtail/documents/static_src
wagtail/embeds/static_src
wagtail/snippets/.gitignore
wagtail/images/.gitignore
wagtail/tests/.gitignore
wagtail/admin/.gitignore
wagtail/contrib/settings/.gitignore
wagtail/contrib/forms/.gitignore
wagtail/contrib/typed_table_block/.gitignore
wagtail/contrib/table_block/static/table_block/js/.gitignore
wagtail/contrib/styleguide/.gitignore
wagtail/contrib/modeladmin/.gitignore
wagtail/search/.gitignore
wagtail/users/.gitignore
wagtail/documents/.gitignore
wagtail/embeds/.gitignore

@squash-labs
Copy link

squash-labs bot commented Feb 23, 2022

Manage this branch in Squash

Test this branch here: https://thibaudcolaschorepackaging-zewg6.squash.io

global-exclude *.py[co]
global-exclude .gitignore
global-exclude wagtail-icomoon.json
Copy link
Contributor

Choose a reason for hiding this comment

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

question: given wagtail-icomoon lives under wagtail/admin/static_src/wagtailadmin/fonts will it not be excluded via prune **/statics_src? or is it copied to static by the front-end tooling?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is currently being copied at wagtail/admin/static/wagtailadmin/fonts/wagtail-icomoon.json. I don’t know by what or why though 😅 .

Copy link
Contributor

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants