Python packaging utilities in Starlark.
For full API documentation, see the API Reference.
.bzl fileload("@pypackaging.bzl//:pypackaging.bzl", "pypackaging")
# Parse a version
v = pypackaging.version.parse("1.2.3")
# Parse a wheel filename
wheel_info = pypackaging.utils.parse_wheel_filename("foo-1.0-py3-none-any.whl")
The logic in this repository is derived from the following upstream projects:
The original Python implementations have been ported to Starlark (.bzl) to allow evaluation during Bazel's analysis phase without requiring a Python interpreter. The core algorithms and compatibility rules remain faithful to the upstream implementations.
See individual .bzl files in pypackaging/private/ for specific upstream sources and detailed documentation.
0.1.02026-06-28 |