Skip to content

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

Closed

Description

@merwok
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']

    Activity

    1. merwok commented on Mar 25, 2014

      @merwok
      MemberAuthor

      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.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Mar 25, 2014
    3. jramnani commented on Apr 15, 2014

      jramnanimannequin
      Mannequin

      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.

    4. merwok commented on Jan 28, 2018

      @merwok
      MemberAuthor

      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)»

    5. changed the title [-]Better error message for setup.py upload command without sdist[/-] [+]Better error message for setup.py upload command without sdist/bdist[/+] on Jan 28, 2018
    6. self-assigned this
      on Jan 28, 2018
    7. jramnani commented on Feb 11, 2018

      jramnanimannequin
      Mannequin

      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.

    8. merwok commented on Feb 18, 2018

      @merwok
      MemberAuthor

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

    9. Mariatta commented on Feb 19, 2018

      @Mariatta
      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

    10. merwok commented on Feb 19, 2018

      @merwok
      MemberAuthor

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

    11. 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

    3.7 (EOL)end of life3.8 (EOL)end of lifeeasystdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions