[Python-Dev] PEP 395: Module Aliasing

Michael Foord fuzzyman at voidspace.org.uk
Fri Mar 4 18:35:13 CET 2011


On 04/03/2011 17:07, Barry Warsaw wrote:
> On Mar 04, 2011, at 11:22 AM, Fred Drake wrote:
>
>> On Fri, Mar 4, 2011 at 10:59 AM,<exarkun at twistedmatrix.com>  wrote:
>>> Something to consider here is how this will interact with Python files which
>>> are _not_ modules.  I'm a little uneasy about having sys.modules["trial"]
>>> refer to the module defined by /usr/bin/trial.
>> I've long held the position that modules and scripts are distinct, and
>> should never share a source file.  All the work that's going into
>> dealing with this just reinforces my position.
> I agree.  In fact, so do the distribution tools.  I don't even include actual
> scripts in my packages any more, I just add the right goo to setup.py and let
> distutils DTRT:
>
>

That (below) is not distutils it is setuptools. distutils just uses 
`scripts=[...]`, which annoyingly *doesn't* work with setuptools.

Michael Foord

> setup(
>      # ...
>      entry_points    = {
>          'console_scripts' : list(scripts),
>          },
>      # ...
>      )
>
> -Barry
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk


-- 
http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110304/9abc0601/attachment-0001.html>


More information about the Python-Dev mailing list