build,python: Separate Python bindings from gpgme
* configure.ac: Remove "python" from available_languages and from
default_languages.
Remove checks for SWIG and available Python versions.
Remove substitution of PYTHONS.
Remove generation of files in lang/python.
* lang/Makefile.am (DIST_SUBDIRS): Remove python.
* lang/python/.gitignore, lang/python/AUTHORS, lang/python/COPYING,
lang/python/COPYING.LESSER, lang/python/ChangeLog, lang/python/INSTALL,
lang/python/NEWS, lang/python/autogen.rc, lang/python/autogen.sh,
lang/python/configure.ac: New.
* lang/python/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc.
copystamp: Remove symbolic linking of gpgme's internal data.h header
and of gpgme's config.h file.
CLEANFILES: Remove cleaning of config.h and data.h.
(RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook,
.PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release,
sign-release): New (copied from top-level Makefile.am).
* lang/python/build-aux/compile, lang/python/build-aux/config.guess,
lang/python/build-aux/config.sub, lang/python/build-aux/depcomp,
lang/python/build-aux/install-sh,
lang/python/build-aux/libtool-patch.sed,
lang/python/build-aux/ltmain.sh, lang/python/build-aux/missing: New.
* m4/ax_pkg_swig.m4: Move to...
* lang/python/m4/ax_pkg_swig.m4: ...here.
* m4/ax_python_devel.m4: Move to...
* lang/python/m4/ax_python_devel.m4: ...here.
* m4/python.m4: Move to...
* lang/python/m4/python.m4: ...here.
* lang/python/m4/gpg-error.m4, lang/python/m4/gpgme.m4,
lang/python/m4/libassuan.m4, lang/python/m4/libtool.m4,
lang/python/m4/ltoptions.m4, lang/python/m4/ltsugar.m4,
lang/python/m4/ltversion.m4, lang/python/m4/lt~obsolete.m4: New.
* lang/python/setup.py.in: Remove code for in-tree builds. Initialize
libs from @GPGME_LIBS@ instead of @GPGME_CONFIG_LIBS@. Initialize
include_dirs and define_macros from @GPGME_CFLAGS@ instead of
@GPGME_CONFIG_CFLAGS@. Look for gpgme.h in @prefix@/include and in
include_dirs and '/usr/include'.
* lang/python/tests/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F,
lang/python/tests/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD,
lang/python/tests/76F7E2B35832976B50A27A282D9B87E44577EB66,
lang/python/tests/7A030357C0F253A5BBCD282FFC4E521B37558F5C,
lang/python/tests/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD: New.
* lang/python/tests/Makefile.am (test_srcdir): Remove.
(TESTS_ENVIRONMENT): Remove adding .libs directory with gpgme library
to LD_LIBRARYPATH.
(private_keys): Use local copies instead of files from gpgme's
tests.
(EXTRA_DIST): Add new files.
(clean-local): Call local copy of start-stop-agent script.
(gpg-sample.stamp): Use local copies of private keys.
(pubring-stamp): Use local copies of pubdemo.asc and secdemo.asc.
(gpg-agent.conf): Use local copy of pinentry helper.
* lang/python/tests/cipher-1.asc, lang/python/tests/cipher-2.asc,
lang/python/tests/cipher-3.asc, lang/python/tests/cipher-no-sig.asc,
lang/python/tests/pinentry, lang/python/tests/pubdemo.asc,
lang/python/tests/pubkey-1.asc, lang/python/tests/secdemo.asc,
lang/python/tests/seckey-1.asc, lang/python/tests/start-stop-agent:
New.
* lang/python/tests/support.py (make_filename): Adapt to changed
path of test files.
--
This makes building and distributing the Python bindings independent of
the sources of gpgme. Many of the new files are copied from gpgme to
make the Python bindings a self-contained package. A later commit
re-adds the possibility to build the Python bindings as nested package
together with gpgme.
GnuPG-bug-id: 7110
2024-05-29 12:24:30 +00:00
|
|
|
# Makefile.am for the Python bindings of GPGME.
|
2016-05-11 09:42:00 +00:00
|
|
|
# Copyright (C) 2016 g10 Code GmbH
|
|
|
|
#
|
|
|
|
# This file is part of GPGME.
|
|
|
|
#
|
|
|
|
# GPGME is free software; you can redistribute it and/or modify it
|
2016-06-14 14:54:26 +00:00
|
|
|
# under the terms of the GNU Lesser General Public License as
|
|
|
|
# published by the Free Software Foundation; either version 2.1 of the
|
|
|
|
# License, or (at your option) any later version.
|
2016-05-11 09:42:00 +00:00
|
|
|
#
|
|
|
|
# GPGME is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
|
|
|
# Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
2018-11-16 12:27:33 +00:00
|
|
|
# License along with this program; if not, see <https://gnu.org/licenses/>.
|
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2016-05-11 09:42:00 +00:00
|
|
|
|
build,python: Separate Python bindings from gpgme
* configure.ac: Remove "python" from available_languages and from
default_languages.
Remove checks for SWIG and available Python versions.
Remove substitution of PYTHONS.
Remove generation of files in lang/python.
* lang/Makefile.am (DIST_SUBDIRS): Remove python.
* lang/python/.gitignore, lang/python/AUTHORS, lang/python/COPYING,
lang/python/COPYING.LESSER, lang/python/ChangeLog, lang/python/INSTALL,
lang/python/NEWS, lang/python/autogen.rc, lang/python/autogen.sh,
lang/python/configure.ac: New.
* lang/python/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc.
copystamp: Remove symbolic linking of gpgme's internal data.h header
and of gpgme's config.h file.
CLEANFILES: Remove cleaning of config.h and data.h.
(RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook,
.PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release,
sign-release): New (copied from top-level Makefile.am).
* lang/python/build-aux/compile, lang/python/build-aux/config.guess,
lang/python/build-aux/config.sub, lang/python/build-aux/depcomp,
lang/python/build-aux/install-sh,
lang/python/build-aux/libtool-patch.sed,
lang/python/build-aux/ltmain.sh, lang/python/build-aux/missing: New.
* m4/ax_pkg_swig.m4: Move to...
* lang/python/m4/ax_pkg_swig.m4: ...here.
* m4/ax_python_devel.m4: Move to...
* lang/python/m4/ax_python_devel.m4: ...here.
* m4/python.m4: Move to...
* lang/python/m4/python.m4: ...here.
* lang/python/m4/gpg-error.m4, lang/python/m4/gpgme.m4,
lang/python/m4/libassuan.m4, lang/python/m4/libtool.m4,
lang/python/m4/ltoptions.m4, lang/python/m4/ltsugar.m4,
lang/python/m4/ltversion.m4, lang/python/m4/lt~obsolete.m4: New.
* lang/python/setup.py.in: Remove code for in-tree builds. Initialize
libs from @GPGME_LIBS@ instead of @GPGME_CONFIG_LIBS@. Initialize
include_dirs and define_macros from @GPGME_CFLAGS@ instead of
@GPGME_CONFIG_CFLAGS@. Look for gpgme.h in @prefix@/include and in
include_dirs and '/usr/include'.
* lang/python/tests/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F,
lang/python/tests/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD,
lang/python/tests/76F7E2B35832976B50A27A282D9B87E44577EB66,
lang/python/tests/7A030357C0F253A5BBCD282FFC4E521B37558F5C,
lang/python/tests/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD: New.
* lang/python/tests/Makefile.am (test_srcdir): Remove.
(TESTS_ENVIRONMENT): Remove adding .libs directory with gpgme library
to LD_LIBRARYPATH.
(private_keys): Use local copies instead of files from gpgme's
tests.
(EXTRA_DIST): Add new files.
(clean-local): Call local copy of start-stop-agent script.
(gpg-sample.stamp): Use local copies of private keys.
(pubring-stamp): Use local copies of pubdemo.asc and secdemo.asc.
(gpg-agent.conf): Use local copy of pinentry helper.
* lang/python/tests/cipher-1.asc, lang/python/tests/cipher-2.asc,
lang/python/tests/cipher-3.asc, lang/python/tests/cipher-no-sig.asc,
lang/python/tests/pinentry, lang/python/tests/pubdemo.asc,
lang/python/tests/pubkey-1.asc, lang/python/tests/secdemo.asc,
lang/python/tests/seckey-1.asc, lang/python/tests/start-stop-agent:
New.
* lang/python/tests/support.py (make_filename): Adapt to changed
path of test files.
--
This makes building and distributing the Python bindings independent of
the sources of gpgme. Many of the new files are copied from gpgme to
make the Python bindings a self-contained package. A later commit
re-adds the possibility to build the Python bindings as nested package
together with gpgme.
GnuPG-bug-id: 7110
2024-05-29 12:24:30 +00:00
|
|
|
## Process this file with automake to produce Makefile.in
|
|
|
|
|
|
|
|
# Location of the released tarball archives. This is prefixed by
|
|
|
|
# the variable RELEASE_ARCHIVE in ~/.gnupg-autogen.rc. For example:
|
|
|
|
# RELEASE_ARCHIVE=user@host:archive/tarballs
|
|
|
|
RELEASE_ARCHIVE_SUFFIX = gpgme
|
|
|
|
# The variable RELEASE_SIGNKEY in ~/.gnupg-autogen.rc is used
|
|
|
|
# to specify the key for signing. For example:
|
|
|
|
# RELEASE_SIGNKEY=D8692123C4065DEA5E0F3AB5249B39D24F25E3B6
|
|
|
|
|
|
|
|
|
|
|
|
# Autoconf flags
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
2016-07-06 08:59:18 +00:00
|
|
|
EXTRA_DIST = \
|
|
|
|
README \
|
2016-07-11 17:42:56 +00:00
|
|
|
MANIFEST.in \
|
build,python: Separate Python bindings from gpgme
* configure.ac: Remove "python" from available_languages and from
default_languages.
Remove checks for SWIG and available Python versions.
Remove substitution of PYTHONS.
Remove generation of files in lang/python.
* lang/Makefile.am (DIST_SUBDIRS): Remove python.
* lang/python/.gitignore, lang/python/AUTHORS, lang/python/COPYING,
lang/python/COPYING.LESSER, lang/python/ChangeLog, lang/python/INSTALL,
lang/python/NEWS, lang/python/autogen.rc, lang/python/autogen.sh,
lang/python/configure.ac: New.
* lang/python/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc.
copystamp: Remove symbolic linking of gpgme's internal data.h header
and of gpgme's config.h file.
CLEANFILES: Remove cleaning of config.h and data.h.
(RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook,
.PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release,
sign-release): New (copied from top-level Makefile.am).
* lang/python/build-aux/compile, lang/python/build-aux/config.guess,
lang/python/build-aux/config.sub, lang/python/build-aux/depcomp,
lang/python/build-aux/install-sh,
lang/python/build-aux/libtool-patch.sed,
lang/python/build-aux/ltmain.sh, lang/python/build-aux/missing: New.
* m4/ax_pkg_swig.m4: Move to...
* lang/python/m4/ax_pkg_swig.m4: ...here.
* m4/ax_python_devel.m4: Move to...
* lang/python/m4/ax_python_devel.m4: ...here.
* m4/python.m4: Move to...
* lang/python/m4/python.m4: ...here.
* lang/python/m4/gpg-error.m4, lang/python/m4/gpgme.m4,
lang/python/m4/libassuan.m4, lang/python/m4/libtool.m4,
lang/python/m4/ltoptions.m4, lang/python/m4/ltsugar.m4,
lang/python/m4/ltversion.m4, lang/python/m4/lt~obsolete.m4: New.
* lang/python/setup.py.in: Remove code for in-tree builds. Initialize
libs from @GPGME_LIBS@ instead of @GPGME_CONFIG_LIBS@. Initialize
include_dirs and define_macros from @GPGME_CFLAGS@ instead of
@GPGME_CONFIG_CFLAGS@. Look for gpgme.h in @prefix@/include and in
include_dirs and '/usr/include'.
* lang/python/tests/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F,
lang/python/tests/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD,
lang/python/tests/76F7E2B35832976B50A27A282D9B87E44577EB66,
lang/python/tests/7A030357C0F253A5BBCD282FFC4E521B37558F5C,
lang/python/tests/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD: New.
* lang/python/tests/Makefile.am (test_srcdir): Remove.
(TESTS_ENVIRONMENT): Remove adding .libs directory with gpgme library
to LD_LIBRARYPATH.
(private_keys): Use local copies instead of files from gpgme's
tests.
(EXTRA_DIST): Add new files.
(clean-local): Call local copy of start-stop-agent script.
(gpg-sample.stamp): Use local copies of private keys.
(pubring-stamp): Use local copies of pubdemo.asc and secdemo.asc.
(gpg-agent.conf): Use local copy of pinentry helper.
* lang/python/tests/cipher-1.asc, lang/python/tests/cipher-2.asc,
lang/python/tests/cipher-3.asc, lang/python/tests/cipher-no-sig.asc,
lang/python/tests/pinentry, lang/python/tests/pubdemo.asc,
lang/python/tests/pubkey-1.asc, lang/python/tests/secdemo.asc,
lang/python/tests/seckey-1.asc, lang/python/tests/start-stop-agent:
New.
* lang/python/tests/support.py (make_filename): Adapt to changed
path of test files.
--
This makes building and distributing the Python bindings independent of
the sources of gpgme. Many of the new files are copied from gpgme to
make the Python bindings a self-contained package. A later commit
re-adds the possibility to build the Python bindings as nested package
together with gpgme.
GnuPG-bug-id: 7110
2024-05-29 12:24:30 +00:00
|
|
|
autogen.sh autogen.rc \
|
2016-07-06 08:59:18 +00:00
|
|
|
gpgme.i \
|
2019-05-06 14:08:26 +00:00
|
|
|
helpers.c helpers.h private.h
|
2016-07-06 08:59:18 +00:00
|
|
|
|
2023-05-28 17:45:48 +00:00
|
|
|
if RUN_GPG_TESTS
|
|
|
|
tests = tests
|
|
|
|
else
|
|
|
|
tests =
|
|
|
|
endif
|
|
|
|
|
|
|
|
SUBDIRS = . ${tests} examples doc src
|
2016-05-11 09:42:00 +00:00
|
|
|
|
2017-03-28 18:55:59 +00:00
|
|
|
.PHONY: prepare
|
2017-04-01 23:29:52 +00:00
|
|
|
prepare: copystamp
|
2017-03-28 18:55:59 +00:00
|
|
|
|
2016-05-11 09:42:00 +00:00
|
|
|
# For VPATH builds we need to copy some files because Python's
|
|
|
|
# distutils are not VPATH-aware.
|
2017-04-01 23:29:52 +00:00
|
|
|
copystamp:
|
2017-04-05 16:47:08 +00:00
|
|
|
ln -sf "$(srcdir)/src" gpg
|
2016-05-11 09:42:00 +00:00
|
|
|
touch $@
|
|
|
|
|
2016-07-11 14:38:37 +00:00
|
|
|
all-local: copystamp
|
2017-04-08 13:34:30 +00:00
|
|
|
set -e ; for PYTHON in $(PYTHONS); do \
|
2017-04-11 00:56:00 +00:00
|
|
|
CPP="$(CPP)" \
|
2016-09-29 07:30:58 +00:00
|
|
|
CFLAGS="$(CFLAGS)" \
|
2017-04-03 13:44:14 +00:00
|
|
|
srcdir="$(srcdir)" \
|
2017-04-05 16:47:08 +00:00
|
|
|
top_builddir="$(top_builddir)" \
|
2017-04-08 13:34:30 +00:00
|
|
|
$$PYTHON setup.py build --verbose --build-base="$$(basename "$${PYTHON}")-gpg" ; \
|
2016-09-14 08:22:07 +00:00
|
|
|
done
|
2016-05-11 09:42:00 +00:00
|
|
|
|
2017-02-15 10:31:27 +00:00
|
|
|
python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz.asc: copystamp
|
2017-04-01 23:29:52 +00:00
|
|
|
$(MKDIR_P) python$(PYTHON_VERSION)-gpg-dist
|
2017-04-11 00:56:00 +00:00
|
|
|
CPP="$(CPP)" \
|
2016-09-29 07:30:58 +00:00
|
|
|
CFLAGS="$(CFLAGS)" \
|
2017-04-03 13:44:14 +00:00
|
|
|
srcdir="$(srcdir)" \
|
2017-04-05 16:47:08 +00:00
|
|
|
top_builddir="$(top_builddir)" \
|
2017-04-01 23:29:52 +00:00
|
|
|
$(PYTHON) setup.py sdist --verbose --dist-dir=python$(PYTHON_VERSION)-gpg-dist \
|
|
|
|
--manifest=python$(PYTHON_VERSION)-gpg-dist/MANIFEST
|
2018-10-04 08:11:01 +00:00
|
|
|
gpgbin=gpgconf --list-components | grep OpenPGP | sed -e 's/gpg:OpenPGP://g'
|
|
|
|
$(gpgbin) --detach-sign --armor python$(PYTHON_VERSION)-gpg-dist/gpg-$(VERSION).tar.gz
|
2016-07-11 14:38:37 +00:00
|
|
|
|
2016-07-12 14:20:35 +00:00
|
|
|
.PHONY: sdist
|
2017-04-01 23:29:52 +00:00
|
|
|
sdist: python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz.asc
|
2016-07-12 14:20:35 +00:00
|
|
|
|
|
|
|
.PHONY: upload
|
2017-04-01 23:29:52 +00:00
|
|
|
upload: python$(PYTHON_VERSION)-gpg-dist/gpg-$(VERSION).tar.gz \
|
|
|
|
python$(PYTHON_VERSION)-gpg-dist/gpg-$(VERSION).tar.gz.asc
|
2016-07-12 14:20:35 +00:00
|
|
|
twine upload $^
|
2016-07-11 14:38:37 +00:00
|
|
|
|
2017-04-01 23:29:52 +00:00
|
|
|
CLEANFILES = copystamp \
|
2017-04-10 13:24:03 +00:00
|
|
|
gpg
|
2016-07-06 08:59:18 +00:00
|
|
|
|
|
|
|
# Remove the rest.
|
|
|
|
#
|
|
|
|
# 'make distclean' clears the write bit, breaking rm -rf. Fix the
|
|
|
|
# permissions.
|
|
|
|
clean-local:
|
2024-05-29 13:17:58 +00:00
|
|
|
rm -rf -- build dist gpg.egg-info
|
2017-04-08 13:34:30 +00:00
|
|
|
for PYTHON in $(PYTHONS); do \
|
|
|
|
find "$$(basename "$${PYTHON}")-gpg" -type d ! -perm -200 -exec chmod u+w {} ';' ; \
|
|
|
|
rm -rf -- "$$(basename "$${PYTHON}")-gpg" ; \
|
2017-02-13 15:44:53 +00:00
|
|
|
done
|
2016-05-11 09:42:00 +00:00
|
|
|
|
|
|
|
install-exec-local:
|
2017-04-08 13:34:30 +00:00
|
|
|
set -e ; for PYTHON in $(PYTHONS); do \
|
2017-04-11 00:56:00 +00:00
|
|
|
CPP="$(CPP)" \
|
|
|
|
CFLAGS="$(CFLAGS)" \
|
2017-04-03 13:44:14 +00:00
|
|
|
srcdir="$(srcdir)" \
|
2017-04-05 16:47:08 +00:00
|
|
|
top_builddir="$(top_builddir)" \
|
2017-04-01 23:29:52 +00:00
|
|
|
$$PYTHON setup.py \
|
|
|
|
build \
|
2017-04-08 13:34:30 +00:00
|
|
|
--build-base="$$(basename "$${PYTHON}")-gpg" \
|
2017-04-01 23:29:52 +00:00
|
|
|
install \
|
|
|
|
--prefix "$(DESTDIR)$(prefix)" \
|
2016-09-14 08:22:07 +00:00
|
|
|
--verbose ; \
|
|
|
|
done
|
2016-05-11 09:42:00 +00:00
|
|
|
|
|
|
|
uninstall-local:
|
2024-05-29 15:13:30 +00:00
|
|
|
set -x; \
|
|
|
|
GV=$$(echo $(VERSION) | tr - _); \
|
|
|
|
normalizedGV=$$(echo $$GV | sed s/_beta/b/); \
|
|
|
|
for PYTHON in $(PYTHONS); do \
|
2017-04-10 13:20:34 +00:00
|
|
|
PLATLIB="$(prefix)/$$("$${PYTHON}" -c 'import sysconfig, os; print(os.path.relpath(sysconfig.get_path("platlib", scheme="posix_prefix"), sysconfig.get_config_var("prefix")))')" ; \
|
2017-04-08 13:34:30 +00:00
|
|
|
rm -rf -- "$(DESTDIR)$${PLATLIB}/gpg" \
|
2024-05-29 15:13:30 +00:00
|
|
|
"$(DESTDIR)$${PLATLIB}"/gpg-$$GV-py*.egg-info \
|
|
|
|
"$(DESTDIR)$${PLATLIB}"/gpg-$$normalizedGV-py*.egg ; \
|
2017-04-03 13:44:14 +00:00
|
|
|
done
|
build,python: Separate Python bindings from gpgme
* configure.ac: Remove "python" from available_languages and from
default_languages.
Remove checks for SWIG and available Python versions.
Remove substitution of PYTHONS.
Remove generation of files in lang/python.
* lang/Makefile.am (DIST_SUBDIRS): Remove python.
* lang/python/.gitignore, lang/python/AUTHORS, lang/python/COPYING,
lang/python/COPYING.LESSER, lang/python/ChangeLog, lang/python/INSTALL,
lang/python/NEWS, lang/python/autogen.rc, lang/python/autogen.sh,
lang/python/configure.ac: New.
* lang/python/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc.
copystamp: Remove symbolic linking of gpgme's internal data.h header
and of gpgme's config.h file.
CLEANFILES: Remove cleaning of config.h and data.h.
(RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook,
.PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release,
sign-release): New (copied from top-level Makefile.am).
* lang/python/build-aux/compile, lang/python/build-aux/config.guess,
lang/python/build-aux/config.sub, lang/python/build-aux/depcomp,
lang/python/build-aux/install-sh,
lang/python/build-aux/libtool-patch.sed,
lang/python/build-aux/ltmain.sh, lang/python/build-aux/missing: New.
* m4/ax_pkg_swig.m4: Move to...
* lang/python/m4/ax_pkg_swig.m4: ...here.
* m4/ax_python_devel.m4: Move to...
* lang/python/m4/ax_python_devel.m4: ...here.
* m4/python.m4: Move to...
* lang/python/m4/python.m4: ...here.
* lang/python/m4/gpg-error.m4, lang/python/m4/gpgme.m4,
lang/python/m4/libassuan.m4, lang/python/m4/libtool.m4,
lang/python/m4/ltoptions.m4, lang/python/m4/ltsugar.m4,
lang/python/m4/ltversion.m4, lang/python/m4/lt~obsolete.m4: New.
* lang/python/setup.py.in: Remove code for in-tree builds. Initialize
libs from @GPGME_LIBS@ instead of @GPGME_CONFIG_LIBS@. Initialize
include_dirs and define_macros from @GPGME_CFLAGS@ instead of
@GPGME_CONFIG_CFLAGS@. Look for gpgme.h in @prefix@/include and in
include_dirs and '/usr/include'.
* lang/python/tests/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F,
lang/python/tests/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD,
lang/python/tests/76F7E2B35832976B50A27A282D9B87E44577EB66,
lang/python/tests/7A030357C0F253A5BBCD282FFC4E521B37558F5C,
lang/python/tests/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD: New.
* lang/python/tests/Makefile.am (test_srcdir): Remove.
(TESTS_ENVIRONMENT): Remove adding .libs directory with gpgme library
to LD_LIBRARYPATH.
(private_keys): Use local copies instead of files from gpgme's
tests.
(EXTRA_DIST): Add new files.
(clean-local): Call local copy of start-stop-agent script.
(gpg-sample.stamp): Use local copies of private keys.
(pubring-stamp): Use local copies of pubdemo.asc and secdemo.asc.
(gpg-agent.conf): Use local copy of pinentry helper.
* lang/python/tests/cipher-1.asc, lang/python/tests/cipher-2.asc,
lang/python/tests/cipher-3.asc, lang/python/tests/cipher-no-sig.asc,
lang/python/tests/pinentry, lang/python/tests/pubdemo.asc,
lang/python/tests/pubkey-1.asc, lang/python/tests/secdemo.asc,
lang/python/tests/seckey-1.asc, lang/python/tests/start-stop-agent:
New.
* lang/python/tests/support.py (make_filename): Adapt to changed
path of test files.
--
This makes building and distributing the Python bindings independent of
the sources of gpgme. Many of the new files are copied from gpgme to
make the Python bindings a self-contained package. A later commit
re-adds the possibility to build the Python bindings as nested package
together with gpgme.
GnuPG-bug-id: 7110
2024-05-29 12:24:30 +00:00
|
|
|
|
|
|
|
dist-hook: gen-ChangeLog
|
|
|
|
|
|
|
|
distcheck-hook:
|
|
|
|
set -e; ( \
|
|
|
|
pref="#+macro: gpg-py_" ;\
|
|
|
|
reldate="$$(date -u +%Y-%m-%d)" ;\
|
|
|
|
echo "$${pref}ver $(PACKAGE_VERSION)" ;\
|
|
|
|
echo "$${pref}date $${reldate}" ;\
|
|
|
|
list='$(DIST_ARCHIVES)'; for i in $$list; do \
|
|
|
|
case "$$i" in *.tar.bz2) \
|
|
|
|
echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\
|
|
|
|
echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\
|
|
|
|
echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\
|
|
|
|
esac;\
|
|
|
|
done ) | tee $(distdir).swdb
|
|
|
|
|
|
|
|
gen_start_date = 2011-12-01T00:00:00
|
|
|
|
gen-ChangeLog:
|
|
|
|
if test -d $(top_srcdir)/.git; then \
|
|
|
|
(cd $(top_srcdir) && \
|
|
|
|
$(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
|
|
|
|
--amend=build-aux/git-log-fix \
|
|
|
|
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
|
|
|
|
cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
|
|
|
|
rm -f $(distdir)/ChangeLog; \
|
|
|
|
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Macro to help the release target.
|
|
|
|
RELEASE_NAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
|
|
|
|
|
|
|
|
release:
|
|
|
|
+(set -e;\
|
|
|
|
if [ "$(abs_top_builddir)" = "$(abs_top_srcdir)" ]; then \
|
|
|
|
echo "error: build directory must not be the source directory" >&2;\
|
|
|
|
exit 2;\
|
|
|
|
fi ;\
|
|
|
|
echo "/* Build started at $$(date -uIseconds) */" ;\
|
|
|
|
cd $(top_srcdir); \
|
|
|
|
./autogen.sh --force; \
|
|
|
|
cd $(abs_top_builddir); \
|
|
|
|
rm -rf dist; mkdir dist ; cd dist ; \
|
|
|
|
$(abs_top_srcdir)/configure --enable-maintainer-mode; \
|
|
|
|
$(MAKE) distcheck; \
|
|
|
|
echo "/* Build finished at $$(date -uIseconds) */" ;\
|
|
|
|
echo "/*" ;\
|
|
|
|
echo " * Please run the final step interactively:" ;\
|
|
|
|
echo " * make sign-release" ;\
|
|
|
|
echo " */" ;\
|
|
|
|
) 2>&1 | tee "$(RELEASE_NAME).buildlog"
|
|
|
|
|
|
|
|
sign-release:
|
|
|
|
+(set -e; \
|
|
|
|
test $$(pwd | sed 's,.*/,,') = dist || cd dist; \
|
|
|
|
x=$$(grep '^RELEASE_ARCHIVE=' $$HOME/.gnupg-autogen.rc|cut -d= -f2);\
|
|
|
|
if [ -z "$$x" ]; then \
|
|
|
|
echo "error: RELEASE_ARCHIVE missing in ~/.gnupg-autogen.rc">&2; \
|
|
|
|
exit 2;\
|
|
|
|
fi;\
|
|
|
|
myarchive="$$x/$(RELEASE_ARCHIVE_SUFFIX)";\
|
|
|
|
x=$$(grep '^RELEASE_SIGNKEY=' $$HOME/.gnupg-autogen.rc|cut -d= -f2);\
|
|
|
|
if [ -z "$$x" ]; then \
|
|
|
|
echo "error: RELEASE_SIGNKEY missing in ~/.gnupg-autogen.rc">&2; \
|
|
|
|
exit 2;\
|
|
|
|
fi;\
|
|
|
|
mysignkey="$$x";\
|
|
|
|
files1="$(RELEASE_NAME).tar.bz2" ;\
|
|
|
|
files2="$(RELEASE_NAME).tar.bz2.sig \
|
|
|
|
$(RELEASE_NAME).swdb \
|
|
|
|
$(RELEASE_NAME).buildlog" ;\
|
|
|
|
echo "/* Signing the source tarball ..." ;\
|
|
|
|
gpg -sbu $$mysignkey $(RELEASE_NAME).tar.bz2 ;\
|
|
|
|
cat $(RELEASE_NAME).swdb >swdb.snippet;\
|
|
|
|
echo >>swdb.snippet ;\
|
|
|
|
sha1sum $${files1} >>swdb.snippet ;\
|
|
|
|
cat "../$(RELEASE_NAME).buildlog" swdb.snippet \
|
|
|
|
| gzip >$(RELEASE_NAME).buildlog ;\
|
|
|
|
echo "Copying to local archive ..." ;\
|
|
|
|
scp -p $${files1} $${files2} $$myarchive/ || true;\
|
|
|
|
echo "Uploading documentation ..." ;\
|
|
|
|
$(MAKE) -C doc online; \
|
|
|
|
echo '/*' ;\
|
|
|
|
echo ' * All done; for checksums see dist/swdb.snippet' ;\
|
|
|
|
echo ' */' ;\
|
|
|
|
)
|