diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix index 6f951bc28370..e08fde3c8bfc 100644 --- a/pkgs/development/interpreters/python/2.7/default.nix +++ b/pkgs/development/interpreters/python/2.7/default.nix @@ -68,6 +68,8 @@ let done '' + optionalString stdenv.isDarwin '' substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' + substituteInPlace Lib/multiprocessing/__init__.py \ + --replace 'os.popen(comm)' 'os.popen("nproc")' ''; configureFlags = [ @@ -95,11 +97,7 @@ let ] ++ optionals x11Support [ tcl tk xlibsWrapper libX11 ] ) ++ optional zlibSupport zlib - - # depend on CF and configd only if purity is an issue - # the impure bootstrap compiler can't build CoreFoundation currently. it requires - # which is in our pure bootstrapTools, but not in the system headers. - ++ optionals (stdenv.isDarwin && !stdenv.cc.nativeLibc) [ CF configd ]; + ++ optionals stdenv.isDarwin [ CF configd ]; # Build the basic Python interpreter without modules that have # external dependencies. diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ed71333eb3de..f6ad5d2a8974 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5677,6 +5677,9 @@ let propagatedBuildInputs = with self; [ argh pathtools pyyaml ]; + buildInputs = stdenv.lib.optionals stdenv.isDarwin + [ pkgs.darwin.apple_sdk.frameworks.CoreServices pkgs.darwin.cf-private ]; + doCheck = false; src = pkgs.fetchurl { @@ -11836,6 +11839,11 @@ let substituteInPlace setup.py \ --replace "['pandas/src/klib', 'pandas/src']" \ "['pandas/src/klib', 'pandas/src', '$cpp_sdk']" + + # disable clipboard tests since pbcopy/pbpaste are not open source + substituteInPlace pandas/io/tests/test_clipboard.py \ + --replace pandas.util.clipboard no_such_module \ + --replace OSError ImportError ''; # The flag `-A 'not network'` will disable tests that use internet.