Skip to content

Commit

Permalink
fix: Go install gopy instead using go mod tidy (#2863)
Browse files Browse the repository at this point in the history
* fix: Go install gopy instead using go mod tidy

Signed-off-by: Achal Shah <[email protected]>

* remove newline

Signed-off-by: Achal Shah <[email protected]>

* fix

Signed-off-by: Achal Shah <[email protected]>

* fix

Signed-off-by: Achal Shah <[email protected]>
  • Loading branch information
achals authored Jun 27, 2022
1 parent 412d249 commit 2f2b519
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def __repr__(self) -> str:
f"{self.provider.upper()}",
f"{self.offline_store_creator.__name__.split('.')[-1].replace('DataSourceCreator', '')}",
online_store_type,
f"python_fs={self.python_feature_server}",
f"go_fs={self.go_feature_retrieval}",
f"python_fs:{self.python_feature_server}",
f"go_fs:{self.go_feature_retrieval}",
]
)

Expand Down
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,18 @@ def build_extension(self, ext: Extension):
subprocess.check_output(["go", "env", "-json"]).decode("utf-8").strip()
)

print(f"Go env: {go_env}")
print(f"CWD: {os.getcwd()}")

destination = os.path.dirname(os.path.abspath(self.get_ext_fullpath(ext.name)))
subprocess.check_call(["go", "mod", "tidy"], env={"PATH": bin_path, **go_env})
subprocess.check_call(["go", "install", "golang.org/x/tools/cmd/goimports"],
env={"PATH": bin_path, **go_env})
subprocess.check_call(["go", "get", "github.com/go-python/[email protected]"],
env={"PATH": bin_path, **go_env})
subprocess.check_call(["go", "install", "github.com/go-python/gopy"],
env={"PATH": bin_path, **go_env})
subprocess.check_call(["go", "mod", "tidy"],
env={"PATH": bin_path, **go_env})
subprocess.check_call(
[
"gopy",
Expand Down

0 comments on commit 2f2b519

Please sign in to comment.