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 — `make install` should symlink `bin/python` to `bin/python3` · Issue #102358 · python/cpython

make install should symlink bin/python to bin/python3 #102358

New issue
Copy link
New issue
Copy link
Open
Open
make install should symlink bin/python to bin/python3#102358
Copy link
Labels
buildThe build process and cross-buildThe build process and cross-buildtopic-installationtype-featureA feature request or enhancementA feature request or enhancement

Description

@carljm
carljm
opened on Mar 1, 2023
Issue body actions

Feature or enhancement

When you build and make install CPython from source, currently the installed bin/ directory contains python3 (symlinked to python3.XX), but it does not contain python. This issue proposes that it should also contain a python symlink.

Pitch

Windows installs (from python.org) do not contain a python3 executable, so there is currently no form that documentation examples can take that will work for all platforms reliably.

#99185 has more discussion of python vs python3 from the Windows perspective.

Venv bin/ dir does contain a python -> python3 symlink.

PEP 394 recommends python over python3 as the canonical way to invoke Python.

The conclusion in #98761 was that python -m ... should be preferred over python3 -m ... in documentation examples.

Of course, most users will not be building and make install ing their own Python. But if our recommendation to redistributors is to provide python -> python3, would it not be best to model that ourselves in make install? Is there any downside?

Reacted by Zachary Ware, Alex Waygood, Kirill Podoprigora and Erlend E. Aasland

Activity

  1. carljm
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Mar 1, 2023
  2. carljm commented on Mar 1, 2023

    @carljm
    carljm
    on Mar 1, 2023
    MemberAuthor
    More actions

    I guess the downside could be that anyone who is installing a Python 2 and a Python 3 to the same prefix, up til now, would have had python -> python2, and after this change they'd have a potential name collision. So the question is, are we enough beyond caring about Python 2 at this point that this is no longer a compelling reason?

    Reacted by Avasam
  3. terryjreedy commented on Mar 1, 2023

    @terryjreedy
    terryjreedy
    on Mar 1, 2023
    Member
    More actions

    I agree with the desire for a cross-platform startup command. However, macOS 10 (Catalina) still has 'python' linked to python2. Startup message says that 'future' versions of macOS would not have python2, so use 'python3'. Should not scripts that try to start python2 with 'python' fail rather than silently run python3. I believe that we have considered the presence and meaning of a 'python' link to be a matter for each distribution. Not sure we are ready to change this.

  4. carljm commented on Mar 2, 2023

    @carljm
    carljm
    on Mar 2, 2023
    MemberAuthor
    More actions

    I think the current (revised) PEP 394 is clear that we are beyond just "letting it be a matter for each distribution" to decide -- we are now already making a clear recommendation of what distributions should do. (They should make python be Python 3.)

    But the fact that Catalina didn't get there yet is meaningful. It seems OK to hold off on this change until there are no (relevant) platforms that still have python as Python 2 by default. (Definition of "relevant" left as an exercise for the reader.)

  5. carljm commented on Mar 2, 2023

    @carljm
    carljm
    on Mar 2, 2023
    MemberAuthor
    More actions

    we are now already making a clear recommendation of what distributions should do

    Actually, after a re-read of the full current state of PEP 394, it isn't at all clear that we've made that shift yet. (Though it seems like we might be feeling ready to do so soon?)

  6. itamaro commented on Aug 20, 2023

    @itamaro
    itamaro
    on Aug 20, 2023
    Contributor
    More actions

    It is unclear to me whether this issue is "awaiting a PR" (that adds a python symlink to make install), or pending further discussion about whether such a symlink should be added.

    While it seems that the "python" over "python3" has won the docs discussion, it is also clear that neither is universally consistent across platforms. I am unsure if universal consistency has any relevance to the "to symlink or not to symlink" question.

  7. iritkatriel
    added
    buildThe build process and cross-buildThe build process and cross-build
    topic-installation
    on Nov 27, 2023
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

    buildThe build process and cross-buildThe build process and cross-buildtopic-installationtype-featureA feature request or enhancementA feature request or enhancement

    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.