Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
compile go only with env var
Signed-off-by: pyalex <moskalenko.alexey@gmail.com>
  • Loading branch information
pyalex committed Apr 18, 2022
commit cbf586e0db9908e440b6804f4a6bd68dd7a6cd6f
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ jobs:
CIBW_BUILD: "cp3*_x86_64"
CIBW_SKIP: "cp36-* *-musllinux_x86_64 cp310-macosx_x86_64"
CIBW_ARCHS: "native"
CIBW_ENVIRONMENT: >
COMPILE_GO=True
CIBW_BEFORE_ALL_LINUX: |
yum install -y golang
CIBW_BEFORE_ALL_MACOS: |
Expand Down Expand Up @@ -195,7 +197,7 @@ jobs:
CIBW_SKIP: "cp36-* *-musllinux_x86_64 cp310-macosx_x86_64"
CIBW_ARCHS: "native"
CIBW_ENVIRONMENT: >
SETUPTOOLS_SCM_PRETEND_VERSION="${{ needs.get-version.outputs.version_without_prefix }}"
COMPILE_GO=True SETUPTOOLS_SCM_PRETEND_VERSION="${{ needs.get-version.outputs.version_without_prefix }}"
CIBW_BEFORE_ALL_LINUX: |
yum install -y golang
CIBW_BEFORE_ALL_MACOS: |
Expand All @@ -213,6 +215,8 @@ jobs:

build-python-sdk-macos-py310:
runs-on: macos-10.15
env:
COMPILE_GO: True
steps:
- uses: actions/checkout@v2
- name: Setup Python
Expand Down
3 changes: 3 additions & 0 deletions sdk/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ def build_extension(self, ext: Extension):
finally:
self.compiler, compiler = compiler, self.compiler

if os.getenv("COMPILE_GO", "false").lower() == "false":
return

bin_path = _generate_path_with_gopath()
go_env = json.loads(
subprocess.check_output(["go", "env", "-json"]).decode("utf-8").strip()
Expand Down