Skip to content
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

Merged
merged 6 commits into from
Nov 9, 2021

Conversation

cmatsuoka
Copy link
Contributor

@cmatsuoka cmatsuoka commented Nov 2, 2021

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]

@cmatsuoka cmatsuoka marked this pull request as draft November 3, 2021 12:43
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]>
@cmatsuoka cmatsuoka force-pushed the charm-binary-python-packages branch from 1308105 to 21eb612 Compare November 3, 2021 15:31
@cmatsuoka
Copy link
Contributor Author

Rebased on master.

@cmatsuoka cmatsuoka marked this pull request as ready for review November 3, 2021 15:31
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]>
@cmatsuoka cmatsuoka force-pushed the charm-binary-python-packages branch from 21eb612 to 9010f4b Compare November 3, 2021 15:33
Copy link
Contributor

@facundobatista facundobatista left a 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!

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

@cmatsuoka cmatsuoka Nov 3, 2021

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.

@@ -72,6 +72,7 @@ parts:
plugin: nil
build-packages:
- python3-dev
- git
Copy link
Contributor

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?

Copy link
Contributor Author

@cmatsuoka cmatsuoka Nov 3, 2021

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]>
Copy link
Contributor

@facundobatista facundobatista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@cmatsuoka cmatsuoka enabled auto-merge November 9, 2021 18:19
@cmatsuoka cmatsuoka merged commit 253d769 into canonical:master Nov 9, 2021
@cmatsuoka cmatsuoka deleted the charm-binary-python-packages branch November 9, 2021 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants