Unverified Commit 70bad31f authored by Emily's avatar Emily Committed by GitHub
Browse files

python3Packages: don't depend on setup hooks' bash eval (part with fewer rebuilds) (#354811)

parents 8b4df30a f9969cbf
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -65,14 +65,11 @@ python3.pkgs.buildPythonApplication rec {
    "conan"
  ];

  pytestFlagsArray = [
    "-n"
    "$NIX_BUILD_CORES"
  ];

  disabledTests = [
    # Tests require network access
    "TestFTP"
    # Unstable test
    "test_shared_windows_find_libraries"
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    # Rejects paths containing nix
    "test_conditional_os"
+2 −15
Original line number Diff line number Diff line
@@ -35,21 +35,8 @@ python3Packages.buildPythonApplication rec {
    pytestCheckHook
  ];

  # The package tries to create a file under the home directory on import
  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  pytestFlagsArray = [
    # pytest exits with a code of 5 if no tests are selected.
    # handle this specific case as not an error
    "|| ([ $? = 5 ] || exit $?)"
  ];

  disabledTestPaths = [
  # Loading tests tries to download something from pypi.org
    "tests/test_cli.py"
  ];
  doCheck = false;

  meta = {
    description = "CLI for the fichub.net API";
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ pythonPackages.buildPythonApplication rec {
    pyyaml
  ];

  setupPyGlobalFlags = [ "build" "--disable-autoupdate" "--localedir=$out/share/locale" ];
  setupPyGlobalFlags = [ "build" "--disable-autoupdate" "--localedir=${placeholder "out"}/share/locale" ];

  preCheck = ''
    export HOME=$(mktemp -d)
+0 −2
Original line number Diff line number Diff line
@@ -39,8 +39,6 @@ python3.pkgs.buildPythonApplication rec {
  ];

  pytestFlagsArray = [
    "-n"
    "$NIX_BUILD_CORES"
    # Run the same tests as upstream does in the first round
    "tests/core/"
    "tests/test_exploit_scenarios.py"
+2 −1
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@ buildPythonPackage rec {

  nativeCheckInputs = [ pytestCheckHook ];

  pytestFlagsArray = [ "$out/${python.sitePackages}" ];
  preCheck = "pushd $out";
  postCheck = "popd";

  disabledTests = [ "test_make_c_files" ];

Loading