[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

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

Jari Aalto

3/8/2008 10:48:00 AM

* Fri 2008-03-07 Robert Kern <robert.kern@gmail.com> gmane.comp.python.general
* Message-Id: fqt61a$sj5$1@ger.gmane.org

>>>> setup(name='program',
>> ...
>>>> scripts = ['program,py'],
>>>> )
>>>> 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.
>>
>> Is there any other way? This is the source package that I would like
>> to keep intact and just patch the setup.py
>
> Not really, no. Why is it so important to only patch the setup.py
> file and not any others?

It has to do with generating a diff against the original package. If
the file is moved:

mv file.py file

prior setup.py run (which, according to answers, would have a change
to <<scripts = ['program']>>), the problem is the generated diff
against original sources:

+ would flag removal of 'file.py'
+ inclusion of 'file'

The ideal would be if setup.py could do all the destination install
"postwork". The generated patch would be clean and only contain
changes in setup.py.

But I understand, if distutils does not support stripping the
extensions during install. It just cacuses exra work for utility
packagers.

Jari

--
Welcome to FOSS revolution: we fix and modify until it shines