@@ -992,20 +992,42 @@ To use a new SDK, add the following in ``recipe/conda_build_config.yaml``
992
992
993
993
.. code-block :: yaml
994
994
995
- MACOSX_DEPLOYMENT_TARGET : # [osx]
996
- - 10.12 # [osx]
995
+ # Please consult conda-forge/core before doing this
996
+ MACOSX_SDK_VERSION : # [osx and x86_64]
997
+ - 10.12 # [osx and x86_64]
998
+
999
+ Note that this should be done if the error you are getting says that a header is not
1000
+ found or a macro is not defined. This will make your package compile with a newer SDK
1001
+ but with ``10.9 `` as the deployment target.
1002
+ WARNING: some packages might use features from ``10.12 `` if you do the above due to
1003
+ buggy symbol availability checks. For example packages looking for ``clock_gettime ``
1004
+ will see it as it will be a weak symbol, but the package might not have a codepath
1005
+ to handle the weak symbol, in that case, you need to update the ``MACOSX_DEPLOYMENT_TARGET ``
1006
+ as described below.
1007
+
1008
+ After increasing the SDK version, if you are getting an error that says that a function
1009
+ is available only for macOS x.x, then do the following in ``recipe/conda_build_config.yaml ``,
1010
+
1011
+ .. code-block :: yaml
1012
+
1013
+ # Please consult conda-forge/core before doing this
1014
+ MACOSX_DEPLOYMENT_TARGET : # [osx and x86_64]
1015
+ - 10.12 # [osx and x86_64]
1016
+ MACOSX_SDK_VERSION : # [osx and x86_64]
1017
+ - 10.12 # [osx and x86_64]
1018
+
997
1019
998
1020
In ``recipe/meta.yaml ``, add the following to ensure that the user's system is compatible.
999
1021
1000
1022
.. code-block :: yaml
1001
1023
1002
1024
requirements :
1003
- run_constrained :
1004
- - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx]
1025
+ run :
1026
+ - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64 ]
1005
1027
1006
- Note that the requirement is a ` run_constrained `, because the `` __osx `` virtual package
1007
- is supported only by `` conda>=4.8 ``. Once that conda version is used widely, the
1008
- requirement will be changed from ``run_constrained `` to ``run ``.
1028
+ Note that this requires `` conda>=4.8 ``. If you want to support older conda versions
1029
+ the requirement should be changed from `` run `` to `` run_constrained ``. Note that
1030
+ `` conda<4.8 `` will ignore the condition if it's a ``run_constrained `` on ``__osx ``.
1009
1031
1010
1032
1011
1033
PyPy builds
0 commit comments