thombashi / pathvalidate

A Python library to sanitize/validate a string such as filenames/file-paths/etc.
https://pathvalidate.rtfd.io/
MIT License
220 stars 13 forks source link

installation via apt not possible #21

Closed christosk closed 2 years ago

christosk commented 2 years ago

I tried to install it via apt: su -l add-apt-repository ppa:thombashi/ppa apt update apt install python3-pathvalidate

Trying add-apt-repository ppa:thombashi/ppa leads to the following error message:

kRyzen7:~# add-apt-repository ppa:thombashi/ppa deb packages of my repositories (https://github.com/thombashi). PPA packaging sources can be found at https://github.com/thombashi/PPA More info: https://launchpad.net/~thombashi/+archive/ubuntu/ppa Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: Die "Keybox" /tmp/tmprksegdde/pubring.gpg' wurde erstellt gpg: /tmp/tmprksegdde/trustdb.gpg: trust-db erzeugt gpg: Schlüssel CF9859CE95D9F1E2: Öffentlicher Schlüssel "Launchpad PPA for Tsuyoshi Hombashi" importiert gpg: Anzahl insgesamt bearbeiteter Schlüssel: 1 gpg: importiert: 1 Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). gpg: Keine gültigen OpenPGP-Daten gefunden.

My interpretation is that an old method (apt-key) is used in thombashi's script. Maybe this method is no longer support by the apt version used in Debian 11.

After this failed I tried to install pathvalidate via pip:

(as superuser) apt install python3-pip and as normal user : pip install pathvalidate. This seems to have been successfull:

Collecting pathvalidate Downloading pathvalidate-2.5.0-py3-none-any.whl (19 kB) Installing collected packages: pathvalidate Successfully installed pathvalidate-2.5.0

But still the python script that tries to import sanit from pathvalidate fails.

thombashi commented 2 years ago

Thank you for your report.

The warning is caused by add-apt-repository that used apt-key for the internal processing.

This will be probably solved by the upstream package: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1862764