commit | 04a803c286451f7ad782369b7c529a46e6ad5c9e | [log] [tgz] |
---|---|---|
author | Ignas Anikevicius <240938+aignas@users.noreply.github.com> | Sun Jun 23 09:20:18 2024 +0900 |
committer | GitHub <noreply@github.com> | Sun Jun 23 00:20:18 2024 +0000 |
tree | 7ed3bc41b2248c8507e7ccb995d9ba8f599f6773 | |
parent | 0fd7b64c2d35fe43d09bf250e3189a4386eb8d9e [diff] |
refactor: move PyPI related extension and repository_rule setup to its own dir (#2003) This is to ensure that future work is easier and its clear where to add tests. Now all of the unit tests can be run by just `bazel test //tests/pypi/...`. Refactor summary: - chore: add aignas to CODEOWNERS - chore: add a new directory for storing PyPI related code - move pypi_index_sources.bzl to private/pypi - chore: move parse_requirements_txt to private/pypi - move parse_whl_name to private/pypi - move whl_target_platforms to private/pypi - move parse_requirements to private/pypi - move pip_repo_name to private/pypi - remove unused file - move pip_config_settings to private/pypi - move pypi_index to pypi/private and rename - move labels.bzl to private/pypi - move generate_build_bazel to private/pypi - move render_pkg_aliases.bzl to private/pypi - move patch_whl.bzl to private/pypi - Move envsubst and render_tests to top level of tests - move pip_install_srcs to private/pypi - split and move pip_install/pip_repository.bzl to private/pypi - move the bzlmod extension to private/pypi
This repository is the home of the core Python rules -- py_library
, py_binary
, py_test
, py_proto_library
, and related symbols that provide the basis for Python support in Bazel. It also contains package installation rules for integrating with PyPI and other indices.
Documentation for rules_python is at https://rules-python.readthedocs.io and in the Bazel Build Encyclopedia.
Examples live in the examples directory.
Currently, the core rules build into the Bazel binary, and the symbols in this repository are simple aliases. However, we are migrating the rules to Starlark and removing them from the Bazel binary. Therefore, the future-proof way to depend on Python rules is via this repository. SeeMigrating from the Bundled Rules
below.
The core rules are stable. Their implementation in Bazel is subject to Bazel's backward compatibility policy. Once migrated to rules_python, they may evolve at a different rate, but this repository will still follow semantic versioning.
The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See How to contribute page for information on our development workflow.
For detailed documentation, see https://rules-python.readthedocs.io
See Bzlmod support for more details.