-
Notifications
You must be signed in to change notification settings - Fork 55
dev_install
WARNING: In progress!
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.
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:
-
If you do not already have Miniconda installed, install the Miniconda Python Distribution.
Note: It is very important to select the "install just for me and do not require administrative privileges" option when installing Miniconda.
- Those of you having previously installed PyBERT will notice a change here. To learn why we've changed these instructions from Anaconda to Miniconda, see this FAQ entry.
-
After that completes, launch an appropriate command prompt shell with the
base
environment activated.How you run an "appropriate command prompt shell with the
base
environment activated" depends on both your platform and the options you selected during Miniconda installation. The installer should have given you instructions on getting into this state, in its last few messages. The telltale sign that you are correctly configured is seeing:(base)
somewhere in your command prompt prefix. -
Install and activate the new LibMamba dependency constraint solver:
conda install conda-libmamba-solver
conda config --set solver libmamba
Note: It seems to be critical that you do this first, immediately after installing Miniconda and before installing anything else. (We don't know why.)
-
Create and activate a custom Anaconda environment for PyBERT development:
conda create -n pybert-dev
conda activate pybert-dev
Note: At this point, you should see that
(base)
has been replaced by(pybert-dev)
in your prompt. -
Install Python 3.10 into the new environment:
conda install -c conda-forge -c defaults python=3.10
-
Install PyBERT's dependencies into the new environment:
conda install -c dbanas -c conda-forge -c defaults --only-deps pybert=5
-
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:conda develop src/
-
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.
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 PyAMI in development mode, enter the following commands from the same command prompt and from within the PyBERT/
directory:
git submodule update --init PyAMI/
conda uninstall --force pyibis-ami
conda develop ./PyAMI/
python -c "import pyibisami as dut; print(dut.__file__)"
In response to the last command, you should see something like:
C:\Users\capnf\Documents\GitHub\PyBERT\PyAMI\pyibisami\__init__.py
PyBERT © 2014 David Banas; all rights reserved World wide.