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

Add option to upgrade core deps in build venv #650

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

fnordahl
Copy link
Collaborator

@fnordahl fnordahl commented Nov 12, 2022

Some packages may require newer versions of core dependencies for successful execution of the pip download or pip wheel commands. Most notable example is Jinja2 and MarkupSafe when installed on Focal ref pallets/jinja#1496.

At this stage of the process the input from the charm wheelhouse.txt is not sufficient.

Add an option to upgrade pip and setuptools in the build venv to deal with these situations.

Fixes: #646
Signed-off-by: Frode Nordahl frode.nordahl@canonical.com

Some packages may require newer versions of core dependencies for
successful execution of the `pip download` or `pip wheel`
commands. Most notable example is Jinja2 and MarkupSafe when
installed on Focal ref pallets/jinja#1496.

At this stage of the process the input from the charm
wheelhouse.txt is not sufficient.

Add an option to upgrade pip and setuptools in the build venv to
deal with these situations.

Fixes: juju#646
Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
@lathiat
Copy link

lathiat commented Dec 9, 2022

Does this fix the same issue, but with a charmcraft.yaml change rather than a config option?
https://discourse.charmhub.io/t/install-or-update-python-packages-before-packing-a-charm/5158

Not clear to me if the proposed fix here works in some cases the above wouldn't. But the above fix went in only a couple weeks before this bug/fix so not sure if it was just missed.

(Originally from: canonical/charmcraft#551)

@fnordahl
Copy link
Collaborator Author

fnordahl commented Dec 9, 2022

Does this fix the same issue, but with a charmcraft.yaml change rather than a config option? https://discourse.charmhub.io/t/install-or-update-python-packages-before-packing-a-charm/5158

Not clear to me if the proposed fix here works in some cases the above wouldn't. But the above fix went in only a couple weeks before this bug/fix so not sure if it was just missed.

(Originally from: canonical/charmcraft#551)

The charmcraft fix is only usable by the charm plugin for operator framework charms. When building with the reactive plugin charm-tools is in charge of the virtualenv.

Once this PR is merged, you would be able to control this through the charmcraft.yaml like this:

type: charm

parts:
  charm:
    source: src/
    plugin: reactive
    reactive-charm-build-arguments:
      - --binary-wheels-from-source
      - -v
      - --upgrade-buildvenv-core-deps

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.

No control over virtualenv used to build wheels
3 participants