aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-02-26LaTeX headersben/python-docs-01Ben McGinnes2-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.
2018-02-19Renaming ad infinitum ...Ben McGinnes1-0/+0
* Dropped the .txt from the end of the file ...
2018-02-19Text conversionBen McGinnes1-0/+77
* Exported from Org Mode to UTF-8 text. * Removed my name from just under the title.
2018-02-19Title fixBen McGinnes1-1/+1
* Fixed title.
2018-02-19Conflict with Phabricator filesBen McGinnes1-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.
2018-02-19Schizophrenic file typesBen McGinnes1-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).
2018-02-16History pathBen McGinnes1-7/+10
* Fixed a typo in a filepath reference. * Moved conjecture regarding the first version of Python used to a footnote.
2018-02-15LaTeX marginsBen McGinnes2-0/+67
* Added LaTeX header for 1 inch margins in the quite likely event that all PDF output ultimately uses LaTeX.
2018-02-15TODO DocumentationBen McGinnes1-1/+2
* Checked off the decision to stick with Org Mode.
2018-02-15TODOBen McGinnes1-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).
2018-02-15tests: Makefile portability.NIIBE Yutaka1-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]>
2018-02-15build: More Makefile fix.NIIBE Yutaka1-6/+5
* lang/python/tests/Makefile.am: Avoid target with '/'. Signed-off-by: NIIBE Yutaka <[email protected]>
2018-02-14Short HistoryBen McGinnes1-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.
2018-02-14Subsectioned historyBen McGinnes1-0/+15
* Split the main parts down into subsections. * Still need to cull the incorrect stuff towards the end and add more recent changes.
2018-02-14HistoryBen McGinnes1-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).
2018-02-14TODOBen McGinnes1-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.
2018-02-14TODOBen McGinnes1-23/+0
* Removed reST version of file.
2018-02-14TODOBen McGinnes1-0/+22
* Converted document from reST to org-mode.
2018-02-14Short HistoryBen McGinnes1-57/+0
* Removed reST version.
2018-02-14Short HistoryBen McGinnes1-0/+56
* Converted document from reST to org-mode.
2017-12-08Spelling fixes for comments and docAndre Heinecke1-1/+1
-- Patch provided by ka7 in dev.gnupg.org Differential D423
2017-12-04python: Default whence argument for Data() to SEEK_SET.Tobias Mueller2-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]>
2017-11-21tests: Make portability fix.NIIBE Yutaka1-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]>
2017-08-21python: Support parallel build in testsAlon Bar-Lev1-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]>
2017-08-21python: Improve keylist test.Justus Winter1-0/+3
* lang/python/tests/t-keylist.py: Check a keylist matching no keys. Signed-off-by: Justus Winter <[email protected]>
2017-07-11python: Improve error handling.Justus Winter2-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]>
2017-06-01Add flag 'is_de_vs' to decryption results and signatures.Justus Winter1-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]>
2017-05-18python: Fix build in certain cases.Justus Winter1-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]>
2017-05-10python: Fix test environment creation.Justus Winter1-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]>
2017-05-10tests: Make sure to kill all previously running daemons.Justus Winter1-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]>
2017-05-10tests: Harmonize test suites.Justus Winter1-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]>
2017-04-11python: Skip TOFU test if not supported by GnuPG.Justus Winter2-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]>
2017-04-11python: use autoconf pre-processor when building via autoconfAlon Bar-Lev1-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]>
2017-04-11python: fix run-tests missing python_libdirAlon Bar-Lev1-1/+3
* lang/python/tests/run-tests.py: Set python_libdir if --python-libdir is set. Signed-off-by: Alon Bar-Lev <[email protected]>
2017-04-10python: Prune CLEANFILES.Justus Winter1-3/+1
-- Fixes-commit: e7d9c0c3d773f826dbd2ed417d04e25c410f3374 Signed-off-by: Justus Winter <[email protected]>
2017-04-10python: Fix distcheck.Justus Winter1-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]>
2017-04-10python: Support alternatate libdir for testsAlon Bar-Lev1-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]>
2017-04-10python: Read gpg-error.h using the pre-processorAlon Bar-Lev1-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]>
2017-04-10python: Remove unneeded stats copyAlon Bar-Lev1-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]>
2017-04-10python: Remove usage of PYTHON_VERSIONSAlon Bar-Lev2-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]>
2017-04-10python: support .pydistutils.cfg modeAlon Bar-Lev1-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]>
2017-04-07python: simplify build, some fixupsAlon Bar-Lev30-39/+23
* 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]>
2017-04-05python: Fix vpath builds, fix distcheck.Justus Winter4-75/+92
* lang/python/gpgme-h-clean.py: Delete file. * lang/python/MANIFEST.in: Adapt accordingly. * lang/python/Makefile.am (EXTRA_DIST): Likewise. (COPY_FILES_GPG): Bring variable back. (copystamp): Copy files. (clean-local): Delete copied files. (install-exec-local): Do not create and install list of installed files. (uninstall-local): Instead, create some explicit rules to uninstall the extension. * lang/python/setup.py.in: Parse arguments. Locate files either in the source directory, or in the build base directory. Inline the code from 'gpgme-h-clean.py'. Copy 'helpers.c', add source directory as include directory. Fixes-commit: 801d7d8c5dd530d26ad6c4bcc94d986e6e022da4 Signed-off-by: Justus Winter <[email protected]>
2017-04-05python: Generate files into build directoryAlon Bar-Lev3-64/+64
* lang/python/setup.py.in: Generate files within BuildExtFirstHack adjust build flags at this point instead of global. * lang/python/Makefile.am: Remove logic of separate source directory per python version in favor of build directory. * lang/python/tests/run-tests.py: Adjust build directory location. -- Generate files into build directory, leaving the source directory clean. Use the same source directory for multiple python version build. Result of 'prepare' target is a standard distutil layout that can be used easily by downstream to build all python targets in-place. Signed-off-by: Alon Bar-Lev <[email protected]>
2017-03-30python: Don't treat skipped tests as errorAndre Heinecke1-1/+1
* lang/python/tests/run-tests.py (failed): Don't count skipped tests for the return code.
2017-03-30python: Fix skipping tests if running with GnuPG < 2.1.12.Justus Winter14-8/+17
* final.py: Import 'support.py' for the side-effect of checking the GnuPG version. * t-data.py: Likewise. * t-protocol-assuan.py: Likewise. * t-wrapper.py: Likewise. * t-callbacks.py: Avoid warning about 'support' being unused. * t-edit.py: Likewise. * t-encrypt-sym.py: Likewise. * t-file-name.py: Likewise. * t-idiomatic.py: Likewise. * t-sig-notation.py: Likewise. * t-trustlist.py: Likewise. * t-verify.py: Likewise. * t-wait.py: Likewise. * t-keylist-from-data.py: Trim unused imports. GnuPG-bug-id: 3008 Fixes-commit: 348da58fe0c3656e6177c98fef6b4c4331326c8e Signed-off-by: Justus Winter <[email protected]>
2017-03-29python,build: Reinstate prepare target.Alon Bar-Lev2-14/+20
* lang/python/Makefile.am: Fix 'prepare' target. * lang/python/setup.py.in: Use 'abs_top_builddir' instead of guessing the path. -- 'prepare' will prepare target at PREPAREDIR. The automake integration will also make use of prepare target. Downstream distributors may also make use of prepare target. Signed-off-by: Alon Bar-Lev <[email protected]>
2017-03-27python: Skip tests if running with GnuPG < 2.1.12.Justus Winter1-1/+6
* lang/python/tests/support.py (assert_gpg_version): Fix error message. Skip all tests when we use GnuPG older than 2.1.12. GnuPG-bug-id: 3008 Signed-off-by: Justus Winter <[email protected]>
2017-03-21python: Wrap 'gpgme_op_keylist_from_data_start'.Justus Winter5-5/+242
* 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]>
2017-03-20python: Fix version check.Justus Winter1-1/+3
* lang/python/tests/support.py (assert_gpg_version): Cope with non-released versions. Fixes-commit: e1cf8bab319ba1dea41ba5d711dbb66ffd8e6fd6 Signed-off-by: Justus Winter <[email protected]>