Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better solution for graphviz executable #34

Closed
jakirkham opened this issue Apr 29, 2019 · 11 comments
Closed

Better solution for graphviz executable #34

jakirkham opened this issue Apr 29, 2019 · 11 comments

Comments

@jakirkham
Copy link
Member

Currently the graphviz.exe file is installed in Library\bin\graphviz. This causes some complications when people want to call the executable as that is not added to the path. Currently we address that by creating a batch script in Library\bin, which calls the executable in Library\bin\graphviz. This causes issues downstream where we have needed to extra work to call the batch script. Am wondering if there is a better way for us to address this, which would result in less downstream pain.

xref: conda-forge/python-graphviz-feedstock#6
xref: ContinuumIO/anaconda-issues#1666

@jakirkham
Copy link
Member Author

Just to propose a solution here, would it be possible to add a hard link to executables in Library\bin\graphviz to Library\bin or are there challenges with this approach?

@jakirkham
Copy link
Member Author

@ccordoba12, as you are pretty familiar with this problem, do you have any thoughts on this?

@ccordoba12
Copy link
Contributor

The right solution would be to compile Graphviz on Windows, but that seems pretty hard.

The problem with the current approach is that the Graphviz installer that we're repackaging as a conda package comes with a lot of third-party libraries (like Qt4 and zlib), so we need to put its contents on Library\bin\graphviz instead of Library\bin.

So I think the batch script approach is the right one for now (I can't think of a better one). We just need to submit patches to the upstream projects that depend on Graphviz to make them work with batch scripts. That's usually a matter of adding shell=True to the subprocess.call command that calls Graphviz executables.

@ankostis
Copy link

I discovered a tough limitation with BAT files: they don't work with UNC cwd.
Should i open a new issue?

@ccordoba12
Copy link
Contributor

No, thanks.

@ankostis
Copy link

ankostis commented Oct 16, 2019

Note that python-graphviz-8.4 does not suffer from UNC problems because it does not set cwd to the parent of the filepath.

@jakirkham
Copy link
Member Author

So that sounds like a python-graphviz issue and not a graphviz issue. Could you please raise on that feedstock?

@ankostis
Copy link

ankostis commented Oct 16, 2019

Thank you, i reported it in conda-forge/python-graphviz-feedstock#32 as advised.

I wanted to cast here my -1 vote against batch proxies for the forthcoming 2.40 release.

@Nodd
Copy link

Nodd commented Jun 11, 2020

sphinx doesn't generate inheritance graphs, if I understand correctly it's because it doesn't support the batch script. Adding Library\bin\graphviz to the path does the trick even if not recommended.

@jakirkham
Copy link
Member Author

Well there was a recent release of Graphviz if someone wants to tackle upgrading ( #46 ) and building from source on Windows ( #11 ).

@jakirkham
Copy link
Member Author

We are now building from source on Windows with PR ( #59 ) 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants