Skip to contentSkip to conversation

ref-manual: classes.rst: add python-setuptools3_rust and python_pyo3 classes

PATCH Superseded [email protected] 2 participants 3 messages Feb 14, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ref-manual: classes.rst: add python-setuptools3_rust and python_pyo3 classes

From: Michael Opdenacker <[email protected]>

---
 documentation/ref-manual/classes.rst | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
documentation/ref-manual/classes.rst +23 -0
index b5443c0d0a..2a20e095aa 100644
@@ -2231,6 +2231,29 @@ The :ref:`ref-classes-python_poetry_core` class enables building Python modules
 
 Internally this uses the :ref:`ref-classes-python_pep517` class.
 
+.. _ref-classes-python_pyo3:
+
+``python_pyo3``
+===============
+
+The :ref:`ref-classes-python_pyo3` class helps make sure that Python extensions
+written in Rust, built with `PyO3 <https://pyo3.rs/>`__ and
+:ref:`ref-classes-python-setuptools3_rust`, properly set up the environment
+for cross compilation.
+
+.. _ref-classes-python-setuptools3_rust:
+
+``python-setuptools3_rust``
+===========================
+
+The :ref:`ref-classes-python-setuptools3_rust` class enables building Python
+extensions implemented in Rust with `PyO3 <https://pyo3.rs/>`__, which allows
+to compile and distribute Python extensions written in Rust as easily
+as if they were written in C.
+
+This class inherits the :ref:`ref-classes-setuptools3` and
+:ref:`ref-classes-python_pyo3` classes.
+
 .. _ref-classes-pixbufcache:
 
 ``pixbufcache``
Signature · 1 line
2.37.2
#1 lore raw

Hi Michael,

Quoted 30 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

---
  documentation/ref-manual/classes.rst | 23 +++++++++++++++++++++++
  1 file changed, 23 insertions(+)
documentation/ref-manual/classes.rst +13 -0
index b5443c0d0a..2a20e095aa 100644
@@ -2231,6 +2231,29 @@ The :ref:`ref-classes-python_poetry_core` class enables building Python modules
 
  Internally this uses the :ref:`ref-classes-python_pep517` class.
 
+.. _ref-classes-python_pyo3:
+
+``python_pyo3``
+===============
+
+The :ref:`ref-classes-python_pyo3` class helps make sure that Python extensions
+written in Rust, built with `PyO3 <https://urldefense.com/v3/__https://pyo3.rs/__;!!OOPJP91ZZw!lUmmEd0Wm4WxY9M9HTZWiO0-ZsqjgcTyYAJUyB67dTareG7k2qSXlVhMahJEHKctv3RUlbC9ktSk6nAqGyaXU0KPVeK04K2IInSKPfUkDa-AOrVgVDTq$ >`__ and
+:ref:`ref-classes-python-setuptools3_rust`, properly set up the environment
+for cross compilation.
+
+.. _ref-classes-python-setuptools3_rust:
+
+``python-setuptools3_rust``

documentation/ref-manual/classes.rst The :ref:`ref-classes-python_poetry_core` class enables building Python modules · line 2256

Quoted 10 lines
documentation/ref-manual/classes.rst +10 -0
+===========================
+
+The :ref:`ref-classes-python-setuptools3_rust` class enables building Python
+extensions implemented in Rust with `PyO3 <https://urldefense.com/v3/__https://pyo3.rs/__;!!OOPJP91ZZw!lUmmEd0Wm4WxY9M9HTZWiO0-ZsqjgcTyYAJUyB67dTareG7k2qSXlVhMahJEHKctv3RUlbC9ktSk6nAqGyaXU0KPVeK04K2IInSKPfUkDa-AOrVgVDTq$ >`__, which allows
+to compile and distribute Python extensions written in Rust as easily
+as if they were written in C.
+
+This class inherits the :ref:`ref-classes-setuptools3` and
+:ref:`ref-classes-python_pyo3` classes.
+

I guess one is likely to use python-setuptools3_rust more than python_pyo3 no? Is python_pyo3 supposed to be an internal class?

Cheers,
Quentin

#2 lore raw

Hi Quentin,

Thanks for the review!

Quoted 43 lines · Quentin Schulz via lists.yoctoproject.org

Hi Michael,

Quoted 40 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

---
  documentation/ref-manual/classes.rst | 23 +++++++++++++++++++++++

  1 file changed, 23 insertions(+)
documentation/ref-manual/classes.rst +0 -0
index b5443c0d0a..2a20e095aa 100644
@@ -2231,6 +2231,29 @@ The :ref:`ref-classes-python_poetry_core` 

class enables building Python modules
    Internally this uses the :ref:ref-classes-python_pep517 class. +.. _ref-classes-python_pyo3:

documentation/ref-manual/classes.rst +5 -0
+
+``python_pyo3``
+===============
+
+The :ref:`ref-classes-python_pyo3` class helps make sure that Python 

extensions
+written in Rust, built with `PyO3
<https://urldefense.com/v3/__https://pyo3.rs/__;!!OOPJP91ZZw!lUmmEd0Wm4WxY9M9HTZWiO0-ZsqjgcTyYAJUyB67dTareG7k2qSXlVhMahJEHKctv3RUlbC9ktSk6nAqGyaXU0KPVeK04K2IInSKPfUkDa-AOrVgVDTq$

Quoted 1 line

`__ and

+:ref:ref-classes-python-setuptools3_rust, properly set up the environment

documentation/ref-manual/classes.rst +8 -0
+for cross compilation.
+
+.. _ref-classes-python-setuptools3_rust:
+
+``python-setuptools3_rust``
+===========================
+
+The :ref:`ref-classes-python-setuptools3_rust` class enables 

building Python
+extensions implemented in Rust with `PyO3
<https://urldefense.com/v3/__https://pyo3.rs/__;!!OOPJP91ZZw!lUmmEd0Wm4WxY9M9HTZWiO0-ZsqjgcTyYAJUyB67dTareG7k2qSXlVhMahJEHKctv3RUlbC9ktSk6nAqGyaXU0KPVeK04K2IInSKPfUkDa-AOrVgVDTq$

Quoted 1 line

`__, which allows

Quoted 8 lines

documentation/ref-manual/classes.rst The :ref:`ref-classes-python_poetry_core` class enables building Python modules · line 2256

Quoted 6 lines
documentation/ref-manual/classes.rst +6 -0
+to compile and distribute Python extensions written in Rust as easily
+as if they were written in C.
+
+This class inherits the :ref:`ref-classes-setuptools3` and
+:ref:`ref-classes-python_pyo3` classes.
+

I guess one is likely to use python-setuptools3_rust more than python_pyo3 no? Is python_pyo3 supposed to be an internal class?

Correct. I should mention this. I'll send a V2.
Thanks again
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com