Skip to content

Commit

Permalink
python3Packages.python-mapnik: fix tests on darwin
Browse files Browse the repository at this point in the history
- replace the hardcoded references to /tmp with $TMPDIR
- disable a PDF-related cairo test
  • Loading branch information
Dettorer committed May 14, 2023
1 parent 843f139 commit cfe4464
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkgs/development/python-modules/python-mapnik/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
, sqlite
, nose
, pytestCheckHook
, stdenv
}:

buildPythonPackage rec {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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" ];
Expand Down

0 comments on commit cfe4464

Please sign in to comment.