ENH: RFC bundle fixup script in python - #889
Open
ihnorton wants to merge 1 commit into
Open
Conversation
Member
Author
|
Note, not ready to merge. To do:
|
Add a new BundleFixup.py script to replace the CMakeScript
"fixup_bundle" routine. Advantages are:
- speed: `make package` runs in ~3 min as compared to ~1 hr
- debuggability: can be debugged in-place with standard pdb
(note: For debugging, it is very helpful to create a git
image of the package directory after the install step.
Then the script can be run/re-run stand-alone, and
reset without deleting or re-running other CMake steps)
There are two steps to the process:
- find all dependencies. For this, we start from the `libs`
passed by SlicerCPackBundleFixup (generated based on configured
libraries). We look at all dependencies, and based on various
criteria, may copy the dependency into the bundle. Similar to
existing script, and uses modified versions of the existing regex
filters to map source_lib -> target_dir in the bundle.
- fixup step: this is a change from the existing script. We look
at *all* Mach-O files in the potential bundle, and correct dylib
references based on *which files are actually in the bundle*.
System library or allow-listed references are ignored (currently
only pqsql and mysql re allow-listed -- they are needed by the
optional qt database drivers).
- implicit verification -- bundling will fail if the dependency
is not found or allow-listed.
- we remove all absolute RPATH references. This should allow to
run tests from the bundle itself on the factory, as a
separate verification step (we can't check dlopen calls, but
assuming we only `dlopen` checked dylibs from inside the
bundle...).
ihnorton
force-pushed
the
faster_bundling
branch
from
February 5, 2018 22:40
22d7e4c to
d90050a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See commit message for more detailed information. The goal here is to make the packaging system easier to use and debug. Using python allows for shorter code, and makes the fixup step much faster: the total packaging time is reduced to ~3 min as compared to ~1 hr (
make packagein an up-to-date build tree). The script can also be debugged with pdb. Hopefully this makes other build system improvements easier to test and iterate, because the turn-around to test changes will be shorter.