Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater committed May 7, 2018
1 parent ad69ca8 commit 387d46a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/docs/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
`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.
17 changes: 17 additions & 0 deletions docs/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,26 @@ poetry will choose a suitable one based on the available package versions.
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

* `--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.
* `--dry-run` : Outputs the operations but will not execute anything (implicitly enables --verbose).

Expand Down
3 changes: 3 additions & 0 deletions docs/docs/repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ If you do not specify the password you will be prompted to write it.
```bash
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

Expand Down
14 changes: 14 additions & 0 deletions docs/docs/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
```

### `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

You can also specify that a dependency should be installed only for specific Python versions:
Expand Down

0 comments on commit 387d46a

Please sign in to comment.