mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
only check cmake existence if building in required
This commit is contained in:
parent
93818fd7e4
commit
25f0ab83cb
8
setup.py
8
setup.py
@ -77,7 +77,7 @@ def _get_options():
|
|||||||
if opt_key:
|
if opt_key:
|
||||||
sys.argv.remove(arg)
|
sys.argv.remove(arg)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not arg.startswith('--'):
|
if not arg.startswith('--'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -122,9 +122,6 @@ def _get_options():
|
|||||||
|
|
||||||
options, cmake_config, cmake_path, cmake_extra = _get_options()
|
options, cmake_config, cmake_path, cmake_extra = _get_options()
|
||||||
|
|
||||||
if cmake_path is None:
|
|
||||||
raise DistutilsSetupError("Cannot find cmake in the path. Please specify its path with --cmake parameter.")
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from Queue import Queue, Empty
|
from Queue import Queue, Empty
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@ -305,6 +302,9 @@ class build(_build):
|
|||||||
def build_dlib():
|
def build_dlib():
|
||||||
"""use cmake to build and install the extension
|
"""use cmake to build and install the extension
|
||||||
"""
|
"""
|
||||||
|
if cmake_path is None:
|
||||||
|
raise DistutilsSetupError("Cannot find cmake in the path. Please specify its path with --cmake parameter.")
|
||||||
|
|
||||||
platform_arch = platform.architecture()[0]
|
platform_arch = platform.architecture()[0]
|
||||||
log.info("Detected Python architecture: %s" % platform_arch)
|
log.info("Detected Python architecture: %s" % platform_arch)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user