From 24b4162d908b48a92660020be0b776c2874fb05a Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 14 Sep 2016 10:22:07 +0200 Subject: python: Build for both Python2 and Python3. * NEWS: Update. * configure.ac: Check for multiple Python versions. * lang/python/Makefile.am: Build and install for both Python versions. * lang/python/tests/Makefile.am: Test both versions. * lang/python/tests/run-tests.py: New test runner. Signed-off-by: Justus Winter --- lang/python/Makefile.am | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'lang/python/Makefile.am') diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am index 8e18dab3..9ec9c4aa 100644 --- a/lang/python/Makefile.am +++ b/lang/python/Makefile.am @@ -54,8 +54,10 @@ copystamp: $(COPY_FILES) $(COPY_FILES_PYME) touch $@ all-local: copystamp - CFLAGS="$(CFLAGS) -I$(top_srcdir)" \ - $(PYTHON) setup.py build --verbose + for PYTHON in $(PYTHONS); do \ + CFLAGS="$(CFLAGS) -I$(top_srcdir)" \ + $$PYTHON setup.py build --verbose ; \ + done dist/pyme3-$(VERSION).tar.gz dist/pyme3-$(VERSION).tar.gz.asc: copystamp CFLAGS="$(CFLAGS) -I$(top_srcdir)" \ @@ -87,10 +89,16 @@ clean-local: fi install-exec-local: - $(PYTHON) setup.py install \ + rm -f install_files.txt + for PYTHON in $(PYTHONS); do \ + $$PYTHON setup.py install \ --prefix $(DESTDIR)$(prefix) \ - --record $(DESTDIR)$(pythondir)/pyme/install_files.txt \ - --verbose + --record files.txt \ + --verbose ; \ + cat files.txt >> install_files.txt ; \ + rm files.txt ; \ + done + mv install_files.txt $(DESTDIR)$(pythondir)/pyme uninstall-local: xargs <$(DESTDIR)$(pythondir)/pyme/install_files.txt -- rm -rf -- -- cgit v1.2.3