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

Doc sys.prefix lib & include directories on Windows and Mac #89946

Closed
CatherineH mannequin opened this issue Nov 11, 2021 · 10 comments
Closed

Doc sys.prefix lib & include directories on Windows and Mac #89946

CatherineH mannequin opened this issue Nov 11, 2021 · 10 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@CatherineH
Copy link
Mannequin

CatherineH mannequin commented Nov 11, 2021

BPO 45788
Nosy @terryjreedy, @vstinner, @ned-deily, @zooba, @miss-islington, @CatherineH
PRs
  • bpo-45788: Link sys.prefix doc to 'Installation paths' #29606
  • [3.10] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606) #29631
  • [3.9] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606) #29632
  • 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 2021-11-18.21:46:42.428>
    created_at = <Date 2021-11-11.18:16:42.063>
    labels = ['3.11', 'type-bug', '3.9', '3.10', 'docs']
    title = 'Doc sys.prefix lib & include directories on Windows and Mac'
    updated_at = <Date 2021-11-18.21:46:42.427>
    user = 'https://github.com/CatherineH'

    bugs.python.org fields:

    activity = <Date 2021-11-18.21:46:42.427>
    actor = 'terry.reedy'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2021-11-18.21:46:42.428>
    closer = 'terry.reedy'
    components = ['Documentation']
    creation = <Date 2021-11-11.18:16:42.063>
    creator = 'CatherineH'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45788
    keywords = ['patch']
    message_count = 10.0
    messages = ['406168', '406249', '406253', '406255', '406261', '406264', '406265', '406562', '406564', '406565']
    nosy_count = 7.0
    nosy_names = ['terry.reedy', 'vstinner', 'ned.deily', 'docs@python', 'steve.dower', 'miss-islington', 'CatherineH']
    pr_nums = ['29606', '29631', '29632']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45788'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @CatherineH
    Copy link
    Mannequin Author

    CatherineH mannequin commented Nov 11, 2021

    On the page:

    https://docs.python.org/3.10/library/sys.html#sys.prefix

    the text says

    The main collection of Python library modules is installed in the directory prefix/lib/pythonX.Y while the platform independent header files (all except pyconfig.h) are stored in prefix/include/pythonX.Y, where X.Y is the version number of Python, for example 3.2.

    However, this seems to only be true on *nix systems. On Windows, the lib and header files are just in prefix/lib and prefix/include. Maybe the text should be changed to say:

    On linux, the main collection of Python library modules is installed in the directory prefix/lib/pythonX.Y while the platform independent header files (all except pyconfig.h) are stored in prefix/include/pythonX.Y, where X.Y is the version number of Python, for example 3.2. On Winodws, there are in prefix/lib and prefix/includes.

    @CatherineH CatherineH mannequin added type-feature A feature request or enhancement 3.7 (EOL) end of life 3.8 only security fixes 3.10 only security fixes 3.9 only security fixes labels Nov 11, 2021
    @CatherineH CatherineH mannequin assigned docspython Nov 11, 2021
    @CatherineH CatherineH mannequin added docs Documentation in the Doc dir 3.7 (EOL) end of life 3.8 only security fixes 3.10 only security fixes 3.9 only security fixes labels Nov 11, 2021
    @CatherineH CatherineH mannequin assigned docspython Nov 11, 2021
    @CatherineH CatherineH mannequin added the docs Documentation in the Doc dir label Nov 11, 2021
    @terryjreedy
    Copy link
    Member

    On Windows, I believe the correct sentence would be "On Windows, they are in prefix/Lib and prefix/include". Ned, how to complete "On macOS, they are in ?."

    Victor, with recent file movement, is "while the platform independent header files (all except pyconfig.h) are stored in prefix/include" still true? In what way is pyconfig.h exceptional? Should 'include' be augmented with 'or its subdirectories'?

    @terryjreedy terryjreedy added 3.11 only security fixes and removed 3.7 (EOL) end of life 3.8 only security fixes labels Nov 12, 2021
    @terryjreedy terryjreedy changed the title sys.prefix include directory on Windows Doc sys.prefix lib & include directories on Windows and Mac Nov 12, 2021
    @terryjreedy terryjreedy added type-bug An unexpected behavior, bug, or error 3.11 only security fixes and removed type-feature A feature request or enhancement 3.7 (EOL) end of life 3.8 only security fixes labels Nov 12, 2021
    @terryjreedy terryjreedy changed the title sys.prefix include directory on Windows Doc sys.prefix lib & include directories on Windows and Mac Nov 12, 2021
    @terryjreedy terryjreedy added type-bug An unexpected behavior, bug, or error and removed type-feature A feature request or enhancement labels Nov 12, 2021
    @ned-deily
    Copy link
    Member

    Which installations paths are used varies on other factors besides platform. Rather than duplicate information here, I suggest simplifying the sys.prefix doc here by removing the details about installation paths and instead refer to the Installation Paths section of the sysconfig module documentation, which should be the primary reference for this info:

    https://docs.python.org/3/library/sysconfig.html#installation-paths

    @vstinner
    Copy link
    Member

    Victor, with recent file movement, is "while the platform independent header files (all except pyconfig.h) are stored in prefix/include" still true?

    Are you talking about Include/cpython/ and Include/internal/ subdirectories?

    Should 'include' be augmented with 'or its subdirectories'?

    You can add it if you want.

    @terryjreedy
    Copy link
    Member

    Ned, I like your idea. In particular, link to sysconfig.get_paths for how prefix is used on a particular machine to define installation paths.

    Sidenote:
    https://docs.python.org/3/library/sysconfig.html#installation-paths
    says "Python currently supports seven schemes:" and lists 5 get_scheme_names list 6, with the extra one being
    'osx_framework_user'. Would
    osx_framework_user: scheme for macOS
    be a satisfactory entry?

    @CatherineH
    Copy link
    Mannequin Author

    CatherineH mannequin commented Nov 13, 2021

    Hey thanks Ned, sysconfig was exactly what I was looking for when I was reading the sys documentation.

    @ned-deily
    Copy link
    Member

    Would osx_framework_user scheme for macOS be a satisfactory entry?

    Yes, it should be there.

    @terryjreedy
    Copy link
    Member

    New changeset 4575c01 by Terry Jan Reedy in branch 'main':
    bpo-45788: Link sys.prefix doc to 'Installation paths' (bpo-29606)
    4575c01

    @terryjreedy
    Copy link
    Member

    New changeset c06c7c4 by Miss Islington (bot) in branch '3.9':
    [3.9] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606) (GH-29632)
    c06c7c4

    @terryjreedy
    Copy link
    Member

    New changeset 2a630e7 by Miss Islington (bot) in branch '3.10':
    [3.10] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606)
    2a630e7

    @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.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants