Page MenuHomeSoftware Heritage

Adapt developer setup instructions as of sept 2020
ClosedPublic

Authored by tenma on Sep 2 2020, 6:31 PM.

Details

Summary
  • pre-commit doesn't necessarily exist as a system package (i.e. Debian buster),

but more commonly as a Python package, so install via pip.
Then, mention to update PATH if need be.

  • install local swh packages as a 2-step process to avoid errors

Diff Detail

Repository
rDDOC Development documentation
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

tenma created this revision.Sep 2 2020, 6:31 PM
vlorentz requested changes to this revision.Sep 2 2020, 11:40 PM
vlorentz added a subscriber: vlorentz.

Thanks, good catch! One comment, though:

docs/developer-setup.rst
36–40

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)

This revision now requires changes to proceed.Sep 2 2020, 11:40 PM
tenma added a comment.EditedSep 3 2020, 11:48 AM

if the venv needs to be configured before pip, then pip install pre-commit should be below

The idea is to install it outside of a venv, to access it like the system package.
But I chose to install it as user (no pip install --system) because I think it shouldn't need to reside in root territory.
We can discuss the preferred approach :

  • system or user?
  • necessarily py3?

I don't think it needs to be py3 because instructions mentioned the Debian package which is py2 I think.

EDIT: pre-commit seems to be used as a Python library in swh Git hooks, so it definitely shouldn't be installed as a system package

tenma updated this revision to Diff 13660.Sep 3 2020, 12:19 PM

Changed to install pre-commit as a python package in venv.
Removed PATH adjusting instructions since they are no longer needed here.

vlorentz accepted this revision.Sep 3 2020, 1:51 PM
This revision is now accepted and ready to land.Sep 3 2020, 1:51 PM
This revision was automatically updated to reflect the committed changes.