use python3 in build
authorparmentelat <thierry.parmentelat@inria.fr>
Mon, 10 Dec 2018 10:26:57 +0000 (11:26 +0100)
committerparmentelat <thierry.parmentelat@inria.fr>
Mon, 10 Dec 2018 10:26:57 +0000 (11:26 +0100)
Makefile
setup.py

index 8a71a78..e038082 100644 (file)
--- 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))"
-
index 4ead837..7ef2690 100755 (executable)
--- 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']),
         ])