python3.pkgs.anytree: make graphviz optional
It is a runtime dependency that produces dependency loop: anytree → graphviz → pango → glib → gtk-doc → anytree
This commit is contained in:
parent
91a276cd79
commit
4522205507
@ -5,6 +5,7 @@
|
||||
, fetchpatch
|
||||
, nose
|
||||
, six
|
||||
, withGraphviz ? true
|
||||
, graphviz
|
||||
, fontconfig
|
||||
}:
|
||||
@ -18,7 +19,7 @@ buildPythonPackage rec {
|
||||
sha256 = "05736hamjv4f38jw6z9y4wckc7mz18ivbizm1s3pb0n6fp1sy4zk";
|
||||
};
|
||||
|
||||
patches = [
|
||||
patches = lib.optionals withGraphviz [
|
||||
(substituteAll {
|
||||
src = ./graphviz.patch;
|
||||
inherit graphviz;
|
||||
@ -33,11 +34,14 @@ buildPythonPackage rec {
|
||||
six
|
||||
];
|
||||
|
||||
# Fontconfig error: Cannot load default config file
|
||||
preCheck = ''
|
||||
# tests print “Fontconfig error: Cannot load default config file”
|
||||
preCheck = lib.optionalString withGraphviz ''
|
||||
export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
|
||||
'';
|
||||
|
||||
# circular dependency anytree → graphviz → pango → glib → gtk-doc → anytree
|
||||
doCheck = withGraphviz;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user