breezy-pizza-55668
07/24/2024, 6:45 PMtransformers
is not resolved by pants
(since transformers
resolves it at runtime). I can solve that with my pex_binary
for production by using inherit_path="fallback"
. How can I achieve the same solution for my dev script that is executed with python_source
?
here is my BUILD
file:
python_source(
name="dev",
dependencies=[":api"],
source="src/serve.py",
restartable=True,
)
pex_binary(
name="prod",
dependencies=[":api"],
entry_point="src/serve.py",
inherit_path="fallback",
)
python_sources(
name="api",
sources=["**/*.py"],
)
python_tests(
name="tests",
sources=["tests/**/test_*.py"],
)
python_test_utils(
name="test_utils",
sources=["tests/conftest.py"],
)
even having torch installed on my virtualenv, Pants for some reason still can't use ithappy-kitchen-89482
07/24/2024, 7:36 PMhappy-kitchen-89482
07/24/2024, 7:37 PMhappy-kitchen-89482
07/24/2024, 7:37 PMbreezy-pizza-55668
07/24/2024, 7:52 PMbreezy-pizza-55668
07/24/2024, 7:52 PMbreezy-pizza-55668
07/24/2024, 7:52 PMhappy-kitchen-89482
07/24/2024, 8:04 PMpants run
some source file on some existing venv, instead of one that Pants creates?breezy-pizza-55668
07/24/2024, 8:31 PMbreezy-pizza-55668
07/24/2024, 8:31 PMpex_binary
)breezy-pizza-55668
07/24/2024, 8:32 PMhappy-kitchen-89482
07/24/2024, 9:55 PMhappy-kitchen-89482
07/24/2024, 9:56 PMflat-zoo-31952
07/25/2024, 1:23 AMbreezy-pizza-55668
07/25/2024, 12:47 PMbreezy-pizza-55668
07/25/2024, 12:48 PM