[v2] docs: update setuptools3 class

Message ID 20220228040405.1135905-1-tim.orling@konsulko.com
State New
Headers show
Series [v2] docs: update setuptools3 class | expand

Commit Message

Tim Orling Feb. 28, 2022, 4:04 a.m. UTC
Add notes to inform about the new `wheel` behavior of the
setuptools3.bbclass.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
Change in v2:
  - improve formatting of notes

 documentation/ref-manual/classes.rst | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

Comments

Michael Opdenacker March 1, 2022, 9:40 a.m. UTC | #1
Hi Tim

Thanks for the patch!

On 2/28/22 05:04, Tim Orling wrote:
> Add notes to inform about the new `wheel` behavior of the
> setuptools3.bbclass.
>
> Signed-off-by: Tim Orling <tim.orling@konsulko.com>
> ---
> Change in v2:
>   - improve formatting of notes
>
>  documentation/ref-manual/classes.rst | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
> index 2338ef6b3..5e4bacc13 100644
> --- a/documentation/ref-manual/classes.rst
> +++ b/documentation/ref-manual/classes.rst
> @@ -2439,8 +2439,26 @@ is installed with the :ref:`pip_install_wheel <ref-classes-pip_install_wheel>` c
>  =======================
>  
>  The ``setuptools3`` class supports Python version 3.x extensions that
> -use build systems based on ``setuptools``. If your recipe uses these
> -build systems, the recipe needs to inherit the ``setuptools3`` class.
> +use build systems based on ``setuptools`` (e.g. only have a ``setup.py`` and
> +have not migrated to the official ``pyproject.toml`` format). If your recipe
> +uses these build systems, the recipe needs to inherit the ``setuptools3`` class.
> +
> +   .. note::
> +
> +      The ``setuptools3`` class ``do_compile()`` task now calls
> +      ``setup.py bdist_wheel`` to build the ``wheel`` binary archive format
> +      (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__).
> +
> +      A consequence of this is that legacy software still using deprecated
> +      ``distutils`` from the Python standard library cannot be packaged as
> +      ``wheels``. A common solution is the replace
> +      ``from distutils.core import setup`` with ``from setuptools import setup``.
> +
> +   .. note::
> +
> +     The ``setuptools3`` class ``do_install()`` task now calls ``pip install``
> +     to install the ``wheel`` binary archive. In current versions of
> +     ``setuptools`` the legacy ``setup.py install`` method is deprecated.
>  
>  .. _ref-classes-setuptools3-base:


Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
... and queued into master-next.

Cheers
Michael.

Patch

diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 2338ef6b3..5e4bacc13 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -2439,8 +2439,26 @@  is installed with the :ref:`pip_install_wheel <ref-classes-pip_install_wheel>` c
 =======================
 
 The ``setuptools3`` class supports Python version 3.x extensions that
-use build systems based on ``setuptools``. If your recipe uses these
-build systems, the recipe needs to inherit the ``setuptools3`` class.
+use build systems based on ``setuptools`` (e.g. only have a ``setup.py`` and
+have not migrated to the official ``pyproject.toml`` format). If your recipe
+uses these build systems, the recipe needs to inherit the ``setuptools3`` class.
+
+   .. note::
+
+      The ``setuptools3`` class ``do_compile()`` task now calls
+      ``setup.py bdist_wheel`` to build the ``wheel`` binary archive format
+      (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__).
+
+      A consequence of this is that legacy software still using deprecated
+      ``distutils`` from the Python standard library cannot be packaged as
+      ``wheels``. A common solution is the replace
+      ``from distutils.core import setup`` with ``from setuptools import setup``.
+
+   .. note::
+
+     The ``setuptools3`` class ``do_install()`` task now calls ``pip install``
+     to install the ``wheel`` binary archive. In current versions of
+     ``setuptools`` the legacy ``setup.py install`` method is deprecated.
 
 .. _ref-classes-setuptools3-base: