Skip to content

Commit

Permalink
packaging: remove dependency on gpg
Browse files Browse the repository at this point in the history
Ubuntu 20.04 focal's python3-gpg does not correctly provide the python-package's metadata.
https://bugs.launchpad.net/ubuntu/+source/gpgme1.0/+bug/1977645
The dependency can be reactivated when the bug is fixed upstream

And document the dependencies in the README.md
  • Loading branch information
wagner-intevation committed Jun 15, 2022
1 parent b3afd66 commit bbee054
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ Installation
Dependencies
------------

These libraries and programs are required:
- The python library `psycopg2` (`python3-psycopg2`) for PostgreSQL communication.
- The python library `gpg` (`python3-gpg`), part of the library gpgme.
Due to issues with Ubuntu 20.04, this dependency is not installed when installed with `pip` or `setup.py`
Other means of distributions (deb packages) are not affected by this bug.
- GnuPG (v>=2.2) for `python3-gpg`.

As a Python3 application, see the `install_requires` section
in setup.py for its dependencies.

If you use setuptools, it will check the hard requirements
and install a runable script. For an installation from source:
If you install the deb-packages, the package management handles all dependencies.

For an installation from source use this command:
```
pip3 install -v -e .
```
Expand Down
11 changes: 10 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
intelmq-mailgen (1.3.0-1) UNRELEASED; urgency=medium
intelmq-mailgen (1.3.0-2) stable; urgency=medium

* Remove python package's dependency on 'gpg'.
Due to a bug in python3-gpg of Ubuntu Focal, intelmqcbmail would always
fail on start.
See https://bugs.launchpad.net/ubuntu/+source/gpgme1.0/+bug/1977645

-- Sebastian Wagner <[email protected]> Wed, 15 Jun 2022 14:36:56 +0200

intelmq-mailgen (1.3.0-1) stable; urgency=medium

* Add revision.

Expand Down
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@

install_requires=[
'psycopg2',
'gpg >= 1.10', # /!\ can (probably) **not** be installed via pip
# Additional requirements:
# * GnuPG (v>=2.2) for python3-gpg
# Ubuntu 20.04 focal's python3-gpg does not correctly provide the python-package's metadata.
# Requiring gpg here would result in
# > pkg_resources.DistributionNotFound: The 'gpg>=1.10' distribution was not found and is required by intelmqmail
# https://bugs.launchpad.net/ubuntu/+source/gpgme1.0/+bug/1977645
# The dependency can be reactivated when the bug is fixed upstream
# 'gpg >= 1.10', # /!\ can (probably) **not** be installed via pip

# * (optional) pyxarf v>0.0.5 for python3 installed
# https://github.com/xarf/python-xarf
# (v==0.0.5 does **not** work)
Expand Down

0 comments on commit bbee054

Please sign in to comment.