Say I wrote module foo.py.
I want the installation process to copy foo.py to prefix/lib/pythonX.Y/site-packages so that it can be imported by other modules, but also to create a symbolic link named foo (not foo.py) in prefix/bin/ that points to foo.py.
How does one tell distutils to do that?
mainfunction. Then write a separate script which importsfooand calls main...if __name__ == '__main__'trick, which I thought was pretty typical.distutilsthen I see all you need on a single page in the docs (script,py_modulesoptions). You could also considersetuptools' entry_points to generate scripts automatically (e.g. with a correct shebang)