Let me clarify a bit. Setuptools and standalone scripts is indeed the
best classical approach, but that does not adapts to my use case. I'm
working with a contunuously, fast evolving system, and there is no
"identified release" (continuous delivery).

I'm under the impression that you tell me that I must use setuptools
entrypoint script so, in other words, a "standard executable" script.
But, it this is THE only way correct way to do, why do python allows
__main__.py?

I don't use standalone script because there are many entry points to my
library, which has a very depth (sub-)packages structure, and on one
hand having dozens of scripts in a ./bin directory lacks of efficiency,
on the other hand I don't want to use absolute imports within a library
just to be able to have standalone scripts, knowing that it is also the
job of __main__.py.

Best regards.

Le 24/08/19 à 17:37, Michael Hooreman a écrit :
> What being part of the program and what are arguments is not meaningful
> at this point: I only want an accurate usage string.
>
> I don't make a setuptools entry point here for the good reason that this
> is used as part of a system, which is not using standard deliverables.
> You have to consider that they are other uses cases of python than some
> packages to deploy with setuptools.
>
> Best regards.
>
> Le 24/08/19 à 17:01, Andrew Barnert a écrit :
>> On Aug 24, 2019, at 00:25, Michael Hooreman <[email protected]> wrote:
>>> In fact, I should add more than the python executable in prog: it must 
>>> contain -m and the package « classpath »
>> But that’s not a valid prog. If you try to execute the program “python -m 
>> spam” with arguments “eggs” and “cheese” (whether with exec, or something 
>> higher level like the shell, or Python’s subprocess module), you’re just 
>> going to get an error because there’s nothing named “python -m spam” on the 
>> PATH.
>>
>> If you’re really trying to reproduce what the user typed (modulo any quoting 
>> and escaping, which you can only guess at because the shell doesn’t preserve 
>> the distinction between “spam 'my arg'” and “spam my\ arg”, etc.), the prog 
>> is “python”, and the args are [“python”, “-m”, “spam”, “eggs”, “cheese”].
>>
>> I’d ask again why you’re not using a setuptools entrypoint script here.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/2MLLHXJWYENDYSHRKVVGLENBEEFAGETF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to