Skip to content

docs: split PyPI docs up and add more #2935

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

Merged
merged 4 commits into from
May 29, 2025
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ to the actual rules_python project and begin the code review process.
## Developer guide

For more more details, guidance, and tips for working with the code base,
see [DEVELOPING.md](DEVELOPING.md)
see [docs/devguide.md](./devguide)

## Formatting

Expand Down
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ dev_pip.parse(
download_only = True,
experimental_index_url = "https://pypi.org/simple",
hub_name = "dev_pip",
parallel_download = False,
python_version = "3.11",
requirements_lock = "//docs:requirements.txt",
)
Expand Down
3 changes: 3 additions & 0 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ sphinx_stardocs(
"//python/private:rule_builders_bzl",
"//python/private/api:py_common_api_bzl",
"//python/private/pypi:config_settings_bzl",
"//python/private/pypi:env_marker_info_bzl",
"//python/private/pypi:pkg_aliases_bzl",
"//python/private/pypi:whl_config_setting_bzl",
"//python/private/pypi:whl_library_bzl",
"//python/uv:lock_bzl",
"//python/uv:uv_bzl",
"//python/uv:uv_toolchain_bzl",
Expand Down
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@
"api/sphinxdocs/private/sphinx_docs_library": "/api/sphinxdocs/sphinxdocs/private/sphinx_docs_library.html",
"api/sphinxdocs/sphinx_docs_library": "/api/sphinxdocs/sphinxdocs/sphinx_docs_library.html",
"api/sphinxdocs/inventories/index": "/api/sphinxdocs/sphinxdocs/inventories/index.html",
"pip.html": "pypi/index.html",
"pypi-dependencies.html": "pypi/index.html",
}

# Adapted from the template code:
Expand Down Expand Up @@ -139,7 +141,9 @@

# --- Extlinks configuration
extlinks = {
"gh-issue": (f"https://github.com/bazel-contrib/rules_python/issues/%s", "#%s issue"),
"gh-path": (f"https://github.com/bazel-contrib/rules_python/tree/main/%s", "%s"),
"gh-pr": (f"https://github.com/bazel-contrib/rules_python/pulls/%s", "#%s PR"),
}

# --- MyST configuration
Expand Down
10 changes: 5 additions & 5 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ It assumes you have a `requirements.txt` file with your PyPI dependencies.

For more details information about configuring `rules_python`, see:
* [Configuring the runtime](configuring-toolchains)
* [Configuring third party dependencies (pip/pypi)](pypi-dependencies)
* [Configuring third party dependencies (pip/pypi)](./pypi/index)
* [API docs](api/index)

## Using bzlmod
## Including dependencies

The first step to using rules_python with bzlmod is to add the dependency to
your MODULE.bazel file:
The first step to using `rules_python` is to add the dependency to
your `MODULE.bazel` file:

```starlark
# Update the version "0.0.0" to the release found here:
Expand All @@ -30,7 +30,7 @@ pip.parse(
use_repo(pip, "pypi")
```

## Using a WORKSPACE file
### Using a WORKSPACE file

Using WORKSPACE is deprecated, but still supported, and a bit more involved than
using Bzlmod. Here is a simplified setup to download the prebuilt runtimes.
Expand Down
3 changes: 1 addition & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ See {gh-path}`Bzlmod support <BZLMOD_SUPPORT.md>` for any behaviour differences
:hidden:
self
getting-started
pypi-dependencies
pypi/index
Toolchains <toolchains>
pip
coverage
precompiling
gazelle
Expand Down
4 changes: 0 additions & 4 deletions docs/pip.md

This file was deleted.

Loading