Commit 9d89b4aa by Evan Shenkman Committed by GitHub

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
parent 355ac95a
...@@ -352,7 +352,7 @@ about dependency groups. ...@@ -352,7 +352,7 @@ about dependency groups.
### Options ### 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**) * `--dev (-D)`: Add package as development dependency. (**Deprecated**)
* `--editable (-e)`: Add vcs/path dependencies as editable. * `--editable (-e)`: Add vcs/path dependencies as editable.
* `--extras (-E)`: Extras to activate for the dependency. (multiple values allowed) * `--extras (-E)`: Extras to activate for the dependency. (multiple values allowed)
...@@ -360,8 +360,8 @@ about dependency groups. ...@@ -360,8 +360,8 @@ about dependency groups.
* `--python`: Python version for which the dependency must be installed. * `--python`: Python version for which the dependency must be installed.
* `--platform`: Platforms 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. * `--source`: Name of the source to use to install the package.
* `---allow-prereleases`: Accept prereleases. * `--allow-prereleases`: Accept prereleases.
* `--dry-run`: Outputs the operations but will not execute anything (implicitly enables --verbose). * `--dry-run`: Output the operations but do not execute anything (implicitly enables --verbose).
* `--lock`: Do not perform install (only update the lockfile). * `--lock`: Do not perform install (only update the lockfile).
......
...@@ -216,8 +216,15 @@ you can add it to your `pyproject.toml` file, like so: ...@@ -216,8 +216,15 @@ you can add it to your `pyproject.toml` file, like so:
```toml ```toml
[[tool.poetry.source]] [[tool.poetry.source]]
name = 'private' name = "private"
url = 'http://example.com/simple' 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 %}} {{% note %}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment