Changeset View
Changeset View
Standalone View
Standalone View
docs/developer-setup.rst
Show All 23 Lines | |||||
Software Heritage requires some dependencies that are usually packaged by your | Software Heritage requires some dependencies that are usually packaged by your | ||||
package manager [1]. On Debian/Ubuntu-based distributions:: | package manager [1]. On Debian/Ubuntu-based distributions:: | ||||
sudo wget https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /etc/apt/trusted.gpg.d/postgresql.asc | sudo wget https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /etc/apt/trusted.gpg.d/postgresql.asc | ||||
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | sudo tee -a /etc/apt/sources.list.d/pgdg.list | echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | sudo tee -a /etc/apt/sources.list.d/pgdg.list | ||||
sudo wget https://downloads.apache.org/cassandra/KEYS -O /etc/apt/trusted.gpg.d/cassandra.asc | sudo wget https://downloads.apache.org/cassandra/KEYS -O /etc/apt/trusted.gpg.d/cassandra.asc | ||||
echo "deb https://downloads.apache.org/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.list | echo "deb https://downloads.apache.org/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.list | ||||
sudo apt update | sudo apt update | ||||
sudo apt install python3 python3-venv libsvn-dev postgresql \ | sudo apt install python3 python3-pip python3-venv libsvn-dev postgresql \ | ||||
libsystemd-dev libpython3-dev graphviz postgresql-autodoc \ | libsystemd-dev libpython3-dev graphviz postgresql-autodoc \ | ||||
postgresql-server-dev-all virtualenvwrapper git build-essential \ | postgresql-server-dev-all virtualenvwrapper git build-essential \ | ||||
pkg-config myrepos lzip cassandra pre-commit | pkg-config myrepos lzip cassandra | ||||
pip install pre-commit | |||||
You may need to extend your enviromment variable PATH to have easy access to commands installed via pip:: | |||||
export PATH="$(python3 -c 'import site; print(site.USER_BASE)')/bin:${PATH}" >> ~/.profile | |||||
vlorentz: if the venv needs to be configured before pip, then `pip install pre-commit` should be below. | |||||
[1] python3.7 runtime version is the minimum required | [1] python3.7 runtime version is the minimum required | ||||
Cassandra and postgresql will be started by tests when they need it, so you | Cassandra and postgresql will be started by tests when they need it, so you | ||||
don't need them started globally (this will save you some RAM):: | don't need them started globally (this will save you some RAM):: | ||||
sudo systemctl stop postgresql | sudo systemctl stop postgresql | ||||
sudo systemctl disable postgresql | sudo systemctl disable postgresql | ||||
Show All 35 Lines | |||||
.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/ | .. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/ | ||||
.. _poetry: https://poetry.eustace.io/ | .. _poetry: https://poetry.eustace.io/ | ||||
.. _pipenv: https://pipenv.readthedocs.io/ | .. _pipenv: https://pipenv.readthedocs.io/ | ||||
Install all the swh packages (in develop mode):: | Install all the swh packages (in develop mode):: | ||||
(swh) ~/swh-environment$ pip install flake8 pifpaf tox wheel mypy | (swh) ~/swh-environment$ pip install flake8 pifpaf tox wheel mypy | ||||
(swh) ~/swh-environment$ pip install $(./bin/pip-swh-packages) | |||||
(swh) ~/swh-environment$ pip install $(./bin/pip-swh-packages --with-testing) | (swh) ~/swh-environment$ pip install $(./bin/pip-swh-packages --with-testing) | ||||
[...] | [...] | ||||
Executing unit tests | Executing unit tests | ||||
-------------------- | -------------------- | ||||
Unit tests are using the pytest_ framework, and can be executed directly or via | Unit tests are using the pytest_ framework, and can be executed directly or via | ||||
tox_. The main difference between these 2 test execution environments is: | tox_. The main difference between these 2 test execution environments is: | ||||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |
if the venv needs to be configured before pip, then pip install pre-commit should be below. (else it's going to run pip for python 2)