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
This is described in detail in the Distutils documentation.
Basically
setupis 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 thatsetupneeds to carry out these tasks.