Skip to content

Commit 4cdadd6

Browse files
author
AntoniaSzecsi
committed
chore: address comment regarding logic in makefile
1 parent 682be05 commit 4cdadd6

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ clean:
2121

2222
.PHONY: build
2323
build: clean
24-
ifeq ($(shell uname),Linux)
25-
BUILD=true python3 scripts/dev.py build
26-
else
2724
python3 scripts/dev.py build
28-
endif
2925

3026
.PHONY: setup-codebuild-agent
3127
setup-codebuild-agent:

scripts/dev.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,14 @@ def clean():
5151
def build():
5252
print("Building package")
5353
env = os.environ.copy()
54-
if os.getenv("BUILD") == "true":
54+
55+
# Set BUILD=true on Linux for native compilation
56+
import platform
57+
if platform.system() == "Linux":
58+
env["BUILD"] = "true"
59+
elif os.getenv("BUILD") == "true":
5560
env["BUILD"] = "true"
61+
5662
run([sys.executable, "setup.py", "sdist", "bdist_wheel"], env=env)
5763

5864

0 commit comments

Comments
 (0)