Justus Winter
6af7bee076
python: Release the GIL during calls into GPGME.
...
* lang/python/helpers.c (pyme_raise_callback_exception): Re-acquire
the Global Interpreter Lock.
(pyPassphraseCb, pyme_set_passphrase_cb, pyProgressCb,
pyme_set_progress_cb, pyStatusCb, pyme_set_status_cb,
_pyme_interact_cb, pyDataReadCb, pyDataWriteCb, pyDataSeekCb,
pyDataReleaseCb, pyme_data_new_from_cbs, _pyme_assuan_data_cb,
_pyme_assuan_inquire_cb, _pyme_assuan_status_cb): Likewise.
* lang/python/setup.py.in: Make 'gpgme-config' emit the correct
cflags, and SWIG generate code to release the GIL before calling us.
Co-authored-by: Kai Michaelis <kai@gnupg.org>
Signed-off-by: Justus Winter <justus@g10code.com>
2016-09-16 15:56:47 +02:00
Justus Winter
594c3b8b05
python: Clarify that we support Python 2.7 too.
...
* lang/python/README: Use 'Python' instead of 'Python 3'.
* lang/python/pyme/version.py.in: Likewise.
* lang/python/setup.py.in: Add classifier for 2.7, drop 3 only.
Signed-off-by: Justus Winter <justus@g10code.com>
2016-09-14 14:36:29 +02:00
Justus Winter
3b37c4efcf
python: Use more generic shebang.
...
--
Signed-off-by: Justus Winter <justus@g10code.com>
2016-09-14 12:15:57 +02:00
Justus Winter
70999d8161
python: Avoid hardcoding the interpreter.
...
* lang/python/setup.py.in: Avoid hardcoding the interpreter.
Signed-off-by: Justus Winter <justus@g10code.com>
2016-09-12 16:19:07 +02:00
Justus Winter
b48b852a84
python: Do not rely on subprocess.DEVNULL.
...
* lang/python/setup.py.in: Do not rely on subprocess.DEVNULL.
Signed-off-by: Justus Winter <justus@g10code.com>
2016-09-12 16:18:31 +02:00
Justus Winter
4c8265d32d
python: Add a flag identifying in-tree builds.
...
* lang/python/helpers.c (pyme_in_tree_build): New variable.
* lang/python/helpers.h (pyme_in_tree_build): New declaration.
* lang/python/pyme/version.py.in (in_tree_build): New variable.
* lang/python/setup.py.in: Rework macro handling, set 'IN_TREE_BUILD'
as appropriate.
Signed-off-by: Justus Winter <justus@g10code.com>
2016-08-02 18:45:10 +02:00
Justus Winter
2f754440f2
python: Rename compiled SWIG module.
...
Avoid the name pygpgme, as this is the name of another popular Python
binding for GPGME.
This commit renames the compiled Python module produced by SWIG.
* lang/python/Makefile.am: Rename the compiled Python module.
* lang/python/gpgme.i: Likewise.
* lang/python/pyme/core.py: Likewise.
* lang/python/pyme/errors.py: Likewise.
* lang/python/pyme/util.py: Likewise.
* lang/python/pyme/version.py.in: Likewise.
* lang/python/setup.py.in: Likewise.
Signed-off-by: Justus Winter <justus@g10code.com>
2016-07-28 16:49:50 +02:00
Justus Winter
b68700d227
python: Drop bad category.
...
--
Signed-off-by: Justus Winter <justus@g10code.com>
2016-07-14 13:34:49 +02:00
Justus Winter
57b5168552
python: Improve python packaging.
...
* lang/python/Makefile.am: Sign source releases, and upload them.
* lang/python/setup.py.in: Add categories.
Signed-off-by: Justus Winter <justus@g10code.com>
2016-07-12 18:34:12 +02:00
Justus Winter
007382ce94
python: Enable out-of-tree build of pyme bindings.
...
* lang/python/MANIFEST.in: Update manifest template.
* lang/python/Makefile.am: Copy more files, move generation of files
to Python build script, add 'sdist' target to build a Python source
distribution.
* lang/python/gpgme-h-clean.py: Add code to build 'errors.i'.
* lang/python/setup.py.in: Generate files, enable out-of-tree builds.
Signed-off-by: Justus Winter <justus@g10code.com>
2016-07-11 18:09:54 +02:00
Justus Winter
7eef399d89
python: Get version information from the build system.
...
* configure.ac: Generate 'setup.py' and 'version.py'.
* lang/python/Makefile.am: Use generated setup script.
* lang/python/pyme/version.py: Turn it into a template, and get
version information from the build system. Also drop some variables.
* lang/python/setup.py: Likewise. This way we can avoid importing the
version module, which is frowned upon and actually caused a problem.
Signed-off-by: Justus Winter <justus@g10code.com>
2016-06-16 14:07:41 +02:00