Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Windows, build scripts should prefer using python.exe from an active virtual env #82990

Closed
taleinat opened this issue Nov 15, 2019 · 4 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes build The build process and cross-build OS-windows type-feature A feature request or enhancement

Comments

@taleinat
Copy link
Contributor

BPO 38809
Nosy @pfmoore, @taleinat, @tjguk, @zware, @zooba, @miss-islington
PRs
  • bpo-38809: Windows build scripts use python.exe from virtual envs #17164
  • [3.8] bpo-38809: Windows build scripts use python.exe from virtual envs (GH-17164) #17237
  • [3.7] bpo-38809: Windows build scripts use python.exe from virtual envs (GH-17164) #17238
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-11-18.17:54:12.228>
    created_at = <Date 2019-11-15.07:23:46.875>
    labels = ['build', '3.8', '3.9', 'type-feature', '3.7', 'OS-windows']
    title = 'On Windows, build scripts should prefer using python.exe from an active virtual env'
    updated_at = <Date 2019-11-18.17:54:12.227>
    user = 'https://github.com/taleinat'

    bugs.python.org fields:

    activity = <Date 2019-11-18.17:54:12.227>
    actor = 'taleinat'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-11-18.17:54:12.228>
    closer = 'taleinat'
    components = ['Build', 'Windows']
    creation = <Date 2019-11-15.07:23:46.875>
    creator = 'taleinat'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38809
    keywords = ['patch']
    message_count = 4.0
    messages = ['356649', '356889', '356890', '356891']
    nosy_count = 6.0
    nosy_names = ['paul.moore', 'taleinat', 'tim.golden', 'zach.ware', 'steve.dower', 'miss-islington']
    pr_nums = ['17164', '17237', '17238']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue38809'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @taleinat
    Copy link
    Contributor Author

    On windows several .bat scripts call find_python.bat to find an appropriate python.exe. find_python.bat has no specific support for virtual envs, and usually ends up calling py.exe to find python.exe. Due to virtual envs not including a py.exe, this effectively ignores having an activated virtual env.

    It is currently possible to build with the specific python that one wants by setting the PYTHON env var. However, this is a simplistic and non-standard solution compared to virtual envs.

    IMO when there is an active virtual env, these scripts should certainly use python.exe from it!

    @taleinat taleinat added the docs Documentation in the Doc dir label Nov 15, 2019
    @taleinat taleinat added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes type-feature A feature request or enhancement build The build process and cross-build and removed docs Documentation in the Doc dir labels Nov 15, 2019
    @miss-islington
    Copy link
    Contributor

    New changeset ee703cb by Miss Islington (bot) (Tal Einat) in branch 'master':
    bpo-38809: Windows build scripts use python.exe from virtual envs (GH-17164)
    ee703cb

    @miss-islington
    Copy link
    Contributor

    New changeset 2b928d9 by Miss Islington (bot) in branch '3.7':
    bpo-38809: Windows build scripts use python.exe from virtual envs (GH-17164)
    2b928d9

    @miss-islington
    Copy link
    Contributor

    New changeset cbbf109 by Miss Islington (bot) in branch '3.8':
    bpo-38809: Windows build scripts use python.exe from virtual envs (GH-17164)
    cbbf109

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes build The build process and cross-build OS-windows type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants