Skip to content

Commit 152e40c

Browse files
committed
ci: fix stubgen by removing gym import
1 parent 9957f2f commit 152e40c

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ jobs:
169169
pip install -v --no-build-isolation '.[dev]'
170170
pip install -v --no-build-isolation extensions/${{ matrix.extension }}
171171
- name: Check that stub files are up-to-date
172-
run: xvfb-run make -C extensions/${{ matrix.extension }} stubgen && git diff --exit-code
172+
run: make -C extensions/${{ matrix.extension }} stubgen && git diff --exit-code
173173
- name: Clang build
174174
run: make -C extensions/${{ matrix.extension }} clangcompile PYTHON_EXECUTABLE=${{ steps.setup-python.outputs.python-path }}
175175
- name: Check clang format
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
from rcs_fr3 import desk, envs
1+
import sys
2+
3+
from rcs_fr3 import desk
24
from rcs_fr3._core import hw
35

46
__all__ = [
57
"desk",
6-
"envs",
78
"hw",
89
]
10+
11+
if "pybind11_stubgen" not in sys.modules:
12+
from rcs_panda import envs # noqa: F401
13+
14+
__all__.append("envs")
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
from rcs_panda import envs
1+
import sys
2+
23
from rcs_panda._core import hw
34

45
__all__ = [
5-
"envs",
66
"hw",
77
]
8+
9+
# prevent gymnasium import during stubgen, which can cause a segfault
10+
if "pybind11_stubgen" not in sys.modules:
11+
from rcs_panda import envs # noqa: F401
12+
13+
__all__.append("envs")

0 commit comments

Comments
 (0)