qtplasmac: ensure gcode parser uses build python version

This commit is contained in:
Phillip Carter 2021-05-14 11:39:57 +10:00
parent f77989abc7
commit 52feebf0c2
3 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,10 @@
# ensure qtplasmac_gcode.py is set to the build python version
$(shell rm -f ../configs/by_machine/qtplasmac/qtplasmac/qtplasmac_gcode.py)
PYTARGETS += ../bin/qtvcp ../configs/by_machine/qtplasmac/qtplasmac/qtplasmac_gcode.py
../configs/by_machine/qtplasmac/qtplasmac/qtplasmac_gcode.py: ../share/qtvcp/screens/qtplasmac/qtplasmac_gcode.in
@$(ECHO) Syntax checking python script $(notdir $@)
$(Q)$(PYTHON) -c 'import sys; compile(open(sys.argv[1]).read(), sys.argv[1], "exec")' $<
$(ECHO) Copying python script $(notdir $@)
$(Q)(echo '#!$(PYTHON)'; sed '1 { /^#!/d; }' $<) > $@.tmp && chmod +x $@.tmp && mv -f $@.tmp $@

View file

@ -1,4 +1,3 @@
#!/usr/bin/python
''' '''
plasmac_gcode.py plasmac_gcode.py

View file

@ -162,6 +162,8 @@ SUBDIRS := \
../docs/src ../docs/src/source-highlight \ ../docs/src ../docs/src/source-highlight \
\ \
../tests \ ../tests \
\
../configs/by_machine/qtplasmac/qtplasmac \
@ -796,6 +798,7 @@ install-python: install-dirs
$(TREE) ../share/qtvcp/panels/* $(DESTDIR)$(datadir)/qtvcp/panels $(TREE) ../share/qtvcp/panels/* $(DESTDIR)$(datadir)/qtvcp/panels
$(TREE) ../share/qtvcp/widgets_ui/* $(DESTDIR)$(datadir)/qtvcp/widgets_ui $(TREE) ../share/qtvcp/widgets_ui/* $(DESTDIR)$(datadir)/qtvcp/widgets_ui
$(FILE) ../share/gmoccapy/images/*.png ../share/gmoccapy/images/*.gif ../share/gmoccapy/images/*.svg $(DESTDIR)$(datadir)/gmoccapy/images $(FILE) ../share/gmoccapy/images/*.png ../share/gmoccapy/images/*.gif ../share/gmoccapy/images/*.svg $(DESTDIR)$(datadir)/gmoccapy/images
$(FILE) ../share/qtvcp/screens/qtplasmac/qtplasmac_gcode.in $(DESTDIR)$(sampleconfsdir)/by_machine/qtplasmac/qtplasmac
install-kernel-dep: install-kernel-dep:
$(DIR) $(DESTDIR)$(moduledir)/linuxcnc \ $(DIR) $(DESTDIR)$(moduledir)/linuxcnc \