Skip to content

Commit 5bab682

Browse files
committed
can't use underscore prefix for distutils options
1 parent a2fe5c9 commit 5bab682

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

setup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def __iter__(self):
317317
+ [(f"disable-{x}", None, f"Disable support for {x}") for x in feature]
318318
+ [(f"enable-{x}", None, f"Enable support for {x}") for x in feature]
319319
+ [
320-
(f"_vendor-{x}", None, f"Use vendored version of {x}")
320+
(f"vendor-{x}", None, f"Use vendored version of {x}")
321321
for x in ("raqm", "fribidi")
322322
]
323323
+ [
@@ -335,7 +335,7 @@ def initialize_options(self):
335335
setattr(self, f"disable_{x}", None)
336336
setattr(self, f"enable_{x}", None)
337337
for x in ("raqm", "fribidi"):
338-
setattr(self, f"_vendor_{x}", None)
338+
setattr(self, f"vendor_{x}", None)
339339

340340
def finalize_options(self):
341341
build_ext.finalize_options(self)
@@ -374,14 +374,14 @@ def finalize_options(self):
374374
_dbg("--enable-raqm implies --enable-freetype")
375375
self.feature.required.add("freetype")
376376
for x in ("raqm", "fribidi"):
377-
if getattr(self, f"_vendor_{x}"):
377+
if getattr(self, f"vendor_{x}"):
378378
if getattr(self, "disable_raqm"):
379379
raise ValueError(
380-
f"Conflicting options: --_vendor-{x} and --disable-raqm"
380+
f"Conflicting options: --vendor-{x} and --disable-raqm"
381381
)
382-
if x == "fribidi" and not getattr(self, "_vendor_raqm"):
382+
if x == "fribidi" and not getattr(self, "vendor_raqm"):
383383
raise ValueError(
384-
f"Conflicting options: --_vendor-{x} and not --_vendor-raqm"
384+
f"Conflicting options: --vendor-{x} and not --vendor-raqm"
385385
)
386386
_dbg("Using vendored version of %s", x)
387387
self.feature.vendor.add(x)

winbuild/build_prepare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def build_pillow():
472472
cmd_set("DISTUTILS_USE_SDK", "1"), # use same compiler to build Pillow
473473
cmd_set("MSSdk", "1"), # for PyPy3.6
474474
cmd_set("py_vcruntime_redist", "true"), # use /MD, not /MT
475-
r'"{python_dir}\{python_exe}" setup.py build_ext --_vendor-raqm --_vendor-fribidi %*',
475+
r'"{python_dir}\{python_exe}" setup.py build_ext --vendor-raqm --vendor-fribidi %*',
476476
]
477477

478478
write_script("build_pillow.cmd", lines)

0 commit comments

Comments
 (0)