Skip to content

Commit f46c4ff

Browse files
committed
Revert "trying to fix macOS port with mbedtls"
This reverts commit e3aebc3.
1 parent e3aebc3 commit f46c4ff

File tree

1 file changed

+8
-32
lines changed

1 file changed

+8
-32
lines changed

builder/macOS.py

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515
from . import unix
1616
from . import spawn
1717

18-
from . import read_file, write_file
19-
18+
unix.unix_cmd = [
19+
'make',
20+
'',
21+
'',
22+
'-C',
23+
]
2024

2125
unix.REAL_PORT = 'macOS'
2226

@@ -29,6 +33,8 @@ def parse_args(extra_args, lv_cflags, board):
2933

3034

3135
def build_commands(not_sure, extra_args, script_dir, lv_cflags, board):
36+
37+
3238
return _build_commands(not_sure, extra_args, script_dir, lv_cflags, board)
3339

3440

@@ -92,9 +98,6 @@ def is_homebrew_arm(cmd):
9298
return False, cmd[0][0]
9399

94100

95-
EXTMOD_MK_PATH = 'lib/micropython/extmod/extmod.mk'
96-
97-
98101
def submodules():
99102
is_arm, brew_path = is_homebrew_arm([['brew', 'config']])
100103

@@ -147,35 +150,8 @@ def submodules():
147150
if return_code != 0:
148151
sys.exit(return_code)
149152

150-
mbedtls = os.path.abspath('lib/micropython/lib/mbedtls/README.md')
151-
152-
if not os.path.exists(mbedtls):
153-
return_code, _ = unix.spawn(unix.submodules_cmd)
154-
155-
if return_code != 0:
156-
sys.exit(return_code)
157153

158154
def compile(*args): # NOQA
159-
data = read_file('macOS', EXTMOD_MK_PATH)
160-
data = data.replace(
161-
'CFLAGS_EXTMOD += -DMICROPY_SSL_MBEDTLS=1 -I$(TOP)/$(MBEDTLS_DIR)/include',
162-
'CFLAGS_EXTMOD += -DMICROPY_SSL_MBEDTLS=1'
163-
)
164-
code = [
165-
'SRC_THIRDPARTY_C += lib/mbedtls_errors/mp_mbedtls_errors.c',
166-
'SRC_THIRDPARTY_C += $(wildcard \\',
167-
' $(MBEDTLS_DIR)/include/*/*.h \\',
168-
' $(MBEDTLS_DIR)/library/*.h \\',
169-
')'
170-
]
171-
172-
data = data.replace(
173-
'SRC_THIRDPARTY_C += lib/mbedtls_errors/mp_mbedtls_errors.c',
174-
'\n'.join(code)
175-
)
176-
177-
write_file(EXTMOD_MK_PATH, data)
178-
179155
_compile(*args)
180156

181157

0 commit comments

Comments
 (0)