Add an ability to install OFRAK from source
- [X] I have reviewed the OFRAK contributor guide and attest that this pull request is in accordance with it.
One sentence summary of this PR (This should go in the CHANGELOG!) Add an ability to install OFRAK from source
Link to Related Issue(s) N/A
Please describe the changes in your request.
This is a source tree equivalent of pip install for OFRAK - works similar to build_image.py approach, but does not require docker.
- Run
make install_core/make install_tutorial/make install_developto pip-install OFRAK from the current source tree. The core and tutorial versions do regular install (make installfor packages listed in the corresponding.yml), while theinstall_developdoes an "editable mode" install (make developfor packages). - Pass
OFRAK_INSTALL_DEPS=brew/OFRAK_INSTALL_DEPS=apttomaketo have the dependencies (including thenpm/rolloutprerequisites) automatically installed. - Pass
OFRAK_INSTALL_PYTHON=python3.x(with or without the full path) tomaketo have OFRAK installed for the particular instance of python on your system.
(This also adds handling of binja as a potentially-missing dependency, as make install_develop easily triggers a situation where the ofrak binja modules are there, but binja is not - let me know if you'd rather have that as a separate PR).
Anyone you think should look at this, specifically? @Edward-Larson probably? Maybe @rbs-jacob?
@ANogin, if I understand the intent behind this PR, you are looking for a way to install OFRAK from source natively.
Did you consider building a Makefile target to do this? What I'm envisioning is something like:
OFRAK_CONFIG=ofrak-dev.yml PYTHON_PATH=python3 make develop
The Makefile target could then:
- Parse the yaml to get list of packages to install
- Call
make develop/installin the respective directory - There could be an optional argument at the end to run apt/brew commands
I also wonder if we need an automated script to install from source -- this is going to increase the amount of things taht need to be tested and maintained.
Did you consider building a Makefile target to do this? What I'm envisioning is something like:
OFRAK_CONFIG=ofrak-dev.yml PYTHON_PATH=python3 make develop
@whyitfor , I can add OFRAK_CONFIG, but then would probably want to do the same for the build_image targets? Right now we have a few hardcoded targets with specific configs, rather than OFRAK_CONFIG, so I kept the same for consistency.
- Parse the yaml to get list of packages to install
- Call
make develop/installin the respective directory
At least the above steps would presumably still require a python script?
- There could be an optional argument at the end to run apt/brew commands
Is there any benefit to handling the apt vs brew vs just print the suggestion logic in Makefile rather than in Python?
I also wonder if we need an automated script to install from source -- this is going to increase the amount of things taht need to be tested and maintained.