diff mbox series

dt-bindings: pip command elaboration

Message ID 20200812070640.2543557-1-linus.walleij@linaro.org
State New
Headers show
Series dt-bindings: pip command elaboration | expand

Commit Message

Linus Walleij Aug. 12, 2020, 7:06 a.m. UTC
pip is now for most practical set-ups implied to be pip3, so
just use "pip" rather than "pip3" in the instructions.
Pass --user explicitly in the example so it is clear that this
gets installed in the user home directory.

Add an additional instruction on how to upgrade the project,
not everyone is aware of how pip works.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
 Documentation/devicetree/writing-schema.rst | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.26.2

Comments

Rob Herring Aug. 12, 2020, 4:24 p.m. UTC | #1
On Wed, Aug 12, 2020 at 1:06 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>

> pip is now for most practical set-ups implied to be pip3, so

> just use "pip" rather than "pip3" in the instructions.


Are you sure about that? A fresh ubuntu 20.04 install for me defaulted
to python2 for 'python' and 'pip'. From what I've read, that should
always be the case. Anything expressly needing python3 should be
explicit. But then ubuntu has python-is-python2 and python-is-python3
packages to set the default, so I'm confused... (I was trying to
figure out what to do with spdxcheck.py which broke on 20.04 because
the new version of the 'git' python module is python3 only and
spdxcheck.py was using python2.)

In any case, pip3 always works and pip may or may not work. So I think
the answer here is obvious.

> Pass --user explicitly in the example so it is clear that this

> gets installed in the user home directory.

>

> Add an additional instruction on how to upgrade the project,

> not everyone is aware of how pip works.


BTW, releases are now on PyPi, so you can do just 'pip3 install
dtschema'. I've been meaning to update this doc with that.


>

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  Documentation/devicetree/writing-schema.rst | 7 ++++++-

>  1 file changed, 6 insertions(+), 1 deletion(-)

>

> diff --git a/Documentation/devicetree/writing-schema.rst b/Documentation/devicetree/writing-schema.rst

> index 8c74a99f95e2..a9cebfca8d31 100644

> --- a/Documentation/devicetree/writing-schema.rst

> +++ b/Documentation/devicetree/writing-schema.rst

> @@ -115,11 +115,16 @@ The DT schema project must be installed in order to validate the DT schema

>  binding documents and validate DTS files using the DT schema. The DT schema

>  project can be installed with pip::

>

> -    pip3 install git+https://github.com/devicetree-org/dt-schema.git@master

> +    pip install --user git+https://github.com/devicetree-org/dt-schema.git@master

>

>  Several executables (dt-doc-validate, dt-mk-schema, dt-validate) will be

>  installed. Ensure they are in your PATH (~/.local/bin by default).

>

> +We sometimes update th DT schema project, and then you can simply add the

> +"--upgrade" option to the above command to get to the latest version:

> +

> +    pip install --user --upgrade git+https://github.com/devicetree-org/dt-schema.git@master

> +

>  dtc must also be built with YAML output support enabled. This requires that

>  libyaml and its headers be installed on the host system. For some distributions

>  that involves installing the development package, such as:

> --

> 2.26.2

>
diff mbox series

Patch

diff --git a/Documentation/devicetree/writing-schema.rst b/Documentation/devicetree/writing-schema.rst
index 8c74a99f95e2..a9cebfca8d31 100644
--- a/Documentation/devicetree/writing-schema.rst
+++ b/Documentation/devicetree/writing-schema.rst
@@ -115,11 +115,16 @@  The DT schema project must be installed in order to validate the DT schema
 binding documents and validate DTS files using the DT schema. The DT schema
 project can be installed with pip::
 
-    pip3 install git+https://github.com/devicetree-org/dt-schema.git@master
+    pip install --user git+https://github.com/devicetree-org/dt-schema.git@master
 
 Several executables (dt-doc-validate, dt-mk-schema, dt-validate) will be
 installed. Ensure they are in your PATH (~/.local/bin by default).
 
+We sometimes update th DT schema project, and then you can simply add the
+"--upgrade" option to the above command to get to the latest version:
+
+    pip install --user --upgrade git+https://github.com/devicetree-org/dt-schema.git@master
+
 dtc must also be built with YAML output support enabled. This requires that
 libyaml and its headers be installed on the host system. For some distributions
 that involves installing the development package, such as: