Skip to content

Commit

Permalink
fix: build and setuptools pinned versions
Browse files Browse the repository at this point in the history
With the recent change in pypa/setuptools#2769, some wheels started to
fail build immediately with an unpinned setuptools in isolation mode.

Signed-off-by: Thulio Ferraz Assis <[email protected]>
  • Loading branch information
f0rmiga committed Oct 27, 2021
1 parent 62f8c0c commit de8a9e4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gazelle/modules_mapping/def.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def _modules_mapping_impl(rctx):
"--no-cache-dir",
"--disable-pip-version-check",
"--index-url={}".format(rctx.attr.pip_index_url),
"build",
"build=={}".format(rctx.attr.build_wheel_version),
"setuptools=={}".format(rctx.attr.setuptools_wheel_version),
],
quiet = rctx.attr.quiet,
timeout = rctx.attr.install_build_timeout,
Expand Down Expand Up @@ -280,6 +281,10 @@ def _search_url(releases, extension):
modules_mapping = repository_rule(
_modules_mapping_impl,
attrs = {
"build_wheel_version": attr.string(
default = "0.5.1",
doc = "The build wheel version.",
),
"generate_timeout": attr.int(
default = 30,
doc = "The timeout for the generator.py command.",
Expand Down Expand Up @@ -309,6 +314,10 @@ modules_mapping = repository_rule(
doc = "The requirements.txt file with hashes locked using pip-tools.",
mandatory = True,
),
"setuptools_wheel_version": attr.string(
default = "v57.5.0",
doc = "The setuptools wheel version.",
),
"_builder": attr.label(
allow_single_file = True,
default = "//gazelle/modules_mapping:builder.py",
Expand Down

0 comments on commit de8a9e4

Please sign in to comment.