mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
update is_new_osx function (#5376)
This commit is contained in:
parent
b2ef6100af
commit
1bf2082ac4
11
setup.py
11
setup.py
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import sys
|
import sys
|
||||||
|
import platform
|
||||||
from distutils.command.build_ext import build_ext
|
from distutils.command.build_ext import build_ext
|
||||||
from distutils.sysconfig import get_python_inc
|
from distutils.sysconfig import get_python_inc
|
||||||
import distutils.util
|
import distutils.util
|
||||||
|
@ -73,18 +74,18 @@ COPY_FILES = {
|
||||||
|
|
||||||
|
|
||||||
def is_new_osx():
|
def is_new_osx():
|
||||||
"""Check whether we're on OSX >= 10.10"""
|
"""Check whether we're on OSX >= 10.7"""
|
||||||
name = distutils.util.get_platform()
|
name = distutils.util.get_platform()
|
||||||
if sys.platform != "darwin":
|
if sys.platform != "darwin":
|
||||||
return False
|
return False
|
||||||
elif name.startswith("macosx-10"):
|
mac_ver = platform.mac_ver()[0]
|
||||||
minor_version = int(name.split("-")[1].split(".")[1])
|
if mac_ver.startswith("10"):
|
||||||
|
minor_version = int(mac_ver.split('.')[1])
|
||||||
if minor_version >= 7:
|
if minor_version >= 7:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
else:
|
return False
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
if is_new_osx():
|
if is_new_osx():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user