Open ANogin opened 1 year ago
@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:
make develop/install
in the respective directoryI 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 thebuild_image
targets? Right now we have a few hardcoded targets with specific configs, rather thanOFRAK_CONFIG
, so I kept the same for consistency.
- Parse the yaml to get list of packages to install
- Call
make develop/install
in 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.
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 tobuild_image.py
approach, but does not require docker.make install_core
/make install_tutorial
/make install_develop
to pip-install OFRAK from the current source tree. The core and tutorial versions do regular install (make install
for packages listed in the corresponding.yml
), while theinstall_develop
does an "editable mode" install (make develop
for packages).OFRAK_INSTALL_DEPS=brew
/OFRAK_INSTALL_DEPS=apt
tomake
to have the dependencies (including thenpm
/rollout
prerequisites) automatically installed.OFRAK_INSTALL_PYTHON=python3.x
(with or without the full path) tomake
to 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?