tags:

views:

1054

answers:

5
+7  Q: 

what is setup.py?

Can anyone please explain, what is 'setup.py' and how can it be configured or used?

+9  A: 

setup.py is a python file, which usually tells you that the module/package you are about to install have been packaged and distributed with Distutils, which is the standard for distributing Python Modules.

This allows you to easily install Python packages, often it's enough to write:

python setup.py install

and the module will install itself.

http://docs.python.org/install/index.html

Silfverstrom
+4  A: 

If you downloaded package that has "setup.py" in root folder, you can install it by running

python setup.py install

If you are developing a project and are wondering what this file is useful for, check Python documentation on writing the Setup Script

Pēteris Caune
+3  A: 

setup.py is a Python script that is usually shipped with libraries or programs, written in that language. It's purpose is the correct installation of the software.

Many packages use the distutils framework in conjuction with setup.py.

http://docs.python.org/distutils/

Ferdinand Beyer
+2  A: 

Setup.py is Python's answer to a multi-platform installer and make file. If you familiar with commandline installation process then make && make install - translate to python setup.py build && python setup.py install. Some packages are pure python and are only byte compiled, other packages may contain native code which will require a native compiler like gcc or cl and some python interfacing module like swig or pyrex.

whatnick
+2  A: 

Here is a tutorial on the python wiki on how to use it, as well as how to submit it to the cheese shop: Tutorial

If found another nice tutorial on how to make python eggs: Python egg tutorial

Homer J. Simpson