Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8771b68

Browse filesBrowse files
author
Alex Eagle
committed
remove requirement macro
1 parent 5db616d commit 8771b68
Copy full SHA for 8771b68

File tree

Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed
Filter options
  • python/pip_install/extract_wheels/lib
Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed

‎python/pip_install/extract_wheels/lib/bazel.py

Copy file name to clipboardExpand all lines: python/pip_install/extract_wheels/lib/bazel.py
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,22 +243,25 @@ def generate_requirements_file_contents(repo_name: str, targets: Iterable[str])
243243
all_whl_requirements = [{whl_requirement_labels}]
244244
245245
def requirement(name):
246+
fail("The 'requirement' macro is disabled in favour of our own 'requirement' macro. See http://go/bazel/python#consuming-pip-dependencies")
247+
248+
def _requirement(name):
246249
name_key = name.replace("-", "_").replace(".", "_").lower()
247250
return "{repo}//pypi__" + name_key
248251
249252
def whl_requirement(name):
250-
return requirement(name) + ":{whl_file_label}"
253+
return _requirement(name) + ":{whl_file_label}"
251254
252255
def data_requirement(name):
253-
return requirement(name) + ":{data_label}"
256+
return _requirement(name) + ":{data_label}"
254257
255258
def dist_info_requirement(name):
256-
return requirement(name) + ":{dist_info_label}"
259+
return _requirement(name) + ":{dist_info_label}"
257260
258261
def entry_point(pkg, script = None):
259262
if not script:
260263
script = pkg
261-
return requirement(pkg) + ":{entry_point_prefix}_" + script
264+
return _requirement(pkg) + ":{entry_point_prefix}_" + script
262265
263266
def install_deps():
264267
fail("install_deps() only works if you are creating an incremental repo. Did you mean to use pip_parse()?")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.