powerful-city-61287
07/15/2024, 10:08 PMbenchmarks in the project root is mysteriously causing an attempt to run a .py file to fail. Details in thread.powerful-city-61287
07/15/2024, 10:08 PMpowerful-city-61287
07/15/2024, 10:09 PMpants run benchmarks/example.py # This will fail with "ImportError: No module named benchmarks.example"
mv benchmarks benchmark
pants run benchmark/example.py # this will succeedpowerful-city-61287
07/15/2024, 10:10 PMbenchmarks in the entire project is in the directory name itselfpowerful-city-61287
07/15/2024, 10:16 PMragas import is requiredpowerful-city-61287
07/15/2024, 10:18 PM.py target invocation will succeed.powerful-city-61287
07/15/2024, 10:22 PMwide-midnight-78598
07/15/2024, 10:22 PM# type: ignore ?powerful-city-61287
07/15/2024, 10:22 PMpowerful-city-61287
07/15/2024, 10:23 PMwide-midnight-78598
07/15/2024, 10:27 PMpowerful-city-61287
07/15/2024, 10:27 PMpowerful-city-61287
07/15/2024, 10:28 PMbenchmarks dirpowerful-city-61287
07/15/2024, 10:28 PMpytest-benchmark repo, since they rely on itpowerful-city-61287
07/15/2024, 10:29 PMwide-midnight-78598
07/15/2024, 10:29 PMpowerful-city-61287
07/15/2024, 10:30 PMtests/benchmarks)wide-midnight-78598
07/15/2024, 10:30 PMpowerful-city-61287
07/15/2024, 10:30 PMpowerful-city-61287
07/15/2024, 10:31 PMpowerful-city-61287
07/15/2024, 10:32 PMpowerful-city-61287
07/15/2024, 10:32 PMwide-midnight-78598
07/15/2024, 10:33 PMwide-midnight-78598
07/15/2024, 10:34 PMpowerful-city-61287
07/15/2024, 10:34 PMwide-midnight-78598
07/15/2024, 10:35 PMpowerful-city-61287
07/15/2024, 10:35 PMpowerful-city-61287
07/15/2024, 10:38 PMdiff --git a/benchmarks/BUILD b/benchmarks/BUILD
index db46e8d..63c5de0 100644
--- a/benchmarks/BUILD
+++ b/benchmarks/BUILD
@@ -1 +1,3 @@
python_sources()
+
+pex_binary(name="hi", entry_point="example.py")
then:
pants run benchmarks:hi
still failspowerful-city-61287
07/15/2024, 10:38 PM