Skip to main content

Let Tox know about Poetry's development dependencies

Project description

Introduction

Tox plugin to let Tox know about Poetry’s development dependencies.

Repositories

Distributions:

Source code:

Usage

add_poetry_dev_dependencies

Set the testenv setting add_poetry_dev_dependencies to True to let Tox install Poetry’s development dependencies in the test environment.

[testenv:example]
# ...
add_poetry_dev_dependencies = True

poetry_use_source_repos

Set the testenv setting poetry_use_source_repos to pip_env_vars to let Tox set the PIP_EXTRA_URL and PIP_EXTRA_INDEX_URL environment variables accordingly.

[testenv:example]
# ...
poetry_use_source_repos = pip_env_vars

This will read sections such as the following from the pyproject.toml file:

[[tool.poetry.source]]
name = "project-alpha"
url = "https://alpha.example/simple"
secondary = true

[[tool.poetry.source]]
name = "project-bravo"
url = "https://bravo.example/simple"

[[tool.poetry.source]]
name = "project-charlie"
url = "https://charlie.example/simple"
default = true

and set the environment variables:

PIP_INDEX_URL=https://charlie.example/simple
PIP_EXTRA_INDEX_URL=https://bravo.example/simple https://pypi.org/simple https://alpha.example/simple

If there is at least one non secondary source repository defined, then pip’s default index server (PyPI https://pypi.org/simple) is placed in PIP_EXTRA_INDEX_URL right before any secondary respository.

If pip’s environment variables are already defined then they are not overwritten. For example in a command like the following, the plugin does not overwrite the environment variable.

PIP_INDEX_URL=https://delta.example/simple tox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tox-poetry-dev-dependencies-0.0.2.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page