You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pypi/lock.md
+26-2Lines changed: 26 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@
5
5
6
6
:::{note}
7
7
Currently `rules_python` only supports `requirements.txt` format.
8
+
9
+
#{gh-issue}`2787` tracks `pylock.toml` support.
8
10
:::
9
11
10
12
## requirements.txt
@@ -37,11 +39,33 @@ This rule generates two targets:
37
39
Once you generate this fully specified list of requirements, you can install the requirements ([bzlmod](./download)/[WORKSPACE](./download-workspace)).
38
40
39
41
:::{warning}
40
-
If you're specifying dependencies in `pyproject.toml`, make sure to include the `[build-system]` configuration, with pinned dependencies. `compile_pip_requirements` will use the build system specified to read your project's metadata, and you might see non-hermetic behavior if you don't pin the build system.
42
+
If you're specifying dependencies in `pyproject.toml`, make sure to include the
43
+
`[build-system]` configuration, with pinned dependencies.
44
+
`compile_pip_requirements` will use the build system specified to read your
45
+
project's metadata, and you might see non-hermetic behavior if you don't pin the
46
+
build system.
41
47
42
-
Not specifying `[build-system]` at all will result in using a default `[build-system]` configuration, which uses unpinned versions ([ref](https://peps.python.org/pep-0518/#build-system-table)).
48
+
Not specifying `[build-system]` at all will result in using a default
49
+
`[build-system]` configuration, which uses unpinned versions
Copy file name to clipboardExpand all lines: gazelle/README.md
+122Lines changed: 122 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -224,6 +224,8 @@ Python-specific directives are as follows:
224
224
| Controls whether Gazelle resolves dependencies for import statements that use paths relative to the current package. Can be "true" or "false".|
225
225
|`# gazelle:python_generate_pyi_deps`|`false`|
226
226
| Controls whether to generate a separate `pyi_deps` attribute for type-checking dependencies or merge them into the regular `deps` attribute. When `false` (default), type-checking dependencies are merged into `deps` for backward compatibility. When `true`, generates separate `pyi_deps`. Imports in blocks with the format `if typing.TYPE_CHECKING:`/`if TYPE_CHECKING:` and type-only stub packages (eg. boto3-stubs) are recognized as type-checking dependencies. |
| Controls whether to generate a `py_proto_library` for each `proto_library` in the package. By default we load this rule from the `@protobuf` repository; use `gazelle:map_kind` if you need to load this from somewhere else. |
| Tells Gazelle to include a set of dependencies, even if they are not imported in a Python module. `targets` is a comma-separated list of target names to include as dependencies. ||
0 commit comments