aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/setup.py.in (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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: 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: 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]>
* python: simplify build, some fixupsAlon Bar-Lev2017-04-071-13/+10
| | | | | | | | | | | | | | | | | | | | | * 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: Fix vpath builds, fix distcheck.Justus Winter2017-04-051-13/+68
| | | | | | | | | | | | | | | | | | | | * 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]>
* python: Generate files into build directoryAlon Bar-Lev2017-04-051-11/+37
| | | | | | | | | | | | | | | | * 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]>
* python,build: Reinstate prepare target.Alon Bar-Lev2017-03-291-4/+5
| | | | | | | | | | | | | * 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]>
* python: Support manipulating the TOFU policy.Justus Winter2017-02-171-1/+2
| | | | | | | | | | | | | | * 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: Fix build system integration.Justus Winter2017-02-151-4/+4
| | | | | | | | | | | | | * lang/python/Makefile.am (copystamp): Also copy the setup script, and link the header files. (all-local): Use local setup script. (sdist): Fix Python source distribution creation. (CLEANFILES): Remove now obsolete files. (install-exec-local): Use local setup script. * lang/python/setup.py.in: Adjust relative paths to in-tree files. Fixes-commit: fe65a26ab584bd70fad45c7c4d44330e30a748a4 Signed-off-by: Justus Winter <[email protected]>
* python: Remove the -builtin flag for SWIG.Tobias Mueller2017-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/setup.py.in: Call SWIG without the builtin flag. -- The SWIG documentation <http://www.swig.org/Doc2.0/Python.html#Python_nn28> leaves the impression that -builtin is solely for increasing performance: New in SWIG version 2.0.4: The use of Python proxy classes has performance implications that may be unacceptable for a high- performance library. The new -builtin option instructs SWIG to forego the use of proxy classes, and instead create wrapped types as new built-in Python types. When this option is used, the following section ("Proxy classes") does not apply. Details on the use of the -builtin option are in the Built-in Types section. While not wasting CPU cycles is good, it also prevents Python code being written in the wrapper itself. That, however, may be useful to make it easier to extend the wrapper. Partially reverts: 856bcfe2934237011984fab0bc69800a7c25c34b Signed-off-by: Tobias Mueller <[email protected]>
* python: Conditionally provide py3 argument to SWIGTobias Mueller2017-02-141-2/+3
| | | | | | | | | | | | | | | * lang/python/setup.py.in: Only call with -py3 when we run under python3 or higher. -- If we ever remove the -builtin flag and leave the the -py3 flag, SWIG will generate Python code which will be incompatible with Python 2, because the py3 flag generates python3 code which is incompatible with python2. So we conditionally generate SWIG bindings with -py3. Signed-off-by: Tobias Mueller <[email protected]>
* python: Require at least GPGME 1.7 for out-of-tree builds.Justus Winter2016-11-091-2/+2
| | | | | | * lang/python/setup.py.in: Bump required version to 1.7. Signed-off-by: Justus Winter <[email protected]>
* python: Rename Python module from PyME to gpg.Daniel Kahn Gillmor2016-10-311-7/+7
| | | | | | | | 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]>
* python: Link 'data.h' and 'config.h' into the builddir.Alon Bar-Lev2016-09-301-4/+0
| | | | | | | | | | | | | * lang/python/Makefile.am: Link to the files. * lang/python/gpgme.i: Update path. * lang/python/setup.py.in: Do not add the top builddir to the include path. -- To make it easy to build the subpackage using standard tools without altering environment or CFLAGS, symlink the required artifacts from source tree into subpackage directory when preparing sources. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Include 'config.h'.Justus Winter2016-09-261-1/+6
| | | | | | | | | | | | * lang/python/Makefile.am: Pass 'top_builddir' to 'setup.py'. * lang/python/gpgme.i: Include 'config.h'. * lang/python/helpers.c: Likewise. * lang/python/helpers.h: Likewise. * lang/python/setup.py.in: Make sure that 'config.h' can be found. -- Fixes build on 32 bit platforms with large file support. Signed-off-by: Justus Winter <[email protected]>
* python: Improve metadata and READMEs.Justus Winter2016-09-191-0/+1
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* python: Release the GIL during calls into GPGME.Justus Winter2016-09-161-7/+8
| | | | | | | | | | | | | | | * 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 <[email protected]> Signed-off-by: Justus Winter <[email protected]>
* python: Clarify that we support Python 2.7 too.Justus Winter2016-09-141-1/+1
| | | | | | | | * 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 <[email protected]>
* python: Use more generic shebang.Justus Winter2016-09-141-1/+1
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* python: Avoid hardcoding the interpreter.Justus Winter2016-09-121-2/+2
| | | | | | * lang/python/setup.py.in: Avoid hardcoding the interpreter. Signed-off-by: Justus Winter <[email protected]>
* python: Do not rely on subprocess.DEVNULL.Justus Winter2016-09-121-2/+7
| | | | | | * lang/python/setup.py.in: Do not rely on subprocess.DEVNULL. Signed-off-by: Justus Winter <[email protected]>
* python: Add a flag identifying in-tree builds.Justus Winter2016-08-021-1/+11
| | | | | | | | | | * 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 <[email protected]>
* python: Rename compiled SWIG module.Justus Winter2016-07-281-1/+1
| | | | | | | | | | | | | | | | | 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 <[email protected]>
* python: Drop bad category.Justus Winter2016-07-141-1/+0
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* python: Improve python packaging.Justus Winter2016-07-121-1/+18
| | | | | | | * lang/python/Makefile.am: Sign source releases, and upload them. * lang/python/setup.py.in: Add categories. Signed-off-by: Justus Winter <[email protected]>
* python: Enable out-of-tree build of pyme bindings.Justus Winter2016-07-111-5/+76
| | | | | | | | | | | * 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 <[email protected]>
* python: Get version information from the build system.Justus Winter2016-06-161-0/+86
* 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 <[email protected]>