Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
474ae9a8
Commit
474ae9a8
authored
Jun 11, 2016
by
Davis E. King
Committed by
GitHub
Jun 11, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #136 from AbdealiJK/ajk/setup
setup.py: Don't fail if pip fails in cmake err msg
parents
87dff094
8da4053c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
setup.py
setup.py
+20
-16
No files found.
setup.py
View file @
474ae9a8
...
...
@@ -468,26 +468,30 @@ class build(_build):
message
=
msg_pkgmanager
.
format
(
'OSX'
,
manager
)
break
elif
sys
.
platform
.
startswith
(
'linux'
):
distname
=
None
try
:
import
distro
except
ImportError
:
except
ImportError
as
err
:
import
pip
pip_exit
=
pip
.
main
([
'install'
,
'distro'
])
pip_exit
=
pip
.
main
([
'install'
,
'
-q'
,
'
distro'
])
if
pip_exit
>
0
:
raise
SystemExit
(
'Pip was unable to install `distro`'
)
import
distro
distname
=
distro
.
id
()
if
distname
in
(
'debian'
,
'ubuntu'
):
message
=
msg_pkgmanager
.
format
(
distname
.
title
(),
'apt-get'
)
elif
distname
in
(
'fedora'
,
'centos'
,
'redhat'
):
pkgmanagers
=
(
"dnf"
,
"yum"
)
for
manager
in
pkgmanagers
:
if
find_executable
(
manager
)
is
not
None
:
message
=
msg_pkgmanager
.
format
(
distname
.
title
(),
manager
)
break
log
.
debug
(
"Unable to install `distro` to identify "
"the recommended command. Falling back "
"to default error message."
)
distro
=
err
else
:
import
distro
if
not
isinstance
(
distro
,
ImportError
):
distname
=
distro
.
id
()
if
distname
in
(
'debian'
,
'ubuntu'
):
message
=
msg_pkgmanager
.
format
(
distname
.
title
(),
'apt-get'
)
elif
distname
in
(
'fedora'
,
'centos'
,
'redhat'
):
pkgmanagers
=
(
"dnf"
,
"yum"
)
for
manager
in
pkgmanagers
:
if
find_executable
(
manager
)
is
not
None
:
message
=
msg_pkgmanager
.
format
(
distname
.
title
(),
manager
)
break
raise
DistutilsSetupError
(
"Cannot find cmake, ensure it is installed and in the path.
\n
"
+
message
+
"
\n
"
...
...
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