Commit 387d46a0 by Sébastien Eustace

Update documentation

parent ad69ca8c
...@@ -157,3 +157,7 @@ or create a brand new one for you to always work isolated from your global Pytho ...@@ -157,3 +157,7 @@ or create a brand new one for you to always work isolated from your global Pytho
The created virtualenv will use the Python executable for which The created virtualenv will use the Python executable for which
`poetry` has been installed. `poetry` has been installed.
What this means is if you project is Python 2.7 only you should
install `poetry` for you global Python 2.7 executable and use
it to manage your project.
...@@ -121,9 +121,26 @@ poetry will choose a suitable one based on the available package versions. ...@@ -121,9 +121,26 @@ poetry will choose a suitable one based on the available package versions.
poetry add requests pendulum poetry add requests pendulum
``` ```
You can also add `git` dependencies:
```bash
poetry add pendulum --git https://github.com/sdispater/pendulum.git
```
or make them point to a local directory or file:
```bash
poetry add my-package --path ../my-package/
poetry add my-package --path ../my-package/dist/my-package-0.1.0.tar.gz
poetry add my-package --path ../my-package/dist/my_package-0.1.0.whl
```
### Options ### Options
* `--dev (-D)`: Add package as development dependency. * `--dev (-D)`: Add package as development dependency.
* `--git`: The url of the Git repository.
* `--path`: The path to a dependency.
* `--extras (-E)`: Extras to activate for the dependency.
* `--optional` : Add as an optional dependency. * `--optional` : Add as an optional dependency.
* `--dry-run` : Outputs the operations but will not execute anything (implicitly enables --verbose). * `--dry-run` : Outputs the operations but will not execute anything (implicitly enables --verbose).
......
...@@ -45,6 +45,9 @@ If you do not specify the password you will be prompted to write it. ...@@ -45,6 +45,9 @@ If you do not specify the password you will be prompted to write it.
```bash ```bash
poetry config http-basic.pypi username password poetry config http-basic.pypi username password
``` ```
You can also specify the username and password when using the `publish` command
with the `--username` and `--password` options.
### Install dependencies from a private repository ### Install dependencies from a private repository
......
...@@ -94,6 +94,20 @@ Here's an example of specifying that you want to use the latest commit on a bran ...@@ -94,6 +94,20 @@ Here's an example of specifying that you want to use the latest commit on a bran
requests = { git = "https://github.com/kennethreitz/requests.git", branch = "next" } requests = { git = "https://github.com/kennethreitz/requests.git", branch = "next" }
``` ```
### `path` dependencies
To depend on a library located in a local directory or file,
you can use the `path` property:
```toml
[tool.poetry.dependencies]
# directory
my-package = { path = "../my-package/" }
# file
my-package = { path = "../my-package/dist/my-package-0.1.0.tar.gz" }
```
### Python restricted dependencies ### Python restricted dependencies
You can also specify that a dependency should be installed only for specific Python versions: You can also specify that a dependency should be installed only for specific Python versions:
......
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