Skip to content

Commit

Permalink
docs: adding a note about being able to specify a package's source re…
Browse files Browse the repository at this point in the history
…pository (python-poetry#3477)

* Adding a note about being able to specify a package's source repository

* Updating the list of options for the add command
  • Loading branch information
glencairn authored and edvardm committed Nov 24, 2021
1 parent ea55f22 commit fbe24e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,16 @@ 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)
* `--optional`: Add as an optional dependency.
* `--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).


Expand Down
11 changes: 9 additions & 2 deletions docs/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}}
Expand Down

0 comments on commit fbe24e4

Please sign in to comment.