-
Notifications
You must be signed in to change notification settings - Fork 131
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
Ensure no missing pip dependencies in build_image.py
#218
base: master
Are you sure you want to change the base?
Ensure no missing pip dependencies in build_image.py
#218
Conversation
@whyitfor could we please land this one and use the new option in our CI? As I am working on #416 and #417 I am went to go back to this manually to make sure all the dependencies across ofrak components are consistent (only remembered to do it because I saw the docker build output for #417 and noticed it's uninstalling/reinstalling some packages in weird way in |
@ANogin, can you complete the PR descripion for this? |
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've reflected on this one a bit, and discussed with @rbs-jacob.
Let's make the following changes.
- Remove the
check-python-reqs
argument frombuild-image.py
build-image.py
should add aninspect
target to the Makefile it generates that runspython3 -m pip check
. This will enable users who want to check for this consistency to do so.- Does
--network="none"
work for all use cases? If so, let's make it default. If not, we should remove it.
--check_python_reqs
option to build_image.pybuild_image.py
Done, should be good to go once #419 is fixed. |
# Legacy-edinable is needed to allow mypy to find packages. | ||
# See https://github.com/python/mypy/issues/13392 | ||
SETUPTOOLS_ENABLE_FEATURES="legacy-editable" $(PIP) install -e .[test] |
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.
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.
yes this change is no longer needed (the command line flag is preferred over the environment variable)
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.
No, with command line flag it insists on reaching out to pypi over network, but with the environment variable it does not.
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've looked into this a bit and reflected.
If I understand correctly,SETUPTOOLS_ENABLE_FEATURES
results in using a pre-PEP 517 backend. editable_mode=compat
uses a PEP660 backend that provides some backwards compatibility. Switching back to SETUPTOOLS_ENABLE_FEATURES
does not make sense to me: is moving the repo in the wrong direction, away from PEP660.
It looks like there are ways to get pip
to not reach out to the network (a combination of --no-index
and --find-links
) which we might want to eventually look into.
For now though, I'd like to prioritize getting the pip check
functionality this MR adds in, without the --network="none"
changes.
Co-authored-by: Wyatt <[email protected]>
One sentence summary of this PR (This should go in the CHANGELOG!)
This changes the
make install
/make develop
step of thefinish.Dockerfile
to run with network disabled, which means that any missing dependencies that were not properly installed inbase.Dockerfile
result in a build failure and flagged.Link to Related Issue(s)
Would enable detecting things like #419 would be detected by CI. This depends on #571 fixing #419 (until that is fixed, this change would break the build - will keep it in draft state until then).
Please describe the changes in your request.
See summary.
Anyone you think should look at this, specifically?
@whyitfor