cpython: include test.support and test.regrtest

test.{support, regrtest} are the internal packages cpython
developers use to write tests.
Although they are not public and the API may change/break
some developers use these packages to write tests for their
(3rd party) software.
The derivations for cpython now only remove the actual tests
but leave the packages in place that are used to write them.

Discussion: https://github.com/NixOS/nixpkgs/pull/28540
This commit is contained in:
Maximilian Güntner 2017-08-24 17:38:28 +02:00 committed by Frederik Rietdijk
parent a7ddca6e3d
commit 94351197cd
4 changed files with 14 additions and 4 deletions

View File

@ -162,7 +162,8 @@ in stdenv.mkDerivation {
# needed for some packages, especially packages that backport
# functionality to 2.x from 3.x
for item in $out/lib/python${majorVersion}/test/*; do
if [[ "$item" != */test_support.py* ]]; then
if [[ "$item" != */test_support.py*
&& "$item" != */regrtest.py* ]]; then
rm -rf "$item"
else
echo $item

View File

@ -111,7 +111,10 @@ in stdenv.mkDerivation {
# needed for some packages, especially packages that backport functionality
# to 2.x from 3.x
for item in $out/lib/python${majorVersion}/test/*; do
if [[ "$item" != */test_support.py* ]]; then
if [[ "$item" != */test_support.py*
&& "$item" != */test/support
&& "$item" != */test/libregrtest
&& "$item" != */test/regrtest.py* ]]; then
rm -rf "$item"
else
echo $item

View File

@ -105,7 +105,10 @@ in stdenv.mkDerivation {
# needed for some packages, especially packages that backport functionality
# to 2.x from 3.x
for item in $out/lib/python${majorVersion}/test/*; do
if [[ "$item" != */test_support.py* ]]; then
if [[ "$item" != */test_support.py*
&& "$item" != */test/support
&& "$item" != */test/libregrtest
&& "$item" != */test/regrtest.py* ]]; then
rm -rf "$item"
else
echo $item

View File

@ -105,7 +105,10 @@ in stdenv.mkDerivation {
# needed for some packages, especially packages that backport functionality
# to 2.x from 3.x
for item in $out/lib/python${majorVersion}/test/*; do
if [[ "$item" != */test_support.py* ]]; then
if [[ "$item" != */test_support.py*
&& "$item" != */test/support
&& "$item" != */test/libregrtest
&& "$item" != */test/regrtest.py* ]]; then
rm -rf "$item"
else
echo $item