[PATCH gnupgpy 0/5] Modernize python build for gpgmepy

Lucas Hoffmann lucc at posteo.de
Sun Mar 23 23:47:14 CET 2025


These patches modernize the build process for the gpgmepy repository.
This was suggested in message 2807036.QOukoFCf94 at daneel
(https://lists.gnupg.org/pipermail/gnupg-devel/2025-March/035822.html).

Please note that this is my first contribution to any gnupg project. You
can find my DCO attached to this message.

Some notes about the individual patches:

- I tried to move as much metadata from the setup.py(.in) file to the
  pyproject.toml file because it is static in two senses:  It is not
  touched by configure and friends and it can be parsed without
  executing it.  I consider both of these advantages for project
  metadata.

- I specified the minimum python version as 3.6.  From the message of
  1a7b204dedaf99efa08915ee561523997175380c it seems that 3.6 was kept
  because it is supported by some Linux distros.  Otherwise a good list
  of versions to support would be the versions supported upstream:
  https://devguide.python.org/versions/ Is there some spelled out policy
  which python versions should be supported?  Should the project have
  one?

- I do not know the m4 macro language and just made the commit "Remove
  distutils related code from configure macros" based on my knowledge of
  shell and python.  I tested the change by running configure on my
  machine.

I tried to search for related issues and patches on the bug tracker but
only found https://dev.gnupg.org/D545 which seems to be partially
applied by a7cfdab46f853397794575307a817982cdd06880.  Did I miss any
important issues or patches that could be incorporated into this series?

I tested my changes on my machine by running `make distclean &&
./configure --enable-maintainer-mode && make check`.  All but one tests
pass; the test t-verify.py is reported twice as failure.  This is the
same on master and with these patches.  Is there some kind of CI or
defined testing environment (docker container, VM, etc) that I can use?
Is this test known to fail or is this a problem with my setup (I am on
nixos if it matters)?

Please reply with your feedback, I am happy to fix problems that these
patches might have.

Best regards,
Lucas

PS: Overview of the patches:

Lucas Hoffmann (5):
  build: Migrate project metadata to pyproject.toml
  build: Specify minimum required python version
  build: Drop distutils from setup.py
  build: Move long description from to pyproject.toml
  build: Remove distutils related code from configure macros

 m4/ax_python_devel.m4 | 66 ++++++++++++-------------------------------
 m4/python.m4          | 42 ++++++---------------------
 pyproject.toml        | 63 +++++++++++++++++++++++++++++++++++++++++
 setup.py.in           | 59 ++------------------------------------
 4 files changed, 92 insertions(+), 138 deletions(-)
 create mode 100644 pyproject.toml

--
2.48.1
-------------- next part --------------
GPGME Python Bindings Developer's Certificate of Origin.  Version 1.0
=====================================================================

By making a contribution to the GPGME Python Bindings project, I
certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the free software license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the
    best of my knowledge, is covered under an appropriate free
    software license and I have the right under that license to
    submit that work with modifications, whether created in whole
    or in part by me, under the same free software license
    (unless I am permitted to submit under a different license),
    as indicated in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including
    all personal information I submit with it, including my
    sign-off) is maintained indefinitely and may be redistributed
    consistent with this project or the free software license(s)
    involved.

Signed-off-by: Lucas Hoffmann <lucc at posteo.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20250323/695ad933/attachment-0001.sig>


More information about the Gnupg-devel mailing list