diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46b8080..0d99af2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: @@ -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 @@ -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 @@ -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 diff --git a/pybind11_stubgen/parser/mixins/filter.py b/pybind11_stubgen/parser/mixins/filter.py index c011293..aee1048 100644 --- a/pybind11_stubgen/parser/mixins/filter.py +++ b/pybind11_stubgen/parser/mixins/filter.py @@ -40,11 +40,13 @@ class FilterClassMembers(IParser): "__builtins__", "__cached__", "__file__", + "__firstlineno__", "__loader__", "__name__", "__package__", "__path__", "__spec__", + "__static_attributes__", ), ) } @@ -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) diff --git a/tests/install-demo-module.sh b/tests/install-demo-module.sh index a9c60c1..6209846 100755 --- a/tests/install-demo-module.sh +++ b/tests/install-demo-module.sh @@ -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}/.." @@ -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 @@ -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"\ @@ -87,7 +67,7 @@ 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" ) @@ -95,10 +75,8 @@ install_pydemo() { main () { parse_args "$@" - clone_eigen clone_pybind11 install_pybind11 - install_eigen install_demo install_pydemo } diff --git a/tests/stubs/python-3.12/requirements.txt b/tests/stubs/python-3.12/requirements.txt index 164b471..7c84e9c 100644 --- a/tests/stubs/python-3.12/requirements.txt +++ b/tests/stubs/python-3.12/requirements.txt @@ -1,4 +1,5 @@ black==22.8.0 +cmeel-eigen==3.4.0.2 isort==5.10.1 numpy~=1.20 scipy~=1.0 diff --git a/tests/stubs/python-3.13 b/tests/stubs/python-3.13 new file mode 120000 index 0000000..0a8325a --- /dev/null +++ b/tests/stubs/python-3.13 @@ -0,0 +1 @@ +python-3.12 \ No newline at end of file diff --git a/tests/stubs/python-3.7/requirements.txt b/tests/stubs/python-3.7/requirements.txt index 164b471..7c84e9c 100644 --- a/tests/stubs/python-3.7/requirements.txt +++ b/tests/stubs/python-3.7/requirements.txt @@ -1,4 +1,5 @@ black==22.8.0 +cmeel-eigen==3.4.0.2 isort==5.10.1 numpy~=1.20 scipy~=1.0 diff --git a/tests/stubs/python-3.8/requirements.txt b/tests/stubs/python-3.8/requirements.txt index 164b471..7c84e9c 100644 --- a/tests/stubs/python-3.8/requirements.txt +++ b/tests/stubs/python-3.8/requirements.txt @@ -1,4 +1,5 @@ black==22.8.0 +cmeel-eigen==3.4.0.2 isort==5.10.1 numpy~=1.20 scipy~=1.0