Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install: option to skip current project package #757

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,28 @@ poetry install --extras "mysql pgsql"
poetry install -E mysql -E pgsql
```

By default `poetry` will install your project's package everytime you run `install`:

```bash
$ poetry install
Installing dependencies from lock file

Nothing to install or update

- Installing <your-package-name> (x.x.x)

```

If you want to skip this installation, use the `--no-root` option.

```bash
poetry install --no-root
```

#### Options

* `--no-dev`: Do not install dev dependencies.
* `--no-root`: Do not install the root package (your project).
* `-E|--extras`: Features to install (multiple values allowed).

### update
Expand Down
19 changes: 19 additions & 0 deletions docs/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,28 @@ poetry install --extras "mysql pgsql"
poetry install -E mysql -E pgsql
```

By default `poetry` will install your project's package everytime you run `install`:

```bash
$ poetry install
Installing dependencies from lock file

Nothing to install or update

- Installing <your-package-name> (x.x.x)

```

If you want to skip this installation, use the `--no-root` option.

```bash
poetry install --no-root
```

### Options

* `--no-dev`: Do not install dev dependencies.
* `--no-root`: Do not install the root package (your project).
* `--extras (-E)`: Features to install (multiple values allowed).

## update
Expand Down
4 changes: 4 additions & 0 deletions poetry/console/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class InstallCommand(EnvCommand):

install
{ --no-dev : Do not install dev dependencies. }
{ --no-root : Do not install the root package (your project). }
{ --dry-run : Outputs the operations but will not execute anything
(implicitly enables --verbose). }
{ --E|extras=* : Extra sets of dependencies to install. }
Expand Down Expand Up @@ -55,6 +56,9 @@ def handle(self):
if return_code != 0:
return return_code

if not self.option("no-root"):
return 0

try:
builder = SdistBuilder(self.poetry, NullEnv(), NullIO())
except ModuleOrPackageNotFound:
Expand Down