From 203b9d76212c3e9b111513cd1826d611cbe90d81 Mon Sep 17 00:00:00 2001 From: Evan Shenkman <75740326+glencairn@users.noreply.github.com> Date: Sat, 13 Nov 2021 23:34:00 -0500 Subject: [PATCH] docs: adding a note about being able to specify a package's source repository (#3477) * Adding a note about being able to specify a package's source repository * Updating the list of options for the add command --- docs/cli.md | 6 +++--- docs/pyproject.md | 11 +++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index 6abd517c270..1ccf04cacae 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -352,7 +352,7 @@ about dependency groups. ### Options -* `--group (-D)`: The group to add the dependency to. +* `--group (-G)`: The group to add the dependency to. * `--dev (-D)`: Add package as development dependency. (**Deprecated**) * `--editable (-e)`: Add vcs/path dependencies as editable. * `--extras (-E)`: Extras to activate for the dependency. (multiple values allowed) @@ -360,8 +360,8 @@ about dependency groups. * `--python`: Python version for which the dependency must be installed. * `--platform`: Platforms for which the dependency must be installed. * `--source`: Name of the source to use to install the package. -* `---allow-prereleases`: Accept prereleases. -* `--dry-run`: Outputs the operations but will not execute anything (implicitly enables --verbose). +* `--allow-prereleases`: Accept prereleases. +* `--dry-run`: Output the operations but do not execute anything (implicitly enables --verbose). * `--lock`: Do not perform install (only update the lockfile). diff --git a/docs/pyproject.md b/docs/pyproject.md index a0d1c896f41..5b2ff5fc32d 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -216,8 +216,15 @@ you can add it to your `pyproject.toml` file, like so: ```toml [[tool.poetry.source]] -name = 'private' -url = 'http://example.com/simple' +name = "private" +url = "http://example.com/simple" +``` + +If you have multiple repositories configured, you can explicitly tell poetry where to look for a specific package: + +```toml +[tool.poetry.dependencies] +requests = { version = "^2.13.0", source = "private" } ``` {{% note %}}