[MacPorts] #74151: py-Pillow: build fails on macOS 26 due to orphaned -C flag when using +x11 variant

MacPorts noreply at macports.org
Fri Jul 3 15:16:47 UTC 2026


#74151: py-Pillow: build fails on macOS 26 due to orphaned -C flag when using +x11
variant
----------------------------+----------------------
  Reporter:  juliamarrinan  |      Owner:  stromnov
      Type:  defect         |     Status:  assigned
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:
Resolution:                 |   Keywords:
      Port:  py-Pillow      |
----------------------------+----------------------
Description changed by ryandesign:

Old description:

> Building py312-Pillow with the +x11 variant fails on macOS 26 with the
> following error:
>
>   python -m build: error: argument --config-setting/-C: expected one
> argument
>
> The generated build command contains an orphaned -C flag with no value:
>
>   python3.12 -m build --no-isolation --wheel ... raqm=disable -C
> imagequant=disable -C
>
> Root cause: The Portfile uses build.args-delete to remove "-C
> xcb=disable" when the +x11 variant is active. However, MacPorts treats -C
> and xcb=disable as separate tokens, so only one token is removed, leaving
> an orphaned -C with no argument.
>
> Fix: Replace build.args-delete with conditional build.args-append using
> variant_isset, so the correct value is always appended rather than
> deleted:
>
>   variant x11 {
>       build.args-append      -C xcb=enable
>       depends_lib-append     port:xorg-libxcb
>   }
>   if {![variant_isset x11]} {
>       build.args-append      -C xcb=disable
>   }
>
> The same issue affects the raqm variant. The same fix should be applied
> there as well.
>
> This issue was introduced or exposed by macOS 26, where a newer version
> of python-build is stricter about malformed -C arguments.

New description:

 Building py312-Pillow with the +x11 variant fails on macOS 26 with the
 following error:

 {{{
 python -m build: error: argument --config-setting/-C: expected one
 argument
 }}}

 The generated build command contains an orphaned `-C` flag with no value:

 {{{
 python3.12 -m build --no-isolation --wheel ... raqm=disable -C
 imagequant=disable -C
 }}}

 Root cause: The Portfile uses `build.args-delete` to remove `-C
 xcb=disable` when the +x11 variant is active. However, MacPorts treats
 `-C` and `xcb=disable` as separate tokens, so only one token is removed,
 leaving an orphaned `-C` with no argument.

 Fix: Replace `build.args-delete` with conditional `build.args-append`
 using `variant_isset`, so the correct value is always appended rather than
 deleted:

 {{{
 variant x11 {
     build.args-append      -C xcb=enable
     depends_lib-append     port:xorg-libxcb
 }
 if {![variant_isset x11]} {
     build.args-append      -C xcb=disable
 }
 }}}

 The same issue affects the raqm variant. The same fix should be applied
 there as well.

 This issue was introduced or exposed by macOS 26, where a newer version of
 python-build is stricter about malformed `-C` arguments.

--

-- 
Ticket URL: <https://trac.macports.org/ticket/74151#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list