Installation#
Preliminaries#
Linux (Debian / Ubuntu)#
Depending on your preferences, you may install the dependencies through APT, or through PIP. Please see the following steps if you want to use APT dependencies.
Install
poetry:
sudo apt update
sudo apt update python3-poetry
Install the APT dependencies:
sudo apt install graphviz python3 python3-pylint
If you are a developer, please also install the following dependencies:
sudo apt install git python3-pip bumpversion python3-coverage python3-pytest python3-pytest-cov python3-pytest-runner python3-sphinx python-pydata-sphinx-theme-doc
sudo pip3 install sphinx_mdinclude --break-system-packages
Windows#
Installing sphinx-uml#
From PIP#
There are several ways to install the package:
System-wide: A modern
pip3version prevents to install packages system-wide. You must either use a virtual environment, or either pass the--break-system-packagesoptions:
sudo pip install sphinx-uml --break-system-packages
User-wide: As a normal user run:
pip install sphinx-uml --break-system-packages
In a
poetryenvironment: the package is available from program run usingpoetry run ....
poetry run pip install
pip install sphinx-uml
In a virtual environment: the package is available only if this virtual environment is enabled.
python3 -m venv env # Create your virtual environment
source env/bin/activate # Activate the "env" virtual environment
which python # Check you use the venv python interpret (i.e., not /usr/bin/python3)
pip install sphinx-uml
deactivate # Leave the "env" virtual environment
From git#
Clone the repository and install the package:
git clone https://github.com/ibgp2/sphinx-uml.git
cd sphinx_uml
Install the missing dependencies and build the wheel of the project in a
poetryenvironment:
poetry install # Install the core dependencies. Pass --with docs,test,dev to install additional dependencies.
poetry build # Build the wheel (see dist/*whl)
The resulting
dist/sphinx_uml*whlfile can be installed usingpip(see the previous section).
Example:
pip3 install dist/sphinx_uml*whl --break-system-packages