Closed HexDecimal closed 3 months ago
Sorry for my lack of reflection - but is the question here about which workaround we should suggest to the user, of the two options a) setting e.g. export MACOSX_DEPLOYMENT_TARGET=10.11
or b) adding a delocate
command line flag e.g. --require-target-macos-version 10.11
?
@matthew-brett My question is if both of those two workarounds should be added to the error message, or should Decloate ignore MACOSX_DEPLOYMENT_TARGET
when it exists to automatically adjust the MacOS version unless --require-target-macos-version
is explicitly given.
I'm leaning towards ignoring MACOSX_DEPLOYMENT_TARGET
since the current behavior is breaking older scripts, but the workarounds are easy to add once they're explained. I don't know how much people value MACOSX_DEPLOYMENT_TARGET
but it seemed important enough to the person who made the PR. Still, this current behavior defies what I asked for in the PR since MACOSX_DEPLOYMENT_TARGET
is more pervasive than I initially thought. I did not want Delocate to fail with a version check unless --require-target-macos-version
was being used.
So I need clarification on how important MACOSX_DEPLOYMENT_TARGET
is for MacOS developers.
I can't give any definitive opinion - but my guess is that MACOSX_DEPLOYMENT_TARGET
is important. You probably saw, but it's very widely used on Github, and I bet it's mainly used in CI - and to specify the minimum macOS on which the binary should work. If we ignore it, then the user specifies MACOSX_DEPLOYMENT_TARGET=10.9
, but in fact gets a binary that crashes on 10.9 - I bet that will often be a problem.
So I need clarification on how important
MACOSX_DEPLOYMENT_TARGET
is for MacOS developers.
very very large amount of packages for macOS depends on it.
Almost any package that includes C/C++
module is using it.
I've decided to keep the current behavior and improve the error message.
The MacOS comparability code added in #198 might be too strict. I had expected Delocate to derive the version automatically from its dependencies unless an explicit target version is given. In this case,
MACOSX_DEPLOYMENT_TARGET
is used as an explicit version when it's set and some tool has set it upstream when I didn't expect it, so it's easy to get an error such as this:I was not expecting
MACOSX_DEPLOYMENT_TARGET
to behave this way since I'm unfamiliar with the variable. I had hoped that #198 would automatically handle this case by renaming the wheel, but I had to setMACOSX_DEPLOYMENT_TARGET=10.11
to resolve this.To workaround this issue either set
MACOSX_DEPLOYMENT_TARGET
to a higher version or use the--require-target-macos-version <version>
flag.I could make a PR to fix this but I need to know how others feel about the
MACOSX_DEPLOYMENT_TARGET
variable. Maybe I only need to add instructions on how to configure the target version to this error message. Or maybe the envrioment variable should be one that's less likely to be set by upstream tools.