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.5k stars 257 forks source link

Add `pex --docs` and several `pex3 docs` options. #2365

Closed jsirois closed 5 months ago

jsirois commented 5 months ago

The pex --docs shortcut should provide an ergonomic way to open the local docs for most Pex CLI users (undoubtedly few use pex3). The pex3 docs additional options allow for most of the control needed though, and the help for the pex --docs option points there.

jsirois commented 5 months ago

Thanks for taking a look @zmanji.

I am not sure on the whole server/pidfile logic but everything lgtm.

That is just moved code in this PR (so pex --docs could share the pex3 docs infra), and its still ~copied code from testing.devpi which powers the --devpi option for the tests and integration tests. Both CI and I have been hammering that logic for a while now; so it may be buggy, but it appears to be solid. The bugs likely lie in rare corner cases.