Skip to content

Commit c1b0351

Browse files
committed
fixes macos and unix builds
1 parent 87a1b24 commit c1b0351

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

builder/macOS.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import shutil
34
from . import spawn
45
from . import generate_manifest
56
from . import update_mphalport
@@ -135,14 +136,8 @@ def _run(c, spinner=False, cmpl=False):
135136

136137

137138
def build_sdl():
138-
global variant
139-
140-
if variant is None:
141-
varnt = 'build-standard'
142-
else:
143-
varnt = f'build-{variant}'
144139

145-
dst = f'lib/micropython/ports/unix/{varnt}/SDL'
140+
dst = f'lib/micropython/ports/unix/build-{variant}/SDL'
146141

147142
if not os.path.exists(dst):
148143
os.makedirs(dst)
@@ -256,8 +251,6 @@ def compile(): # NOQA
256251

257252
os.remove(os.path.join('build', f))
258253

259-
import shutil
260-
261254
src = f'lib/micropython/ports/unix/build-{variant}/micropython'
262255
dst = f'build/lvgl_micropy_macos'
263256
shutil.copyfile(src, dst)

builder/unix.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import shutil
34
from . import spawn
45
from . import generate_manifest
56
from . import update_mphalport
@@ -135,14 +136,7 @@ def _run(c, spinner=False, cmpl=False):
135136

136137

137138
def build_sdl():
138-
global variant
139-
140-
if variant is None:
141-
variant = 'build-standard'
142-
else:
143-
variant = f'build-{variant}'
144-
145-
dst = f'lib/micropython/ports/unix/{variant}/SDL'
139+
dst = f'lib/micropython/ports/unix/build-{variant}/SDL'
146140

147141
if not os.path.exists(dst):
148142
os.makedirs(dst)
@@ -258,9 +252,8 @@ def compile(): # NOQA
258252

259253
os.remove(os.path.join('build', f))
260254

261-
import shutil
262255

263-
src = f'lib/micropython/ports/unix/{variant}/micropython'
256+
src = f'lib/micropython/ports/unix/build-{variant}/micropython'
264257
dst = f'build/lvgl_micropy_unix'
265258
shutil.copyfile(src, dst)
266259

0 commit comments

Comments
 (0)