2016-05-11 09:42:00 +00:00
|
|
|
# Makefile.am for the Python bindings.
|
|
|
|
# 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
|
|
|
|
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2016-07-06 08:59:18 +00:00
|
|
|
EXTRA_DIST = \
|
|
|
|
README \
|
2016-07-11 17:42:56 +00:00
|
|
|
MANIFEST.in \
|
2016-07-06 08:59:18 +00:00
|
|
|
gpgme.i \
|
2016-07-28 08:20:20 +00:00
|
|
|
helpers.c helpers.h private.h \
|
2016-07-06 08:59:18 +00:00
|
|
|
gpgme-h-clean.py \
|
2016-07-11 17:42:56 +00:00
|
|
|
examples \
|
2016-07-06 08:59:18 +00:00
|
|
|
pyme
|
|
|
|
|
2016-09-20 17:58:00 +00:00
|
|
|
SUBDIRS = . tests
|
2016-05-11 09:42:00 +00:00
|
|
|
|
2016-06-06 12:08:59 +00:00
|
|
|
COPY_FILES = \
|
2016-07-11 14:38:37 +00:00
|
|
|
$(srcdir)/gpgme.i \
|
2016-06-06 12:08:59 +00:00
|
|
|
$(srcdir)/README \
|
2016-07-11 14:38:37 +00:00
|
|
|
$(srcdir)/MANIFEST.in \
|
|
|
|
$(srcdir)/gpgme-h-clean.py \
|
|
|
|
$(srcdir)/examples \
|
2016-07-28 08:20:20 +00:00
|
|
|
$(srcdir)/helpers.c $(srcdir)/helpers.h $(srcdir)/private.h
|
2016-06-06 12:08:59 +00:00
|
|
|
|
2016-08-02 16:42:26 +00:00
|
|
|
COPY_FILES_PYME = \
|
|
|
|
$(srcdir)/pyme/callbacks.py \
|
|
|
|
$(srcdir)/pyme/constants \
|
|
|
|
$(srcdir)/pyme/core.py \
|
|
|
|
$(srcdir)/pyme/errors.py \
|
|
|
|
$(srcdir)/pyme/__init__.py \
|
|
|
|
$(srcdir)/pyme/results.py \
|
|
|
|
$(srcdir)/pyme/util.py
|
|
|
|
|
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.
|
2016-08-02 16:42:26 +00:00
|
|
|
copystamp: $(COPY_FILES) $(COPY_FILES_PYME)
|
|
|
|
if test "$(srcdir)" != "$(builddir)" ; then \
|
2016-09-20 17:46:04 +00:00
|
|
|
cp -R $(COPY_FILES) . ; \
|
|
|
|
cp -R $(COPY_FILES_PYME) pyme ; \
|
2016-08-02 16:42:26 +00:00
|
|
|
fi
|
2016-05-11 09:42:00 +00:00
|
|
|
touch $@
|
|
|
|
|
2016-07-11 14:38:37 +00:00
|
|
|
all-local: copystamp
|
2016-09-14 08:22:07 +00:00
|
|
|
for PYTHON in $(PYTHONS); do \
|
|
|
|
CFLAGS="$(CFLAGS) -I$(top_srcdir)" \
|
2016-09-26 09:35:40 +00:00
|
|
|
top_builddir="$(top_builddir)" \
|
2016-09-14 08:22:07 +00:00
|
|
|
$$PYTHON setup.py build --verbose ; \
|
|
|
|
done
|
2016-05-11 09:42:00 +00:00
|
|
|
|
2016-07-12 14:20:35 +00:00
|
|
|
dist/pyme3-$(VERSION).tar.gz dist/pyme3-$(VERSION).tar.gz.asc: copystamp
|
2016-07-11 14:38:37 +00:00
|
|
|
CFLAGS="$(CFLAGS) -I$(top_srcdir)" \
|
|
|
|
$(PYTHON) setup.py sdist --verbose
|
2016-07-12 14:20:35 +00:00
|
|
|
gpg2 --detach-sign --armor dist/pyme3-$(VERSION).tar.gz
|
2016-07-11 14:38:37 +00:00
|
|
|
|
2016-09-29 07:30:57 +00:00
|
|
|
.PHONY: prepare
|
|
|
|
prepare: copystamp
|
|
|
|
|
2016-07-12 14:20:35 +00:00
|
|
|
.PHONY: sdist
|
|
|
|
sdist: dist/pyme3-$(VERSION).tar.gz dist/pyme3-$(VERSION).tar.gz.asc
|
|
|
|
|
|
|
|
.PHONY: upload
|
|
|
|
upload: dist/pyme3-$(VERSION).tar.gz dist/pyme3-$(VERSION).tar.gz.asc
|
|
|
|
twine upload $^
|
2016-07-11 14:38:37 +00:00
|
|
|
|
2016-07-28 13:44:38 +00:00
|
|
|
CLEANFILES = gpgme.h errors.i gpgme_wrap.c pyme/gpgme.py \
|
2016-05-24 15:22:08 +00:00
|
|
|
copystamp
|
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:
|
|
|
|
rm -rf -- build
|
2016-05-11 09:42:00 +00:00
|
|
|
if test "$(srcdir)" != "$(builddir)" ; then \
|
2016-07-06 08:59:18 +00:00
|
|
|
find . -type d ! -perm -200 -exec chmod u+w {} ';' ; \
|
2016-07-11 14:38:37 +00:00
|
|
|
for F in $(COPY_FILES); do rm -rf -- `basename $$F` ; done ; \
|
2016-08-02 16:42:26 +00:00
|
|
|
for F in $(COPY_FILES_PYME); do \
|
|
|
|
rm -rf -- pyme/`basename $$F` ; \
|
|
|
|
done ; \
|
2016-05-11 09:42:00 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
install-exec-local:
|
2016-09-14 08:22:07 +00:00
|
|
|
rm -f install_files.txt
|
|
|
|
for PYTHON in $(PYTHONS); do \
|
|
|
|
$$PYTHON setup.py install \
|
2016-05-11 09:42:00 +00:00
|
|
|
--prefix $(DESTDIR)$(prefix) \
|
2016-09-14 08:22:07 +00:00
|
|
|
--record files.txt \
|
|
|
|
--verbose ; \
|
|
|
|
cat files.txt >> install_files.txt ; \
|
|
|
|
rm files.txt ; \
|
|
|
|
done
|
2016-09-21 07:17:23 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(pythondir)/pyme
|
2016-09-14 08:22:07 +00:00
|
|
|
mv install_files.txt $(DESTDIR)$(pythondir)/pyme
|
2016-05-11 09:42:00 +00:00
|
|
|
|
|
|
|
uninstall-local:
|
|
|
|
xargs <$(DESTDIR)$(pythondir)/pyme/install_files.txt -- rm -rf --
|
|
|
|
rm -rf -- $(DESTDIR)$(pythondir)/pyme
|