Don't remove header files when removing bloat
knarfS opened this issue · 4 comments
Don't remove the header files / the include directory when removing bloat. This way a application can be compiled against these header files.
Maybe add a separate switch (CONDA_SKIP_INCLUDE_CLEANUP) to skip the cleanup of the header files?
I quickly hacked this cleanup option in last week while trying to build your AppImage. My plan was to provide a way to first run this plugin to create the conda environment with CONDA_SKIP_CLEANUP=1
, then do your stuff, then when finally running linuxdeploy allow for e.g., CONDA_CLEANUP_ONLY=1
to run the cleanup routines.
The problem with your suggestion is that there still are header files in the final AppImage, which, after building, just aren't needed.
We could provide both these options, though. Then you get the best of both worlds. What do you think?
Sounds good to me, though the CONDA_CLEANUP_ONLY=1
would probably be sufficient.
This kind of issue could be solved even better with linuxdeploy/linuxdeploy#68. Then you could run a "bootstrap" stage first, which would initialize the AppDir and run preliminary tasks (e.g., for the conda plugin, download and install the conda environment), then you could run your own tasks, and then run the remaining tasks.
Decided to simply go for keeping the headers. I don't think it'll add too much bloat. Thanks again for your help!