Skip to content

Commit de97bd3

Browse files
authored
chore: Install dependencies into a virtualenv for gitpod (#2749)
* 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]>
1 parent 3d2b431 commit de97bd3

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.gitpod.Dockerfile

Lines changed: 0 additions & 5 deletions
This file was deleted.

.gitpod.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
# https://www.gitpod.io/docs/config-gitpod-file
2-
image:
3-
file: .gitpod.Dockerfile
42
tasks:
53
- init: |
4+
python -m venv venv
5+
source venv/bin/activate
6+
67
pip install pre-commit
78
pre-commit install --hook-type pre-commit --hook-type pre-push
89
pip install '.[dev]'
10+
make compile-protos-python
911
make compile-protos-go
1012
make compile-go-lib
13+
env:
14+
PYTHONUSERBASE: "/workspace/.pip-modules"
1115
command: |
16+
source venv/bin/activate
17+
1218
git config --global alias.ci 'commit -s'
1319
git config --global alias.sw switch
1420
git config --global alias.st status
@@ -31,3 +37,7 @@ github:
3137
addComment: false
3238
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
3339
addBadge: false
40+
41+
vscode:
42+
extensions:
43+
- ms-python.python

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ def _generate_python_protos(self, path: str):
249249
self.python_folder,
250250
]
251251
+ proto_files,
252-
env=os.environ
253252
)
254253

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

337336
try:
338-
e = os.environ.copy()
339-
e["PATH"] = self.path_val
340337
subprocess.check_call(
341338
self.go_protoc
342339
+ [
@@ -350,7 +347,7 @@ def _generate_go_protos(self, path: str):
350347
"--go-grpc_opt=module=github.com/feast-dev/feast/go/protos",
351348
]
352349
+ proto_files,
353-
env=e,
350+
env={"PATH": self.path_val},
354351
)
355352
except CalledProcessError as e:
356353
print(f"Stderr: {e.stderr}")
@@ -499,6 +496,7 @@ def copy_extensions_to_source(self):
499496
"grpcio",
500497
"grpcio-tools==1.44.0",
501498
"mypy-protobuf==3.1",
499+
"pybindgen==0.22.0",
502500
"sphinx!=4.0.0",
503501
],
504502
cmdclass={

0 commit comments

Comments
 (0)