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
fa14909e
Unverified
Commit
fa14909e
authored
Jan 17, 2018
by
Davis E. King
Committed by
GitHub
Jan 17, 2018
Browse files
Set build parallelism correctly for travis-ci
parent
a602126b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
setup.py
setup.py
+2
-0
No files found.
setup.py
View file @
fa14909e
...
@@ -152,6 +152,8 @@ class CMakeBuild(build_ext):
...
@@ -152,6 +152,8 @@ class CMakeBuild(build_ext):
subprocess
.
check_call
([
'cmake'
,
'--build'
,
'.'
]
+
build_args
,
cwd
=
build_folder
)
subprocess
.
check_call
([
'cmake'
,
'--build'
,
'.'
]
+
build_args
,
cwd
=
build_folder
)
def
num_available_cpu_cores
(
ram_per_build_process_in_gb
):
def
num_available_cpu_cores
(
ram_per_build_process_in_gb
):
if
os
.
environ
.
has_key
(
'TRAVIS'
)
and
os
.
environ
[
'TRAVIS'
]
==
'true'
:
return
2
# When building on travis-ci, just use 2 cores since travis-ci limits you to that regardless of what the hardware might suggest.
try
:
try
:
mem_bytes
=
os
.
sysconf
(
'SC_PAGE_SIZE'
)
*
os
.
sysconf
(
'SC_PHYS_PAGES'
)
mem_bytes
=
os
.
sysconf
(
'SC_PAGE_SIZE'
)
*
os
.
sysconf
(
'SC_PHYS_PAGES'
)
mem_gib
=
mem_bytes
/
(
1024.
**
3
)
mem_gib
=
mem_bytes
/
(
1024.
**
3
)
...
...
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