nox-poetry is a plugin for Nox, a flexible test automation tool, that simplifies testing and building Python projects managed with Poetry. It integrates Poetry's dependency management and build processes directly into Nox sessions, providing features like installing project dependencies, building packages, and exporting requirements. The current version is 1.2.0, with regular updates that often include support for newer Python and Poetry versions, alongside bug fixes and minor feature enhancements.
pip install nox-poetryVerified import paths — ran on the pinned version, not inferred.
This `noxfile.py` demonstrates how to use `nox-poetry` to manage dependencies and run tests for a Poetry-managed project across multiple Python versions, and how to build the project.
Migrate calls from global functions (e.g., `build_package()`) to `session.poetry` methods (e.g., `session.poetry.build()`). Refer to the official documentation for updated usage patterns.
Ensure your Nox sessions are configured to use Python >=3.9. Update your `noxfile.py`'s `python` parameter in `@nox.session` decorators accordingly. For example, `python=['3.9', '3.10']`.
Ensure your Nox sessions are configured to use Python >=3.8. Update your `noxfile.py`'s `python` parameter in `@nox.session` decorators.
Ensure `poetry` is installed in the environment where Nox is run, or if preferred, install `poetry` within the Nox session itself using `session.install('poetry')` *before* calling `session.poetry.*` methods.Verify your `pyproject.toml` correctly defines your project using Poetry's specification. Ensure it's in the project root where Nox is executed.