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

Add project docs for project.scripts #7010

Merged
merged 1 commit into from
Sep 4, 2024
Merged
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
16 changes: 16 additions & 0 deletions docs/concepts/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ definitions with [package sources](./dependencies.md) in `tool.uv.sources`.

See the official [`pyproject.toml` guide](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/) for more details on getting started with a `pyproject.toml`.

## Defining entry points

uv uses the standard `[project.scripts]` table to define entry points for the project.

For example, to declare an command called `hello` that invokes the `hello` function in the
`example_package_app` module:

```toml title="pyproject.toml"
[project.scripts]
hello = "example_package_app:hello"
```

!!! important

Using `[project.scripts]` requires a [build system](#build-systems) to be defined.

## Build systems

Projects _may_ define a `[build-system]` in the `pyproject.toml`. The build system defines how the
Expand Down
Loading