Skip to content

Commit

Permalink
non-package-mode: switch from mode ("package"/"non-package") to…
Browse files Browse the repository at this point in the history
… `package-mode` (`true`/`false`)
  • Loading branch information
radoering committed Dec 9, 2023
1 parent 24fda44 commit 922d140
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ If you want to use Poetry only for dependency management but not for packaging,

```toml
[tool.poetry]
mode = "non-package"
package-mode = false
```

In this mode, metadata such as `name` and `version` are optional.
Expand Down
6 changes: 3 additions & 3 deletions docs/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ menu:

The `tool.poetry` section of the `pyproject.toml` file is composed of multiple sections.

## mode
## package-mode

The mode of the project, either `"package"` (default) or `"non-package"`. **Optional**
Whether Poetry operates in package mode (default) or not. **Optional**

See {{< relref "basic-usage#operating-modes" >}} for more information.

```toml
mode = "non-package"
package-mode = false
```

## name
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/console/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class InstallCommand(InstallerCommand):
<info> poetry install --no-root</info>
If you want to use Poetry only for dependency management but not for packaging,
you can set the operating mode to "non-package" in your pyproject.toml file.
you can set the "package-mode" to false in your pyproject.toml file.
"""

_loggers = ["poetry.repositories.pypi_repository", "poetry.inspection.info"]
Expand Down
2 changes: 1 addition & 1 deletion tests/console/commands/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def test_non_package_mode_does_not_try_to_install_root(
) -> None:
content = """\
[tool.poetry]
mode = "non-package"
package-mode = false
"""
poetry = project_factory(name="non-package-mode", pyproject_content=content)

Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/non_package_mode/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
mode = "non-package"
package-mode = false

[tool.poetry.dependencies]
python = "^3.8"
Expand Down

0 comments on commit 922d140

Please sign in to comment.