[Distutils] PEP 517: Build system API

Nick Coghlan ncoghlan at gmail.com
Sat Nov 26 06:18:42 EST 2016


On 26 November 2016 at 19:34, Wes Turner <wes.turner at gmail.com> wrote:
> On Friday, November 25, 2016, Nick Coghlan <ncoghlan at gmail.com> 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   |   Brisbane, Australia


More information about the Distutils-SIG mailing list