GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Ensure venv works with source builds when using --copies · Issue #92897 · python/cpython

Ensure venv works with source builds when using --copies #92897

New issue
Copy link
New issue
Copy link
Closed
Closed
Ensure venv works with source builds when using --copies#92897
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@jkloth
jkloth
opened on May 17, 2022
Issue body actions

Currently a venv created with --copies or on Windows doesn't respect the sysconfig.is_python_build() property of the creating interpreter. This leads to compilation errors when attempting to build extensions in the virtual environment.

Linked PRs

  • GH-92897: schedule the check_home deprecation to 3.15 #129102
  • [3.13] GH-92897: schedule the check_home deprecation to 3.15 (GH-129102) #130583
  • [3.12] GH-92897: schedule the check_home deprecation to 3.15 (GH-129102) #130585
  • gh-92897: Doc: the check_home removal has been scheduled for 3.15 #130586
  • gh-92897: document removal of check_home in Doc/whatsnew/3.15.rst #133815

Activity

  1. jkloth
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 17, 2022
  2. jkloth
    added a commit that references this issue on May 17, 2022

    pythongh-92897: Ensure `venv --copies` respects source build property…

    4b60bf8
  3. eryksun
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on May 17, 2022
  4. jkloth commented on May 17, 2022

    @jkloth
    jkloth
    on May 17, 2022
    ContributorAuthor
    More actions

    An example error when building psutil.

    running build_ext
    building 'psutil._psutil_windows' extension
    creating build\temp.win-amd64-3.12
    creating build\temp.win-amd64-3.12\Release
    creating build\temp.win-amd64-3.12\Release\psutil
    creating build\temp.win-amd64-3.12\Release\psutil\arch
    creating build\temp.win-amd64-3.12\Release\psutil\arch\windows
    C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=590 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x01000 -D_AVAIL_WINVER_=0x01000 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\Users\Jeremy\Source\pyperformance\include -IC:\Public\Devel\cpython\main\include -IC:\Public\Devel\cpython\main\Include -IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\ATLMFC\include -IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\shared -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\um -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\winrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt /Tcpsutil/_psutil_common.c /Fobuild\temp.win-amd64-3.12\Release\psutil/_psutil_common.obj
    _psutil_common.c
    C:\Public\Devel\cpython\main\include\Python.h(12): fatal error C1083: Cannot open include file: 'pyconfig.h': No such file or directory
    error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    

    After the PR, this builds without error (kinda). There is a bug in setuptools that causes an additional error. This can be worked around by setting the environment variable SETUPTOOLS_USE_DISTUTILS=no.

  5. vstinner commented on May 18, 2022

    @vstinner
    vstinner
    on May 18, 2022
    Member
    More actions

    @jkloth proposed #92899 to fix this issue.

  6. jkloth commented on May 25, 2022

    @jkloth
    jkloth
    on May 25, 2022
    ContributorAuthor
    More actions

    I'll add that prior to 3.8 this problem did not occur. Just that source builds on Windows are a rare thing to start with much less compiling in virtual environments from a source build so this change in behavior has gone relatively unnoticed.

  7. vsajip
    added 4 commits that reference this issue on Jul 5, 2022

    gh-92897: Ensure `venv --copies` respects source build property of th…

    0675975

    [3.11] pythongh-92897: Ensure `venv --copies` respects source build p…

    124acce

    pythongh-92897: Ensure `venv --copies` respects source build property…

    5e0626c

    [3.11] gh-92897: Ensure `venv --copies` respects source build propert…

    49aeda9
  8. vsajip commented on Jul 5, 2022

    @vsajip
    vsajip
    on Jul 5, 2022
    Member
    More actions

    Closing, as PRs merged for main and 3.11 branches.

  9. vsajip
    closed this as completedon Jul 5, 2022
  10. FFY00 commented on Jan 20, 2025

    @FFY00
    FFY00
    on Jan 20, 2025
    Member
    More actions

    Is there any plan for the removal of the check_home argument in sysconfig.is_python_build, whose deprecation was introduced in GH-92899?

    Keeping deprecated as-is doesn't really create much maintenance burden, and removing it can break user code, though searching for such usages on Github didn't yield any results. Perhaps we could schedule its removal for 3.15 or 3.16, and clearly state that in the deprecation warning? What do you folks think?

  11. vstinner commented on Jan 20, 2025

    @vstinner
    vstinner
    on Jan 20, 2025
    Member
    More actions

    The deprecated check_home parameter can be removed in Python 3.15.

    Reacted by Filipe Laíns
  12. FFY00
    added 2 commits that reference this issue on Jan 20, 2025

    pythonGH-92897: schedule the check_home deprecation to 3.15

    25cf141

    GH-92897: schedule the check_home deprecation to 3.15 (#129102)

    e52ab56
  13. srinivasreddy
    added a commit that references this issue on Jan 21, 2025

    pythonGH-92897: schedule the check_home deprecation to 3.15 (python#1…

    4f6a7f6
  14. hugovk
    added 2 commits that reference this issue on Feb 26, 2025

    [3.13] pythonGH-92897: schedule the check_home deprecation to 3.15 (p…

    3850b51

    [3.12] pythonGH-92897: schedule the check_home deprecation to 3.15 (p…

    19dfe00
  15. FFY00
    added 2 commits that reference this issue on Feb 27, 2025

    [3.13] GH-92897: schedule the check_home deprecation to 3.15 (GH-129102…

    4100fb0

    [3.12] GH-92897: schedule the check_home deprecation to 3.15 (GH-129102…

    a55a9cd
  16. hugovk
    added a commit that references this issue on Mar 14, 2025

    gh-92897: Doc: the check_home removal has been scheduled for 3.15 (#1…

    3d797e4
  17. plashchynski
    added a commit that references this issue on Mar 17, 2025

    pythongh-92897: Doc: the check_home removal has been scheduled for 3.…

    bdfc245
  18. picnixz
    added a commit that references this issue on May 11, 2025

    gh-92897: document removal of `check_home` in `Doc/whatsnew/3.15.rst` (…

    add8289
  19. Pranjal095
    added a commit that references this issue on Jul 12, 2025

    pythongh-92897: document removal of `check_home` in `Doc/whatsnew/3.1…

    f44a3c9
  20. taegyunkim
    added a commit that references this issue on Aug 4, 2025

    pythongh-92897: document removal of `check_home` in `Doc/whatsnew/3.1…

    8921000
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

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.