From 71171b3225a7cf4073a9519852791eb4c94e7ff0 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Wed, 22 Apr 2020 18:50:27 +0200 Subject: [PATCH] Python tests: test venv from a nix env with Python 3.8 This test was disabled because it did not function yet, however, apparently it does with 3.8. --- pkgs/development/interpreters/python/tests.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/development/interpreters/python/tests.nix b/pkgs/development/interpreters/python/tests.nix index 55065c45d57..f2fb6b95c37 100644 --- a/pkgs/development/interpreters/python/tests.nix +++ b/pkgs/development/interpreters/python/tests.nix @@ -38,17 +38,18 @@ let is_nixenv = "False"; }; + } // lib.optionalAttrs (python.pythonAtLeast "3.8") { # Venv built using Python Nix environment (python.buildEnv) # TODO: Cannot create venv from a nix env # Error: Command '['/nix/store/ddc8nqx73pda86ibvhzdmvdsqmwnbjf7-python3-3.7.6-venv/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. - # nixenv-venv = rec { - # env = runCommand "${python.name}-venv" {} '' - # ${pythonEnv.interpreter} -m venv $out - # ''; - # interpreter = "${env}/bin/${pythonEnv.executable}"; - # is_venv = "True"; - # is_nixenv = "True"; - # }; + nixenv-venv = rec { + env = runCommand "${python.name}-venv" {} '' + ${pythonEnv.interpreter} -m venv $out + ''; + interpreter = "${env}/bin/${pythonEnv.executable}"; + is_venv = "True"; + is_nixenv = "True"; + }; }; # All PyPy package builds are broken at the moment