Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I avoid getting useless warnings while building my package using setuptools?

It seems that setuptools triggers various warnings that are really of zero value and I want to get rid of them as they are spamming the continuous integration progress, making just harder to spot real warnings.

Here are those that I do want to get rid of:

python setup.py -q bdist_wheel
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.pyc' found under directory '*'
warning: no previously-included files matching '*.pyo' found under directory '*'
warning: no previously-included files matching '*.orig' found under directory '*'
warning: no files found matching '*.md' under directory 'releases'
warning: no files found matching '*.rst' under directory 'releases'
warning: no files found matching '*.json' under directory 'releases'
warning: no previously-included files matching '*' found under directory 'examples/node_modules'
no previously-included directories found matching 'examples/node_modules'
warning: build_py: byte-compiling is disabled, skipping.

warning: install_lib: byte-compiling is disabled, skipping.

It seems that all these are caused by the MANIFEST.in file but the conditions there do have a reason for being there, and that's clearly not the one of generating warnings when exclude patters do find no files to match?!

like image 339
sorin Avatar asked Apr 10 '26 16:04

sorin


1 Answers

At the moment I found only one workaround for this issue: export PYTHONDONTWRITEBYTECODE= This will avoid getting these annoying warnings during the build.

like image 70
sorin Avatar answered Apr 13 '26 05:04

sorin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!