[Distutils] PEP 517: Build system API
Wes Turner
wes.turner at gmail.com
Sat Nov 26 15:41:07 EST 2016
I suppose a __main__.py could also/instead be added as
- site.tools.__main__
https://github.com/python/cpython/blob/master/Lib/site.py
- site.__doc__
- site._script()
- distutils.__main__
https://github.com/python/cpython/tree/master/Lib/distutils/command
- setuptools.__main__
https://github.com/pypa/setuptools/blob/master/setup.py
- _gen_console_scripts() # $ easy_install[%s]
- distutils.setup_keywords()
- pip.commands._
https://github.com/pypa/pip/tree/master/pip/commands
And then how does site.py interact with importlib and .pth files?
- https://github.com/python/cpython/blob/master/Lib/importlib/abc.py
-
https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap_external.py
- source_from_cache()
On Saturday, November 26, 2016, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 26 November 2016 at 19:34, Wes Turner <wes.turner at gmail.com
> <javascript:;>> wrote:
> > On Friday, November 25, 2016, Nick Coghlan <ncoghlan at gmail.com
> <javascript:;>> wrote:
> >> By contrast, if we only propose deprecating "import" lines in ".pth"
> >> files, and also propose a more explicit approach to automatic code
> >> execution at interpreter startup, then it's only folks relying on the
> >> arbitrary-code-execution feature that would incur any migration costs.
> >> The language level pay-offs to justify that cost would be:
> >>
> >> - simplification of the current systems for implicit code execution at
> >> start-up
> >
> > There's
> >
> > python -m site
> >
> > But is there a -m tool for checking .pth files?
> > (For code in .pth.py files)?
>
> Not currently, there's only the code that implicitly gets called from
> site.main() (which is in turn called as a side effect of importing the
> site module).
>
> So even though that machinery is already there in a pure Python module
> in every Python installation, none of it is exposed as a public
> Python-level API.
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan | ncoghlan at gmail.com <javascript:;> | Brisbane,
> Australia
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20161126/2c743bf7/attachment.html>
More information about the Distutils-SIG
mailing list