From 761037d4f571a71de9297567a0bcdab7133b347e Mon Sep 17 00:00:00 2001 From: parmentelat Date: Mon, 10 Dec 2018 11:26:57 +0100 Subject: [PATCH] use python3 in build --- Makefile | 11 +++++------ setup.py | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 8a71a78..e038082 100644 --- a/Makefile +++ b/Makefile @@ -18,13 +18,13 @@ bindir := /usr/bin PWD := $(shell pwd) -all: - python setup.py build +all: + python3 setup.py build install: install-python install-phpxmlrpc install-python: - python setup.py install \ + python3 setup.py install \ --install-purelib=$(DESTDIR)/$(datadir)/plc_api \ --install-scripts=$(DESTDIR)/$(datadir)/plc_api \ --install-data=$(DESTDIR)/$(datadir)/plc_api @@ -35,9 +35,9 @@ install-phpxmlrpc: mkdir -p $(DESTDIR)/$(datadir)/plc_api/php/phpxmlrpc/ rsync --exclude .git -ai php/phpxmlrpc/ $(DESTDIR)/$(datadir)/plc_api/php/phpxmlrpc/ -clean: +clean: find . -name '*.pyc' | xargs rm -f - python setup.py clean && rm -rf build + python3 setup.py clean && rm -rf build index: echo "This step is obsolete" @@ -101,4 +101,3 @@ endif +%: varname=$(subst +,,$@) +%: @echo "$($(varname))" - diff --git a/setup.py b/setup.py index 4ead837..7ef2690 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # Setup script for PLCAPI # @@ -16,9 +16,9 @@ setup(packages = ['PLC', 'PLC/Methods', 'PLC/Methods/system', 'PLC/Accessors', ' # package for mod_python and mod_wsgi, defer choice to myplc ('apache', ['apache/ModPython.py', 'apache/__init__.py', 'apache/plc.wsgi']), ('php', ['php/plc_api.php']), - ('migrations', + ('migrations', ['migrations/README.txt', - 'migrations/extract-views.py'] + 'migrations/extract-views.py'] + glob('migrations/[0-9][0-9][0-9]*')), ('extensions', ['extensions/README.txt']), ]) -- 2.43.0