Changeset View
Changeset View
Standalone View
Standalone View
docs/developer-setup.rst
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
Clone the |swh| environment repository:: | Clone the |swh| environment repository:: | ||||
~$ git clone https://forge.softwareheritage.org/source/swh-environment.git | ~$ git clone https://forge.softwareheritage.org/source/swh-environment.git | ||||
[...] | [...] | ||||
~$ cd swh-environment | ~$ cd swh-environment | ||||
~/swh-environment$ | ~/swh-environment$ | ||||
Checkout all the swh packages source repositories:: | |||||
~/swh-environment$ ./bin/update | |||||
Create a virtualenv:: | Create a virtualenv:: | ||||
~/swh-environment$ source /usr/share/virtualenvwrapper/virtualenvwrapper.sh | ~/swh-environment$ source /usr/share/virtualenvwrapper/virtualenvwrapper.sh | ||||
~/swh-environment$ mkvirtualenv -p /usr/bin/python3 -a $PWD swh | ~/swh-environment$ mkvirtualenv -p /usr/bin/python3 -a $PWD swh | ||||
[...] | [...] | ||||
(swh) ~/swh-environment$ | (swh) ~/swh-environment$ | ||||
Checkout all the swh packages source repositories:: | |||||
(swh) ~/swh-environment$ pip install pre-commit | |||||
(swh) ~/swh-environment$ ./bin/update | |||||
In the future you can re-activate the created virtualenv with:: | In the future you can re-activate the created virtualenv with:: | ||||
$ workon swh | $ workon swh | ||||
(swh) ~/swh-environment$ | (swh) ~/swh-environment$ | ||||
.. Note:: the above assumes you are using virtualenvwrapper_ to manage your | .. Note:: the above assumes you are using virtualenvwrapper_ to manage your | ||||
Python virtualenvs, but that is by no means mandatory. You can use plain | Python virtualenvs, but that is by no means mandatory. You can use plain | ||||
virtualenvs, or any other virtualenv management tool (pipenv_ or poetry_ for | virtualenvs, or any other virtualenv management tool (pipenv_ or poetry_ for | ||||
example). virtualenvwrapper_ is our preference, but YMMV. | example). virtualenvwrapper_ is our preference, but YMMV. | ||||
.. _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 pre-commit 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) | ||||
(swh) ~/swh-environment$ pip install $(./bin/pip-swh-packages --with-testing) | (swh) ~/swh-environment$ pip install $(./bin/pip-swh-packages --with-testing) | ||||
[...] | [...] | ||||
.. Note:: If you experience issues in :program:`pip` package resolution, try using | .. Note:: If you experience issues in :program:`pip` package resolution, try using | ||||
``--use-deprecated=legacy-resolver`` CLI option. | ``--use-deprecated=legacy-resolver`` CLI option. | ||||
It can be set in :file:`~/.config/pip/pip.conf` until the issue is solved:: | It can be set in :file:`~/.config/pip/pip.conf` until the issue is solved:: | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |