-
Notifications
You must be signed in to change notification settings - Fork 75
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
charm_builder: install binary python packages (CRAFT-601) #588
charm_builder: install binary python packages (CRAFT-601) #588
Conversation
Charm plugin property `charm-binary-python-packages` can be used to list binary packages to install from PyPI. Packages may still be installed from sources if they're only available in source format. Signed-off-by: Claudio Matsuoka <[email protected]>
Github is deprecating access with the unencrypted git protocol. Change github requirement data transfer protocol to https. Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
1308105
to
21eb612
Compare
Rebased on master. |
Option `--prefer-binary` is only available in pip 20.x and bionic installs 9.x. Options are to update pip to a newer version and keep using `--prefer-binary`; change the option to `--only-binary` (in this case installation of packages only available in source form or depending on packages only available in source form would fail); or not specify any option related to binary installation (which would result in installation from source if tha latest version of a package is only available in source form, which is a possible situation but likely to be a corner case). This commit implements the third solution. Signed-off-by: Claudio Matsuoka <[email protected]>
21eb612
to
9010f4b
Compare
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.
Added a couple of questions, thanks!
requirements-dev.txt
Outdated
@@ -61,4 +61,4 @@ tomli==1.2.2 | |||
typing-extensions==3.10.0.2 | |||
urllib3==1.26.7 | |||
zipp==3.6.0 | |||
git+git://github.com/canonical/craft-cli.git@4af19f9c0da733321dc754be1180aea28f3feeb1 | |||
git+https://github.com/canonical/craft-cli.git@4af19f9c0da733321dc754be1180aea28f3feeb1 |
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.
Why this change?
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.
Github is deprecating access using the unencrypted git protocol (see https://github.blog/2021-09-01-improving-git-protocol-security-github/). This is not effective yet but there was a brownout on Nov 02 when this PR was submitted. Also note that all entries using non-published packages will be removed before the next release.
snap/snapcraft.yaml
Outdated
@@ -72,6 +72,7 @@ parts: | |||
plugin: nil | |||
build-packages: | |||
- python3-dev | |||
- git |
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 this is needed for?
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 was needed to be able to install packages using git+https and can be removed when those lines are removed. I will revert these changes since this brownout period ended (if we leave this to be changed later we'll forget to remove the git entry from snapcraft.yaml).
Github will phase out data transfers using the unencrypted git protocol (see https://github.blog/2021-09-01-improving-git-protocol-security-github/). Revert changes now because it adds 'git' to the snap build package list. Unpublished dependencies will be removed prior to release. Signed-off-by: Claudio Matsuoka <[email protected]>
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.
Great, thanks!
Charm plugin property
charm-binary-python-packages
can be used tolist binary packages to install from PyPI. Packages may still be
installed from sources if they're only available in source format.
Signed-off-by: Claudio Matsuoka [email protected]