diff options
Diffstat (limited to 'pkgs/development/python-modules/pybind11/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pybind11/default.nix | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/pybind11/default.nix b/pkgs/development/python-modules/pybind11/default.nix index 0f386a7c42f..76e60fda86a 100644 --- a/pkgs/development/python-modules/pybind11/default.nix +++ b/pkgs/development/python-modules/pybind11/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { cmakeFlags = [ "-DEIGEN3_INCLUDE_DIR=${eigen}/include/eigen3" - ] ++ lib.optionals (!python.isPy2) [ + ] ++ lib.optionals (python.isPy3k) [ # Enable some tests only on Python 3. The "test_string_view" test # 'testTypeError: string_view16_chars(): incompatible function arguments' # fails on Python 2. @@ -39,6 +39,14 @@ buildPythonPackage rec { dontUsePipInstall = true; dontUseSetuptoolsCheck = true; + patches = [ + ./0001-Find-include-directory.patch + ]; + + postPatch = '' + substituteInPlace pybind11/__init__.py --subst-var-by include "$out/include" + ''; + preFixup = '' pushd .. export PYBIND11_USE_CMAKE=1 @@ -50,8 +58,6 @@ buildPythonPackage rec { popd ''; - installCheckTarget = "pytest"; - doInstallCheck = true; checkInputs = [ pytest numpy |