summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@microsoft.com>2021-04-12 16:46:22 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-15 20:18:58 +0100
commitbf68c627b1b87e6b00f2ea42ee5eb40ec0b2e9be (patch)
tree7da257694040129de39e9b2bc7e28f20430fcbba /documentation
parent70441f2b7348ab5f877cdb24bcaf76c35fb69338 (diff)
downloadpoky-bf68c627b1b87e6b00f2ea42ee5eb40ec0b2e9be.tar.gz
ref-manual: add python3targetconfig class and remove python 2 references
Add the recently added python3targetconfig class. Also, we no longer have the python 2 classes, remove all references to those. (From yocto-docs rev: c63d88656e2fc5361c512d4d9b426260c3e339f3) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/ref-manual/classes.rst67
-rw-r--r--documentation/ref-manual/migration-2.6.rst2
-rw-r--r--documentation/ref-manual/variables.rst10
3 files changed, 20 insertions, 59 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 6d9779f6e7..52a50faf67 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -501,29 +501,6 @@ Support for other version control systems such as Subversion is limited
501due to BitBake's automatic fetch dependencies (e.g. 501due to BitBake's automatic fetch dependencies (e.g.
502``subversion-native``). 502``subversion-native``).
503 503
504.. _ref-classes-distutils:
505
506``distutils*.bbclass``
507======================
508
509The ``distutils*`` classes support recipes for Python version 2.x
510extensions, which are simple. These recipes usually only need to point
511to the source's archive and then inherit the proper class. Building is
512split into two methods depending on which method the module authors
513used.
514
515- Extensions that use an Autotools-based build system require Autotools
516 and the classes based on ``distutils`` in their recipes.
517
518- Extensions that use build systems based on ``distutils`` require the
519 ``distutils`` class in their recipes.
520
521- Extensions that use build systems based on ``setuptools`` require the
522 :ref:`setuptools <ref-classes-setuptools>` class in their recipes.
523
524The ``distutils-common-base`` class is required by some of the
525``distutils*`` classes to provide common Python2 support.
526
527.. _ref-classes-distutils3: 504.. _ref-classes-distutils3:
528 505
529``distutils3*.bbclass`` 506``distutils3*.bbclass``
@@ -542,15 +519,9 @@ used.
542 ``distutils`` class in their recipes. 519 ``distutils`` class in their recipes.
543 520
544- Extensions that use build systems based on ``setuptools3`` require 521- Extensions that use build systems based on ``setuptools3`` require
545 the :ref:`setuptools3 <ref-classes-setuptools>` class in their 522 the :ref:`setuptools3 <ref-classes-setuptools3>` class in their
546 recipes. 523 recipes.
547 524
548The ``distutils3*`` classes either inherit their corresponding
549``distutils*`` class or replicate them using a Python3 version instead
550(e.g. ``distutils3-base`` inherits ``distutils-common-base``, which is
551the same as ``distutils-base`` but inherits ``python3native`` instead of
552``pythonnative``).
553
554.. _ref-classes-externalsrc: 525.. _ref-classes-externalsrc:
555 526
556``externalsrc.bbclass`` 527``externalsrc.bbclass``
@@ -2138,13 +2109,13 @@ For information on setting up and running ptests, see the
2138":ref:`dev-manual/common-tasks:testing packages with ptest`" 2109":ref:`dev-manual/common-tasks:testing packages with ptest`"
2139section in the Yocto Project Development Tasks Manual. 2110section in the Yocto Project Development Tasks Manual.
2140 2111
2141.. _ref-classes-python-dir: 2112.. _ref-classes-python3-dir:
2142 2113
2143``python-dir.bbclass`` 2114``python3-dir.bbclass``
2144====================== 2115=======================
2145 2116
2146The ``python-dir`` class provides the base version, location, and site 2117The ``python3-dir`` class provides the base version, location, and site
2147package location for Python. 2118package location for Python 3.
2148 2119
2149.. _ref-classes-python3native: 2120.. _ref-classes-python3native:
2150 2121
@@ -2155,14 +2126,17 @@ The ``python3native`` class supports using the native version of Python
21553 built by the build system rather than support of the version provided 21263 built by the build system rather than support of the version provided
2156by the build host. 2127by the build host.
2157 2128
2158.. _ref-classes-pythonnative: 2129.. _ref-classes-python3targetconfig:
2159 2130
2160``pythonnative.bbclass`` 2131``python3targetconfig.bbclass``
2161======================== 2132===============================
2162 2133
2163When inherited by a recipe, the ``pythonnative`` class supports using 2134The ``python3targetconfig`` class supports using the native version of Python
2164the native version of Python built by the build system rather than using 21353 built by the build system rather than support of the version provided
2165the version provided by the build host. 2136by the build host, except that the configuration for the target machine
2137is accessible (such as correct installation directories). This also adds a
2138dependency on target ``python3``, so should only be used where appropriate
2139in order to avoid unnecessarily lengthening builds.
2166 2140
2167.. _ref-classes-qemu: 2141.. _ref-classes-qemu:
2168 2142
@@ -2323,22 +2297,13 @@ additional configuration options you want to pass SCons command line.
2323The ``sdl`` class supports recipes that need to build software that uses 2297The ``sdl`` class supports recipes that need to build software that uses
2324the Simple DirectMedia Layer (SDL) library. 2298the Simple DirectMedia Layer (SDL) library.
2325 2299
2326.. _ref-classes-setuptools:
2327
2328``setuptools.bbclass``
2329======================
2330
2331The ``setuptools`` class supports Python version 2.x extensions that use
2332build systems based on ``setuptools``. If your recipe uses these build
2333systems, the recipe needs to inherit the ``setuptools`` class.
2334
2335.. _ref-classes-setuptools3: 2300.. _ref-classes-setuptools3:
2336 2301
2337``setuptools3.bbclass`` 2302``setuptools3.bbclass``
2338======================= 2303=======================
2339 2304
2340The ``setuptools3`` class supports Python version 3.x extensions that 2305The ``setuptools3`` class supports Python version 3.x extensions that
2341use build systems based on ``setuptools3``. If your recipe uses these 2306use build systems based on ``setuptools``. If your recipe uses these
2342build systems, the recipe needs to inherit the ``setuptools3`` class. 2307build systems, the recipe needs to inherit the ``setuptools3`` class.
2343 2308
2344.. _ref-classes-sign_rpm: 2309.. _ref-classes-sign_rpm:
diff --git a/documentation/ref-manual/migration-2.6.rst b/documentation/ref-manual/migration-2.6.rst
index 0517b0a2bb..823d3cbd12 100644
--- a/documentation/ref-manual/migration-2.6.rst
+++ b/documentation/ref-manual/migration-2.6.rst
@@ -118,7 +118,7 @@ For names of recipes removed because of this repository change, see the
118--------------------------------------------------------------------------------------------------- 118---------------------------------------------------------------------------------------------------
119 119
120Previously, it was possible for Python recipes that inherited the 120Previously, it was possible for Python recipes that inherited the
121:ref:`distutils <ref-classes-distutils>` and 121``distutils`` and
122:ref:`distutils3 <ref-classes-distutils3>` classes to fetch code 122:ref:`distutils3 <ref-classes-distutils3>` classes to fetch code
123during the :ref:`ref-tasks-configure` task to satisfy 123during the :ref:`ref-tasks-configure` task to satisfy
124dependencies mentioned in ``setup.py`` if those dependencies were not 124dependencies mentioned in ``setup.py`` if those dependencies were not
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 725600c0e5..5993182568 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -6030,9 +6030,7 @@ system and gives an overview of their function and contents.
6030 :term:`PYTHON_ABI` 6030 :term:`PYTHON_ABI`
6031 When used by recipes that inherit the 6031 When used by recipes that inherit the
6032 :ref:`distutils3 <ref-classes-distutils3>`, 6032 :ref:`distutils3 <ref-classes-distutils3>`,
6033 :ref:`setuptools3 <ref-classes-setuptools3>`, 6033 :ref:`setuptools3 <ref-classes-setuptools3>` classes, denotes the
6034 :ref:`distutils <ref-classes-distutils>`, or
6035 :ref:`setuptools <ref-classes-setuptools>` classes, denotes the
6036 Application Binary Interface (ABI) currently in use for Python. By 6034 Application Binary Interface (ABI) currently in use for Python. By
6037 default, the ABI is "m". You do not have to set this variable as the 6035 default, the ABI is "m". You do not have to set this variable as the
6038 OpenEmbedded build system sets it for you. 6036 OpenEmbedded build system sets it for you.
@@ -6041,16 +6039,14 @@ system and gives an overview of their function and contents.
6041 names used when installing the Python headers and libraries in 6039 names used when installing the Python headers and libraries in
6042 sysroot (e.g. ``.../python3.3m/...``). 6040 sysroot (e.g. ``.../python3.3m/...``).
6043 6041
6044 Recipes that inherit the ``distutils`` class during cross-builds also 6042 Recipes that inherit the ``distutils3`` class during cross-builds also
6045 use this variable to locate the headers and libraries of the 6043 use this variable to locate the headers and libraries of the
6046 appropriate Python that the extension is targeting. 6044 appropriate Python that the extension is targeting.
6047 6045
6048 :term:`PYTHON_PN` 6046 :term:`PYTHON_PN`
6049 When used by recipes that inherit the 6047 When used by recipes that inherit the
6050 `distutils3 <ref-classes-distutils3>`, 6048 `distutils3 <ref-classes-distutils3>`,
6051 :ref:`setuptools3 <ref-classes-setuptools3>`, 6049 :ref:`setuptools3 <ref-classes-setuptools3>` classes, specifies the
6052 :ref:`distutils <ref-classes-distutils>`, or
6053 :ref:`setuptools <ref-classes-setuptools>` classes, specifies the
6054 major Python version being built. For Python 3.x, ``PYTHON_PN`` would 6050 major Python version being built. For Python 3.x, ``PYTHON_PN`` would
6055 be "python3". You do not have to set this variable as the 6051 be "python3". You do not have to set this variable as the
6056 OpenEmbedded build system automatically sets it for you. 6052 OpenEmbedded build system automatically sets it for you.