From 56aa4581ea75fa5bab72d2317b531077d023e0b0 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Mon, 8 Aug 2022 09:31:29 +0200 Subject: [PATCH 1/2] use --ignore-invalid=all flag to be able to upgrade pybind11-stubgen --- python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index b4f46866..ccab5494 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -32,7 +32,7 @@ if(pybind11_stubgen AND NOT ${pybind11_stubgen} EQUAL 0) for better autocompletion support install it with pip.") else() message("-- Found pybind11-stubgen: ${stubgen_path}") - install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pybind11_stubgen --no-setup-py netgen)") + install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pybind11_stubgen --no-setup-py --ignore-invalid=all netgen)") install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../stubs/netgen-stubs/ DESTINATION ${NG_INSTALL_DIR_PYTHON}/netgen/ COMPONENT netgen) endif() endif(BUILD_STUB_FILES) From b98a0e1f889bb513f6662dfb6e2fc1d1f6632e9d Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Mon, 8 Aug 2022 09:35:45 +0200 Subject: [PATCH 2/2] add pybind11 stubgen do test scripts --- tests/build_pip.ps1 | 2 +- tests/build_pip.sh | 2 +- tests/build_pip_mac.sh | 2 +- tests/dockerfile | 2 +- tests/dockerfile_mpi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/build_pip.ps1 b/tests/build_pip.ps1 index b8e3a140..68af2952 100644 --- a/tests/build_pip.ps1 +++ b/tests/build_pip.ps1 @@ -9,6 +9,6 @@ $env:NETGEN_CCACHE = 1 $pydir=$args[0] & $pydir\python.exe --version -& $pydir\python.exe -m pip install scikit-build wheel numpy twine +& $pydir\python.exe -m pip install scikit-build wheel numpy twine pybind11-stubgen & $pydir\python setup.py bdist_wheel -G"Visual Studio 16 2019" & $pydir\python -m twine upload dist\*.whl diff --git a/tests/build_pip.sh b/tests/build_pip.sh index 1d6f6bd3..b4e3299a 100755 --- a/tests/build_pip.sh +++ b/tests/build_pip.sh @@ -11,7 +11,7 @@ for pyversion in 38 39 310 do export PYDIR="/opt/python/cp${pyversion}-cp${pyversion}/bin" echo $PYDIR - $PYDIR/pip install -U pytest-check numpy wheel scikit-build + $PYDIR/pip install -U pytest-check numpy wheel scikit-build pybind11-stubgen rm -rf _skbuild $PYDIR/pip wheel . diff --git a/tests/build_pip_mac.sh b/tests/build_pip_mac.sh index 980e4976..f07655e5 100755 --- a/tests/build_pip_mac.sh +++ b/tests/build_pip_mac.sh @@ -6,7 +6,7 @@ export NETGEN_CCACHE=1 export PYDIR=/Library/Frameworks/Python.framework/Versions/$1/bin $PYDIR/python3 --version -$PYDIR/pip3 install --user numpy twine scikit-build wheel +$PYDIR/pip3 install --user numpy twine scikit-build wheel pybind11-stubgen export CMAKE_OSX_ARCHITECTURES='arm64;x86_64' $PYDIR/python3 setup.py bdist_wheel --plat-name macosx-10.15-universal2 -j10 diff --git a/tests/dockerfile b/tests/dockerfile index 8bb9919d..d67883e9 100644 --- a/tests/dockerfile +++ b/tests/dockerfile @@ -29,5 +29,5 @@ RUN apt-get update && apt-get -y install \ tcl-dev \ tk-dev -RUN python3 -m pip install pytest-check +RUN python3 -m pip install pytest-check pybind11-stubgen ADD . /root/src/netgen diff --git a/tests/dockerfile_mpi b/tests/dockerfile_mpi index 98cf6780..df905b17 100644 --- a/tests/dockerfile_mpi +++ b/tests/dockerfile_mpi @@ -23,5 +23,5 @@ RUN apt-get update && apt-get -y install \ tcl-dev \ tk-dev -RUN python3 -m pip install pytest-mpi pytest-check pytest +RUN python3 -m pip install pytest-mpi pytest-check pytest pybind11-stubgen ADD . /root/src/netgen