Open dpnova opened 10 years ago
This should be entirely possible, and sounds like a pretty good idea to me. Remote debugging is one of the use cases I would like to cover, and if you're installing on a headless server, getting Tk installed is going to be difficult (or at least require pulling in a bunch of dependencies that shouldn't be there).
The best approach I can think of is to split the packaging of bugjar into two completely separate PyPI packages - a network probe that has no GUI dependencies, and a GUI that can talk to that probe. The package for the GUI part can then have the network probe as a dependency, or we have a third meta package that installs head + probe.
I'm not familiar with the intricacies of meta packages in pypi - so net being a dep of bugjar sounds most sane to me.
I was actually thinking more about allowing a code path where the net entry point into the library never triggers the tkinter import. This does mean the user would have to install the relevant tkinter deps manually which may be less than ideal...
I thought about structuring the code so that Tk was just never imported - but like you said, then you've got the problem that "pip install bugjar" doesn't work out of the box. One of the key requirements for PyBee tools is that the install isn't complicated (wherever possible), so I'm not so keen on this approach.
As for a meta-package - there's nothing too complex there - it's just a Python package with a setup.py, but no code, that defines a set of dependencies. You install the code-less package, and you get all the dependencies installed. Or, you can install the individual dependencies separately. That would mean it would be possible to install the GUI head without necessarily installing the probe.
This would suit debugging a process in vagrant, but would have use beyond that too.
The question is, is this even possible? A cursory look seems to suggest it should be, so leaving this here as a place to continue the convo.