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

plugins: be more specific in search for payload Python #487

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

tigarmo
Copy link
Contributor

@tigarmo tigarmo commented Jul 4, 2023

This commit updates the Python plugin to be more restrictive when looking for the interpreter in the parts' payload: if the venv is created using "python3.10", then that exact version of Python must be found in the payload in order to be usable.

In addition to avoiding issues from incompatible versions, this handles cases like the Python 3.6 package (from the deadsnakes ppa) that has both a "python3.6" and a "python3.6m" binaries by default.

  • Have you signed the CLA?

@tigarmo tigarmo requested a review from cmatsuoka July 4, 2023 15:13
@tigarmo tigarmo marked this pull request as ready for review July 4, 2023 15:14
@tigarmo
Copy link
Contributor Author

tigarmo commented Jul 4, 2023

I'm investigating the mypy breakage separately

This commit updates the Python plugin to be more restrictive when
looking for the interpreter in the parts' payload: if the venv is
created using "python3.10", then that exact version of Python must be
found in the payload in order to be usable.

In addition to avoiding issues from incompatible versions, this handles
cases like the Python 3.6 package (from the deadsnakes ppa) that has
both a "python3.6" and a "python3.6m" binaries by default.
@cmatsuoka cmatsuoka enabled auto-merge (squash) July 6, 2023 18:11
@cmatsuoka cmatsuoka merged commit d3cc6cc into canonical:main Jul 6, 2023
7 checks passed
lengau referenced this pull request in canonical/charmcraft Jul 13, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [craft-parts](https://togithub.com/canonical/craft-parts) | `==1.20.0`
-> `==1.23.0` |
[![age](https://badges.renovateapi.com/packages/pypi/craft-parts/1.23.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/craft-parts/1.23.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/craft-parts/1.23.0/compatibility-slim/1.20.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/craft-parts/1.23.0/confidence-slim/1.20.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>canonical/craft-parts (craft-parts)</summary>

###
[`v1.23.0`](https://togithub.com/canonical/craft-parts/releases/tag/1.23.0)

[Compare
Source](https://togithub.com/canonical/craft-parts/compare/1.22.0...1.23.0)

##### What's Changed

- github: add issue templates by
[@&#8203;sergiusens](https://togithub.com/sergiusens) in
[https://github.com/canonical/craft-parts/pull/484](https://togithub.com/canonical/craft-parts/pull/484)
- docs: start working on a plugin template; reorganise files by
[@&#8203;dboddie](https://togithub.com/dboddie) in
[https://github.com/canonical/craft-parts/pull/482](https://togithub.com/canonical/craft-parts/pull/482)
- docs: make the part properties reference reusable by
[@&#8203;dboddie](https://togithub.com/dboddie) in
[https://github.com/canonical/craft-parts/pull/483](https://togithub.com/canonical/craft-parts/pull/483)
- packaging: pin Pydantic to <2.0.0 by
[@&#8203;tigarmo](https://togithub.com/tigarmo) in
[https://github.com/canonical/craft-parts/pull/488](https://togithub.com/canonical/craft-parts/pull/488)
- docs: fixed broken references by
[@&#8203;dboddie](https://togithub.com/dboddie) in
[https://github.com/canonical/craft-parts/pull/486](https://togithub.com/canonical/craft-parts/pull/486)
- plugins: be more specific in search for payload Python by
[@&#8203;tigarmo](https://togithub.com/tigarmo) in
[https://github.com/canonical/craft-parts/pull/487](https://togithub.com/canonical/craft-parts/pull/487)
- Release 1.23.0 by [@&#8203;cmatsuoka](https://togithub.com/cmatsuoka)
in
[https://github.com/canonical/craft-parts/pull/491](https://togithub.com/canonical/craft-parts/pull/491)

**Full Changelog**:
canonical/craft-parts@1.22.0...1.23.0

###
[`v1.22.0`](https://togithub.com/canonical/craft-parts/releases/tag/1.22.0)

[Compare
Source](https://togithub.com/canonical/craft-parts/compare/v1.21.1...1.22.0)

##### What's Changed

- docs: include reusable content by
[@&#8203;dboddie](https://togithub.com/dboddie) in
[https://github.com/canonical/craft-parts/pull/468](https://togithub.com/canonical/craft-parts/pull/468)
- many: remove todos what won't be done by
[@&#8203;cmatsuoka](https://togithub.com/cmatsuoka) in
[https://github.com/canonical/craft-parts/pull/469](https://togithub.com/canonical/craft-parts/pull/469)
- docs: add a how-to for overriding builds by
[@&#8203;tigarmo](https://togithub.com/tigarmo) in
[https://github.com/canonical/craft-parts/pull/467](https://togithub.com/canonical/craft-parts/pull/467)
- lint: use correct types for SnapSource test by
[@&#8203;mr-cal](https://togithub.com/mr-cal) in
[https://github.com/canonical/craft-parts/pull/470](https://togithub.com/canonical/craft-parts/pull/470)
- docs: fix yaml in examples by
[@&#8203;mr-cal](https://togithub.com/mr-cal) in
[https://github.com/canonical/craft-parts/pull/466](https://togithub.com/canonical/craft-parts/pull/466)
- deps: make python-apt dependency optional by
[@&#8203;lengau](https://togithub.com/lengau) in
[https://github.com/canonical/craft-parts/pull/455](https://togithub.com/canonical/craft-parts/pull/455)
- info: convert TODO to bug by
[@&#8203;mr-cal](https://togithub.com/mr-cal) in
[https://github.com/canonical/craft-parts/pull/475](https://togithub.com/canonical/craft-parts/pull/475)
- parts: add a helper to query overlay use by
[@&#8203;tigarmo](https://togithub.com/tigarmo) in
[https://github.com/canonical/craft-parts/pull/478](https://togithub.com/canonical/craft-parts/pull/478)
- Merge 1.19.6 by [@&#8203;cmatsuoka](https://togithub.com/cmatsuoka) in
[https://github.com/canonical/craft-parts/pull/479](https://togithub.com/canonical/craft-parts/pull/479)
- Merge 1.21.1 by [@&#8203;cmatsuoka](https://togithub.com/cmatsuoka) in
[https://github.com/canonical/craft-parts/pull/480](https://togithub.com/canonical/craft-parts/pull/480)
- tox: fix broken tox environments by
[@&#8203;lengau](https://togithub.com/lengau) in
[https://github.com/canonical/craft-parts/pull/477](https://togithub.com/canonical/craft-parts/pull/477)
- infos: apply architecture maps if needed by
[@&#8203;lengau](https://togithub.com/lengau) in
[https://github.com/canonical/craft-parts/pull/476](https://togithub.com/canonical/craft-parts/pull/476)
- source: snap: Forward unmatched parameters by
[@&#8203;valentindavid](https://togithub.com/valentindavid) in
[https://github.com/canonical/craft-parts/pull/233](https://togithub.com/canonical/craft-parts/pull/233)
- Release 1.22.0 by [@&#8203;cmatsuoka](https://togithub.com/cmatsuoka)
in
[https://github.com/canonical/craft-parts/pull/481](https://togithub.com/canonical/craft-parts/pull/481)

##### New Contributors

- [@&#8203;valentindavid](https://togithub.com/valentindavid) made their
first contribution in
[https://github.com/canonical/craft-parts/pull/233](https://togithub.com/canonical/craft-parts/pull/233)

**Full Changelog**:
canonical/craft-parts@v1.21.1...1.22.0

###
[`v1.21.1`](https://togithub.com/canonical/craft-parts/compare/v1.21.0...v1.21.1)

[Compare
Source](https://togithub.com/canonical/craft-parts/compare/v1.21.0...v1.21.1)

###
[`v1.21.0`](https://togithub.com/canonical/craft-parts/releases/tag/v1.21.0)

[Compare
Source](https://togithub.com/canonical/craft-parts/compare/v1.20.0...v1.21.0)

#### What's Changed

- callbacks: add callback to explicitly list base packages by
[@&#8203;cmatsuoka](https://togithub.com/cmatsuoka) in
[https://github.com/canonical/craft-parts/pull/448](https://togithub.com/canonical/craft-parts/pull/448)
- ci: freeze build and lint versions for 1.19 by
[@&#8203;lengau](https://togithub.com/lengau) in
[https://github.com/canonical/craft-parts/pull/458](https://togithub.com/canonical/craft-parts/pull/458)
- ci: bump github action versions by
[@&#8203;mr-cal](https://togithub.com/mr-cal) in
[https://github.com/canonical/craft-parts/pull/462](https://togithub.com/canonical/craft-parts/pull/462)
- callbacks: add callback to configure overlay package layer by
[@&#8203;tigarmo](https://togithub.com/tigarmo) in
[https://github.com/canonical/craft-parts/pull/464](https://togithub.com/canonical/craft-parts/pull/464)
- Release 1.21.0 by [@&#8203;cmatsuoka](https://togithub.com/cmatsuoka)
in
[https://github.com/canonical/craft-parts/pull/465](https://togithub.com/canonical/craft-parts/pull/465)

**Full Changelog**:
canonical/craft-parts@v1.20.0...v1.21.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" in timezone Etc/UTC,
Automerge - "before 07:00" in timezone Etc/UTC.

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/canonical/charmcraft).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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