RLS
RLS

Reputation: 41

Why Does setup.py Remain in my Distribution Package?

I am somewhat new to Python and even newer to distutils.

I wanted to create a distribution of my program for other users in my office, so I used setup from distutils.core. I set up my directory structure, created a manifest.in file and a setup.py file. Everything seemed to go as planned. The result is that I have a .zip file containing the directory structure that I intended.

The maifest file was not contained in the .zip file (I assume it was only needed by distutils), but the setup.py file remained in the .zip file. Why is that? Is setup.py needed by the end-user?

Thank you,

-RS

Upvotes: 2

Views: 112

Answers (1)

abarnert
abarnert

Reputation: 366003

In the normal case, users install your app by running python setup.py install, or something that effectively does the same thing (like pip install foo).

Of course there are cases where they don't need setup.py—e.g., because they're installing a pre-packaged binary egg or Windows installer or whatever—but most packages have to work for the normal case. So, the default packaging commands include it. In the docs, Specifying the files to distribute says:

If you don’t supply an explicit list of files (or instructions on how to generate one), the sdist command puts a minimal default set into the source distribution:

setup.py (or whatever you called your setup script) …

Upvotes: 2

Related Questions