-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the ability to add complete dependencies in one go
- Loading branch information
Showing
3 changed files
with
159 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,6 +186,7 @@ You also can specify a constraint when adding a package, like so: | |
|
||
```bash | ||
poetry add pendulum@^2.0.5 | ||
poetry add "pendulum>=2.0.5" | ||
``` | ||
|
||
If you try to add a package that is already present, you will get an error. | ||
|
@@ -224,11 +225,20 @@ It means that changes in the local directory will be reflected directly in envir | |
|
||
If you don't want the dependency to be installed in editable mode you can specify it in the `pyproject.toml` file: | ||
|
||
``` | ||
```toml | ||
[tool.poetry.dependencies] | ||
my-package = {path = "../my/path", develop = false} | ||
``` | ||
|
||
If the package(s) you want to install provide extras, you can specify them | ||
when adding the package: | ||
|
||
```bash | ||
poetry add requests[security,socks] | ||
poetry add "requests[security,socks]~=2.22.0" | ||
poetry add "git+https://github.com/pallets/[email protected][dotenv,dev]" | ||
``` | ||
|
||
### Options | ||
|
||
* `--dev (-D)`: Add package as development dependency. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters