|
Packit Service |
30b792 |
# -*- mode: org -*-
|
|
Packit Service |
30b792 |
#+TITLE: A Short History of the GPGME bindings for Python
|
|
Packit Service |
30b792 |
#+LATEX_COMPILER: xelatex
|
|
Packit Service |
30b792 |
#+LATEX_CLASS: article
|
|
Packit Service |
30b792 |
#+LATEX_CLASS_OPTIONS: [12pt]
|
|
Packit Service |
30b792 |
#+LATEX_HEADER: \usepackage{xltxtra}
|
|
Packit Service |
30b792 |
#+LATEX_HEADER: \usepackage[margin=1in]{geometry}
|
|
Packit Service |
30b792 |
#+LATEX_HEADER: \setmainfont[Ligatures={Common}]{Times New Roman}
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
* Overview
|
|
Packit Service |
30b792 |
:PROPERTIES:
|
|
Packit Service |
30b792 |
:CUSTOM_ID: overview
|
|
Packit Service |
30b792 |
:END:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
| Version: | 0.0.1 |
|
|
Packit Service |
30b792 |
| GPGME Version: | 1.13.0 |
|
|
Packit Service |
30b792 |
| Author: | Ben McGinnes <ben@gnupg.org> |
|
|
Packit Service |
30b792 |
| Author GPG Key: | DB4724E6FA4286C92B4E55C4321E4E2373590E5D |
|
|
Packit Service |
30b792 |
| Language: | Australian English, British English |
|
|
Packit Service |
30b792 |
| xml:lang: | en-AU, en-GB, en |
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
The GPGME Python bindings passed through many hands and numerous
|
|
Packit Service |
30b792 |
phases before, after a fifteen year journey, coming full circle to
|
|
Packit Service |
30b792 |
return to the source. This is a short explanation of that journey.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
** In the beginning
|
|
Packit Service |
30b792 |
:PROPERTIES:
|
|
Packit Service |
30b792 |
:CUSTOM_ID: in-the-begining
|
|
Packit Service |
30b792 |
:END:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
In 2002 John Goerzen released PyME; Python bindings for the GPGME
|
|
Packit Service |
30b792 |
module which utilised the current release of Python of the time and
|
|
Packit Service |
30b792 |
SWIG.[fn:1] Shortly after creating it and ensuring it worked he stopped
|
|
Packit Service |
30b792 |
supporting it, though he left his work available on his Gopher
|
|
Packit Service |
30b792 |
site.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
** Keeping the flame alive
|
|
Packit Service |
30b792 |
:PROPERTIES:
|
|
Packit Service |
30b792 |
:CUSTOM_ID: keeping-the-flame-alive
|
|
Packit Service |
30b792 |
:END:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
A couple of years later the project was picked up by Igor Belyi and
|
|
Packit Service |
30b792 |
actively developed and maintained by him from 2004 to 2008. Igor's
|
|
Packit Service |
30b792 |
whereabouts at the time of this document's creation are unknown,
|
|
Packit Service |
30b792 |
but the current authors do hope he is well. We're assuming (or
|
|
Packit Service |
30b792 |
hoping) that life did what life does and made continuing untenable.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
** Passing the torch
|
|
Packit Service |
30b792 |
:PROPERTIES:
|
|
Packit Service |
30b792 |
:CUSTOM_ID: passing-the-torch
|
|
Packit Service |
30b792 |
:END:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
In 2014 Martin Albrecht wanted to patch a bug in the PyME code and
|
|
Packit Service |
30b792 |
discovered the absence of Igor. Following a discussion on the PyME
|
|
Packit Service |
30b792 |
mailing list he became the new maintainer for PyME, releasing
|
|
Packit Service |
30b792 |
version 0.9.0 in May of that year. He remains the maintainer of
|
|
Packit Service |
30b792 |
the original PyME release in Python 2.6 and 2.7 (available via
|
|
Packit Service |
30b792 |
PyPI).
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
** Coming full circle
|
|
Packit Service |
30b792 |
:PROPERTIES:
|
|
Packit Service |
30b792 |
:CUSTOM_ID: ouroboros
|
|
Packit Service |
30b792 |
:END:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
In 2015 Ben McGinnes approached Martin about a Python 3 version,
|
|
Packit Service |
30b792 |
while investigating how complex a task this would be the task ended
|
|
Packit Service |
30b792 |
up being completed. A subsequent discussion with Werner Koch led
|
|
Packit Service |
30b792 |
to the decision to fold the Python 3 port back into the original
|
|
Packit Service |
30b792 |
GPGME release in the languages subdirectory for non-C bindings
|
|
Packit Service |
30b792 |
under the module name of =pyme3=.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
In 2016 this PyME module was integrated back into the GPGME project
|
|
Packit Service |
30b792 |
by Justus Winter. During the course of this work Justus adjusted
|
|
Packit Service |
30b792 |
the port to restore limited support for Python 2, but not as many
|
|
Packit Service |
30b792 |
minor point releases as the original PyME package supports. During
|
|
Packit Service |
30b792 |
the course of this integration the package was renamed to more
|
|
Packit Service |
30b792 |
accurately reflect its status as a component of GPGME. The =pyme3=
|
|
Packit Service |
30b792 |
module was renamed to =gpg= and adopted by the upstream GnuPG team.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
In 2017 Justus departed G10code and the GnuPG team. Following this
|
|
Packit Service |
30b792 |
Ben returned to maintain of gpgme Python bindings and continue
|
|
Packit Service |
30b792 |
building them from that point.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
* Relics of the past
|
|
Packit Service |
30b792 |
:PROPERTIES:
|
|
Packit Service |
30b792 |
:CUSTOM_ID: relics-past
|
|
Packit Service |
30b792 |
:END:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
There are a few things, in addition to code specific factors, such as
|
|
Packit Service |
30b792 |
SWIG itself, which are worth noting here.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
** The Annoyances of Git
|
|
Packit Service |
30b792 |
:PROPERTIES:
|
|
Packit Service |
30b792 |
:CUSTOM_ID: the-annoyances-of-git
|
|
Packit Service |
30b792 |
:END:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
As anyone who has ever worked with git knows, submodules are
|
|
Packit Service |
30b792 |
horrible way to deal with pretty much anything. In the interests
|
|
Packit Service |
30b792 |
of avoiding migraines, that was skipped with addition of the PyME
|
|
Packit Service |
30b792 |
code to GPGME.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
Instead the files were added to a subdirectory of the =lang/=
|
|
Packit Service |
30b792 |
directory, along with a copy of the entire git log up to that point
|
|
Packit Service |
30b792 |
as a separate file within the =lang/python/docs/= directory.[fn:2]
|
|
Packit Service |
30b792 |
As the log for PyME is nearly 100KB and the log for GPGME is
|
|
Packit Service |
30b792 |
approximately 1MB, this would cause considerable bloat, as well as
|
|
Packit Service |
30b792 |
some confusion, should the two be merged.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
Hence the unfortunate, but necessary, step to simply move the
|
|
Packit Service |
30b792 |
files. A regular repository version has been maintained should it
|
|
Packit Service |
30b792 |
be possible to implement this better in the future.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
** The Perils of PyPI
|
|
Packit Service |
30b792 |
:PROPERTIES:
|
|
Packit Service |
30b792 |
:CUSTOM_ID: the-perils-of-pypi
|
|
Packit Service |
30b792 |
:END:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
The early port of the Python 2 =pyme= module as =pyme3= was never
|
|
Packit Service |
30b792 |
added to PyPI while the focus remained on development and testing
|
|
Packit Service |
30b792 |
during 2015 and early 2016. Later in 2016, however, when Justus
|
|
Packit Service |
30b792 |
completed his major integration work and subsequently renamed the
|
|
Packit Service |
30b792 |
module from =pyme3= to =gpg=, some prior releases were also
|
|
Packit Service |
30b792 |
provided through PyPI.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
Since these bindings require a matching release of the GPGME
|
|
Packit Service |
30b792 |
libraries in order to function, it was determined that there was
|
|
Packit Service |
30b792 |
little benefit in also providing a copy through PyPI since anyone
|
|
Packit Service |
30b792 |
obtaining the GPGME source code would obtain the Python bindings
|
|
Packit Service |
30b792 |
source code at the same time. Whereas there was the potential to
|
|
Packit Service |
30b792 |
sew confusion amongst Python users installing the module from PyPI,
|
|
Packit Service |
30b792 |
only to discover that without the relevant C files, header files or
|
|
Packit Service |
30b792 |
SWIG compiled binaries, the Python module did them little good.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
There are only two files on PyPI which might turn up in a search
|
|
Packit Service |
30b792 |
for this module or a sample of its content:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
1. gpg (1.8.0) - Python bindings for GPGME GnuPG cryptography library
|
|
Packit Service |
30b792 |
2. pyme (0.9.0) - Python support for GPGME GnuPG cryptography library
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
*** GPG 1路8路0 - Python bindings for GPGME GnuPG cryptography library
|
|
Packit Service |
30b792 |
:PROPERTIES:
|
|
Packit Service |
30b792 |
:CUSTOM_ID: pypi-gpgme-180
|
|
Packit Service |
30b792 |
:END:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
This is the most recent version to reach PyPI and is the version
|
|
Packit Service |
30b792 |
of the official Pyhon bindings which shipped with GPGME 1.8.0. If
|
|
Packit Service |
30b792 |
you have GPGME 1.8.0 installed and /only/ 1.8.0 installed, then it
|
|
Packit Service |
30b792 |
is probably safe to use this copy from PyPI.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
As there have been a lot of changes since the release of GPGME
|
|
Packit Service |
30b792 |
1.8.0, the GnuPG Project recommends not using this version of the
|
|
Packit Service |
30b792 |
module and instead installing the current version of GPGME along
|
|
Packit Service |
30b792 |
with the Python bindings included with that package.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
*** PyME 0路9路0 - Python support for GPGME GnuPG cryptography library
|
|
Packit Service |
30b792 |
:PROPERTIES:
|
|
Packit Service |
30b792 |
:CUSTOM_ID: pypi-gpgme-90
|
|
Packit Service |
30b792 |
:END:
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
This is the last release of the PyME bindings maintained by Martin
|
|
Packit Service |
30b792 |
Albrecht and is only compatible with Python 2, it will not work
|
|
Packit Service |
30b792 |
with Python 3. This is the version of the software from which the
|
|
Packit Service |
30b792 |
port from Python 2 to Python 3 code was made in 2015.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
Users of the more recent Python bindings will recognise numerous
|
|
Packit Service |
30b792 |
points of similarity, but also significant differences. It is
|
|
Packit Service |
30b792 |
likely that the more recent official bindings will feel "more
|
|
Packit Service |
30b792 |
pythonic."
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
For those using Python 2, there is essentially no harm in using
|
|
Packit Service |
30b792 |
this module, but it may lack a number of more recent features
|
|
Packit Service |
30b792 |
added to GPGME.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
* Footnotes
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
[fn:1] In all likelihood this would have been Python 2.2 or possibly
|
|
Packit Service |
30b792 |
Python 2.3.
|
|
Packit Service |
30b792 |
|
|
Packit Service |
30b792 |
[fn:2] The entire PyME git log and other preceding VCS logs are
|
|
Packit Service |
30b792 |
located in the =gpgme/lang/python/docs/old-commits.log= file.
|