Page MenuHome GnuPG

gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config)
Closed, ResolvedPublic

Description

gpg-error-config and gpgme-config are deprecated to prefer pkg-config (or gpgrt-config).

Still in GPGME, python binding build uses them. Let us move to pkg-config, instead.

Event Timeline

gniibe created this task.

Reviewing the build process, it's just better to use @...VAR...@ by configure (instead of invoke pkg-config again in setup.py).

Pushed the fix.
Note that non-in-tree build never been reliable (using the result of the configure, in tree).
So, I basically don't consider the use case of non-in-tree build.

werner changed the task status from Open to Testing.Sep 22 2022, 10:40 AM
werner removed a project: Restricted Project.

Hello,

the pushed fix breaks when libgpg-error does not require special CFLAGS, i.e. when @GPG_ERROR_CFLAGS@ expands to an empty string:

running build
gcc: warning: : linker input file unused because linking not done
gcc: error: : linker input file not found: No such file or directory
Using gpgme.h from ../../src/gpgme.h
 [...]
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['gcc', '-E', '', 'python3.10-gpg/include1.h']' returned non-zero exit status 1.

cu Andreas

@gniibe - Thanks for the quick response. It now works for me.
cu Andreas

OK I can confirm that with ae9258fb and f1802682 commits I was ble to update my rpm packages to 1.18.0.