Generally speaking, a single poetry-backed library should work out of the box with stew
with no additional configuration.
However, we cannot assume that all setups will work. To maximize compatibility with stew
,
setup your project according to one of the two options below.
This setup is only suitable for single-library repositories.
- The
pyproject.toml
file is at the root of the repository (e.g.:/pyproject.toml
) - A folder that matches the name of your import, next to the
pyproject.toml
file (e.g.:/coveo_stew/
) - An
__init__.py
file inside the importable folder (e.g.:/coveo_stew/__init__.py
)
The current repository uses that setup.
This setup is actually the multiple library setup with just one library:
- The
pyproject.toml
file is contained in a folder somewhere in the repository (e.g.:/src/python/pyproject.toml
) - There's a folder that matches the name of your module import, next to the
pyproject.toml
file (e.g.:/src/python/coveo_systools/*.py
) - An
__init__.py
file inside the importable folder (e.g.:/src/python/coveo_systools/__init__.py
) - The
tool.stew.pydev
setting should be false or not present - The
poetry.package-mode
setting should be true or not present
As a reference, take a look at the coveo-python-oss repository.