lang:python:wheel
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| lang:python:wheel [2024/10/08 15:23] – Création premier jet root | lang:python:wheel [2025/11/10 12:17] (Version actuelle) – Ajout de "abi3audit" root | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====Création d'un paquet==== | + | =====Création d'un paquet===== |
| * Génération du paquet | * Génération du paquet | ||
| Ligne 21: | Ligne 21: | ||
| </ | </ | ||
| + | =====cibuildwheel===== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | Il permet de compiler le projet pour n' | ||
| + | |||
| + | Ce n'est intéressant que si le module python contient du code compilé et doit être compilé pour toutes les versions de Python compatibles. | ||
| + | |||
| + | Uniquement testé sous Windows pour générer des versions pour Windows. | ||
| + | |||
| + | Il va télécharger toutes les versions de Python nécessaires et exécuter '' | ||
| + | |||
| + | <code bash> | ||
| + | python.exe -m pip install cibuildwheel | ||
| + | python.exe -m cibuildwheel --output-dir wheelhouse --platform windows | ||
| + | </ | ||
| + | |||
| + | Il se configure avec le fichier '' | ||
| + | |||
| + | <code ini> | ||
| + | [tool.cibuildwheel] | ||
| + | build-verbosity = 1 | ||
| + | build-frontend = { name = " | ||
| + | test-command = " | ||
| + | |||
| + | [tool.cibuildwheel.windows] | ||
| + | build = [ | ||
| + | " | ||
| + | ] | ||
| + | skip = [ | ||
| + | " | ||
| + | ] | ||
| + | |||
| + | enable = [" | ||
| + | |||
| + | # Devrait être dans build-system.requires mais cela n'a pas fonctionné pour moi. https:// | ||
| + | before-build = "pip install cmake==4.0.3" | ||
| + | # N'est pas encore officiellement automatique. https:// | ||
| + | repair-wheel-command = " | ||
| + | </ | ||
| + | |||
| + | =====manylinux===== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | Fournit des images Docker avec toutes les versions de Python pour générer les wheel pour Linux avec la glibc et musl. | ||
| + | |||
| + | Rien n'est automatisé. Les installations de Python sont dans ''/ | ||
| + | |||
| + | '' | ||
| + | |||
| + | =====abi3audit===== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | Vérifie que le fichier wheel généré est compatible '' | ||
| + | |||
| + | Un wheel indique via son nom la version minimale de Python et s'il est '' | ||
| + | |||
| + | Exemple : | ||
| + | |||
| + | <code bash> | ||
| + | | ||
| + | [11:38:42] 👎 toto-1.3.1-cp38-abi3-win32.whl: | ||
| + | 👎 toto-1.3.1-cp38-abi3-win32.whl: | ||
| + | ABI, but is tagged for the Python 3.8 ABI | ||
| + | | ||
| + | │ Symbol | ||
| + | | ||
| + | │ PyUnstable_Module_SetGIL | ||
| + | │ _Py_DecRefShared | ||
| + | │ PyMutex_Lock | ||
| + | │ PyFrame_GetBack | ||
| + | │ PyMethod_Type | ||
| + | │ PyInstanceMethod_New | ||
| + | │ _PyObject_GetDictPtr | ||
| + | │ PyThreadState_GetUnchecked │ not ABI3 │ | ||
| + | │ PyObject_ClearManagedDict | ||
| + | │ _PyType_Lookup | ||
| + | │ PyInstanceMethod_Type | ||
| + | │ PyObject_LengthHint | ||
| + | │ PyObject_VisitManagedDict | ||
| + | │ PyMutex_Unlock | ||
| + | │ _Py_MergeZeroLocalRefcount │ not ABI3 │ | ||
| + | │ PyFrame_GetLineNumber | ||
| + | │ PyUnicode_AsUTF8AndSize | ||
| + | │ PyObject_CheckBuffer | ||
| + | │ PyObject_GenericGetDict | ||
| + | │ PyDict_GetItemStringRef | ||
| + | │ PyObject_GetBuffer | ||
| + | │ PyBuffer_Release | ||
| + | │ PyFrame_GetCode | ||
| + | │ PyCMethod_New | ||
| + | │ PyInterpreterState_Get | ||
| + | | ||
| + | 💁 toto-1.3.1-cp38-abi3-win32.whl: | ||
| + | 15 ABI violations found | ||
| + | </ | ||
lang/python/wheel.1728393805.txt.gz · Dernière modification : de root
