[2/3] ref-manual/variables.rst: add SETUPTOOLS_*_ARGS

Message ID 20220111195742.1921572-3-tim.orling@konsulko.com
State New
Headers show
Series [1/3] ref-manual/variables.rst: add SETUPTOOLS_SETUP_PATH | expand

Commit Message

Tim Orling Jan. 11, 2022, 7:57 p.m. UTC
Add SETUPTOOLS_BUILD_ARGS variable which can be used to pass additional
arguments to `setup.py build`.

Add SETUPTOOLS_INSTALL_ARGS variable which can be used to pass
additional arguments to `setup.py install`.

[YOCTO #14610]

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 documentation/ref-manual/variables.rst | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Quentin Schulz Jan. 12, 2022, 2:26 p.m. UTC | #1
Hi Tim,

On 1/11/22 20:57, Tim Orling wrote:
> Add SETUPTOOLS_BUILD_ARGS variable which can be used to pass additional
> arguments to `setup.py build`.
> 
> Add SETUPTOOLS_INSTALL_ARGS variable which can be used to pass
> additional arguments to `setup.py install`.
> 
> [YOCTO #14610]
> 
> Signed-off-by: Tim Orling <tim.orling@konsulko.com>
> ---
>   documentation/ref-manual/variables.rst | 19 +++++++++++++++++++
>   1 file changed, 19 insertions(+)
> 
> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
> index 83ccda830..3011c1c83 100644
> --- a/documentation/ref-manual/variables.rst
> +++ b/documentation/ref-manual/variables.rst
> @@ -6847,6 +6847,25 @@ system and gives an overview of their function and contents.
>   
>            EXTRA_IMAGE_FEATURES += "read-only-rootfs"
>   
> +   :term:`SETUPTOOLS_BUILD_ARGS`
> +      When used by recipes that inherit the
> +      :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
> +      be used to specify additional arguments to be passed to ``setup.py build``
> +      in the ``setuptools3_do_compile()`` task. By default, this variable is unset::
> +
> +         SETUPTOOLS_BUILD_ARGS ?= ""
> +
> +   :term:`SETUPTOOLS_INSTALL_ARGS`
> +      When used by recipes that inherit the
> +      :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
> +      be used to specify additional arguments to be passed to ``setup.py install``
> +      in the ``setuptools3_do_install()`` task. By default, this variable is::
> +
> +         SETUPTOOLS_INSTALL_ARGS ?= "--root=${D} \
> +             --prefix=${prefix} \
> +             --install-lib=${PYTHON_SITEPACKAGES_DIR} \
> +             --install-data=${datadir}"
> +

I don't really like specifying the default values of variables in the 
docs. The default value can change and the docs will most likely not be 
kept in sync (as a few recent patches from Michael has shown :) ).

I think the paragraph can stop at "be passed to ``setup.py install``. Or 
maybe we can add a few words on what someone would typically set this 
variable to in their recipe if they have to modify it?

Cheers,
Quentin

>      :term:`SETUPTOOLS_SETUP_PATH`
>         When used by recipes that inherit the
>         :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#2384): https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_docs_message_2384&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=8wGMTT7Mjy9XFEK8rx13kzdh8PSQEe7L1DRuSkGS_zIIejVqWrVUWNVNxtQDiQjR&s=Hrn-7ZEdMEgRnmJGvVy19eX7zCYGwQY2oq4Hr0XGhz0&e=
> Mute This Topic: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_mt_88357645_6293953&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=8wGMTT7Mjy9XFEK8rx13kzdh8PSQEe7L1DRuSkGS_zIIejVqWrVUWNVNxtQDiQjR&s=KVFe8_QAMfcjQibqPvJqj14YPqUGtIHNOSHR0hmZEZI&e=
> Group Owner: docs+owner@lists.yoctoproject.org
> Unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_docs_unsub&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=8wGMTT7Mjy9XFEK8rx13kzdh8PSQEe7L1DRuSkGS_zIIejVqWrVUWNVNxtQDiQjR&s=a2EqtjY70frDTNQjHZiWadqWOQo6eyBrV7c4oFuIVUI&e=  [quentin.schulz@theobroma-systems.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Tim Orling Jan. 12, 2022, 4:26 p.m. UTC | #2
On Wed, Jan 12, 2022 at 6:26 AM Quentin Schulz <
quentin.schulz@theobroma-systems.com> wrote:

> Hi Tim,
>
> On 1/11/22 20:57, Tim Orling wrote:
> > Add SETUPTOOLS_BUILD_ARGS variable which can be used to pass additional
> > arguments to `setup.py build`.
> >
> > Add SETUPTOOLS_INSTALL_ARGS variable which can be used to pass
> > additional arguments to `setup.py install`.
> >
> > [YOCTO #14610]
> >
> > Signed-off-by: Tim Orling <tim.orling@konsulko.com>
> > ---
> >   documentation/ref-manual/variables.rst | 19 +++++++++++++++++++
> >   1 file changed, 19 insertions(+)
> >
> > diff --git a/documentation/ref-manual/variables.rst
> b/documentation/ref-manual/variables.rst
> > index 83ccda830..3011c1c83 100644
> > --- a/documentation/ref-manual/variables.rst
> > +++ b/documentation/ref-manual/variables.rst
> > @@ -6847,6 +6847,25 @@ system and gives an overview of their function
> and contents.
> >
> >            EXTRA_IMAGE_FEATURES += "read-only-rootfs"
> >
> > +   :term:`SETUPTOOLS_BUILD_ARGS`
> > +      When used by recipes that inherit the
> > +      :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable
> can
> > +      be used to specify additional arguments to be passed to
> ``setup.py build``
> > +      in the ``setuptools3_do_compile()`` task. By default, this
> variable is unset::
> > +
> > +         SETUPTOOLS_BUILD_ARGS ?= ""
> > +
> > +   :term:`SETUPTOOLS_INSTALL_ARGS`
> > +      When used by recipes that inherit the
> > +      :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable
> can
> > +      be used to specify additional arguments to be passed to
> ``setup.py install``
> > +      in the ``setuptools3_do_install()`` task. By default, this
> variable is::
> > +
> > +         SETUPTOOLS_INSTALL_ARGS ?= "--root=${D} \
> > +             --prefix=${prefix} \
> > +             --install-lib=${PYTHON_SITEPACKAGES_DIR} \
> > +             --install-data=${datadir}"
> > +
>
> I don't really like specifying the default values of variables in the
> docs. The default value can change and the docs will most likely not be
> kept in sync (as a few recent patches from Michael has shown :) ).
>
> Agreed. I didn't like it either ;)


> I think the paragraph can stop at "be passed to ``setup.py install``. Or
> maybe we can add a few words on what someone would typically set this
> variable to in their recipe if they have to modify it?
>
>
Of course the problem is I didn't have any examples other than the
default...


> Cheers,
> Quentin
>
> >      :term:`SETUPTOOLS_SETUP_PATH`
> >         When used by recipes that inherit the
> >         :ref:`setuptools3 <ref-classes-setuptools3>` class, this
> variable should
> >
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#2384):
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_docs_message_2384&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=8wGMTT7Mjy9XFEK8rx13kzdh8PSQEe7L1DRuSkGS_zIIejVqWrVUWNVNxtQDiQjR&s=Hrn-7ZEdMEgRnmJGvVy19eX7zCYGwQY2oq4Hr0XGhz0&e=
> > Mute This Topic:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_mt_88357645_6293953&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=8wGMTT7Mjy9XFEK8rx13kzdh8PSQEe7L1DRuSkGS_zIIejVqWrVUWNVNxtQDiQjR&s=KVFe8_QAMfcjQibqPvJqj14YPqUGtIHNOSHR0hmZEZI&e=
> > Group Owner: docs+owner@lists.yoctoproject.org
> > Unsubscribe:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_docs_unsub&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=8wGMTT7Mjy9XFEK8rx13kzdh8PSQEe7L1DRuSkGS_zIIejVqWrVUWNVNxtQDiQjR&s=a2EqtjY70frDTNQjHZiWadqWOQo6eyBrV7c4oFuIVUI&e=
> [quentin.schulz@theobroma-systems.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>

Patch

diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 83ccda830..3011c1c83 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -6847,6 +6847,25 @@  system and gives an overview of their function and contents.
 
          EXTRA_IMAGE_FEATURES += "read-only-rootfs"
 
+   :term:`SETUPTOOLS_BUILD_ARGS`
+      When used by recipes that inherit the
+      :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
+      be used to specify additional arguments to be passed to ``setup.py build``
+      in the ``setuptools3_do_compile()`` task. By default, this variable is unset::
+      
+         SETUPTOOLS_BUILD_ARGS ?= ""
+
+   :term:`SETUPTOOLS_INSTALL_ARGS`
+      When used by recipes that inherit the
+      :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
+      be used to specify additional arguments to be passed to ``setup.py install``
+      in the ``setuptools3_do_install()`` task. By default, this variable is::
+
+         SETUPTOOLS_INSTALL_ARGS ?= "--root=${D} \
+             --prefix=${prefix} \
+             --install-lib=${PYTHON_SITEPACKAGES_DIR} \
+             --install-data=${datadir}"
+
    :term:`SETUPTOOLS_SETUP_PATH`
       When used by recipes that inherit the
       :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should