Skip to content

Commit 198a75a

Browse files
authored
Fix & update CI (#243)
1 parent cf58aa6 commit 198a75a

File tree

7 files changed

+16
-29
lines changed

7 files changed

+16
-29
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Python
1919
uses: actions/setup-python@v5
2020
with:
21-
python-version: '3.11'
21+
python-version: '3.13'
2222
- name: Checkout
2323
uses: actions/checkout@v4
2424
- name: Install requirements
@@ -46,12 +46,12 @@ jobs:
4646
pybind11-branch:
4747
- "master"
4848
python:
49+
- "3.13"
4950
- "3.12"
5051
- "3.11"
5152
- "3.10"
5253
- "3.9"
5354
- "3.8"
54-
- "3.7"
5555
numpy-format:
5656
- "numpy-array-wrap-with-annotated"
5757
include:
@@ -87,7 +87,7 @@ jobs:
8787

8888
- name: Install demo module
8989
shell: bash
90-
run: ./tests/install-demo-module.sh --pybind11-branch "${{ matrix.pybind11-branch }}" --eigen-branch "master"
90+
run: ./tests/install-demo-module.sh --pybind11-branch "${{ matrix.pybind11-branch }}"
9191

9292
- name: Check stubs generation
9393
shell: bash
@@ -114,11 +114,12 @@ jobs:
114114
matrix:
115115
test-package: [ "gemmi" ]
116116
python:
117+
- "3.13"
118+
- "3.12"
117119
- "3.11"
118120
- "3.10"
119121
- "3.9"
120122
- "3.8"
121-
- "3.7"
122123
steps:
123124
- uses: actions/checkout@v4
124125

@@ -159,7 +160,7 @@ jobs:
159160
- name: Setup Python ${{ matrix.python }}
160161
uses: actions/setup-python@v2
161162
with:
162-
python-version: "3.10"
163+
python-version: "3.13"
163164

164165
- name: Build dist
165166
run: pipx run build --sdist --wheel

pybind11_stubgen/parser/mixins/filter.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ class FilterClassMembers(IParser):
4040
"__builtins__",
4141
"__cached__",
4242
"__file__",
43+
"__firstlineno__",
4344
"__loader__",
4445
"__name__",
4546
"__package__",
4647
"__path__",
4748
"__spec__",
49+
"__static_attributes__",
4850
),
4951
)
5052
}
@@ -104,6 +106,8 @@ def handle_class_member(
104106
return None
105107
if name.startswith("__pybind11_module"):
106108
return None
109+
if name.startswith("_pybind11_conduit_v1_"):
110+
return None
107111
return super().handle_class_member(path, class_, member)
108112

109113

tests/install-demo-module.sh

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,17 @@ function parse_args() {
1515
fi
1616
echo "Usage: $0 --pybind11-branch PYBIND11_BRANCH"
1717
echo " --pybind11-branch name of pybind11 branch"
18-
echo " --eigen-branch name of eigen branch"
1918
exit 1
2019
}
2120

2221
# parse params
2322
while [[ "$#" > 0 ]]; do case $1 in
2423
--pybind11-branch) PYBIND11_BRANCH="$2"; shift;shift;;
25-
--eigen-branch) EIGEN_BRANCH="$2"; shift;shift;;
2624
*) usage "Unknown parameter passed: $1"; shift; shift;;
2725
esac; done
2826

2927
# verify params
3028
if [ -z "$PYBIND11_BRANCH" ]; then usage "PYBIND11_BRANCH is not set"; fi;
31-
if [ -z "$EIGEN_BRANCH" ]; then usage "EIGEN_BRANCH is not set"; fi;
3229

3330
TESTS_ROOT="$(readlink -m "$(dirname "$0")")"
3431
PROJECT_ROOT="${TESTS_ROOT}/.."
@@ -39,18 +36,6 @@ function parse_args() {
3936
}
4037

4138

42-
clone_eigen() {
43-
mkdir -p "${EXTERNAL_DIR}"
44-
if [ ! -d "${EXTERNAL_DIR}/eigen" ]; then
45-
git clone \
46-
--depth 1 \
47-
--branch "${EIGEN_BRANCH}" \
48-
--single-branch \
49-
https://gitlab.com/libeigen/eigen.git \
50-
"${EXTERNAL_DIR}/eigen"
51-
fi
52-
}
53-
5439
clone_pybind11() {
5540
mkdir -p "${EXTERNAL_DIR}"
5641
if [ ! -d "${EXTERNAL_DIR}/pybind11" ]; then
@@ -63,13 +48,8 @@ clone_pybind11() {
6348
fi
6449
}
6550

66-
install_eigen() {
67-
cmake -S "${EXTERNAL_DIR}/eigen" -B "${BUILD_ROOT}/eigen"
68-
cmake --install "${BUILD_ROOT}/eigen" \
69-
--prefix "${INSTALL_PREFIX}"
70-
}
71-
7251
install_pybind11() {
52+
export CMAKE_PREFIX_PATH="$(cmeel cmake)"
7353
cmake \
7454
-S "${EXTERNAL_DIR}/pybind11" \
7555
-B "${BUILD_ROOT}/pybind11"\
@@ -87,18 +67,16 @@ install_demo() {
8767

8868
install_pydemo() {
8969
(
90-
export CMAKE_PREFIX_PATH="$(readlink -m "${INSTALL_PREFIX}")";
70+
export CMAKE_PREFIX_PATH="$(readlink -m "${INSTALL_PREFIX}"):$(cmeel cmake)";
9171
export CMAKE_ARGS="-DCMAKE_CXX_STANDARD=17";
9272
pip install --force-reinstall "${TESTS_ROOT}/py-demo"
9373
)
9474
}
9575

9676
main () {
9777
parse_args "$@"
98-
clone_eigen
9978
clone_pybind11
10079
install_pybind11
101-
install_eigen
10280
install_demo
10381
install_pydemo
10482
}

tests/stubs/python-3.12/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
black==22.8.0
2+
cmeel-eigen==3.4.0.2
23
isort==5.10.1
34
numpy~=1.20
45
scipy~=1.0

tests/stubs/python-3.13

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.12

tests/stubs/python-3.7/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
black==22.8.0
2+
cmeel-eigen==3.4.0.2
23
isort==5.10.1
34
numpy~=1.20
45
scipy~=1.0

tests/stubs/python-3.8/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
black==22.8.0
2+
cmeel-eigen==3.4.0.2
23
isort==5.10.1
34
numpy~=1.20
45
scipy~=1.0

0 commit comments

Comments
 (0)