Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.ipython: disable clipboard test on darwin #159516

Merged
merged 1 commit into from
Feb 12, 2022

Conversation

mweinelt
Copy link
Member

@mweinelt mweinelt commented Feb 12, 2022

Motivation for this change

#157584 (comment)

Probably to big to into master, but easier to test on master. Can be rebased later.

cc @NixOS/darwin-maintainers please test

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@vcunat
Copy link
Member

vcunat commented Feb 12, 2022

Uh, its another of the parameters that would better not change hash if added with an empty list :-/ But... with null it wouldn't be extremely ugly and it would avoid rebuild except where needed (and failed anyway).

@mweinelt
Copy link
Member Author

mweinelt commented Feb 12, 2022

Wondering if the solution is as simple as

diff --git a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh
index 0f708f88829..26aa614426e 100644
--- a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh
+++ b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh
@@ -33,12 +33,12 @@ function pytestCheckPhase() {
 
     # Compose arguments
     args=" -m pytest"
-    if [ -n "$disabledTests" ]; then
+    if [ "${#disabledTests[@]}" -gt 0 ]; then
         disabledTestsString=$(_pytestComputeDisabledTestsString "${disabledTests[@]}")
       args+=" -k \""$disabledTestsString"\""
     fi
 
-    if [ -n "${disabledTestPaths-}" ]; then
+    if [ "${#disabledTestPaths[@]}" -gt 0 ]; then
         eval "disabledTestPaths=($disabledTestPaths)"
     fi
 

Edit: nope, isn't.

@vcunat
Copy link
Member

vcunat commented Feb 12, 2022

The solution has to be in evaluation time, i.e. shell can't do it. On a quick glance, replacing empty lists by null values might even be a reasonable default for mkDerivation and similar functions.

@vcunat
Copy link
Member

vcunat commented Feb 12, 2022

Anyway, let's try this particular build
@ofborg build python3Packages.ipython

Copy link
Contributor

@risicle risicle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WFM macos 10.15

@mweinelt
Copy link
Member Author

Rebased, sorry for the noise. Need to learn how to do it properly I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants