Although Pex already supported local project requirements, they worked
like any other requirement and were included in locks. In the typical
case, a project would rather maintain a lock of its third party
requirements separate from itself. For projects that used requirement
files to record their unlocked dependencies, -r could be used instead
of locking the local project. For projects that recorded their
dependencies in a setup.py, setup.cfg or pyproject.toml, the
dependency information needed to be extracted from those files to create
a lock that did not lock the project code itself. Just as bad, when
constructing a PEX the source code layout of the project recorded in
those same project files needed to be replicated in some combination of
-D, -P and -M since resolving from a lock required all projects
needed by the PEX were represented in the lock.
With the addition of the new --project option to PEX builds and
pex3 lock {create,sync}, a project's dependencies and source code
layout can be referenced from their canonical home in the project
configuration files.
Although Pex already supported local project requirements, they worked like any other requirement and were included in locks. In the typical case, a project would rather maintain a lock of its third party requirements separate from itself. For projects that used requirement files to record their unlocked dependencies,
-r
could be used instead of locking the local project. For projects that recorded their dependencies in asetup.py
,setup.cfg
orpyproject.toml
, the dependency information needed to be extracted from those files to create a lock that did not lock the project code itself. Just as bad, when constructing a PEX the source code layout of the project recorded in those same project files needed to be replicated in some combination of-D
,-P
and-M
since resolving from a lock required all projects needed by the PEX were represented in the lock.With the addition of the new
--project
option to PEX builds andpex3 lock {create,sync}
, a project's dependencies and source code layout can be referenced from their canonical home in the project configuration files.Fixes #2412.