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
c22bedc1
Commit
c22bedc1
authored
Dec 27, 2016
by
hiiwave
Committed by
Davis E. King
Dec 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify setup.py so that it can be installed under conda environment (#377)
parent
2f91cd6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
setup.py
setup.py
+9
-1
No files found.
setup.py
View file @
c22bedc1
...
...
@@ -355,7 +355,7 @@ def read_version():
major
=
re
.
findall
(
"set
\
(CPACK_PACKAGE_VERSION_MAJOR.*
\"
(.*)
\"
"
,
open
(
'dlib/CMakeLists.txt'
)
.
read
())[
0
]
minor
=
re
.
findall
(
"set
\
(CPACK_PACKAGE_VERSION_MINOR.*
\"
(.*)
\"
"
,
open
(
'dlib/CMakeLists.txt'
)
.
read
())[
0
]
patch
=
re
.
findall
(
"set
\
(CPACK_PACKAGE_VERSION_PATCH.*
\"
(.*)
\"
"
,
open
(
'dlib/CMakeLists.txt'
)
.
read
())[
0
]
return
major
+
'.'
+
minor
+
'.'
+
patch
return
major
+
'.'
+
minor
+
'.'
+
patch
def
rmtree
(
name
):
...
...
@@ -504,6 +504,14 @@ class build(_build):
# make sure build artifacts are generated for the version of Python currently running
cmake_extra_arch
=
[]
if
'conda'
in
sys
.
version
:
# to support conda distribution
from
distutils.sysconfig
import
get_python_inc
import
distutils.sysconfig
as
sysconfig
cmake_extra_arch
+=
[
'-DPYTHON_INCLUDE_DIR='
+
get_python_inc
()]
cmake_extra_arch
+=
[
'-DPYTHON_LIBRARY='
+
sysconfig
.
get_config_var
(
'LIBDIR'
)]
if
sys
.
version_info
>=
(
3
,
0
):
cmake_extra_arch
+=
[
'-DPYTHON3=yes'
]
...
...
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