Skip to content

Commit

Permalink
chore: Install dependencies into a virtualenv for gitpod (#2749)
Browse files Browse the repository at this point in the history
* chore: Add pybindgen to setup_requires

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

* chore: Add env to gopy command

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

* remove clone

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

* More fixes

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

* Fix protos persistance

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

* Just create a virtualenv locally

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

* compile python protos

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

* rmove env stuff

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

* fix

Signed-off-by: Achal Shah <[email protected]>
  • Loading branch information
achals authored May 31, 2022
1 parent 3d2b431 commit de97bd3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
5 changes: 0 additions & 5 deletions .gitpod.Dockerfile

This file was deleted.

14 changes: 12 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# https://www.gitpod.io/docs/config-gitpod-file
image:
file: .gitpod.Dockerfile
tasks:
- init: |
python -m venv venv
source venv/bin/activate
pip install pre-commit
pre-commit install --hook-type pre-commit --hook-type pre-push
pip install '.[dev]'
make compile-protos-python
make compile-protos-go
make compile-go-lib
env:
PYTHONUSERBASE: "/workspace/.pip-modules"
command: |
source venv/bin/activate
git config --global alias.ci 'commit -s'
git config --global alias.sw switch
git config --global alias.st status
Expand All @@ -31,3 +37,7 @@ github:
addComment: false
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: false

vscode:
extensions:
- ms-python.python
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ def _generate_python_protos(self, path: str):
self.python_folder,
]
+ proto_files,
env=os.environ
)

def run(self):
Expand Down Expand Up @@ -335,8 +334,6 @@ def _generate_go_protos(self, path: str):
proto_files = glob.glob(os.path.join(self.proto_folder, path))

try:
e = os.environ.copy()
e["PATH"] = self.path_val
subprocess.check_call(
self.go_protoc
+ [
Expand All @@ -350,7 +347,7 @@ def _generate_go_protos(self, path: str):
"--go-grpc_opt=module=github.com/feast-dev/feast/go/protos",
]
+ proto_files,
env=e,
env={"PATH": self.path_val},
)
except CalledProcessError as e:
print(f"Stderr: {e.stderr}")
Expand Down Expand Up @@ -499,6 +496,7 @@ def copy_extensions_to_source(self):
"grpcio",
"grpcio-tools==1.44.0",
"mypy-protobuf==3.1",
"pybindgen==0.22.0",
"sphinx!=4.0.0",
],
cmdclass={
Expand Down

0 comments on commit de97bd3

Please sign in to comment.