canonical / charm-duplicity

A charm that provides functionality for both manual and automatic backups for a deployed application
0 stars 3 forks source link

Install blocked by old version of `pip` #12

Closed jneo8 closed 10 months ago

jneo8 commented 10 months ago

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 "", line 1, in       File "/var/lib/pip/pip-build-y4ldt5j2/cryptography/setup.py", line 14, in         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.


Imported from Launchpad using lp2gh.

jneo8 commented 10 months ago

(by vultaire) 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

jneo8 commented 10 months ago

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

jneo8 commented 10 months ago

(by valexby) Hi Ray,

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

Hope that helps.

jneo8 commented 10 months ago

(by rgildein) 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.