conda-forge / python-graphviz-feedstock

A conda-smithy repository for python-graphviz.
BSD 3-Clause "New" or "Revised" License
3 stars 12 forks source link

Conda version of 0.16 broken on windows #42

Closed rwedge closed 3 years ago

rwedge commented 3 years ago

Running this code:

> import graphviz
> graphviz.Digraph().pipe()
...
graphviz.backend.ExecutableNotFound: failed to executed ['dot', '-Kdot.bat', '-Tpdf'],
make sure the Graphviz executables are on your systems' PATH

I believe this was caused by https://github.com/xflr6/graphviz/commit/422adc1fde7b8a1ecd383dd7f17e7b319bd610d4 changing the command from

cmd = [engine, '-T%s' % ':'.join(output_format)]

to this

cmd = ['dot', '-K%s' % engine, '-T%s' % ':'.join(output_format)]

Since 'dot' is used directly instead of through engine, it doesn't get changed from 'dot' to 'dot.bat' and the command fails because dot can't be found

@xflr6 thoughts on how to fix this?

xflr6 commented 3 years ago

Thanks @rwedge.

+1, looks like 28e281412affc5468d72ae65caff892fe6d78093 missed to update the .patch file that is used here:

https://github.com/conda-forge/python-graphviz-feedstock/blob/6311c81f256de360768dba06ed0789cc3d8c066a/recipe/windows-bat.patch#L7-L8

Caveat that I don't maintain this (conda) package/distribution: @scopatz or @jakirkham, can you take a look?

To clarify: The vanilla-version of graphviz works on Windows (using the vanilla-version of Graphviz): IIRC, the conda-distribution of Graphviz includes .bat-wrappers for the layout commands to work around some library loading issue (not sure if that is still needed).

rwedge commented 3 years ago

Not sure if the wrappers are still necessary but I can try updating the patch file

jakirkham commented 3 years ago

Yeah the wrappers are still needed. Thanks for working on a patch.