Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 165c116a329e
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 67f6f3a42025
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 30, 2017

  1. pandas: Fix build on darwin

    Since the commands "locale", "pbpaste" and "pbcopy" are not in nixpkgs,
    as they are impure darwin dependencies, we currently cannot get the
    clipboard and locale functionality to work properly. We disable the
    tests "test_locale" and "test_clipboard" on darwin, so we get a mostly
    working pandas. Additionally to disabling the test via py.test, we also
    need to provide fake pbpaste/pbcopy commands, so py.test won't fail
    during the collection phase.
    
    This closes #25417 and closes #11623.
    knedlsepp committed May 30, 2017

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    erictapen Kerstin
    Copy the full SHA
    eb2994a View commit details
  2. Merge pull request #26221 from knedlsepp/fix-pandas-darwin-build

    pandas: Fix build on darwin
    FRidh authored May 30, 2017
    Copy the full SHA
    67f6f3a View commit details
Showing with 14 additions and 9 deletions.
  1. +14 −9 pkgs/development/python-modules/pandas/default.nix
23 changes: 14 additions & 9 deletions pkgs/development/python-modules/pandas/default.nix
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@
, openpyxl
, tables
, xlwt
, darwin ? {}
, libcxx ? null
}:

@@ -53,7 +52,7 @@ in buildPythonPackage rec {
openpyxl
tables
xlwt
] ++ optional isDarwin darwin.locale; # provides the locale command
];

# For OSX, we need to add a dependency on libcxx, which provides
# `complex.h` and other libraries that pandas depends on to build.
@@ -63,16 +62,22 @@ in buildPythonPackage rec {
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
'';

checkPhase = ''
runHook preCheck
py.test $out/${python.sitePackages}/pandas --skip-slow --skip-network
''
# TODO: Get locale and clipboard support working on darwin.
# Until then we disable the tests.
+ optionalString isDarwin ''
# Fake the impure dependencies pbpaste and pbcopy
echo "#!/bin/sh" > pbcopy
echo "#!/bin/sh" > pbpaste
chmod a+x pbcopy pbpaste
export PATH=$(pwd):$PATH
'' + ''
py.test $out/${python.sitePackages}/pandas --skip-slow --skip-network \
${if isDarwin then "-k 'not test_locale and not test_clipboard'" else ""}
runHook postCheck
'';

@@ -83,7 +88,7 @@ in buildPythonPackage rec {
homepage = "http://pandas.pydata.org/";
description = "Python Data Analysis Library";
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ raskin fridh ];
maintainers = with stdenv.lib.maintainers; [ raskin fridh knedlsepp ];
platforms = stdenv.lib.platforms.unix;
};
}