Skip to content

python: remove the pycs and pycaches#60

Merged
ader1990 merged 1 commit intocloudbase:masterfrom
ader1990:python_remove_pycache_pyc
May 7, 2026
Merged

python: remove the pycs and pycaches#60
ader1990 merged 1 commit intocloudbase:masterfrom
ader1990:python_remove_pycache_pyc

Conversation

@ader1990
Copy link
Copy Markdown
Member

@ader1990 ader1990 commented Apr 27, 2026

In the Python folder, as the same Python is used also for building cloudbase-init, there are alot of pycs / pycache files and folders, which are bulking up the MSI size.

The github actions runs show a rather counter-intuitive comparison on the run times: the cloudbase-init packaged without the pycs runs faster than the one with packaged pycs. This behaviour makes sense if the Python interpreter actually spends more time in checking the existing pycs, then replacing them with newer ones maybe.

In any case, the end result is beneficial from two perspectives: smaller MSI size 49.3 MB vs 60.4 MB and almost one minute faster run.

@ader1990 ader1990 force-pushed the python_remove_pycache_pyc branch 3 times, most recently from c58fa07 to 63a6bbe Compare May 6, 2026 11:33
@ader1990 ader1990 changed the title Python remove pycache pyc python: remove the pycs and pycaches May 6, 2026
Comment thread .github/workflows/build_test_cbsinit.yml Outdated
Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
@ader1990 ader1990 force-pushed the python_remove_pycache_pyc branch from 63a6bbe to 92b447b Compare May 6, 2026 12:11
@ader1990 ader1990 merged commit e6b7470 into cloudbase:master May 7, 2026
1 check passed
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