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
d0726637
Commit
d0726637
authored
Dec 27, 2016
by
Davis King
Browse files
merged
parents
b93b6f36
c22bedc1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
dlib/test/string.cpp
dlib/test/string.cpp
+7
-0
setup.py
setup.py
+9
-1
No files found.
dlib/test/string.cpp
View file @
d0726637
...
@@ -243,6 +243,13 @@ namespace
...
@@ -243,6 +243,13 @@ namespace
DLIB_TEST
(
wv
[
0
]
==
L"test"
);
DLIB_TEST
(
wv
[
0
]
==
L"test"
);
DLIB_TEST
(
wv
[
1
]
==
L"string"
);
DLIB_TEST
(
wv
[
1
]
==
L"string"
);
wstr
=
L"Über alle Maßen\u00A0Öttingenstraße"
;
wv
=
split
(
wstr
,
L" \u00A0
\n\r\t
"
);
DLIB_TEST
(
wv
.
size
()
==
4
);
DLIB_TEST
(
wv
[
0
]
==
L"Über"
);
DLIB_TEST
(
wv
[
1
]
==
L"alle"
);
DLIB_TEST
(
wv
[
2
]
==
L"Maßen"
);
DLIB_TEST
(
wv
[
3
]
==
L"Öttingenstraße"
);
wstr
=
L"test string hah"
;
wstr
=
L"test string hah"
;
DLIB_TEST
(
split_on_first
(
wstr
).
first
==
L"test"
);
DLIB_TEST
(
split_on_first
(
wstr
).
first
==
L"test"
);
...
...
setup.py
View file @
d0726637
...
@@ -355,7 +355,7 @@ def read_version():
...
@@ -355,7 +355,7 @@ def read_version():
major
=
re
.
findall
(
"set\(CPACK_PACKAGE_VERSION_MAJOR.*
\"
(.*)
\"
"
,
open
(
'dlib/CMakeLists.txt'
).
read
())[
0
]
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
]
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
]
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
):
def
rmtree
(
name
):
...
@@ -504,6 +504,14 @@ class build(_build):
...
@@ -504,6 +504,14 @@ class build(_build):
# make sure build artifacts are generated for the version of Python currently running
# make sure build artifacts are generated for the version of Python currently running
cmake_extra_arch
=
[]
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
):
if
sys
.
version_info
>=
(
3
,
0
):
cmake_extra_arch
+=
[
'-DPYTHON3=yes'
]
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