python3: some imports for build.py
This commit is contained in:
parent
b37e155eb4
commit
09db5afdfa
|
|
@ -19,11 +19,11 @@ arduinodir =
|
||||||
#
|
#
|
||||||
# Note: the flag -save-temps=obj does not appear to be a valid flag for win32.
|
# Note: the flag -save-temps=obj does not appear to be a valid flag for win32.
|
||||||
# Omit the "=obj", or omit it entirely.
|
# Omit the "=obj", or omit it entirely.
|
||||||
cflags = -DF_CPU=%F_CPU% -mmcu=%CPU% -Wall -Wstrict-prototypes -std=gnu99
|
cflags = -DF_CPU=%%F_CPU%% -mmcu=%%CPU%% -Wall -Wstrict-prototypes -std=gnu99
|
||||||
-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
|
-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
|
||||||
-Winline -fno-move-loop-invariants -fno-tree-scev-cprop -Os
|
-Winline -fno-move-loop-invariants -fno-tree-scev-cprop -Os
|
||||||
-ffunction-sections -finline-functions-called-once -mcall-prologues
|
-ffunction-sections -finline-functions-called-once -mcall-prologues
|
||||||
-Wa,-adhlns=%ALNAME% -save-temps=obj
|
-Wa,-adhlns=%%ALNAME%% -save-temps=obj
|
||||||
|
|
||||||
# Flags passed to avr-gcc to be passed on to the linker.
|
# Flags passed to avr-gcc to be passed on to the linker.
|
||||||
ldflags = -Wl,--as-needed -Wl,--gc-sections
|
ldflags = -Wl,--as-needed -Wl,--gc-sections
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,18 @@
|
||||||
import wx.lib.newevent
|
import wx.lib.newevent
|
||||||
import thread, shlex, subprocess
|
|
||||||
import os, re
|
try:
|
||||||
|
import thread as _thread
|
||||||
|
except ImportError:
|
||||||
|
import _thread
|
||||||
|
import shlex
|
||||||
|
import subprocess
|
||||||
|
import os
|
||||||
|
import re
|
||||||
from os.path import isfile, join
|
from os.path import isfile, join
|
||||||
from sys import platform
|
from sys import platform
|
||||||
|
|
||||||
if platform.startswith("win"):
|
if platform.startswith("win"):
|
||||||
from _subprocess import STARTF_USESHOWWINDOW
|
from subprocess import STARTF_USESHOWWINDOW
|
||||||
|
|
||||||
(scriptEvent, EVT_SCRIPT_UPDATE) = wx.lib.newevent.NewEvent()
|
(scriptEvent, EVT_SCRIPT_UPDATE) = wx.lib.newevent.NewEvent()
|
||||||
SCRIPT_RUNNING = 1
|
SCRIPT_RUNNING = 1
|
||||||
|
|
@ -80,7 +87,7 @@ class ScriptThread:
|
||||||
def Start(self):
|
def Start(self):
|
||||||
self.running = True
|
self.running = True
|
||||||
self.cancelled = False
|
self.cancelled = False
|
||||||
thread.start_new_thread(self.Run, ())
|
_thread.start_new_thread(self.Run, ())
|
||||||
|
|
||||||
def Stop(self):
|
def Stop(self):
|
||||||
self.cancelled = True
|
self.cancelled = True
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue