From 94351197cd40d7e2d22e8a971e888b8333764cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20G=C3=BCntner?= Date: Thu, 24 Aug 2017 17:38:28 +0200 Subject: [PATCH] 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 --- pkgs/development/interpreters/python/cpython/2.7/default.nix | 3 ++- pkgs/development/interpreters/python/cpython/3.4/default.nix | 5 ++++- pkgs/development/interpreters/python/cpython/3.5/default.nix | 5 ++++- pkgs/development/interpreters/python/cpython/3.6/default.nix | 5 ++++- 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 fd3c63de1e7..f601fbc9808 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 d00b91f316f..3b375e147bc 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 1b71dba42c4..ed1170427c0 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 0b0f9c8be6a..127c093501c 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