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

Allow disabling Desktop or CommandLine builds #83

Closed
wants to merge 1 commit into from

Conversation

effigies
Copy link
Contributor

The internal dependency graph seems to simplify to:

graph LR;
   Desktop --> GuiQt --> AllElse
   Desktop & GuiQt --> Qwt
   Command & Desktop ---> AllElse
Loading

This is a small patch to allow for either to be disabled. The motivating use case is building a separate conda package for each tool and a meta-package that depends on each:

graph LR;
  connectome-workbench --> connectome-workbench-gui & connectome-workbench-cli
Loading

@coalsont
Copy link
Member

What is the motivation for making them separate conda packages? How does conda handle imagemagick's convert vs display executables?

@effigies
Copy link
Contributor Author

effigies commented Oct 15, 2024

It's mostly a space optimization.

The motivation is that wb_command is very useful to include in a reproducible environment, which you can build with conda and potentially containerize to lock things down even more. wb_view is twice the size and I haven't encountered a situation where I'd need it in a virtual environment.

Imagemagick distributes only one package, but display and convert (and the other programs) are just symlinks to magick, a 24KB binary.

@coalsont
Copy link
Member

coalsont commented Oct 15, 2024

Separating them completely sounds like it would build all the common libraries twice in the build process. Is building a specific environment from source a typical use case that needs space/time optimization based on binary package selection? I think other packaging systems allow one source package to produce more than one binary package.

@effigies
Copy link
Contributor Author

I've opened a conversation with the conda-forge folks to see if I could build once and split the binaries into two packages or build twice with different arguments and reuse the build directory to save time and effort. I couldn't figure out how to do it from their documentation, so this patch was the result.

Given that this is building binary packages that will be downloaded far more often than updated, the inefficiency of two builds per OS on new releases seems tolerable if it can't be avoided.

If you're interested, the PR is at conda-forge/staged-recipes#27880.

@effigies
Copy link
Contributor Author

effigies commented Oct 15, 2024

Tbh the main thing I care about packaging is the CLI, and I started the split just to remove the GUI. I decided that would likely annoy someone who installed it into a desktop environment and expected the GUI, so making the two packages and having the project name install both seemed like the best ux whole still achieving my goal.

@coalsont
Copy link
Member

coalsont commented Oct 15, 2024

I don't know if this would be worse, but having a full-fledged connectome-workbench "replace" a stripped-down connectome-workbench-cli in the package metadata might be another approach.

I think you can already do make wb_view or make wb_command after cmake is finished, and it should do what you would expect.

@effigies
Copy link
Contributor Author

Okay, I was able to create multiple packages from a single compilation step, so this is not needed.

I think there might be a way to build multiple package variants where one is nogui or something, but that seems more complicated than just splitting the package. If someone does conda install connectome-workbench, they'll get everything they expect.

@effigies effigies closed this Oct 16, 2024
@effigies effigies deleted the multibuild branch October 16, 2024 14:06
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

Successfully merging this pull request may close these issues.

2 participants