pex-tool / pex

A tool for generating .pex (Python EXecutable) files, lock files and venvs.
https://docs.pex-tool.org/
Apache License 2.0
2.52k stars 258 forks source link

Fix `third_party.exposed()`. #2330

Closed jsirois closed 7 months ago

jsirois commented 7 months ago

This cleans up #2328 by fixing the root cause of the interpreter identification leak of exposed attrs. The API to report exposed sys.path elements, third_party.exposed(), worked at build time, with a full Pex distribution available, but returned an empty iterator at run time, with the subset of Pex available in the runtime .bootstrap/.

jsirois commented 7 months ago

The setuptools build backend introduced to handle pre-testing Python 3.13 in CI is quite flaky. Yet another instance: https://github.com/pantsbuild/pex/actions/runs/7545643289/job/20541741101?pr=2330#step:5:1847

I'm working on switching the build system in a separate PR to handle dynamic Requires-Python metadata without using setuptools to solve the files it leaks to the source root during the build process problems.

jsirois commented 7 months ago

The setuptools build backend introduced to handle pre-testing Python 3.13 in CI is quite flaky...

Fix in #2331