aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/gpg/core.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* python: simplify build, some fixupsAlon Bar-Lev2017-04-071-1490/+0
| | | | | | | | | | | | | | | | | | | | | * lang/python/gpg/version.py.in: Rename to lang/python/version.py.in. configure.ac: Generate version.py.in in lang/python. * lang/python/MANIFEST.in: Include version.py explicitly. * lang/python/gpg: Rename to 'src'. * lang/python/Makefile.am: Do not copy source files, do not use absolute directories, support lib64 in uninstall, clean also dist directory, use symlink for gpg src. * lang/python/setup.py.in: Use builddir, copy sources into builddir, copy version.py into module. -- Simplify build to symlink the gpg sources into builddir instead of copying. This requires handling of version.py as generated file. In addition apply some cleanups: Drop the absolution pathes, clean the dist directory as well, support lib64 for sitelib at uninstall. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Wrap 'gpgme_op_keylist_from_data_start'.Justus Winter2017-03-211-3/+20
| | | | | | | | | | | | | | * NEWS: Update. * lang/python/gpg/core.py (Context.keylist): New keyword argument 'source'. If given, list keys from 'source'. * lang/python/gpgme.i: Wrap the argument to 'gpgme_op_keylist_from_data_start'. * lang/python/tests/Makefile.am (py_tests): Add new test. * lang/python/tests/support.py (EphemeralContext): Do not throw an error if no agent has been started in the context. * lang/python/tests/t-keylist-from-data.py: New file. Signed-off-by: Justus Winter <[email protected]>
* python: Support manipulating the TOFU policy.Justus Winter2017-02-171-0/+12
| | | | | | | | | | | | | | * NEWS: Update. * doc/gpgme.texi: Fix typos. * lang/python/gpg/constants/__init__.py: Import new files. * lang/python/gpg/constants/tofu/__init__.py: New file. * lang/python/gpg/constants/tofu/policy.py: New file. * lang/python/gpg/core.py (Context.key_tofu_policy): New function. * lang/python/gpgme.i: Nice reprs for gpgme_tofu_info_t. * lang/python/setup.py.in: Install new package. * lang/python/tests/t-quick-key-manipulation.py: Extend test. Signed-off-by: Justus Winter <[email protected]>
* python: Support quick key signing.Justus Winter2017-02-171-0/+41
| | | | | | | | | | | | | * NEWS: Update. * doc/gpgme.texi (gpgme_op_keysign): Fix the description of the 'expire' argument. * lang/python/gpg/constants/__init__.py: Import new file. * lang/python/gpg/constants/keysign.py: New file. * lang/python/gpg/core.py (Context.key_sign): New function. * lang/python/tests/Makefile.am (py_tests): Add new test. * lang/python/tests/t-quick-key-signing.py: New test. Signed-off-by: Justus Winter <[email protected]>
* python: Fix using strings as commands in the assuan protocol.Justus Winter2017-02-171-1/+1
| | | | | | | | | * lang/python/gpg/core.py (Context.assuan_transact): Fix testing whether the command is a string on Python2. * lang/python/tests/t-protocol-assuan.py: Improve the test to detect this problem. Signed-off-by: Justus Winter <[email protected]>
* python: Support adding and revoking UIDs.Justus Winter2017-02-161-0/+24
| | | | | | | | | | * NEWS: Update. * lang/python/gpg/core.py (Context.key_add_uid): New function. (Context.key_revoke_uid): Likewise. * lang/python/tests/Makefile.am (XTESTS): Add new test. * lang/python/tests/t-quick-key-manipulation.py: New file. Signed-off-by: Justus Winter <[email protected]>
* python: Support quick subkey creation.Justus Winter2017-02-161-0/+72
| | | | | | | | | * NEWS: Update. * lang/python/gpg/core.py (Context.create_subkey): New function. * lang/python/tests/Makefile.am (XTESTS): Add new test. * lang/python/tests/t-quick-subkey-creation.py: New file. Signed-off-by: Justus Winter <[email protected]>
* python: Support quick key creation.Justus Winter2017-02-161-1/+79
| | | | | | | | | | | | * NEWS: Update. * lang/python/gpg/constants/__init__.py: Import new file. * lang/python/gpg/constants/create.py: New file. * lang/python/gpg/core.py (Context.create_key): New function. * lang/python/tests/Makefile.am (XTESTS): Add new test. * lang/python/tests/support.py (TemporaryDirectory): New class. * lang/python/tests/t-quick-key-creation.py: New file. Signed-off-by: Justus Winter <[email protected]>
* python: Update lists of functions returning gpgme_error_t.Justus Winter2017-02-151-6/+18
| | | | | | | | | * lang/python/gpg/core.py (Context._errorcheck): Add instructions how to update the list. Update list. (Data._errorcheck): Likewise. (Context.set_engine_info): Simplify. Signed-off-by: Justus Winter <[email protected]>
* python: Wrap utility functions.Justus Winter2017-02-141-0/+49
| | | | | | | | | | | | | | * NEWS: Update. * lang/python/gpg/core.py (pubkey_algo_string): New function. (pubkey_algo_name): Add docstring. (hash_algo_name): Likewise. (get_protocol_name): Likewise. (addrspec_from_uid): New function. * lang/python/gpgme.i (gpgme_pubkey_algo_string): Result must be freed. (gpgme_addrspec_from_uid): Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Add keylist mode parameter.Justus Winter2017-02-141-2/+5
| | | | | | | * NEWS: Update. * lang/python/gpg/core.py (Context.keylist): Add 'mode' parameter. Signed-off-by: Justus Winter <[email protected]>
* python: Add convenience functions for the home directory.Justus Winter2017-02-141-2/+12
| | | | | | | | | * NEWS: Update. * lang/python/gpg/core.py (Context.__init__): Add 'home_dir' argument. (__repr__): Include 'home_dir'. (Context.home_dir): New property. Signed-off-by: Justus Winter <[email protected]>
* python: Make Context have a repr method.Tobias Mueller2016-12-011-0/+8
| | | | | | | | | * lang/python/gpg/core.py (Context.__repr__): New function. -- This makes Context objects look nicer in a REPL. Signed-off-by: Tobias Mueller <[email protected]>
* python: Rename Python module from PyME to gpg.Daniel Kahn Gillmor2016-10-311-0/+1164
This follows weeks of discussion on the gnupg-devel mailing list. Hopefully it will make it easier for people using Python to use GnuPG in the future. Signed-off-by: Daniel Kahn Gillmor <[email protected]>