summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Dettorer Hervot <dettorer@dettorer.net>2023-05-14 14:56:56 +0200
committerPaul Dettorer Hervot <dettorer@dettorer.net>2023-05-14 17:36:25 +0200
commitcfe4464d7e8cf2f67fd6c8d3c3b534de75d676c1 (patch)
tree500b60585713708c58cef13d1abc96e347fb2d82
parentpython311Packages.python-mapnik: use boost182 instead of the default (diff)
downloadnixpkgs-cfe4464d7e8cf2f67fd6c8d3c3b534de75d676c1.tar.gz
python3Packages.python-mapnik: fix tests on darwin
- replace the hardcoded references to /tmp with $TMPDIR - disable a PDF-related cairo test
-rw-r--r--pkgs/development/python-modules/python-mapnik/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix
index cc545b391aa4..a6e42d2369b6 100644
--- a/pkgs/development/python-modules/python-mapnik/default.nix
+++ b/pkgs/development/python-modules/python-mapnik/default.nix
@@ -23,6 +23,7 @@
, sqlite
, nose
, pytestCheckHook
+, stdenv
}:
buildPythonPackage rec {
@@ -98,6 +99,9 @@ buildPythonPackage rec {
preCheck = ''
# import from $out
rm -r mapnik
+ '' + lib.optionalString stdenv.isDarwin ''
+ # Replace the hardcoded /tmp references with $TMPDIR
+ sed -i "s,/tmp,$TMPDIR,g" test/python_tests/*.py
'';
# https://github.com/mapnik/python-mapnik/issues/255
@@ -129,6 +133,8 @@ buildPythonPackage rec {
"test_visual_zoom_all_rendering1"
"test_visual_zoom_all_rendering2"
"test_wgs84_inverse_forward"
+ ] ++ lib.optional stdenv.isDarwin [
+ "test_passing_pycairo_context_pdf"
];
pythonImportsCheck = [ "mapnik" ];