Skip to content

Commit

Permalink
Fixed unit test (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrisco authored Dec 24, 2024
1 parent 05518d6 commit 0b48241
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ to compile a requirements solution and install third-party distributions from th
project differs from ``rules_python`` in that the URLs for the distributions are written to the
solution, enabling deterministic and repo-cacheable downloads and installs of third-party dependencies.

To get started with bzlmod on Bazel 7::
To get started with bzlmod on Bazel 7:

.. code-block:: python
# Find {version} on the req-compile GitHub releases page.
bazel_dep(name = "rules_req_compile", version = "{version}")
Expand All @@ -45,7 +47,9 @@ To get started with bzlmod on Bazel 7::
)
use_repo(requirements, "my_pip_deps")
Using WORKSPACE.bazel::
Using WORKSPACE.bazel:

.. code-block:: python
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Expand Down Expand Up @@ -322,4 +326,3 @@ together and ensure that their requirements will all install into the same envir

> req-candidates --paths-only | req-compile --extra test --solution compiled-requirements.txt --wheel-dir .wheeldir > compiled-requirements.txt
.. all reqs and all test reqs compiled together...

1 change: 1 addition & 0 deletions private/reqs_repo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def parse_constraint(data, lockfile, wheel_dirs):
for entry in data[2:-1]:
text = entry.replace("# via", "#")
pkg, _, _ = text.strip(" #").partition(" ")

# TODO: Support extras.
# Split off the extra.
pkg, _, _ = pkg.partition("[")
Expand Down
2 changes: 1 addition & 1 deletion private/tests/unit/parse_lockfile_test_suite.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ _FIND_LINKS_NESTED_EXPECTED = {
"sha256": "810546bb58f2aff5f51ee5c8389d936c9c8ba4c27ddace1c4a87e48635b8812a",
"url": None,
"version": "3.5.1",
"via": [],
"via": None,
},
}

Expand Down

0 comments on commit 0b48241

Please sign in to comment.