pythonPackages.shapely: fix tests, switch to pytestCheckHook
This commit is contained in:
parent
31fe1f430e
commit
18370cd9d0
@ -1,5 +1,5 @@
|
|||||||
{ lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, substituteAll, pythonOlder
|
{ lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, substituteAll, pythonOlder
|
||||||
, geos, pytest, cython
|
, geos, pytestCheckHook, cython
|
||||||
, numpy
|
, numpy
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -18,10 +18,10 @@ buildPythonPackage rec {
|
|||||||
cython
|
cython
|
||||||
];
|
];
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ numpy ];
|
propagatedBuildInputs = [ numpy ];
|
||||||
|
|
||||||
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
# environment variable used in shapely/_buildcfg.py
|
# environment variable used in shapely/_buildcfg.py
|
||||||
GEOS_LIBRARY_PATH = "${geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}";
|
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
|
preCheck = ''
|
||||||
checkPhase = ''
|
|
||||||
rm -r shapely # prevent import of local shapely
|
rm -r shapely # prevent import of local shapely
|
||||||
py.test tests
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
disabledTests = [
|
||||||
|
"test_collection"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Geometric objects, predicates, and operations";
|
description = "Geometric objects, predicates, and operations";
|
||||||
maintainers = with maintainers; [ knedlsepp ];
|
maintainers = with maintainers; [ knedlsepp ];
|
||||||
|
Loading…
Reference in New Issue
Block a user