rhythmic-battery-45198
12/21/2021, 7:13 PM.whl
file which we have added to our repo because it is particularly complex to build from source. This works fine if I use an absolute path as the requirement but can not find a way to make it work with relative paths.
python_requirement(
name="assimulo",
requirements=[
"assimulo@ file:////path/to/3rdparty/python/wheel/Assimulo-trunk-cp38-cp38-linux_x86_64.whl"
],
)
python_requirement(
name="assimulo",
requirements=[
"assimulo@ wheel/Assimulo-trunk-cp38-cp38-linux_x86_64.whl"
],
)
Is there a known path forward to use a relative path to a .whl as a requirement?enough-analyst-54434
12/21/2021, 7:17 PMrhythmic-battery-45198
12/21/2021, 7:27 PMrhythmic-battery-45198
12/21/2021, 7:47 PMfiles(
name="wheels",
sources=[
"wheel/*.whl",
],
)
python_requirement(
name="assimulo",
requirements=[
"assimulo@ <file://3rdparty/python/wheel/Assimulo-trunk-cp38-cp38-linux_x86_64.whl>"
],
dependencies=[
":wheels"
]
)
rhythmic-battery-45198
12/21/2021, 7:47 PMrhythmic-battery-45198
12/21/2021, 7:48 PMrhythmic-battery-45198
12/21/2021, 7:48 PMValueError: non-local file URIs are not supported on this platform: '<file://3rdparty/python/wheel/Assimulo-trunk-cp38-cp38-linux_x86_64.whl>'
enough-analyst-54434
12/21/2021, 7:57 PM... @ url
style requirements. You can just pass it a relative path directly with no adornment. Pants may balk though.enough-analyst-54434
12/21/2021, 7:59 PMassimulo@ file://$PWD/3rdparty/python/wheel/Assimulo-trunk-cp38-cp38-linux_x86_64.whl
Unfortunately, Pants also nanny's requirements files and splits them up into requirement strings that are then passed directly instead of beiung re-assembled into a requirement file.enough-analyst-54434
12/21/2021, 7:59 PMrhythmic-battery-45198
12/21/2021, 8:02 PMenough-analyst-54434
12/21/2021, 8:02 PMenough-analyst-54434
12/21/2021, 8:02 PMrhythmic-battery-45198
12/21/2021, 8:02 PMenough-analyst-54434
12/21/2021, 8:04 PMrhythmic-battery-45198
12/21/2021, 8:04 PMenough-analyst-54434
12/21/2021, 8:05 PM[python-repos]
repos = ["%(buildroot)s/3rdparty/python/wheel"]
And then to depend on wheels there use normal requirement strings.enough-analyst-54434
12/21/2021, 8:06 PMrhythmic-battery-45198
12/21/2021, 8:07 PMrhythmic-battery-45198
12/21/2021, 8:15 PMenough-analyst-54434
12/21/2021, 8:28 PM[python-repos] repos
option would not change; nor would your requirement string necessarily, and Pants would no-op.rhythmic-battery-45198
12/21/2021, 8:41 PMhappy-kitchen-89482
12/21/2021, 8:43 PMenough-analyst-54434
12/21/2021, 8:44 PM3rdparty/python/wheel/Assimulo-trunk-cp38-cp38-linux_x86_64.whl)
.
Ideally the Pip relative path syntax approach and the Pip requirements supporting $PWD approach would be supported. But, IIRC we have issues tracking those and we're just not there yet.enough-analyst-54434
12/21/2021, 8:45 PMrhythmic-battery-45198
12/21/2021, 8:48 PMenough-analyst-54434
12/21/2021, 8:49 PMrhythmic-battery-45198
12/21/2021, 8:54 PMAssimulo==3.2
to 3rdparty/python/requirements.txt
happy-kitchen-89482
12/21/2021, 8:56 PM