Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.13'
- name: Checkout
uses: actions/checkout@v4
- name: Install requirements
Expand Down Expand Up @@ -46,12 +46,12 @@ jobs:
pybind11-branch:
- "master"
python:
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
numpy-format:
- "numpy-array-wrap-with-annotated"
include:
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:

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

- name: Check stubs generation
shell: bash
Expand All @@ -114,11 +114,12 @@ jobs:
matrix:
test-package: [ "gemmi" ]
python:
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -159,7 +160,7 @@ jobs:
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.13"

- name: Build dist
run: pipx run build --sdist --wheel
Expand Down
4 changes: 4 additions & 0 deletions pybind11_stubgen/parser/mixins/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ class FilterClassMembers(IParser):
"__builtins__",
"__cached__",
"__file__",
"__firstlineno__",
"__loader__",
"__name__",
"__package__",
"__path__",
"__spec__",
"__static_attributes__",
),
)
}
Expand Down Expand Up @@ -104,6 +106,8 @@ def handle_class_member(
return None
if name.startswith("__pybind11_module"):
return None
if name.startswith("_pybind11_conduit_v1_"):
return None
return super().handle_class_member(path, class_, member)


Expand Down
26 changes: 2 additions & 24 deletions tests/install-demo-module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@ function parse_args() {
fi
echo "Usage: $0 --pybind11-branch PYBIND11_BRANCH"
echo " --pybind11-branch name of pybind11 branch"
echo " --eigen-branch name of eigen branch"
exit 1
}

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

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

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


clone_eigen() {
mkdir -p "${EXTERNAL_DIR}"
if [ ! -d "${EXTERNAL_DIR}/eigen" ]; then
git clone \
--depth 1 \
--branch "${EIGEN_BRANCH}" \
--single-branch \
https://gitlab.com/libeigen/eigen.git \
"${EXTERNAL_DIR}/eigen"
fi
}

clone_pybind11() {
mkdir -p "${EXTERNAL_DIR}"
if [ ! -d "${EXTERNAL_DIR}/pybind11" ]; then
Expand All @@ -63,13 +48,8 @@ clone_pybind11() {
fi
}

install_eigen() {
cmake -S "${EXTERNAL_DIR}/eigen" -B "${BUILD_ROOT}/eigen"
cmake --install "${BUILD_ROOT}/eigen" \
--prefix "${INSTALL_PREFIX}"
}

install_pybind11() {
export CMAKE_PREFIX_PATH="$(cmeel cmake)"
cmake \
-S "${EXTERNAL_DIR}/pybind11" \
-B "${BUILD_ROOT}/pybind11"\
Expand All @@ -87,18 +67,16 @@ install_demo() {

install_pydemo() {
(
export CMAKE_PREFIX_PATH="$(readlink -m "${INSTALL_PREFIX}")";
export CMAKE_PREFIX_PATH="$(readlink -m "${INSTALL_PREFIX}"):$(cmeel cmake)";
export CMAKE_ARGS="-DCMAKE_CXX_STANDARD=17";
pip install --force-reinstall "${TESTS_ROOT}/py-demo"
)
}

main () {
parse_args "$@"
clone_eigen
clone_pybind11
install_pybind11
install_eigen
install_demo
install_pydemo
}
Expand Down
1 change: 1 addition & 0 deletions tests/stubs/python-3.12/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
black==22.8.0
cmeel-eigen==3.4.0.2
isort==5.10.1
numpy~=1.20
scipy~=1.0
Expand Down
1 change: 1 addition & 0 deletions tests/stubs/python-3.13
1 change: 1 addition & 0 deletions tests/stubs/python-3.7/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
black==22.8.0
cmeel-eigen==3.4.0.2
isort==5.10.1
numpy~=1.20
scipy~=1.0
Expand Down
1 change: 1 addition & 0 deletions tests/stubs/python-3.8/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
black==22.8.0
cmeel-eigen==3.4.0.2
isort==5.10.1
numpy~=1.20
scipy~=1.0
Expand Down