0002-allow-to-set-python-interpreter.patch 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. From s.martin49@gmail.com Fri Oct 10 23:43:32 2014
  2. Content-Type: text/plain; charset="us-ascii"
  3. MIME-Version: 1.0
  4. Content-Transfer-Encoding: 7bit
  5. Subject: [PATCH] allow to set python interpreter
  6. X-Mercurial-Node: 4805f636c2317d989a5f704ba691369f41be6595
  7. X-Mercurial-Series-Index: 1
  8. X-Mercurial-Series-Total: 1
  9. Message-Id: <4805f636c2317d989a5f.1412977412@bobook>
  10. X-Mercurial-Series-Id: <4805f636c2317d989a5f.1412977412@bobook>
  11. User-Agent: Mercurial-patchbomb/3.1.2
  12. Date: Fri, 10 Oct 2014 23:43:32 +0200
  13. From: Samuel Martin <s.martin49@gmail.com>
  14. To: canfestival-devel@lists.sourceforge.net
  15. Cc: Samuel Martin <s.martin49@gmail.com>
  16. # HG changeset patch
  17. # User "Samuel Martin" <s.martin49@gmail.com>
  18. # Date 1412977082 -7200
  19. # Fri Oct 10 23:38:02 2014 +0200
  20. # Node ID 4805f636c2317d989a5f704ba691369f41be6595
  21. # Parent c408fdc77aa18fcda81db4f0d038e8a69ba84bb2
  22. allow to set python interpreter
  23. Canfestival python modules and scripts are not python3 compliant.
  24. Allow to pass the python interperter to be used to make.
  25. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  26. diff --git a/Makefile.in b/Makefile.in
  27. --- a/Makefile.in
  28. +++ b/Makefile.in
  29. @@ -21,6 +21,9 @@
  30. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  31. #
  32. +PYTHON ?= python
  33. +export PYTHON
  34. +
  35. all: objdictedit canfestival examples
  36. examples: canfestival driver
  37. diff --git a/doc/manual/en/manual.tex b/doc/manual/en/manual.tex
  38. --- a/doc/manual/en/manual.tex
  39. +++ b/doc/manual/en/manual.tex
  40. @@ -1134,6 +1134,7 @@
  41. python objdictedit.py [od files...]
  42. \end{verbatim}
  43. +Note that Gnosis modules only run with python2 as interpreter.
  44. \subsubsection{Installation and usage on Windows}
  45. diff --git a/examples/CANOpenShell/Makefile.in b/examples/CANOpenShell/Makefile.in
  46. --- a/examples/CANOpenShell/Makefile.in
  47. +++ b/examples/CANOpenShell/Makefile.in
  48. @@ -69,11 +69,11 @@
  49. CANOpenShellMasterOD.c: CANOpenShellMasterOD.od
  50. $(MAKE) -C ../../objdictgen gnosis
  51. - python ../../objdictgen/objdictgen.py CANOpenShellMasterOD.od CANOpenShellMasterOD.c
  52. + $(PYTHON) ../../objdictgen/objdictgen.py CANOpenShellMasterOD.od CANOpenShellMasterOD.c
  53. CANOpenShellSlaveOD.c: CANOpenShellSlaveOD.od
  54. $(MAKE) -C ../../objdictgen gnosis
  55. - python ../../objdictgen/objdictgen.py CANOpenShellSlaveOD.od CANOpenShellSlaveOD.c
  56. + $(PYTHON) ../../objdictgen/objdictgen.py CANOpenShellSlaveOD.od CANOpenShellSlaveOD.c
  57. %.o: %.c
  58. $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
  59. diff --git a/examples/DS401_Master/Makefile.in b/examples/DS401_Master/Makefile.in
  60. --- a/examples/DS401_Master/Makefile.in
  61. +++ b/examples/DS401_Master/Makefile.in
  62. @@ -53,7 +53,7 @@
  63. TestMaster.c: TestMaster.od
  64. $(MAKE) -C ../../objdictgen gnosis
  65. - python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c
  66. + $(PYTHON) ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c
  67. %.o: %.c
  68. $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
  69. diff --git a/examples/DS401_Slave_Gui/Makefile.in b/examples/DS401_Slave_Gui/Makefile.in
  70. --- a/examples/DS401_Slave_Gui/Makefile.in
  71. +++ b/examples/DS401_Slave_Gui/Makefile.in
  72. @@ -59,7 +59,7 @@
  73. ObjDict.c: ObjDict.od
  74. $(MAKE) -C ../../objdictgen gnosis
  75. - python ../../objdictgen/objdictgen.py ObjDict.od ObjDict.c
  76. + $(PYTHON) ../../objdictgen/objdictgen.py ObjDict.od ObjDict.c
  77. .cpp.o:
  78. $(CXX) -c $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) `wx-config --cxxflags` $< -o $@
  79. diff --git a/examples/SillySlave/Makefile.in b/examples/SillySlave/Makefile.in
  80. --- a/examples/SillySlave/Makefile.in
  81. +++ b/examples/SillySlave/Makefile.in
  82. @@ -53,7 +53,7 @@
  83. SillySlave.c: SillySlave.od
  84. $(MAKE) -C ../../objdictgen gnosis
  85. - python ../../objdictgen/objdictgen.py SillySlave.od SillySlave.c
  86. + $(PYTHON) ../../objdictgen/objdictgen.py SillySlave.od SillySlave.c
  87. %.o: %.c
  88. $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
  89. diff --git a/examples/TestMasterMicroMod/Makefile.in b/examples/TestMasterMicroMod/Makefile.in
  90. --- a/examples/TestMasterMicroMod/Makefile.in
  91. +++ b/examples/TestMasterMicroMod/Makefile.in
  92. @@ -61,7 +61,7 @@
  93. TestMaster.c: TestMaster.od
  94. $(MAKE) -C ../../objdictgen gnosis
  95. - python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c
  96. + $(PYTHON) ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c
  97. %.o: %.c
  98. $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
  99. diff --git a/examples/TestMasterSlave/Makefile.in b/examples/TestMasterSlave/Makefile.in
  100. --- a/examples/TestMasterSlave/Makefile.in
  101. +++ b/examples/TestMasterSlave/Makefile.in
  102. @@ -69,11 +69,11 @@
  103. TestSlave.c: TestSlave.od
  104. $(MAKE) -C ../../objdictgen gnosis
  105. - python ../../objdictgen/objdictgen.py TestSlave.od TestSlave.c
  106. + $(PYTHON) ../../objdictgen/objdictgen.py TestSlave.od TestSlave.c
  107. TestMaster.c: TestMaster.od
  108. $(MAKE) -C ../../objdictgen gnosis
  109. - python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c
  110. + $(PYTHON) ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c
  111. %.o: %.c
  112. $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
  113. diff --git a/examples/TestMasterSlaveLSS/Makefile.in b/examples/TestMasterSlaveLSS/Makefile.in
  114. --- a/examples/TestMasterSlaveLSS/Makefile.in
  115. +++ b/examples/TestMasterSlaveLSS/Makefile.in
  116. @@ -64,15 +64,15 @@
  117. TestSlaveA.c: TestSlaveA.od
  118. $(MAKE) -C ../../objdictgen gnosis
  119. - python ../../objdictgen/objdictgen.py TestSlaveA.od TestSlaveA.c
  120. + $(PYTHON) ../../objdictgen/objdictgen.py TestSlaveA.od TestSlaveA.c
  121. TestSlaveB.c: TestSlaveB.od
  122. $(MAKE) -C ../../objdictgen gnosis
  123. - python ../../objdictgen/objdictgen.py TestSlaveB.od TestSlaveB.c
  124. + $(PYTHON) ../../objdictgen/objdictgen.py TestSlaveB.od TestSlaveB.c
  125. TestMaster.c: TestMaster.od
  126. $(MAKE) -C ../../objdictgen gnosis
  127. - python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c
  128. + $(PYTHON) ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c
  129. %.o: %.c
  130. $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
  131. diff --git a/examples/kerneltest/Makefile.in b/examples/kerneltest/Makefile.in
  132. --- a/examples/kerneltest/Makefile.in
  133. +++ b/examples/kerneltest/Makefile.in
  134. @@ -79,10 +79,10 @@
  135. TestSlave.c: TestSlave.od
  136. $(MAKE) -C ../../objdictgen gnosis
  137. - python ../../objdictgen/objdictgen.py TestSlave.od TestSlave.c
  138. + $(PYTHON) ../../objdictgen/objdictgen.py TestSlave.od TestSlave.c
  139. TestMaster.c: TestMaster.od
  140. $(MAKE) -C ../../objdictgen gnosis
  141. - python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c
  142. + $(PYTHON) ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c
  143. #endif