echoing-london-29138
02/18/2022, 9:05 AMresource(name="pyproject", source="pyproject.toml")
python_sources(name="source", sources=["./**/*.py", "!setup.py"])
python_distribution(
name="utils",
provides=python_artifact(
name="utils",
version="0.1.0",
),
dependencies=[
":pyproject",
":source",
],
wheel_config_settings={"--global-option": ["--python-tag", "py3"]},
)
But when I tried to run a test which is in another module, I got the following error :
ModuleNotFoundError: No module named 'utils'
I feel I’m not configuring as it should be, but I’m completely lost. Is there a project that I could have a look on to understand how to use pants ?refined-addition-53644
02/18/2022, 10:39 AM./pants package
The other thing would be explicitly define dependency on the generated dist similar to what has been described here
https://www.pantsbuild.org/docs/python-test-goal#testing-your-packaging-pipelinerefined-addition-53644
02/18/2022, 10:47 AMsource_root
concept, if you aren't already aware of it.
https://www.pantsbuild.org/docs/source-rootsechoing-london-29138
02/18/2022, 10:57 AM./pants package
The test fails when I try to reference to another module. When I try to the reference into the dependency of the test, I had this error :
pex.environment.ResolveError: Failed to resolve requirements from PEX environment
echoing-london-29138
02/18/2022, 10:58 AMechoing-london-29138
02/18/2022, 11:09 AMenough-analyst-54434
02/18/2022, 3:19 PM./pants test x/y/z:w
? What is the relevant BUILD file there? Can you provide full (possibly redacted) output from the failing Pants command and the same for the relevant BUILD files and pants.toml configuration?