TL;DR:
I'd like to propose a change where packages should NOT install their
tests to ${D} by default. Such an install may optionally enabled with USE=test, which should be decoupled from FEATURES=test. Or depending on
the color of the bikeshed, we add something new like USE=install-tests.
Background:
Python packages install a number of _test.py files, and related .pyc
files. The files are generally useful for running tests after the
package is installed, and may have additional testing dependencies that
are not installed via RDEPEND.
TL;DR:
I'd like to propose a change where packages should NOT install their
tests to ${D} by default.
Such an install may optionally enabled with
USE=test, which should be decoupled from FEATURES=test.
Or depending on
the color of the bikeshed, we add something new like USE=install-tests.
Background:
Python packages install a number of _test.py files, and related .pyc
files. The files are generally useful for running tests after the
package is installed, and may have additional testing dependencies that
are not installed via RDEPEND.
As an example, on the livegui install media, these files take 100MB+
before squashfs compression.
Some users MAY wish to verify that a package continues to function
correctly, and they should have the USE=test dependencies available at runtime, and the tests installed.
Such post-install testing may also require other files to be present, to configure the test suite runs.
On 2/1/24 4:03 PM, Michał Górny wrote:
I suppose you are referring to dev-lang/python here. Unfortunately, removing tests from it is a non-trivial problem. As I've mentioned to
you before, there are packages that actually import modules form the
test directory.
Remember that Gentoo has a policy of following upstream, and this policy
is specifically targeted towards developers who expect Gentoo to
be a good baseline environment for developing packages. By explicitly diverging from upstream default install by default, we are effectively creating an incompatible Python environment and requiring users to go through extra steps to restore upstream compatibility.
The "following upstream" argument is extremely weak.
eschwartz ~/git/cpython $ ./configure --help| grep test
--disable-test-modules don't build nor install test modules
Clearly, upstream is giving you loud and clear permission to refrain
from installing this. They even have a split in their Makefile variables:
- LIBSUBDIRS: things that are always installed
- TESTSUBDIRS: test files that you can disable
TL;DR:
I'd like to propose a change where packages should NOT install their
tests to ${D} by default. Such an install may optionally enabled with USE=test, which should be decoupled from FEATURES=test. Or depending on
the color of the bikeshed, we add something new like USE=install-tests.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 475 |
Nodes: | 16 (2 / 14) |
Uptime: | 18:22:31 |
Calls: | 9,487 |
Calls today: | 6 |
Files: | 13,617 |
Messages: | 6,121,091 |