about summary refs log tree commit diff
path: root/pkgs/development/interpreters/python
diff options
context:
space:
mode:
authorMaximilian Güntner <code@sourcediver.org>2017-08-24 17:38:28 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2017-08-28 09:49:08 +0200
commit94351197cd40d7e2d22e8a971e888b8333764cb5 (patch)
tree152a432b2ad546c7b49f6b3f6b8d2aa06667c12e /pkgs/development/interpreters/python
parenta7ddca6e3dce865a6a07cbdaea3963026b7bb3d3 (diff)
downloadnixlib-94351197cd40d7e2d22e8a971e888b8333764cb5.tar
nixlib-94351197cd40d7e2d22e8a971e888b8333764cb5.tar.gz
nixlib-94351197cd40d7e2d22e8a971e888b8333764cb5.tar.bz2
nixlib-94351197cd40d7e2d22e8a971e888b8333764cb5.tar.lz
nixlib-94351197cd40d7e2d22e8a971e888b8333764cb5.tar.xz
nixlib-94351197cd40d7e2d22e8a971e888b8333764cb5.tar.zst
nixlib-94351197cd40d7e2d22e8a971e888b8333764cb5.zip
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
Diffstat (limited to 'pkgs/development/interpreters/python')
-rw-r--r--pkgs/development/interpreters/python/cpython/2.7/default.nix3
-rw-r--r--pkgs/development/interpreters/python/cpython/3.4/default.nix5
-rw-r--r--pkgs/development/interpreters/python/cpython/3.5/default.nix5
-rw-r--r--pkgs/development/interpreters/python/cpython/3.6/default.nix5
4 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix
index fd3c63de1e72..f601fbc98085 100644
--- a/pkgs/development/interpreters/python/cpython/2.7/default.nix
+++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix
@@ -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
diff --git a/pkgs/development/interpreters/python/cpython/3.4/default.nix b/pkgs/development/interpreters/python/cpython/3.4/default.nix
index d00b91f316ff..3b375e147bce 100644
--- a/pkgs/development/interpreters/python/cpython/3.4/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.4/default.nix
@@ -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
diff --git a/pkgs/development/interpreters/python/cpython/3.5/default.nix b/pkgs/development/interpreters/python/cpython/3.5/default.nix
index 1b71dba42c41..ed1170427c0a 100644
--- a/pkgs/development/interpreters/python/cpython/3.5/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.5/default.nix
@@ -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
diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix
index 0b0f9c8be6ab..127c093501c3 100644
--- a/pkgs/development/interpreters/python/cpython/3.6/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix
@@ -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