Skip to content

Commit 4dc4eaf

Browse files
committed
Fixed pex build platform issue
1 parent f8fdae7 commit 4dc4eaf

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

examples/python-dag/salt.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ paused: false
44

55
schedule:
66
type: "interval"
7-
every_seconds: "5"
7+
every_seconds: "30"
88

99
triggers:
1010
- type: time

src/salt/builders/py_builder.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import glob
22
import pathlib
33
import sys
4-
import subprocess
54

6-
import build
75
import typer
86
import docker
97

@@ -38,7 +36,8 @@ def build_pex(pyproject_path: pathlib.Path):
3836
container_project_dir = "/app"
3937

4038
command = (
41-
f"python -m build {container_project_dir}"
39+
f"python -m build {container_project_dir} && "
40+
f"pex {container_project_dir}/dist/*.whl -o {container_project_dir}/build/main.pex -m {pyproject_path.name}.main:main"
4241
)
4342
container = client.containers.run(
4443
image="salt:latest",

0 commit comments

Comments
 (0)