Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 1
    Not sure why this is being downvoted; it's basically correct even if there are other solutions.
    – Iguananaut
    Commented Nov 8, 2019 at 9:42
  • 2
    The question title is "How to build a source distribution without using setup.py file?" This answer seems to just demonstrate "here's how to recreate the same setup.py file that you've just deleted", which is not useful.
    – platypus
    Commented Nov 8, 2019 at 17:48
  • 1
    Yes, but that was based on a misunderstanding that writing a declarative setup.cfg means that a setup.py isn't necessary anymore to use setuptools, which isn't true. Just because the title of the question is misleading doesn't mean the answer is. They wrote in the body of the question "So how should you actually build the .tar.gz file using setuptools?" which this answers correctly.
    – Iguananaut
    Commented Nov 9, 2019 at 23:03
  • 2
    It actually is true. setuptools doesn't require a setup.py file if you are using PEP 517.
    – Paul
    Commented Nov 19, 2019 at 13:58
  • 2
    "if you are using PEP 517" Except most people aren't. It's still provisional, and is barely even mentioned in packaging.python.org . It's not something you would have unless you know to go looking for it. If you just want setuptools to work as it always used to this is correct.
    – Iguananaut
    Commented Nov 19, 2019 at 14:32