eager-dress-66405
03/24/2022, 4:16 PMeager-dress-66405
03/24/2022, 4:17 PM3rdparty/BUILD.pants
contained the following and worked great:
python_requirements(
source="../path/to/legacy/external-requirements.txt",
)
This made it easy to partially migrate our repo to pants without breaking anything legacy.eager-dress-66405
03/24/2022, 4:21 PM../
)
• Use an absolute path (/path
or //path
)
• Use a symlink to the legacy path as a source (not recognized as file)high-yak-85899
03/24/2022, 4:27 PMeager-dress-66405
03/24/2022, 4:27 PMpython_requirements(
source="../path/to/legacy/external-requirements.txt",
)
high-yak-85899
03/24/2022, 4:27 PMpython_sources
.high-yak-85899
03/24/2022, 4:28 PMhundreds-father-404
03/24/2022, 4:29 PM../
now get appliedeager-dress-66405
03/24/2022, 4:31 PM../
seems reasonable. Not allowing /absolute/paths
seems a bit restrictive, but sure. Why not recognize symlinks though?hundreds-father-404
03/24/2022, 4:34 PM/HOME/some_other_project
I'm not certain re symlinks, I think Stu or John might have more context on thateager-dress-66405
03/24/2022, 4:34 PMrequirements.txt
file into 3rdparty
, and symlinking to it from the legacy location. Pip has no problem following symlinks.
If we were starting from scratch we would not need the requirements file in 2 locations, but we only still only partially on pants and too much brittle tooling references the legacy structure.
It's a lot nicer for our 3rdpary deps for pants to be
3rdparty:pandas
eager-dress-66405
03/24/2022, 4:35 PMhundreds-father-404
03/24/2022, 4:36 PM--changed-since
works, so we know which targets to consider and which we can ignore