I haven't read those discussions in full (sorry to be lazy, but there's quite a lot there), but my initial take is that the rule doesn't apply to running setup.py scripts, where there's a greater need for backward compatibility. I think the rule about the CWD not being on sys.path only applies to loading a proper PEP 517 build backend when that's specified in pyproject.toml. Furthermore, if the build backend then wants to run some code with the CWD on sys.path, I think it's free to do so, so this could be implemented in the setuptools backend. The rule is only for how the frontend loads the backend, not what the backend does afterwards. Where a real PEP 517 backend needs to be loaded from the CWD (e.g. for Flit to bootstrap itself), we've already got the intreehooks package to make this possible: https://pypi.org/project/intreehooks/
On Sun, Jan 27, 2019, at 2:26 PM, Chris Jerdonek wrote:
For those of you who participated in the PEP 517 discussion during the summer of 2017 (just prior to its provisional acceptance), I want to flag that one of the issues discussed back then has now resurfaced for discussion. This is because the feature was turned on by default in pip's latest release (19.0) less than a week ago.> The issue is the one around whether the source directory should be included in sys.path. The resurfacing is more or less as predicted. For example, in one email  from August 29, 2017, Nick summarized the state of things by saying (not too long before provisional acceptance)-->
So I think we can deem this one resolved in favour of "Frontends must ensure the current directory is *NOT* on sys.path before importing the designated backend", as starting there will mean we maximise our chances of learning something new as part of the initial rollout of the provisionally accepted API.>
- If omitting it is genuinely a problem, we'll likely find out soon enough as part of implementing a setup.py backend>
Basically, that "soon enough" moment has arrived, and at least one discussion on how to resolve it has started on the tracker here:> https://github.com/pypa/pip/issues/6163
There is another discussion here, but it's probably better for the discussion to be in one spot:> https://github.com/pypa/setuptools/issues/1642 Maybe Discourse?
Distutils-SIG mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://firstname.lastname@example.org/message/LMGQS...