Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
869097c8
Commit
869097c8
authored
Jan 16, 2021
by
Davis King
Browse files
Make setup.py errors about cmake not being installed more readable
parent
df46c516
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
setup.py
setup.py
+5
-6
No files found.
setup.py
View file @
869097c8
...
...
@@ -118,18 +118,17 @@ class CMakeBuild(build_ext):
def
get_cmake_version
(
self
):
try
:
out
=
subprocess
.
check_output
([
'cmake'
,
'--version'
])
except
OSError
:
raise
RuntimeError
(
"
\n
*******************************************************************
\n
"
+
" CMake must be installed to build the following extensions: "
+
", "
.
join
(
e
.
name
for
e
in
self
.
extensions
)
+
"
\n
*******************************************************************
\n
"
)
except
:
sys
.
stderr
.
write
(
"
\n
ERROR: CMake must be installed to build dlib
\n\n
"
)
sys
.
exit
(
1
)
return
re
.
search
(
r
'version\s*([\d.]+)'
,
out
.
decode
()).
group
(
1
)
def
run
(
self
):
cmake_version
=
self
.
get_cmake_version
()
if
platform
.
system
()
==
"Windows"
:
if
LooseVersion
(
cmake_version
)
<
'3.1.0'
:
raise
RuntimeError
(
"CMake >= 3.1.0 is required on Windows"
)
sys
.
stderr
.
write
(
"
\n
ERROR: CMake >= 3.1.0 is required on Windows
\n\n
"
)
sys
.
exit
(
1
)
for
ext
in
self
.
extensions
:
self
.
build_extension
(
ext
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment