aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* doc-howto: fundamental aspects of GPGME vs PythonBen McGinnes2018-03-081-1/+55
| | | | | | | | | * Added a section for those pythonistas who are too used to web programming. Stressed that it's not simply not RESTful, it's not even REST-like. * Letting me move on to drawing a very loose parallel between a session and a context. The differences should become obvious in the subsequent sections.
* doc: Added multiple TODOs for inclusion in the HOWTOBen McGinnes2018-03-081-1/+43
| | | | | | | | | | | | | | * Some instructions to include are fairly obvious; as with encryption, decryption and signature verification. * Some are a little less obvious. * This includes the requests received to specifically include subkey management (adding and revoking subkeys on a primary key that's being retained. * Added the UID equivalents to the list, as well as key selection matters (and may or may not include something for handling group lines since that involves wrapping a CLI binary). * Key control documentation and examples requested by Mike Ingle of confidantmail.org.
* GPL compatible license for documentationBen McGinnes2018-03-071-3/+9
| | | | | * Added the same, slightly modified GPL based license that is used in other parts of GnuPG.
* HOWTO updateBen McGinnes2018-03-071-5/+5
| | | | | | | | * removed one bit of whitespace. * Marked up references to gpgme.h. * Fixed one spelling error. * Removed py2.6 from python search order since even if it is supported, it shouldn't be encouraged.
* GPGME Python bindings HOWTOBen McGinnes2018-03-071-0/+221
| | | | | | | * Started work on the GPGME Python bindings HOWTO. * 1,050 words to begin with at approx. 7.5KB. * Got as far as installation. * Includes instruction not to use PyPI for this.
* TODO - HOWTOBen McGinnes2018-03-071-1/+2
| | | | | * Added suv-entry for the new HOWTO being started and, since it has been started, checked it off.
* TODOBen McGinnes2018-03-071-0/+6
| | | | * Slightly expanded the list.
* WS removalBen McGinnes2018-02-261-1/+1
| | | | * Whitespace removal.
* LaTeX headersben/python-docs-01Ben McGinnes2018-02-262-0/+8
| | | | | | | * Set LaTeX headers to enable ligatures and a 12pt font by default. * Paper size left for regional defaults. * Using XeLaTeX for easier font control. * Using default LaTeX font of Latin Main, but that's easy enough to change.
* Renaming ad infinitum ...Ben McGinnes2018-02-191-0/+0
| | | | * Dropped the .txt from the end of the file ...
* Text conversionBen McGinnes2018-02-191-0/+77
| | | | | * Exported from Org Mode to UTF-8 text. * Removed my name from just under the title.
* Title fixBen McGinnes2018-02-191-1/+1
| | | | * Fixed title.
* Conflict with Phabricator filesBen McGinnes2018-02-191-0/+0
| | | | | | | | | | | | | | | | | | | | | * The developers of Phabricator, the web front-end on dev.gnupg.org have not implemented renderers for Markdown, Org-Mode or any other common markdown like language. * They also refuse to do so. * Instead they re-invented the wheel and implemented their own version of Markdown-like thing which is incompatible with everything else. It is called Remarkup. * The developers of Phabricator and Remarkup have refused to provide conversion tools to move files to/from any format to/from Remarkup. * They expect everyone to learn their new favourite pet project. * Remarkup may or may not display Org Mode files, but if so then it is likely to only want to do so as plain text. * There is an unaffiliated and unofficial project to convert Github Markdown to Remarkup via Pandoc. This might be adapted for our use, but requires testing. * Until then exporting from Org Mode to UTF-8 text is likely the least worst plan. * Which means renaming this file to README.org first.
* Schizophrenic file typesBen McGinnes2018-02-191-2/+2
| | | | | | * Removed Markdown style heading underlining. * Removed in-line file type declaration (which is not correctly parsed by the web interface on dev.gnupg.org).
* History pathBen McGinnes2018-02-161-7/+10
| | | | | | * Fixed a typo in a filepath reference. * Moved conjecture regarding the first version of Python used to a footnote.
* Merge branch 'master' of /Users/ben/dev/hgit/mine/gnupg/gpgme/master into ↵Ben McGinnes2018-02-151-12/+9
|\ | | | | | | ben/python-docs-01
| * tests: Makefile portability.NIIBE Yutaka2018-02-151-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | * tests/gpg/Makefile.am: Don't use "export" directive. * tests/gpgsm/Makefile.am: Ditto. * lang/qt/tests/Makefile.am: Ditto. * lang/python/tests/Makefile.am: Ditto. -- GnuPG-bug-id: 3056 Signed-off-by: NIIBE Yutaka <[email protected]>
| * build: More Makefile fix.NIIBE Yutaka2018-02-151-6/+5
| | | | | | | | | | | | * lang/python/tests/Makefile.am: Avoid target with '/'. Signed-off-by: NIIBE Yutaka <[email protected]>
* | LaTeX marginsBen McGinnes2018-02-152-0/+67
| | | | | | | | | | * Added LaTeX header for 1 inch margins in the quite likely event that all PDF output ultimately uses LaTeX.
* | TODO DocumentationBen McGinnes2018-02-151-1/+2
| | | | | | | | * Checked off the decision to stick with Org Mode.
* | TODOBen McGinnes2018-02-151-7/+34
| | | | | | | | | | * Beginning to turn the first part of this into something kind of like an actual TODO list as Org Mode uses it (maybe).
* | Short HistoryBen McGinnes2018-02-141-20/+96
| | | | | | | | | | | | * Fixed or updated the most fundamental errors. * Also included some details on which modules are available on PyPI, as well as what happened to the PyME commit log.
* | Subsectioned historyBen McGinnes2018-02-141-0/+15
| | | | | | | | | | | | * Split the main parts down into subsections. * Still need to cull the incorrect stuff towards the end and add more recent changes.
* | HistoryBen McGinnes2018-02-141-52/+68
| | | | | | | | | | | | * Reshaping the history file to fit Org Mode's structuring for docs. * Also said history needs to be a bit more clear (it was kind of unfinished).
* | TODOBen McGinnes2018-02-141-20/+45
| | | | | | | | | | | | | | | | * Updated TODO. * The entirety of the old TODO has been replaced with either more relevant tasks or goals for the examples and a more measured approach to the docs and why, in this project, Org Mode trumps reST, even though it's Python through and through.
* | TODOBen McGinnes2018-02-141-23/+0
| | | | | | | | * Removed reST version of file.
* | TODOBen McGinnes2018-02-141-0/+22
| | | | | | | | * Converted document from reST to org-mode.
* | Short HistoryBen McGinnes2018-02-141-57/+0
| | | | | | | | * Removed reST version.
* | Short HistoryBen McGinnes2018-02-141-0/+56
|/ | | | * Converted document from reST to org-mode.
* Spelling fixes for comments and docAndre Heinecke2017-12-081-1/+1
| | | | | | | -- Patch provided by ka7 in dev.gnupg.org Differential D423
* python: Default whence argument for Data() to SEEK_SET.Tobias Mueller2017-12-042-0/+11
| | | | | | | | | | | | | | * lang/python/gpgme.i: copied signature from gpgme.h and defaulted the value to SEEK_SET. * lang/python/tests/t-data.py: Added a test for no second argument -- Having to import the os package when wanting to read a Data object is a slight annoyance. With SWIG, we can define default parameters. This change defaults the whence argument to SEEK_SET which is how StringIO and BytesIO behave. Signed-off-by: Tobias Mueller <[email protected]>
* tests: Make portability fix.NIIBE Yutaka2017-11-211-4/+4
| | | | | | | | | | | | | | * lang/python/tests/Makefile.am: Distinguish target and path. * tests/gpg/Makefile.am: Ditto. * tests/gpgsm/Makefile.am: Ditto. -- GNU Make is powerful enough to match path to target (and vice versa), but BSD make is not. GnuPG-bug-id: 3056 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Support parallel build in testsAlon Bar-Lev2017-08-211-1/+1
| | | | | | | * lang/python/tests/Makefile.am: Depend xcheck with all which was lost due to the check hack. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Improve keylist test.Justus Winter2017-08-211-0/+3
| | | | | | * lang/python/tests/t-keylist.py: Check a keylist matching no keys. Signed-off-by: Justus Winter <[email protected]>
* python: Improve error handling.Justus Winter2017-07-112-65/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Update. * lang/python/src/core.py (Context.__read__): New helper function. (Context.encrypt): Attach partial results to exceptions. (Context.decrypt): Likewise. (Context.sign): Likewise. (Context.verify): Likewise. * lang/python/src/errors.py (GpgError): Move the core of GPGMEError to this class, add a nicer interface for it. This makes the errors thrown by this library more uniform, and allows us to track the underlying error in synthesized high-level errors. (GPGMEError): Simplify. (...): Make sure to call the parent classes' constructor in all other classes. -- Attach partial results to errors. Some operations return results even though they signal an error. Of course this information must be taken with a grain of salt. But often, this information is useful for diagnostic uses or to give the user feedback. Since the normal control flow is disrupted by the exception, the callee can no longer return results, hence we attach them to the exception objects. GnuPG-bug-id: 3271 Signed-off-by: Justus Winter <[email protected]>
* Add flag 'is_de_vs' to decryption results and signatures.Justus Winter2017-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Update. * lang/cpp/src/decryptionresult.cpp (DecryptionResult::isDeVs): New function. * lang/cpp/src/decryptionresult.h (DecryptionResult::isDeVs): New prototype. * lang/cpp/src/verificationresult.cpp (Signature::isDeVs): New function. * lang/cpp/src/verificationresult.h (Signature::isDeVs): New prototype. * lang/python/src/results.py (DecryptResult): Turn field 'is_de_vs' into a boolean. (Signature): Likewise. * src/decrypt.c (_gpgme_decrypt_status_handler): Handle the new compliance status line. * src/verify.c (_gpgme_verify_status_handler): Likewise. * src/gpgme.h.in (gpgme_status_code_t): Add new status codes for the new status lines. * src/keylist.c (parse_pub_field18): Move function to 'util.h'. (keylist_colon_handler): Adapt callsites. * src/status-table.c (status_table): Add new status lines. * src/util.h (PARSE_COMPLIANCE_FLAGS): New macro. This used to be 'parse_pub_field18', but turned into a macro to make it polymorphic. -- When decrypting data and verifying signatures, report whether the operations are in compliance with the criteria for data classified as VS-NfD. This information can the be presented to the user. GnuPG-bug-id: 3059 Signed-off-by: Justus Winter <[email protected]>
* python: Fix build in certain cases.Justus Winter2017-05-181-1/+1
| | | | | | | | | | | * lang/python/setup.py.in: Prepend the Python build dir to the list of include directories so that it takes precedence over any other include directory. -- Fixes the build in case an older 'gpgme.h' is installed and is picked up by the compiler when compiling the Python module. Signed-off-by: Justus Winter <[email protected]>
* python: Fix test environment creation.Justus Winter2017-05-101-1/+0
| | | | | | | * lang/python/tests/Makefile.am (pubring-stamp): Do not depend on the configuration files, this can trigger superfluous rebuilds. Signed-off-by: Justus Winter <[email protected]>
* tests: Make sure to kill all previously running daemons.Justus Winter2017-05-101-0/+1
| | | | | | | | | | | | | | | | * lang/python/tests/Makefile.am: Kill all previously running daemons before creating the private key store. * lang/qt/tests/Makefile.am: Likewise. * tests/gpg/Makefile.am: Likewise. * tests/gpgsm/Makefile.am: Likewise. -- Now that the daemons sockets are no longer created in the GNUPGHOME, we cannot rely on cleaning the build directory to make sure they are shut down. Therefore, we explicitly kill any running daemons when creating the test environment. Signed-off-by: Justus Winter <[email protected]>
* tests: Harmonize test suites.Justus Winter2017-05-101-1/+4
| | | | | | | | | | | | * lang/python/tests/Makefile.am: Create test environment as part of 'make all'. * tests/gpg/Makefile.am: Make sure the private keystore is created first. * tests/gpgsm/Makefile.am: Create test environment as part of 'make all'. Make sure the private keystore is created first. Signed-off-by: Justus Winter <[email protected]>
* python: Skip TOFU test if not supported by GnuPG.Justus Winter2017-04-112-0/+11
| | | | | | | | * lang/python/tests/support.py (have_tofu_support): New function. * lang/python/tests/t-quick-key-manipulation.py: Skip TOFU test if not supported by GnuPG. Signed-off-by: Justus Winter <[email protected]>
* python: use autoconf pre-processor when building via autoconfAlon Bar-Lev2017-04-111-0/+4
| | | | | | | * configure.ac: Add AC_PROG_CPP. * lang/python/Makefile.am: Set CPP environment for setup.py to use. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: fix run-tests missing python_libdirAlon Bar-Lev2017-04-111-1/+3
| | | | | | | * lang/python/tests/run-tests.py: Set python_libdir if --python-libdir is set. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Prune CLEANFILES.Justus Winter2017-04-101-3/+1
| | | | | | -- Fixes-commit: e7d9c0c3d773f826dbd2ed417d04e25c410f3374 Signed-off-by: Justus Winter <[email protected]>
* python: Fix distcheck.Justus Winter2017-04-101-2/+2
| | | | | | | | | * lang/python/Makefile.am (uninstall-local): Explicitly request the scheme 'posix_prefix'. On Python2.7 the default scheme is 'posix_local', breaking distcheck. Fixes-commit: 25e6444b3f4601c7821beab06bc4520deacb007b Signed-off-by: Justus Winter <[email protected]>
* python: Support alternatate libdir for testsAlon Bar-Lev2017-04-101-10/+15
| | | | | | | | | | | | * lang/python/tests/run-tests.py: Add --python-libdir optional parameter. -- This will make the python tests usable for downstream that build python module outside of autotools build system. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Read gpg-error.h using the pre-processorAlon Bar-Lev2017-04-101-25/+35
| | | | | | | | | | | | | | | * lang/python/setup.py.in: Read gpg-error.h using the pre-processor. -- The libgpg-error may be installed in multilib configuration in which there is a wrapper header at /usr/include that includes the actual header at /usr/include/*. This causes invalid errors.i generation. Let the pre-processor extract the header content instead reading it explicitly. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Remove unneeded stats copyAlon Bar-Lev2017-04-101-6/+0
| | | | | | | * lang/python/setup.py.in: errors.i, gpgme.h are generated and always newer than the original. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Remove usage of PYTHON_VERSIONSAlon Bar-Lev2017-04-102-14/+13
| | | | | | | | | | | | | | | | | | | | | * configure.ac: Remove PYTHON_VERSIONS subst. * lang/python/Makefile.am: Use basename of python as builddir prefix. * lang/python/tests/run-tests.py: Likewise. -- Two variables needs be at sync PYTHONS and PYTHON_VERSIONS, these may go out of sync in some cases, for example in Gentoo where default python is 3.4 we get: PYTHON='/usr/bin/python2' PYTHONS='/usr/bin/python /usr/bin/python2' PYTHON_VERSIONS='2.7 3.4' We can use the basename of the python interpreter to achieve similar effect without having to sync indexes between these two variables. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: support .pydistutils.cfg modeAlon Bar-Lev2017-04-101-15/+10
| | | | | | | | | | | * lang/python/setup.py.in: Do not parse arguments. -- The distutils settings can come from either command-line or configuration file. Parsing parameters is not working in all cases. Signed-off-by: Alon Bar-Lev <[email protected]>