[Distutils] Install a script to <prefix>/sbin instead of <prefix>/bin

Michael Jansen info at michael-jansen.biz
Tue Dec 3 10:38:51 CET 2013


On Tuesday, December 03, 2013 08:56:26 AM Paul Moore wrote:
> On 3 December 2013 08:41, Michael Jansen <info at michael-jansen.biz> wrote:
> > So another idea i am thinking about is doing it like this:
> > 
> > 
> > 
> > scripts = [
> > 
> > "bin/myscript3", # <= backwardscompatible
> > 
> > ( 'bin/', [ 'bin/myscript1', 'bin/myscript2' ] ),
> > 
> > ( 'sbin/', [ 'sbin/mysbinscript1', 'sbin/mysbinscript2' ] ),
> > 
> > ( 'lib/myproject/libexec', [ 'libexec/script' ] )
> > 
> > ]
> 
> The "scripts" argument is generally considered obsolete - tools like
> pip will not generate executable wrappers for scripts specified like
> this, which means that they will not work properly on Windows.
> 
> You should really be using (in this case, extending) the setuptools
> "console_scripts" entry point.

This should be the next step. And it will. The message that scripts from distutils/setuptools is 
deprecated seems to be a bit unknown out there.

http://code.ohloh.net/search?s=setup%20scripts&p=2&pp=0&fl=Python&mp=1&ml=1&me=1&md=
1&ff=1&filterChecked=true

So doing both should be the right thing to do. The fact that pip does not support it is imho pips 
problem.

So who will decide if any change to distutils goes through? I have no idea about the python patch 
process. Any links?

Mike

-- 
Michael Jansen
http://michael-jansen.biz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20131203/c25377e8/attachment-0001.html>


More information about the Distutils-SIG mailing list