-
Notifications
You must be signed in to change notification settings - Fork 14
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
Several pip fixes for Python hydration #186
base: main
Are you sure you want to change the base?
Conversation
This is closer to the recommended way to invoke pip according to the [latest pip documentation](https://pip.pypa.io/en/stable/getting-started/). The reason why this invocation is more robust is that it only requires the Python interpreter itself to be on the PATH, and it is robust to the bin directory corresponding to site-packages being omitted from the PATH (usually by accident).
`pip list` can be very time consuming if there are many packages installed. `pip --version` is fast regardless.
Some Python packages _must_ be installed from source: either PyPI only holds source distributions of them, or lacks wheels for the target platform. If the host platform matches the target Lambda platform, then permit installation of Python packages from source.
Any news on this? |
@lpsinger thanks for your patience! As you may have seen, my focus has been on shipping aws-lite and Arc 11; soon I'll be returning to PRs and work unrelated to that end! |
Any updates on this? |
Yeah, I found that to be the case for some packages, but not many; my recollection at the time of building this Python integration was that the current best practice for packaging was a binary dist. Whereas the approach I took here is more rigid in its requirements for the published package, it is also significantly more deterministic, which is a quality we look for in Architect deployments. Ultimately I'm amenable to this change, but it'll need to be accompanied by at least the same level of testing rigor as we have for the other Python hydration stuff.
As of this time we must run
Seems reasonable! |
We recently split off the part of our project that was written in Python into a separate project that does not use Architect. I'm not supporting that part of our project, so I will not be taking this PR any further at the moment. |
Permit installing Python packages from source if host and target match.
Some Python packages must be installed from source: either PyPI
only holds source distributions of them, or lacks wheels for the
target platform. If the host platform matches the target Lambda
platform, then permit installation of Python packages from source.
Use
pip --version
, notpip list
, to test for working pippip list
can be very time consuming if there are many packagesinstalled.
pip --version
is fast regardless.Invoke pip using
python3 -m pip
rather thanpip3
This is closer to the recommended way to invoke pip according to the
latest pip documentation.
The reason why this invocation is more robust is that it only
requires the Python interpreter itself to be on the PATH, and it is
robust to the bin directory corresponding to site-packages being
omitted from the PATH (usually by accident).
Thank you for helping out! ✨
We really appreciate your commitment to improving Architect
To maintain a high standard of quality in our releases, before merging every pull request we ask that you've completed the following:
master
npm it
from the repo root)readme.md
, help docs, inline docs & comments, etc.)changelog.md
Please also be sure to completed the CLA (if you haven't already).
Learn more about contributing to Architect here.
Thanks again!