aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/setup.py.in (follow)
Commit message (Collapse)AuthorAgeFilesLines
* python: Remove Python bindingsIngo Klöcker2025-02-031-299/+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
* build,python: Add Python 3.13 and remove Python 3.8Ingo Klöcker2024-12-041-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. --
* build,python: Fix build with setuptools 72.2.0+Ingo Klöcker2024-09-021-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
* build,python: Build Python bindings without distutilsBen Greiner2024-05-291-7/+12
| | | | | | | | | | | | | | | | | | | | | * 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
* python: Fix configure generating setup.py.NIIBE Yutaka2022-10-261-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]>
* build:python: Don't use gpg-error-config/gpgme-config.NIIBE Yutaka2022-09-151-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]>
* python: documentationBen McGinnes2018-11-301-43/+65
| | | | | | | | | | | * Added long description to setup.py.in. * Added maintenance mode details with clarification for what type of things would be a bug as far as MM is concerned and what wouldn't be. ** Includes a not too subtle hint directed towards the donations page. * Miscellaneous tightening of documentation. Signed-off-by: Ben McGinnes <[email protected]>
* doc: convert more http:// links to https://Daniel Kahn Gillmor2018-10-181-1/+1
| | | | | | -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Python bindings setup fileBen McGinnes2018-08-181-2/+11
| | | | | | * Moved the build import back up where it belongs. * Included comments indicating how to build and install for multiple Python versions beyond the first 2 on the same system.
* Python bindings setup: Near PEP8 complianceBen McGinnes2018-08-181-83/+110
| | | | | | * lang/python/version.py.in: Fixed most things, but there's still an issue near the build portion with the existing Python bugs referenced. * lang/python/setup.py.in: Now PEP8 compliant.
* python bindings: python 3.7Ben McGinnes2018-06-291-0/+1
| | | | | | | | * Bindings confirmed to work with the newly released 3.7.0. * Updated M4 file to reflect this change and correct the Python binary search order (3.7 is not yet given priority, but will still be found first via the more generic python3 executable). * Updated setup.py.in, bindings documentation and README to reflect this.
* python: Fix crash by leaving struct members intactTobias Mueller2018-04-171-18/+1
| | | | | | | | | | | | | | | | | | | | | * lang/python/setup.py.in: Copy gpgme.h instead of parsing it. -- The python bindings tried to parse deprecated functions out of gpgme.h. This fails for the current gpgme.h in that it removes an entire field in the key sig struct (_obsolete_class). Hence, the fields were off by an int and the bindings accessed struct members via the wrong offset. That caused python program to crash. At least on 32bit platforms, the crash can be easily triggered by accessing key.uids[0].signatures. On 64bit platforms the compiler probably aligns the struct so that the missing 4 bytes are not noticed. With this change, the python bindings will expose all functions that gpgme exposes, including the deprecated ones. Credits go to Justus Winter for debugging and identying the issue. Signed-off-by: Tobias Mueller <[email protected]> GnuPG-bug-id: 3892
* 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]>