From 18370cd9d0ebe37e2903409c7175046590305e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 22 Feb 2021 09:28:56 +0100 Subject: [PATCH] pythonPackages.shapely: fix tests, switch to pytestCheckHook --- .../development/python-modules/shapely/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/shapely/default.nix b/pkgs/development/python-modules/shapely/default.nix index b5875818b952..91c34734a8c5 100644 --- a/pkgs/development/python-modules/shapely/default.nix +++ b/pkgs/development/python-modules/shapely/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, substituteAll, pythonOlder -, geos, pytest, cython +, geos, pytestCheckHook, cython , numpy }: @@ -18,10 +18,10 @@ buildPythonPackage rec { cython ]; - checkInputs = [ pytest ]; - propagatedBuildInputs = [ numpy ]; + checkInputs = [ pytestCheckHook ]; + # environment variable used in shapely/_buildcfg.py GEOS_LIBRARY_PATH = "${geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}"; @@ -38,12 +38,14 @@ buildPythonPackage rec { }) ]; - # Disable the tests that improperly try to use the built extensions - checkPhase = '' + preCheck = '' rm -r shapely # prevent import of local shapely - py.test tests ''; + disabledTests = [ + "test_collection" + ]; + meta = with lib; { description = "Geometric objects, predicates, and operations"; maintainers = with maintainers; [ knedlsepp ];