simplejson icon indicating copy to clipboard operation
simplejson copied to clipboard

Is it possible to delete the simplejson/tests directory when creating a binary package(wheel package)

Open tklltkioc opened this issue 4 years ago • 2 comments

OS: centos 7.9
python: 3.8.2

Package    Version
---------- -------
pip        21.0
setuptools 52.0.0
wheel      0.36.2

When i run command python setup.py bdist_wheel,i get the result as follows: image

After modify setup.py one line

#packages=['simplejson', 'simplejson.tests']
packages=['simplejson']

i get the result as follows: image

Size compare: image delete the simplejson/tests directory could reduce 28kb.

So when running simplejson,whether it is necessary to package the simplejson/tests directory in the wheel package?

tklltkioc avatar Jan 29 '21 03:01 tklltkioc

This is possible in theory, although it's unknown if this would break anything for anyone who may be running the tests from a wheel for some reason. Can you find an authoritative reference for current Python packaging standards that suggests this is the current best practice?

etrepum avatar Jan 29 '21 04:01 etrepum

OK,I'll try and find it.

tklltkioc avatar Jan 29 '21 08:01 tklltkioc