diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml
index ced408f2a40c8ebcdbf56e30f07dd29115d87512..3a5ca233b1ae2ed94bfb72d39236943a6c48d8ac 100644
--- a/.github/workflows/windows-conda.yml
+++ b/.github/workflows/windows-conda.yml
@@ -51,11 +51,6 @@ jobs:
         cmake --build . --config Release --target install
         if errorlevel 1 exit 1
 
-        :: Build stubs
-        git clone https://github.com/jcarpent/pybind11-stubgen.git
-        python "%CD%\pybind11-stubgen\pybind11_stubgen\__init__.py" -o %CONDA_PREFIX%\Lib\site-packages\eigenpy eigenpy --boost-python --ignore-invalid signature --no-setup-py --root-module-suffix ""
-        if errorlevel 1 exit 1
-
         :: Testing
         ctest --output-on-failure -C Release -V
         if errorlevel 1 exit 1
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index b23c49ab32f76e111d3049da3d3e17d3015db9d6..6e769cc15d1d040a696a5ae85600f51f9247825d 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -61,7 +61,7 @@ if(GENERATE_PYTHON_STUBS)
   load_stubgen()
 
   generate_stubs(${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_NAME}
-                 ${ABSOLUTE_PYTHON_SITELIB} ${PYWRAP})
+                 ${ABSOLUTE_PYTHON_SITELIB} ${PYWRAP}) ${PROJECT_NAME}
 endif(GENERATE_PYTHON_STUBS)
 
 # --- INSTALL SCRIPTS