I have a graphical package that I would like to distribute as a single .git repository, that actually contains two separate modules.
Problem
- On some systems,
Cairo.jlwill work fine, whereasGtk.jlmight not (ex: JuliaBox). - Want to distribute a plotting package with a
Cairolayer for generating the plots themselves, and aGtklayer to get an interactive GUI.
Example
Currently, InspectDR is organized as follows (-> means “depends on”):
InspectDR.jl -> Cairo.jl + Gtk.jl
But I would like to restructure the InspectDR.jl package such that:
InpsectDR.jl (package)
|--InspectDRImage (module) -> Cairo.jl
|--InspectDRGtk (module) -> InspectDRImage + Gtk.jl
If I use the old system, I have to add both Cairo & Gtk to the REQUIRE file. But that causes installation issues on systems where Gtk does not work.
The Solution??
If I understand correctly, I would like a user to be able to ] add InspectDR, but only build InspectDRImage & using InspectDRImage - without ever referencing the InspectDRGtk module (which would try to install Gtk on the user’s machine).
…Although maybe the way to do this is to have the user ] add InspectDRImage directly - and have Julia’s package manager know to grab it from the InpsectDR.jl .git repository.
Need Help
Can someone point me to a similar package somewhere - or possibly a set of instructions that closely relates to what I am looking for?
I cannot figure out how to do this with the new Project.toml & Manifest.toml files.