Hi. On my system: du -ch /usr/lib/python3.8/site-packages/*/tests/ 18 MB in total
I did not see anything in Guidelines about packaging tests. Do we really need them in final package? Are there any objection to propose in Guidelines something like:
%exclude %{python3_sitelib}/YOUR-MODULE/tests
On 09. 06. 20 21:49, Miroslav Suchý wrote:
Hi. On my system: du -ch /usr/lib/python3.8/site-packages/*/tests/ 18 MB in total
I did not see anything in Guidelines about packaging tests. Do we really need them in final package?
It depends on the package, but in majority of the cases, we don't.
Are there any objection to propose in Guidelines something like:
%exclude %{python3_sitelib}/YOUR-MODULE/tests
I am all in to say the tests SHOULD NOT be packaged (assuming the package works without them) and SHOULD either be removed or packaged into a -tests subpackage.
However, somebody might argue %exclude is not the bast tool for the job:
https://github.com/rpm-software-management/rpm/issues/994#issuecomment-57657...
Side note: rpmlint upstream wants to warn about exactly this:
https://github.com/rpm-software-management/rpmlint/pull/430
Dne 09. 06. 20 v 22:35 Miro Hrončok napsal(a):
On 09. 06. 20 21:49, Miroslav Suchý wrote:
Hi. On my system: du -ch /usr/lib/python3.8/site-packages/*/tests/ 18 MB in total
I did not see anything in Guidelines about packaging tests. Do we really need them in final package?
It depends on the package, but in majority of the cases, we don't.
Are there any objection to propose in Guidelines something like:
%exclude %{python3_sitelib}/YOUR-MODULE/tests
I am all in to say the tests SHOULD NOT be packaged (assuming the package works without them) and SHOULD either be removed or packaged into a -tests subpackage.
In Ruby world, there used to be guideline to exclude the tests for some while. However, removing the test from the package means that we would differ from upstream. Therefore nowadays, we typically keep the test suite as part of -doc subpackage. But if there was more generic guidelines, such as -test(s) subpackage, I would not object.
Vít
However, somebody might argue %exclude is not the bast tool for the job:
https://github.com/rpm-software-management/rpm/issues/994#issuecomment-57657...
Side note: rpmlint upstream wants to warn about exactly this:
Hi
In the Go world tests are part of the Go module and you even have Go modules that write code that depends on the testing code of other modules
Which would be nice if "go get" did not ignore testing code deps by default, so testing deps are an horrible cyclic hairball in Go land.
(and we can not ignore them like go get does, because they are not marked as testing deps in go module descriptors)
Regards,
packaging@lists.fedoraproject.org