erplibre/script/install
Mathieu Benoit 60d049dfec [FIX] install : compiler pykcs11 avec SWIG 4.3 et au-delà
Toute installation d'Odoo 14, 15 ou 17 échoue depuis que SWIG 4.5 est paru
sur PyPI : « ‘PyInt_FromLong’ was not declared in this scope », 55 fois.
pykcs11 — tiré par endesive — ne livre aucun wrapper pré-généré, et son
« requires = ["swig"] » n'est pas borné : c'est la DERNIÈRE version publiée
qui tourne, pas celle du système. Or SWIG 4.3 a retiré les alias Python 2
qu'il écrivait lui-même, et le typemap CK_RV de pykcs11 en utilise un.

On rend l'alias au préprocesseur, identique token pour token à celui de
SWIG 4.2. CPPFLAGS et non CFLAGS : un .cpp passe par compiler_so_cxx.
Vérifié sur la VM et ici : poetry install rend 0, import PyKCS11 passe.

--- EN ---

Every Odoo 14, 15 and 17 install has been failing since SWIG 4.5 landed on
PyPI: "'PyInt_FromLong' was not declared in this scope", 55 times. pykcs11
— pulled in by endesive — ships no pre-generated wrapper, and its
`requires = ["swig"]` is unbounded: the LATEST published version runs, not
the system one. SWIG 4.3 dropped the Python 2 aliases it used to emit
itself, and pykcs11's CK_RV typemap uses one of them.

We hand the alias back to the preprocessor, token for token identical to
SWIG 4.2's. CPPFLAGS, not CFLAGS: a .cpp goes through compiler_so_cxx.
Verified on the VM and here: poetry install returns 0, import PyKCS11 works.

Assisted-by: Claude Opus 5
2026-08-23 02:11:50 -04:00
..
install_arch_linux.sh [ADD] arch: Canadian pacman mirrors first 2026-08-16 23:33:49 -04:00
install_debian_10_prod_docker.sh [UPD] typo certbot 2026-01-10 04:52:39 -05:00
install_debian_dependency.sh [ADD] install s390x : batir PROJ quand la distribution est en retard 2026-08-23 02:11:50 -04:00
install_dev.sh [ADD] install: mise as Python provider, pyenv as fallback 2026-08-16 23:33:49 -04:00
install_dev_extra_ubuntu.sh [UPD] replace docker-compose to docker compose 2024-05-03 23:13:59 -04:00
install_erplibre.sh [IMP] mobile home installation and run 2025-11-11 05:19:14 -05:00
install_fedora_dependency.sh [FIX] install s390x : pyproj exige le binaire proj, pas ses en-tetes 2026-08-23 02:11:50 -04:00
install_git_repo.sh [IMP] refactoring .venv.erplibre 2025-10-31 01:34:26 -04:00
install_locally.sh [FIX] install : compiler pykcs11 avec SWIG 4.3 et au-delà 2026-08-23 02:11:50 -04:00
install_locally_dev.sh [IMP] installation: parallelize repo sync and poetry install 2026-08-07 02:09:35 -04:00
install_locally_prod.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
install_ntfy.sh [ADD] install: add NTFY self-hosted push notification server 2026-08-07 02:52:17 -04:00
install_OSX_dependency.sh [UPD] OSX installation: remove python 3.7 2026-02-13 04:07:32 -05:00
install_production.sh [UPD] script refactor install_daemon, python script to customize services 2025-11-02 02:14:15 -05:00
install_production_nginx.sh [IMP] support multi version odoo on same workspace 2025-10-31 01:36:26 -04:00
install_suse_dependency.sh [FIX] install s390x : pyproj exige le binaire proj, pas ses en-tetes 2026-08-23 02:11:50 -04:00
install_ubuntu_docker.sh [UPD] typo certbot 2026-01-10 04:52:39 -05:00
install_venv.sh [ADD] install: mise as Python provider, pyenv as fallback 2026-08-16 23:33:49 -04:00
lib_lowmem.sh [FIX] install s390x: the compiler was killed for lack of memory 2026-08-17 00:40:01 -04:00
lib_pip_provider.sh [ADD] install: uv to place Python packages, pip as fallback 2026-08-16 23:33:49 -04:00
lib_proj.sh [ADD] install s390x : batir PROJ quand la distribution est en retard 2026-08-23 02:11:50 -04:00
lib_python_provider.sh [ADD] install: mise as Python provider, pyenv as fallback 2026-08-16 23:33:49 -04:00
lib_qpdf.sh [FIX] install: the EL9, EL10 and Fedora build chain 2026-08-16 23:33:49 -04:00