Skip to content

Commit

Permalink
cpython: include test.support and test.regrtest
Browse files Browse the repository at this point in the history
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: NixOS#28540
  • Loading branch information
mguentner authored and FRidh committed Aug 28, 2017
1 parent a7ddca6 commit 9435119
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pkgs/development/interpreters/python/cpython/2.7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/interpreters/python/cpython/3.4/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/interpreters/python/cpython/3.5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/interpreters/python/cpython/3.6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9435119

Please sign in to comment.