aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-02-03python: Remove Python bindingsIngo Klöcker139-29233/+0
* README: Update. * configure.ac: Remove checks, variables and file generations related to the Python bindings. Remove python from available_languages and default_languages. * lang/Makefile.am (DIST_SUBDIRS): Remove python. * lang/python: Remove. * m4/ax_pkg_swig.m4, m4/ax_python_devel.m4, m4/python.m4: Remove. -- The Python bindings have been moved to a separate Git repository: gpgmepy. GnuPG-bug-id: 7262
2024-12-04build,python: Fix uninstalling in distcheckIngo Klöcker1-1/+1
* lang/python/Makefile.am (uninstall-local): Get platlib path relative to data path. -- For unknown reasons (at least on my system) Python 3.1x's sysconfig returns a platlib (== directory for site-specific, platform-specific files) starting with /usr/local although the prefix config variable is /usr. This broke uninstallation because a wrong folder was (tried to) remove. Python 2.7 and 3.9 return a platlib starting with just /usr. In order to always get the correct relative path we use the data path instead of the prefix config variable as anchor directory.
2024-12-04build,python: Add Python 3.13 and remove Python 3.8Ingo Klöcker1-1/+1
* configure.ac: Look for Python 3.13. Don't look for Python 3.8 anymore. * lang/python/setup.py.in: Update Python versions in classifiers. * m4/python.m4: Add python3.13 as valid interpreter. Remove python3.8. --
2024-09-02build,python: Fix build with setuptools 72.2.0+Ingo Klöcker1-3/+3
* lang/python/setup.py.in (BuildExtFirstHack.run): Extend members of the extension instead of lists that were passed to the extension. -- setuptools 72.2.0 integrated changes in distutils which included "Support for Pathlike objects in data files and extensions". With this change the extensions now take a copy of the sources list passed to the constructor instead of keeping a reference to the passed list. Hence, modifying the sources list that was passed to the extension didn't change the sources list of the extension anymore. This is fixed by modifying the sources list of the extension directly. For consistency we do the same for the swig_opts list. GnuPG-bug-id: 7281
2024-05-29build,python: Fix make distcheck for Python 3.9+Ingo Klöcker1-2/+6
* lang/python/Makefile.am (uninstall-local): Remove installed .egg folders. -- Python 3.9+ install the module into a gpg-*.egg folder instead of in "gpg" with accompanying gpg-*.egg-info file. Moreover, Python 3.9+ normalize version numbers, e.g. the version 1.24.0_beta576 is normalized as 1.24.0b576.
2024-05-29build,python: Build Python bindings without distutilsBen Greiner4-10/+15
* m4/python.m4: Add python3.12 and 3.11 as valid interpreters, remove EOL 3.4, 3.5, 3.7 (keep 3.6 because some distributions still ship and maintain it). * lang/python/Makefile.am (clean-local): Remove dist and gpg.egg-info created by Python 3.9+ on make install. * lang/python/setup.py.in: switch from distutils to setuptools where possible, remove obsolete and deprecated -py3 option of swig, add classifiers up to 3.12, remove 3.4, 3.5, 3.7. * lang/python/doc/src/gpgme-python-howto.org: replace distutils with setuptools * lang/python/examples/howto/advanced/cython/setup.py: replace distutils with setuptools -- This fixes building the Python bindings for Python 3.12 where distutils has been removed. Based on D545
2023-10-13python,doc: Fix typos in documentation and source code commentsIngo Klöcker4-6/+6
-- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
2023-10-13python,examples: Add missing word "License"Marius P35-35/+35
* lang/python/examples/howto/add-userid.py, lang/python/examples/howto/clear-sign-file.py, lang/python/examples/howto/create-key.py, lang/python/examples/howto/decrypt-file.py, lang/python/examples/howto/detach-sign-file.py, lang/python/examples/howto/encrypt-file.py, lang/python/examples/howto/encrypt-sign-file.py, lang/python/examples/howto/encrypt-to-group-gullible.py, lang/python/examples/howto/encrypt-to-group-trustno1.py, lang/python/examples/howto/encrypt-to-group.py, lang/python/examples/howto/export-key.py, lang/python/examples/howto/export-minimised-key.py, lang/python/examples/howto/export-secret-key.py, lang/python/examples/howto/export-secret-keys.py, lang/python/examples/howto/groups.py, lang/python/examples/howto/import-key.py, lang/python/examples/howto/import-keybasekey.py, lang/python/examples/howto/import-keys-hkp.py, lang/python/examples/howto/import-keys.py, lang/python/examples/howto/import-mailvelope-keys.py, lang/python/examples/howto/keycount.py, lang/python/examples/howto/local-sign-group.py, lang/python/examples/howto/mutt-groups.py, lang/python/examples/howto/pmkey-import-alt.py, lang/python/examples/howto/pmkey-import-hkp-alt.py, lang/python/examples/howto/pmkey-import-hkp.py, lang/python/examples/howto/pmkey-import.py, lang/python/examples/howto/revoke-userid.py, lang/python/examples/howto/send-key-to-keyserver.py, lang/python/examples/howto/sign-file.py, lang/python/examples/howto/sign-key.py, lang/python/examples/howto/symcrypt-file.py, lang/python/examples/howto/temp-homedir-config.py, lang/python/examples/howto/verify-signatures.py, lang/python/examples/howto/verify-signed-file.py: Add "License" after "Lesser General Public" -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
2023-05-30cpp,python: Respect --disable-gpg-test for testsBiswapriyo Nath1-1/+7
lang/cpp/Makefile.am (SUBDIRS): Depend tests in RUN_GPG_TESTS. lang/python/Makefile.am (SUBDIRS): Ditto. -- This is similar to the core and qt switch to disable the tests. Signed-off-by: Biswapriyo Nath <[email protected]> ChangeLog entries added by wk.
2023-05-23python: Fix wrong use of write.Werner Koch2-10/+5
* lang/python/helpers.c (pyPassphraseCb): Use gpgme_io_writen. (_gpg_interact_cb): Ditto. * lang/python/helpers.h (write) [W32]: Remove bad write macro. -- GnuPG-bug-id: T6501 Using write(2) without checking for EINTR is a not a good idea. Futher gpgme_io_writen is the correct way to send data from a callback. This also fixed the wrong use of a simple macro for Windows.
2023-04-25doc: Fix Python example code.NIIBE Yutaka4-15/+24
* lang/python/doc/src/gpgme-python-howto.org: Fix chmod race. * lang/python/examples/howto/export-secret-key.py: Likewise. * lang/python/examples/howto/export-secret-keys.py: Likewise. * lang/python/examples/howto/temp-homedir-config.py: Likewise. -- It's not for Python 2.7. GnuPG-bug-id: 6466 Reported-by: Hanno Böck Co-authored-by: Ingo Klöcker Signed-off-by: NIIBE Yutaka <[email protected]>
2023-02-09tests: Stop daemons after setting up test environmentIngo Klöcker1-0/+1
* lang/python/tests/Makefile.am, lang/qt/tests/Makefile.am, tests/gpg/Makefile.am, tests/json/Makefile.am (pubring-stamp): Call `gpgconf --kill all` after importing test keys. -- This ensures that no gpg-agents or other daemons are running after "make".
2022-12-14doc:python: Replace gpgme-config to pkg-config.NIIBE Yutaka1-2/+2
-- Signed-off-by: NIIBE Yutaka <[email protected]>
2022-10-26python: Fix configure generating setup.py.NIIBE Yutaka1-11/+16
* lang/python/setup.py.in: Handle the case, when substitutions may be empty. -- Reported-by: Andreas Metzler Fixes-commit: ae9258fbf3b9d434495ef11fc184a91fe7c4ca57 GnuPG-bug-id: 6204 Signed-off-by: NIIBE Yutaka <[email protected]>
2022-09-15build:python: Don't use gpg-error-config/gpgme-config.NIIBE Yutaka1-29/+5
* lang/python/setup.py.in: Use @prefix@, @GPGME_CONFIG_LIBS@, @GPGME_CONFIG_CFLAGS@, and @GPG_ERROR_CFLAGS@ of configure. -- GnuPG-bug-id: 6204 Signed-off-by: NIIBE Yutaka <[email protected]>
2022-08-09python: Don't call __del__ from __exit__ method.NIIBE Yutaka2-2/+5
* lang/python/src/core.py (Context, Data): Don't call __del__ from __exit__ method, as the object may be still in use. * lang/python/tests/t-idiomatic.py: Fix the test. -- GnuPG-bug-id: 6060 Signed-off-by: NIIBE Yutaka <[email protected]>
2022-08-05python: Don't access gpgme with wrapped=None.NIIBE Yutaka1-0/+12
* lang/python/src/core.py (GpgmeWrapper, Context): Check self.wrapped is valid. -- GnuPG-bug-id: 6060 Signed-off-by: NIIBE Yutaka <[email protected]>
2022-08-05python: Reset passphrase callback correctly.Jasper Spaans1-8/+4
* lang/python/src/core.py (Context(GpgmeWrapper)): Reset passphrase callback correctly, for encrypt, decrypt, create_key, and create_subkey methods. -- Signed-off-by: Jasper Spaans <[email protected]>
2021-06-24python: Allow returning signatures made by unknown keys in `decrypt`Jasper Spaans1-3/+9
-- This functionality got dropped somewhere after 1.12, as part of the cleanup of the `Context.decrypt` call signature. Reintroduce it again, now using an explicit keyword argument `filter_signatures` (which defaults to hiding signatures by unknown keys). GnuPG-bug-id: 5292
2020-12-03python: Fix key_export*.NIIBE Yutaka1-3/+3
* lang/python/src/core.py (key_export): Just raise an error. (key_export_minimal, key_export_secret): Ditto. -- GnuPG-bug-id: 5149 Fixes-commit: 7faef33d13fa8efce152ca7aa6e9d39030c1cf08 Signed-off-by: NIIBE Yutaka <[email protected]>
2020-11-12python: Fix a test for newer GnuPG (>= 2.3).NIIBE Yutaka1-1/+2
* lang/python/tests/t-quick-subkey-creation.py: Specify RSA. -- Using GnuPG 2.3, a key with default (ed25519/cv25519) cannot have some combination of capabilities (e.g., "encr auth"). Signed-off-by: NIIBE Yutaka <[email protected]>
2020-10-27python: Handle the when case __doc__ is None.NIIBE Yutaka1-1/+6
* lang/python/src/core.py (GpgmeWrapper): Check if None. -- GnuPG-bug-id: 5075 Signed-off-by: NIIBE Yutaka <[email protected]>
2020-07-15core: Deprecate the non-working trustlist functions.Werner Koch2-47/+0
* src/gpgme.h.in: Clarify that the trustlist function should not be used. * src/engine.c (_gpgme_engine_op_trustlist): Always return an error. * src/engine-backend.h (struct engine_ops): Remove trustlist member. * src/engine-gpg.c (gpg_trustlist): Remove. (struct engine_ops): Remove that member. Also in all other engines. * tests/gpg/t-trustlist.c: Remove. * lang/python/tests/t-trustlist.py: Remove. -- This never worked in reality because the required feature has been removed from GnuPG version 1.3.2 soon after introduction of this feature in gpgme - 17 years ago. It was anyway marked as experimental. We keep the API and ABI, though. GnuPG-bug-id: 4834 Signed-off-by: Werner Koch <[email protected]>
2020-07-14python: Workaround for a regression in GnuPG 2.2.21Werner Koch2-2/+16
* lang/python/tests/support.py (is_gpg_version): New. * lang/python/tests/t-encrypt-sym.py: Add workaround. -- GnuPG-bug-id: 4991 Signed-off-by: Werner Koch <[email protected]>
2020-03-03python: fix minor typo in howtoBernhard Reiter1-1/+1
2020-02-14python: Also detect python 3.9.Werner Koch1-2/+2
-- Signed-off-by: Werner Koch <[email protected]>
2019-11-06python: Fix how to generate documentation.NIIBE Yutaka1-46/+35
* lang/python/doc/Makefile.am: Explicitly write rules to generate rst and texinfo files. Fixes-commit: 36428d8cf153a33faac6a951752cdc76e23f9737 Signed-off-by: NIIBE Yutaka <[email protected]>
2019-07-12python: doc: Remove generated files, put rules in Makefile.NIIBE Yutaka13-8017/+39
* lang/python/doc/Makefile.am (EXTRA_DIST): Remove files not distributed like files under meta. * Add rules to generate .rst and .texi files. * lang/python/doc/rst: Remove .rst files to be generated. * lang/python/doc/texinfo: Remove .texi files to be generated. GnuPG-bug-id: 4275 Signed-off-by: NIIBE Yutaka <[email protected]>
2019-07-12python: doc: Add suffix for org files.NIIBE Yutaka6-0/+0
Signed-off-by: NIIBE Yutaka <[email protected]>
2019-06-13python: Fix regression in t-decrypt-verify test.Werner Koch1-11/+11
* lang/python/tests/t-decrypt-verify.py: Comment recent changes. -- Fixes-commit: bd2d282e572b5d02669238c9e087259b85638477 GnuPG-bug-id: 4276
2019-06-13python: Set a default-key into gpg.conf for the tests.Werner Koch1-2/+1
* lang/python/tests/Makefile.am (gpg.conf): Set a default key. -- It seems we need to set a default key because at least t-sign.py does not specify the key to use and we do not want to rely on the order of keys in the keyring. Also Fixes-commit: f3ca2c9ce9fd4a03e293065f10b92589a7e642d6 gpg 2.0 is end-of-life and we don't need these extra options anymore. In fact they for the use of some gpg version and don't use the version gpgconf knows about. This also aligns the python tests to what we use for the C test suite. Signed-off-by: Werner Koch <[email protected]>
2019-06-04python: Fix typo in DecryptionError exception.NIIBE Yutaka1-3/+3
* lang/python/src/errors.py (DecryptionError): Rename from DeryptionError. (UnsupportedAlgorithm): Use DecryptionError. -- GnuPG-bug-id: 4478 Reported-by: Jan Girlich Signed-off-by: NIIBE Yutaka <[email protected]>
2019-05-06python: Make EXTRA_DIST files explicitAndre Heinecke4-5/+171
* configure.ac: Configure new Makefiles. * lang/python/Makefile.am: Remove dirs from extra dist and use subdirs. * lang/python/examples/Makefile.am, lang/python/src/Makefile.am, lang/python/doc/Makefile.am: New. Files that list EXTRA_DIST files. -- This is similar to what lang/js does by explicitly listing the files. This ensures that we have clean distribution tarballs without accidentall additions that just lay in the directory. GnuPG-Bug-Id: T4481
2019-05-06Python, doc: Minor style improvementAndre Heinecke1-8/+9
* lang/python/src/core.py (Context): Retab and shorten max line length.
2019-05-03python: stop raising BadSignatures from decrypt(verify=True)dkg/fix-T4276Daniel Kahn Gillmor2-13/+10
* src/core.py (decrypt): filter out signatures with errors from the returned verify_result, but avoid raising BadSignatures * tests/t-decrypt-verify.py: ensure that only a single signature is returned when evaluating cipher-3.asc, since the other signature is unknown. -- This change preserves the invariant that decrypt() only ever returns valid signatures in the verify_result, but it avoids unnecessary errors in the face of the presence of an additional bad signature. GnuPG-bug-id: 4276 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2019-05-03python/tests: try to decrypt and verify new test dataDaniel Kahn Gillmor2-0/+21
* lang/python/tests/t-decrypt.py: test decryption of cipher-3.asc and cipher-no-sig.asc * lang/python/tests/t-decrypt-verify.py: test decryption and verification of cipher-3.asc and cipher-no-sig.asc -- note that this introduces a failed test -- decrypt-verify.py misbehaves on cipher-3.asc by throwing a BadSignature even though GnuPG-bug-id: 4276 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2019-05-03python: make it easier to run a limited number of testsDaniel Kahn Gillmor1-1/+1
* lang/python/tests/Makefile.am: prefer py_tests from the environment if present. -- I'm trying to make it nicer/quicker to hack on the testsuite for python bindings. With this change, if you're improving the python bindings test suite, you can selectively run only a few specific tests like so: lang/python$ make check py_tests='t-decrypt.py t-decrypt-verify.py' Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2019-03-26Release GPGME 1.13.0gpgme-1.13.0Werner Koch1-1/+1
* configure.ac: Bump LT versions. For C to C33/A22/R0. For C++ to C15/A9/R0. For Qt to C10/A3/R3. Signed-off-by: Werner Koch <[email protected]>
2019-02-10python: examplesBen McGinnes1-0/+131
* A rather obvious variant of the existing key import examples, except directed at Mailvelope's keyserver. * Yeah, Werner, I know ... but it exists because I used it and there's no harm in sharing. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2019-01-30python: docsBen McGinnes3-6/+6
* Version bump in preparation for whenever GPGME 1.13.0 happens. * Ran the post_installer.py for docs preparation again. Signed-off-by: Ben McGinnes <[email protected]>
2019-01-27python: post installer scriptBen McGinnes1-0/+4
* Removed auto-generated .texi files from doc/src/ so only the corrected versions are left. * Which means now it is complete, but with the initial work to expand it with info file generation later.
2019-01-27python: post installer docs fix scriptBen McGinnes10-15/+53
* Moved post_installer.py into the examples/howto/ directory. * Added instructions for its use to the Python Bindings HOWTO. * Ran it as intended from the lang/python/ directory in order to both prove it works and quickly and easily get the updated howto replicated. Also to fix all those .texi files. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2019-01-02python: post installer doc fix scriptBen McGinnes1-20/+9
* Got rid of the bash bit in the comments. * Made the final printed instructions far more obvious. Signed-off-by: Ben McGinnes <[email protected]>
2019-01-02python: examplesBen McGinnes4-6/+3
* Fixed inter-edit.py so it will actually work now. * made 3 others executable. * Fixed the semantics of assuan.py's instructions. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-12-26python: examplesBen McGinnes4-6/+3
* Fixed inter-edit.py so it will actually work now. * made 3 others executable. * Fixed the semantics of assuan.py's instructions. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-12-24python: docs processingBen McGinnes2-6/+175
* Added some EPUB specific config options to the Sphinx config file which might help reduce some of Sphinx's more stupid default errors with EPUB validation. * Added lang/python/post_installer.py script for automating the generation of .texi and .rst "source" files from the real source files written in Org mode. Includes recreating the Sphinx Makefile which is excluded due to the m4 toolchain in parent directories, it also handles the rewriting of the reST index file properly and rewrites the .texi files so they don't impale themselves on Unicode. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-12-21python: docsBen McGinnes8-51/+193
* Found a bug in org-mode's export to texinfo function which will require either manual modification of each file or a customs sed run over the generated files for all updates. * Manually updated the current files for now, but will need to add some post-install processing scripts for future use (I already have some of these for my specific setup, they just need to be made a little more generic and platform independent for here). Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-12-21python: groups exampleBen McGinnes2-10/+10
* Tightened code a little more. Signed-off-by: Ben McGinnes <[email protected]>
2018-12-17python docs: house keepingBen McGinnes1-14/+27
* Dropped the ASCII copyright line, since even MS have conceded their battle against Unicode enough to load UTF-8. * Fixed the drafts section since there will be less need of multiple output format testing from next year.
2018-12-16python: howto and examplesBen McGinnes4-59/+61
* Tightening up both the documentation and some of the example code. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>