distutils - Is is possible to install without the .py extensions

Robert Kern robert.kern at gmail.com
Fri Mar 7 17:20:26 EST 2008


Jari Aalto wrote:
> Given following setup.py stanza:
> 
>     #!/usr/bin/python
> 
>     from distutils.core import setup
>     import glob
> 
>     setup(name='program',
>           description='',
>           keywords='',
>           version='',
>           url='',
>           download_url='',
>           license='',
>           author='',
>           author_email='',
>           long_description="""
>           """,
>           scripts = ['program,py'],
>           packages = ['''],
>       )
> 
> Is there any way to fix the installation (postinstall or something), so
> that the the result is:
> 
>     /usr/bin/program
> 
> instead of:
> 
>     /usr/bin/program.py

The easiest and best way is to just rename the file in your source tree to 
"program" and be done with it.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list