Make ld-decode into a Python package #385
Merged
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.
This is definitely a "please review this" PR rather than a "merge this right now" PR!
This moves ld-decode's modules into an
lddecode
package, and adds asetup.py
script - if you're not a Python user, this is the standard way of describing and installing Python libraries/programs. The scripts are renamed to match the names they'll be installed under (ld-decode
rather thanld-decode.py
), and theimport
lines are updated to use the package.ld-decode will still work directly from the source tree as before, but to install the modules and scripts, you can now do:
The
#!
in the scripts will be updated to match the Python interpreter you use to run setup.py, so if you want a non-defaultpython3
, use that here.I've made some arbitrary choices about module names; if you have better suggestions, let me know!
lddecode
. It can't beld-decode
because it has to be a valid identifier, and the name would collide with the script;ld_decode
would be legal but unusual.lddecode_core
->lddecode.core
lddutils
->lddecode.utils
ld_utils
->lddecode.plot_utils
(??)foo
->lddecode.foo
@oyvindln: this will need some matching changes to the imports in your VHS fork when you merge it, but it should be the same as I've done for the ld-decode scripts here. The VHS modules could go into an
lddecode.vhs
package?Fixes #70.