File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 11
11
# See the License for the specific language governing permissions and
12
12
# limitations under the License.
13
13
14
+ from distutils .sysconfig import get_config_var
15
+ from distutils .version import LooseVersion
16
+ import os
17
+ import platform
14
18
from setuptools import setup , Extension
19
+ # From https://github.com/pandas-dev/pandas/pull/24274:
20
+ # For mac, ensure extensions are built for macos 10.9 when compiling on a
21
+ # 10.9 system or above, overriding distuitls behaviour which is to target
22
+ # the version that python was built for. This may be overridden by setting
23
+ # MACOSX_DEPLOYMENT_TARGET before calling setup.py
24
+ if sys .platform == 'darwin' :
25
+ if 'MACOSX_DEPLOYMENT_TARGET' not in os .environ :
26
+ current_system = LooseVersion (platform .mac_ver ()[0 ])
27
+ python_target = LooseVersion (
28
+ get_config_var ('MACOSX_DEPLOYMENT_TARGET' ))
29
+ if python_target < '10.9' and current_system >= '10.9' :
30
+ os .environ ['MACOSX_DEPLOYMENT_TARGET' ] = '10.9'
31
+
15
32
16
33
sasl_module = Extension ('sasl.saslwrapper' ,
17
34
sources = ['sasl/saslwrapper.cpp' ],
You can’t perform that action at this time.
0 commit comments