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

Better error message for setup.py upload command without sdist/bdist #65259

Closed
merwok opened this issue Mar 25, 2014 · 7 comments
Closed

Better error message for setup.py upload command without sdist/bdist #65259

merwok opened this issue Mar 25, 2014 · 7 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@merwok
Copy link
Member

merwok commented Mar 25, 2014

BPO 21060
Nosy @merwok, @dstufft, @Mariatta
PRs
  • bpo-21060: improve error message for "setup.py upload" without dist files #5726
  • [2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726). #5748
  • [3.6] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726) #5747
  • [3.7] bpo-21060: Improve error message for "setup.py upload" without dist files (GH-5726) #5746
  • Files
  • issue21060-py35.patch
  • issue21060-py38.patch: Updated error message.
  • 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/merwok'
    closed_at = <Date 2018-02-19.04:57:52.690>
    created_at = <Date 2014-03-25.08:46:37.717>
    labels = ['3.7', '3.8', 'type-bug', 'library', 'easy']
    title = 'Better error message for setup.py upload command without sdist/bdist'
    updated_at = <Date 2018-02-19.04:58:20.239>
    user = 'https://github.com/merwok'

    bugs.python.org fields:

    activity = <Date 2018-02-19.04:58:20.239>
    actor = 'miss-islington'
    assignee = 'eric.araujo'
    closed = True
    closed_date = <Date 2018-02-19.04:57:52.690>
    closer = 'eric.araujo'
    components = ['Distutils']
    creation = <Date 2014-03-25.08:46:37.717>
    creator = 'eric.araujo'
    dependencies = []
    files = ['34898', '47437']
    hgrepos = []
    issue_num = 21060
    keywords = ['patch', 'easy']
    message_count = 7.0
    messages = ['214793', '216391', '311031', '312006', '312292', '312338', '312341']
    nosy_count = 4.0
    nosy_names = ['eric.araujo', 'jramnani', 'dstufft', 'Mariatta']
    pr_nums = ['5726', '5748', '5747', '5746']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue21060'
    versions = ['Python 2.7', 'Python 3.6', 'Python 3.7', 'Python 3.8']

    @merwok
    Copy link
    Member Author

    merwok commented Mar 25, 2014

    From http://jamie.curle.io/blog/my-first-experience-adding-package-pypi/ :

    python setup.py upload
    running upload
    error: no dist file created in earlier command
    

    I thought I was going mad because I could see the dist file, it was right there in all of [its] tar and gzipped glory.

    “earlier command” is misleading, as the dist file must be created by the same command line that calls upload (for now at least; see bpo-12944). The error message should be clearer, and if the doc doesn’t explain how this works, it should be improved too.

    @merwok merwok added stdlib Python modules in the Lib dir easy type-bug An unexpected behavior, bug, or error labels Mar 25, 2014
    @jramnani
    Copy link
    Mannequin

    jramnani mannequin commented Apr 15, 2014

    Attaching a patch with a (hopefully) more useful error message.

    I didn't find a good place to add this information in the "Distributing Python Modules" section of the docs, but let me know if you had a place in mind.

    @merwok
    Copy link
    Member Author

    merwok commented Jan 28, 2018

    For improving the message, I am hesitating between adding to the existing message (hoping to help search engines find their way to improved docs):

    «No dist file created in earlier command (e.g. setup.py sdist upload)»

    and rewriting it entirely:

    «Must create and upload dist files in one command (e.g. setup.py sdist upload)»

    @merwok merwok added the 3.7 (EOL) end of life label Jan 28, 2018
    @merwok merwok changed the title Better error message for setup.py upload command without sdist Better error message for setup.py upload command without sdist/bdist Jan 28, 2018
    @merwok merwok self-assigned this Jan 28, 2018
    @jramnani
    Copy link
    Mannequin

    jramnani mannequin commented Feb 11, 2018

    I think the error message you suggested is better than the one in the current patch. I've added a new patch with your improved message.

    I haven't submitted or updated a patch since the migration to GitHub. I can open a PR over on GitHub if that would make it easier for you.

    @merwok
    Copy link
    Member Author

    merwok commented Feb 18, 2018

    Thanks for the feedback, I went with the cleaner phrasing.

    @merwok merwok added the 3.8 only security fixes label Feb 18, 2018
    @Mariatta
    Copy link
    Member

    New changeset eeb3365 by Mariatta (Éric Araujo) in branch '2.7':
    [2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726).
    eeb3365

    @merwok
    Copy link
    Member Author

    merwok commented Feb 19, 2018

    Fixed in all branches. I messed up the ticket reference so some links are missing here.

    @merwok merwok closed this as completed Feb 19, 2018
    @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 easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants