# du -h /usr/lib64/python2.7/test/ 28M /usr/lib64/python2.7/test/ * dev-lang/python-2.7.7 Total files : 4057 Total size : 56.68 MiB So about half the installed size are the python unit tests that no one uses and which are only relevant at install time. Not installing (unconditionally, or with use=-test) would halve the installed size for great benefit.
Upstream installs them. If you don't want them, use INSTALL_MASK.
Hmm... I see other distros package the test suite separately. So I guess a use flag would not be too abnormal here.
I'd also like to see test suites go away. This should be documented somewhere since its pretty common for test folders to be installed for setuptools/pip packages as well.
(In reply to Johan Bergström from comment #3) > I'd also like to see test suites go away. This should be documented > somewhere since its pretty common for test folders to be installed for > setuptools/pip packages as well. Agreed. If we are going to remove tests, we should come up with a consistent policy for it. This would include: - A consistently named use flag - A code snippet on the wiki Personally, I would prefer to keep installing tests unconditionally, but if I'm out-voted it is no great bother to me.
I'd say this is a case for INSTALL_MASK.
A note on implementing this for dev-lang/python: The test.support module gets used in the test suites for lib2to3, idlelib, and distutils. These are installed outside of the python/test/ directory. Also, it looks like some the tests of some third-party packages import test.support. For example: site-packages/simplejson/tests/test_tool.py: from test.support import strip_python_stderr site-packages/bsddb3/tests/test_all.py: from test import test_support So, we would probably need to install the test.support module to avoid breaking src_test in a few python-related ebuilds.
*** Bug 574322 has been marked as a duplicate of this bug. ***
(In reply to Mike Gilbert from comment #6) > A note on implementing this for dev-lang/python: > > The test.support module gets used in the test suites for lib2to3, idlelib, > and distutils. These are installed outside of the python/test/ directory. > > Also, it looks like some the tests of some third-party packages import > test.support. For example: > > site-packages/simplejson/tests/test_tool.py: from test.support import > strip_python_stderr > site-packages/bsddb3/tests/test_all.py: from test import test_support > > > So, we would probably need to install the test.support module to avoid > breaking src_test in a few python-related ebuilds. test directory is only for people who do testing. People who do testing, have `test` USE-flag set. So I think python: ``` use test || rm -rf .... ``` and dev-python/simplejson: ``` PYTHON_REQ_USE="test=" ``` would solve this case.
*** Bug 650336 has been marked as a duplicate of this bug. ***
https://www.mail-archive.com/gentoo-dev@lists.gentoo.org/msg98823.html