adamant-wolf-51914
12/01/2023, 10:19 AM.so
file as a dependency for one of the python_sources. The closest I could fins is https://www.pantsbuild.org/docs/adhoc-tool#using-externally-managed-tools `system_binary`but it seems it will only work with the ad_hook. Is there a way to do that? The binary currently lives in user's `.pyenv`and should be same for everyone. Any hint would be appreciated!adamant-wolf-51914
12/01/2023, 10:56 AMresources(
name="spylizard",
sources=["spylizard.so"],
)
python_sources(
overrides={
"solver_spylizard.py": {
"dependencies": [
":spylizard",
],
}
}
)
But this does not solve the problem:
ModuleNotFoundError: No module named 'spylizard'
When the binary is in .pyenv, and script is executed with python, module is imported.happy-kitchen-89482
12/01/2023, 4:25 PM.pyenv
? I take that to mean the python distribution that provides that .so (presumably spylizard
) was installed using pip
in one of the pyenv
interpreters on the system?happy-kitchen-89482
12/01/2023, 4:27 PMspylizard
package provides spylizard.so
as part of its installation, then you want to add spylizard
as a 3rd-party requirement in your code (e.g., in requirements.txt) and generate it into your lockfile if you're using lockfiles. You can't rely on it existing in an interpreter's site-packages, because Pants (via Pex) takes great pains to scrub those from its working set.happy-kitchen-89482
12/01/2023, 4:28 PMadamant-wolf-51914
12/01/2023, 4:42 PMadamant-wolf-51914
12/01/2023, 4:42 PMadamant-wolf-51914
12/01/2023, 4:43 PMhappy-kitchen-89482
12/01/2023, 5:01 PMhappy-kitchen-89482
12/01/2023, 5:02 PMhappy-kitchen-89482
12/01/2023, 5:02 PMhappy-kitchen-89482
12/01/2023, 5:02 PMhappy-kitchen-89482
12/01/2023, 5:06 PMhappy-kitchen-89482
12/01/2023, 5:07 PMadamant-wolf-51914
12/01/2023, 5:08 PMhappy-kitchen-89482
12/01/2023, 5:10 PMhappy-kitchen-89482
12/01/2023, 5:10 PMhappy-kitchen-89482
12/01/2023, 5:11 PMhappy-kitchen-89482
12/01/2023, 5:11 PMhappy-kitchen-89482
12/01/2023, 5:11 PMhappy-kitchen-89482
12/01/2023, 5:12 PMadamant-wolf-51914
12/01/2023, 5:13 PMflat-zoo-31952
12/01/2023, 5:13 PMwork under wayThis is charitable. I'd say it's more some throwaway branches and vague proposals
flat-zoo-31952
12/01/2023, 5:15 PMflat-zoo-31952
12/01/2023, 5:15 PMflat-zoo-31952
12/01/2023, 5:16 PMflat-zoo-31952
12/01/2023, 5:17 PMhappy-kitchen-89482
12/01/2023, 5:21 PMadamant-wolf-51914
12/01/2023, 5:50 PMflat-zoo-31952
12/01/2023, 5:58 PM