isislovecruft / python-gnupg

A modified version of python-gnupg, including security patches, extensive documentation, and extra features.
Other
424 stars 172 forks source link

Remove requirement that gpg is not a symlink #259

Open 007 opened 5 years ago

007 commented 5 years ago

Requiring this check breaks compatibility with real-life. If I have a symlink to gpg in my path this will ignore that and report GnuPG is not installed! even though I can execute gpg myself and it works fine.

This also explicitly breaks compatibility with OSX homebrew, which uses symlinks to manage versioned packages:

$ which gpg
/usr/local/bin/gpg
$ ls -l /usr/local/bin/gpg
lrwxr-xr-x 1 user admin 30 Apr 13 21:37 /usr/local/bin/gpg -> ../Cellar/gnupg/2.2.15/bin/gpg
$ gpg --version | head -1
gpg (GnuPG) 2.2.15
$ python test.py
...
RuntimeError: GnuPG is not installed!

Ref #123 #69