Skip to content

pysetup doesn’t work for the docutils project #57143

Description

@merwok
BPO 12934
Nosy @brettcannon, @ncoghlan, @tarekziade, @merwok

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 2011-11-24.14:20:10.495>
created_at = <Date 2011-09-07.16:12:47.465>
labels = ['invalid']
title = 'pysetup doesn\xe2\x80\x99t work for the docutils project'
updated_at = <Date 2011-11-24.14:20:10.494>
user = 'https://github.com/merwok'

bugs.python.org fields:

activity = <Date 2011-11-24.14:20:10.494>
actor = 'eric.araujo'
assignee = 'tarek'
closed = True
closed_date = <Date 2011-11-24.14:20:10.495>
closer = 'eric.araujo'
components = ['Distutils2']
creation = <Date 2011-09-07.16:12:47.465>
creator = 'eric.araujo'
dependencies = []
files = []
hgrepos = []
issue_num = 12934
keywords = []
message_count = 3.0
messages = ['143695', '148195', '148255']
nosy_count = 5.0
nosy_names = ['brett.cannon', 'ncoghlan', 'tarek', 'eric.araujo', 'alexis']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue12934'
versions = ['3rd party', 'Python 3.3']

Activity

  1. merwok commented on Sep 7, 2011

    @merwok
    MemberAuthor

    I tried to run “pysetup metadata” in a docutils source directory but the program failed, because packaging tries to import docutils and it picks up the 2.x version in the local directory.

    The import chain is: pysetup → packaging.run → packaging.metadata → docutils

    I could edit sys.path in pysetup, but that would mean that people calling “python3.y -m packaging.run” would not get the fix. Another idea would be to catch both ImportError and SyntaxError when packaging.metadata tries to import docutils, but it would be better to find the 3.x version of docutils in site-packages if it exists.

    What do you import experts think?

  2. merwok commented on Nov 23, 2011

    @merwok
    MemberAuthor

    Due to the same reason, it’s also not possible to run “pysetup3.1 metadata” in the distutils2 repo, or “pysetup2.4 metadata” in the distutils2-python3 repo.

  3. merwok commented on Nov 24, 2011

    @merwok
    MemberAuthor

    This is a problem on my side, not in distutils2. My pysetupX.Y scripts are just shell one-liners of this form:

    PYTHONPATH=~/path/to/d2 pythonX.Y -m distutils2.run "$@"

    Because of sys.path initialization, d2 tried to import docutils from the working directory instead of the version in site-packages. If I install d2 and run the installed pysetup script, d2 and docutils are imported from site-packages and everything is fine.

  4. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions