Commit 9f79d94e authored by Dominik Neise's avatar Dominik Neise
Browse files

PYTHONPATH and INTROOT do not play a role during installation. pip will not...

PYTHONPATH and INTROOT do not play a role during installation. pip will not install to INTROOT if -e is omitted.
parent 451bc504
Pipeline #4182 passed with stage
in 54 seconds
......@@ -15,9 +15,28 @@ this example is being installed, the compiled code will be copied into `$INTROOT
Again, when used with other components, a merged `CDB` is needed, and `$ACS_CDB` needs to point there.
# Installation
- When the setup is correct, you can navigate to idl/src where you can find the `Makefile`. Run `make all install` to compile the package. This needs to be executed whenever the idl changes, which is hopefully not as often as the implementation of the component.
- Back in the top-level directory of this package, you can run `pip install --user -e .` in order to build the python code under exampleImpl that is needed by the component. The package will be installed in place (to $INTROOT/lib/python/site-package when -e is omitted). Make sure that this is present in your $PYTHONPATH. being installed as with `-e` you can edit the code without needing to reinstall again. You will need to start and stop the container however in order get the changes into effect.
When the setup is correct, you can navigate to `idl/src/` where you can find the `Makefile`.
Run `make all install` to compile the package.
This only needs to be executed after the idl was modified, which is hopefully not as often as the implementation of the component.
# only once after download OR after modification of the files inside idl/
cd idl/src
make all install
cd ../..
pip install --user -e .
The actual Python sources of this ACS-component can be found in `exampleImpl/`.
By saying `pip install --user -e .` these sources are being [installed into the user site](https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site)
in so called [editable mode](https://packaging.python.org/tutorials/installing-packages/#installing-from-a-local-src-tree).
There is no actual "build" or "compile" step happening, since Python is an interpreted language.
However the install step is necessary for the Python interpreter to actually find the sources.
Usually during the installation files are copied into a standardized location for the interpreter to find them.
However during code development this behavior is inconvenient, since after a modification of the sources, one would need to repeat the `pip install` step for the modification to actually take effect.
By means of the `-e` flag, we tell pip to not actually copy the sources, but rather link them, resulting in a convenient setup, where modifications take effect immediatelty.
However, you will need to start and stop the container however in order get the changes into effect.
# Starting ACS and the Container.
In order to fully test the acs component, you will need to start acs and the container as specified in the CDB.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment