Question

I keep seeing this kind of code a lot in python setup.py files.

from distutils.core import setup
setup(
        name            = 'SOMETHINGHERE',
        version         = 'SOMETHINGHERE',
        py_modules      = ['SOMETHINGHERE'],
        author          = 'SOMETHINGHERE',
        author_email    = 'SOMETHINGHERE',
        url             = 'http://www.example.com',
        description     = 'SOMETHINGHERE',
        )

What exactly does it mean? How does it work? I'm trying to understand the code. ps: sorry about my poor english xP

Was it helpful?

Solution

This is described in detail in the Distutils documentation.

Basically setup is a function that checks which command distutils was invoked with and performs the appropriate action on the package (e.g. installing it, downloading it, building a binary distribution, etc.). The arguments provide any package-specific information that setup needs to carry out these tasks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top