-
Notifications
You must be signed in to change notification settings - Fork 72
Enhance and test exportLibs.py
#3914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
docs/01_developers/bare_container.md
Outdated
| - **Multi-stage Dockerfile**: | ||
| ```Dockerfile | ||
| FROM ghcr.io/gardenlinux/gardenlinux/container-python-dev:1877.5 as packages | ||
| FROM ghcr.io/gardenlinux/gardenlinux/container-python-dev:1877.8 as packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this image is not published yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the first PR was merged after the release of 1877.7. And as this draft would also change the interface from RUN exportLibs.py to RUN gl-build export-python-libs, I've changed the version to a release which would probably contain the updated version, to have a working example
docs/01_developers/bare_container.md
Outdated
| COPY requirements.txt / | ||
| RUN pip3 install -r requirements.txt --break-system-packages --no-cache-dir | ||
| RUN exportLibs.py | ||
| RUN gl-build export-python-libs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does gl-build end up in that image? this is a script from the gl-python-lib, but in the pythonDev feature this library is not installed (not suggesting it should), but then an extra step would be required in this dockerfile, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind, just noticed it is part of this pr
|
I've restored an updated version of the |
|
End of the year state of this PR: Depends on the decision of #3952 |
Due to ADR 30, the current version of the PR, not using |
exportLibs.py by installation of python-gardenlinux-libexportLibs.py
|
|
||
| # shellcheck source=/dev/null | ||
| source venv/bin/activate | ||
| pip install pyelftools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the rationale for this installation method? did you evaluate packaging this as a debian package? not sure if this is what we want, please get feedback from @nkraetzschmar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exportLibs.py script runs in a virtual environment, as it requires pyelftools. This is necessary to have a completely fresh python environment of the system, as the dist-packages are later copied to the bare-python image. If we would install pyelftools system wide, it would be always contained in the bare-python image, even if it is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that seems reasonable, thanks for explaining, but I think this is obscure enough that it should be documented (a comment in the script is fine imo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, makes sense 👍 I've added a comment.
This is a follow up of #3695
Depends on merge of python-gardenlinux-lib #253
What this PR does / why we need it:
exportLibs.pyscript frompythonDevfeaturepythonDevfeaturerequestspackage works as expectedWhich issue(s) this PR fixes:
Fixes #3889