Skip to content

Create the link directory "libs" to ".\\PCbuild\\<arch>" #160867

Closed as not planned

Description

@Locked-chess-official

Feature or enhancement

After building python on windows by running "build.bat", the final librarys are in ".\PCbuild\<arch>", but if you want to install the librarys for the test, some module building tools and cmakes (for example, scikit-build-core) will find the librarys in the directory ".\libs" and then failed. Create the link directory by mklink can fix it.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. Locked-chess-official commented on Oct 29, 2026

    @Locked-chess-official
    ContributorAuthor

    It is also important to link PC\pyconfig.h to Include

  2. Locked-chess-official commented on Oct 29, 2026

    @Locked-chess-official
    ContributorAuthor

    Here is an example error message:

    PS C:\Users\hh180\scikit_build_core_windows_cpython_repro\scikit_build_core_windows_cpython_repro> C:\Users\hh180\my_python\use_new_action\python.bat -m pip install .
      Running Release|x64 interpreter...
      Processing .\.
        Installing build dependencies ... done
        Getting requirements to build wheel ... done
        Preparing metadata (pyproject.toml) ... done
      Building wheels for collected packages: scikit-build-core-windows-cpython-repro
        Building wheel for scikit-build-core-windows-cpython-repro (pyproject.toml) ... error
        error: subprocess-exited-with-error
        × Building wheel for scikit-build-core-windows-cpython-repro (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [45 lines of output]
            *** scikit-build-core 1.1.1 using CMake 4.0.3 (wheel)
            *** Configuring CMake...
            2026-10-29 17:13:20,891 - scikit_build_core - WARNING - libdir: C:\Users\hh180\my_python\use_new_action\libs is not a directory
            2026-10-29 17:13:20,892 - scikit_build_core - WARNING - Can't find a Python library, got libdir=C:\Users\hh180\my_python\use_new_action\libs, ldlibrary=python315.dll, multiarch=None, masd=None
            loading initial cache file build\CMakeInit.txt
            -- Building for: Visual Studio 17 2022
            -- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.26300.
            -- The CXX compiler identification is MSVC 19.44.35228.0
            -- Detecting CXX compiler ABI info
            -- Detecting CXX compiler ABI info - done
            -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
            -- Detecting CXX compile features
            -- Detecting CXX compile features - done
            CMake Error at C:/Program Files/CMake/share/cmake-4.0/Modules/FindPython/Support.cmake:771 (file):
              file STRINGS file
              "C:/Users/hh180/my_python/use_new_action/Include/pyconfig.h" cannot be
              read.
            Call Stack (most recent call first):
              C:/Program Files/CMake/share/cmake-4.0/Modules/FindPython/Support.cmake:3745 (_python_get_version)
              C:/Program Files/CMake/share/cmake-4.0/Modules/FindPython.cmake:691 (include)
              CMakeLists.txt:6 (find_package)
      
      
            CMake Error at C:/Program Files/CMake/share/cmake-4.0/Modules/FindPython/Support.cmake:771 (file):
              file STRINGS file
              "C:/Users/hh180/my_python/use_new_action/Include/pyconfig.h" cannot be
              read.
            Call Stack (most recent call first):
              C:/Program Files/CMake/share/cmake-4.0/Modules/FindPython/Support.cmake:3745 (_python_get_version)
              C:/Program Files/CMake/share/cmake-4.0/Modules/FindPython.cmake:691 (include)
              CMakeLists.txt:6 (find_package)
      
      
            CMake Error at C:/Program Files/CMake/share/cmake-4.0/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
              Could NOT find Python (missing: Python_LIBRARIES Interpreter
              Development.Module) (found version "3.15.0")
            Call Stack (most recent call first):
              C:/Program Files/CMake/share/cmake-4.0/Modules/FindPackageHandleStandardArgs.cmake:591 (_FPHSA_FAILURE_MESSAGE)
              C:/Program Files/CMake/share/cmake-4.0/Modules/FindPython.cmake:712 (find_package_handle_standard_args)
              CMakeLists.txt:6 (find_package)
      
      
            -- Configuring incomplete, errors occurred!
      
            *** CMake configuration failed
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for scikit-build-core-windows-cpython-repro
      Failed to build scikit-build-core-windows-cpython-repro
      
      [notice] A new release of pip is available: 26.0.1 -> 26.2.2
      [notice] To update, run: C:\Users\hh180\my_python\use_new_action\PCbuild\amd64\python.exe -m pip install --upgrade pip
      error: failed-wheel-build-for-install
      
      × Failed to build installable wheels for some pyproject.toml based projects
      ╰─> scikit-build-core-windows-cpython-repro
    
  3. picnixz commented on Oct 29, 2026

    @picnixz
    Member
  4. zooba commented on Oct 29, 2026

    @zooba
    Member

    sysconfig ought to be capable of handling this. If not, it should be made capable of handling it.

    We should not create links or copying extra source files around during build to satisfy these kinds of use cases - it's led to breakage in the past and will lead to it again in the future.

    If the metadata isn't available and the tools can't adapt, then the answer is for the user to use PC/layout to copy the build into a new place with a layout that the tools expect.

  5. added
    pendingThe issue will be closed if no feedback is provided
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsbuildThe build process and cross-buildpendingThe issue will be closed if no feedback is providedtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions