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

New functions in site.py to get user/global site packages paths #50942

Closed
tarekziade mannequin opened this issue Aug 13, 2009 · 4 comments
Closed

New functions in site.py to get user/global site packages paths #50942

tarekziade mannequin opened this issue Aug 13, 2009 · 4 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@tarekziade
Copy link
Mannequin

tarekziade mannequin commented Aug 13, 2009

BPO 6693
Nosy @malemburg, @tiran, @tarekziade
Files
  • site.patch
  • 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 = 'https://github.com/tarekziade'
    closed_at = <Date 2009-08-20.21:28:39.228>
    created_at = <Date 2009-08-13.08:31:56.754>
    labels = ['type-feature', 'library']
    title = 'New functions in site.py to get user/global site packages paths'
    updated_at = <Date 2009-08-20.21:28:39.227>
    user = 'https://github.com/tarekziade'

    bugs.python.org fields:

    activity = <Date 2009-08-20.21:28:39.227>
    actor = 'tarek'
    assignee = 'tarek'
    closed = True
    closed_date = <Date 2009-08-20.21:28:39.228>
    closer = 'tarek'
    components = ['Library (Lib)']
    creation = <Date 2009-08-13.08:31:56.754>
    creator = 'tarek'
    dependencies = []
    files = ['14719']
    hgrepos = []
    issue_num = 6693
    keywords = ['patch']
    message_count = 4.0
    messages = ['91516', '91517', '91545', '91784']
    nosy_count = 3.0
    nosy_names = ['lemburg', 'christian.heimes', 'tarek']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue6693'
    versions = ['Python 2.7', 'Python 3.2']

    @tarekziade
    Copy link
    Mannequin Author

    tarekziade mannequin commented Aug 13, 2009

    As discussed in Distutils-SIG.

    Here's a patch for site.py that adds:

    • getsitepackages : Returns a list containing all global site-packages
      directories (and possibly site-python).

    • getusersitepackages: Returns the user-specific site-packages directory
      path.

    • getuserbase: Returns the user base directory path.

    @tarekziade tarekziade mannequin self-assigned this Aug 13, 2009
    @tarekziade tarekziade mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Aug 13, 2009
    @malemburg
    Copy link
    Member

    Two things:

    • The globals should get a comment explaining what their purpose is and
      where they are being initialized.

    • The get*() functions should only initialize the globals if they are
      set to None. In the patch, they are initialized every time the functions
      are called.

    @tarekziade
    Copy link
    Mannequin Author

    tarekziade mannequin commented Aug 14, 2009

    Done.

    I've put Christian in the loop since he implemented the PEP-370
    feature, to make sure these changes are fine with him.

    @tarekziade
    Copy link
    Mannequin Author

    tarekziade mannequin commented Aug 20, 2009

    applied in r74526 and r74529

    @tarekziade tarekziade mannequin closed this as completed Aug 20, 2009
    @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
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant