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