dev_install - capn-freako/PyBERT GitHub Wiki
NOTE: These instructions changed dramatically with the release of PyBERT v6, because PyBERT is now Pip-installable; no more Conda! :)
NOTE: These instructions are for developers only! If you are a user, who does not intend to modify the PyBERT source code, back up and choose Instant Gratification, instead.
NOTE: You may also wish to follow these instructions if you want to test the code in an unreleased development branch to, for instance, provide feedback to the developers.
NOTE: I'm assuming you're working at a Bash, or Sh, prompt. If you're using Csh, please, make the necessary translations to the following commands.
NOTE: The new development infrastructure is exclusively make
driven.
Enter just make
without arguments, to see all available targets with descriptions.
If you wish to install PyBERT in a way that allows you to see immediate feedback to any changes you make to the PyBERT source code, follow these steps:
CAUTION: Do NOT skip step #1! It provides protection to your pre-existing, system Python installation. By doing your PyBERT development work inside a new virtual Python environment intended only for that purpose, you will prevent damage to your system Python environment.
NOTE: Your new virtual environment will be set up to use whichever version of Python you run when you create it.
-
Create and activate a custom virtual environment for PyBERT development:
-
python3 -m venv ~/.venv/pybert-dev
(If that fails, try just "python".) -
source ~/.venv/pybert-dev/bin/activate
(Windows users:source ~\.venv\pybert-dev\Scripts\activate
)
NOTE: At this point, you should see
(pybert-dev)
in your prompt. -
-
Install PyBERT and its dependencies into the new environment:
-
pip install PipBERT
(Note the package name: Pip BERT!)
-
-
Fork/clone the PyBERT GitHub repository to your machine.
-
From the main PyBERT repository, make your own fork of PyBERT by clicking where shown:
-
From your new fork of PyBERT, clone, or download, to your working machine, by clicking where shown:
and entering the following command:
git clone <PASTE>
Note: If you don't wish to create your own fork of the PyBERT project, you may just clone mine. However, note that you won't be able to push any changes you make to the Python source code back up to GitHub!
-
-
Move into the newly created
PyBERT/
directory and install PyBERT in "development" mode:pip install -e .
-
If you wish to develop on something other than the main branch then check it out:
git checkout <branch>
-
Test your new development mode installation of PyBERT, by executing the following command:
python -m pybert
You should see the usual PyBERT GUI application appear on your screen.
-
Enter the command:
make
, without any arguments, to see a list of targets available to you.
You are now ready to begin changing the PyBERT source code and testing those changes. Of course, you must quit and restart PyBERT, after making a source code change, in order to see its effects.
If you also wish to install PyIBIS-AMI in development mode, enter the following commands from the same command prompt and from within the PyBERT/
directory:
git submodule update --init PyAMI/
pip install -e ./PyAMI/
python -c "import pyibisami as dut; print(dut.__file__)"
In response to the last command, you should see something like:
<path to PyBERT project>/PyAMI/pyibisami/__init__.py