Install blocked by old version of `pip`

Bug #1968367 reported by John Lettman
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
charm-duplicity
Fix Committed
Undecided
Robert Gildein

Bug Description

The `install` hook fails due to an old version of `pip`.

When installing "fabric" via pip, the dependency "cryptography" fails with a message stating the version of pip is too old and a traceback as follows: [0]

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/var/lib/pip/pip-build-y4ldt5j2/cryptography/setup.py", line 14, in <module>
        from setuptools_rust import RustExtension
    ModuleNotFoundError: No module named 'setuptools_rust'

The `install` hook succeeds when the modification for bug 1968366 is applied alongside an upgrade of pip as follows:
$ python -m pip install --upgrade pip

If possible, the charm needs to ensure the supported version of pip is available for the dependencies it intends to install during the `install` hook.

[0]: https://pastebin.canonical.com/p/f4YtDSB546/

Tags: bseng-1397

Related branches

Andrea Ieri (aieri)
description: updated
Revision history for this message
Paul Goins (vultaire) wrote :

If this is a charmcraft-built charm, this is easy to fix. I've done this for a few charms already.

See here: https://discourse.charmhub.io/t/install-or-update-python-packages-before-packing-a-charm/5158

Revision history for this message
Chi Wai CHAN (raychan96) wrote :

For which release are you seeing this problem? I saw bionic is having similar problem: missing rustc.

Revision history for this message
Aliaksandr Vasiuk (valexby) wrote :

Hi Ray,

The series are Bionic, duplicity is of version 0.7.17-0ubuntu1.1 and the charm is revision 12.

Hope that helps.

Eric Chen (eric-chen)
tags: added: bseng-1397
Revision history for this message
Robert Gildein (rgildein) wrote :

Hi Paul (@vultaire) we could not use `charm-python-packages`, since this is reactive charm
and we are using reactive plugin.

However we potentially could use `build-packages` and define `fabric` (`cryptography`) in
wheelhouse.txt instead of installing in with layers. However I could not make it work, so for
now I proposed only add `pkg-config` and disabling `include_system_packages`.

Changed in charm-duplicity:
status: New → Incomplete
status: Incomplete → In Progress
assignee: nobody → Robert Gildein (rgildein)
Tianqi Xiao (txiao)
Changed in charm-duplicity:
status: In Progress → Fix Committed
milestone: none → 23.10
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.