pip container does no longer include g1_monetary_license
pip
image has been rebuilt for testing Poetry v2 (#499 (closed)), but this image does not include g1_monetary_license
directory. It has been detected with DeathReaper run. For some reasons, it was magically included before (last working build dates from Nov. 2023), and is therefore no longer included. [tool.poetry.include]
field takes care of that for Poetry, but not for pip
/setuptools
.
One solution could be to have, in addition to Poetry’s field, the dedicated setuptools
field to include g1_monetary_license
directory:
- https://setuptools.pypa.io/en/latest/userguide/datafiles.html#package-data
- https://stackoverflow.com/questions/78085020/packaging-with-pyproject-toml-that-will-include-other-multi-level-directories
- https://stackoverflow.com/questions/76886313/how-to-include-json-files-in-a-python-package-using-a-pyproject-toml
- https://pip.pypa.io/en/stable/news/
- https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/
But I don’t manage to have it working.
Other solution, is to build the pip
image from Poetry. Poetry would build the wheel, the wheel is copied to the Python-slim image and installed with pip
.
Todos
-
Fix
pip
image generation to includeg1_monetary_license
: installpoetry
v1 to have an independent image.
Outro
A test could have been to test that g1_monetary_license
is included in the package.
It would require to install unzip
on Poetry containers, then run following command in the build job
:
unzip -p dist/silkaj-*-py3-none-any.whl g1_monetary_license/g1_monetary_license_fr.rst
Hopefully, it should be detected before a release since Silkaj can’t start without it. Further work create an independent Python package for the license/charter files. (Research about Ğ1 monetary license integration ... (#221 - closed))