Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
1b069e81
Commit
1b069e81
authored
Jun 17, 2016
by
Matthew Brett
Browse files
Refactor lib builders to be cross platform
parent
30aefa0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
common_utils.sh
common_utils.sh
+1
-0
docker_build_wrap.sh
docker_build_wrap.sh
+1
-1
library_builders.sh
library_builders.sh
+12
-2
No files found.
common_utils.sh
View file @
1b069e81
...
...
@@ -4,6 +4,7 @@
set
-e
MULTIBUILD_DIR
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
if
[
$(
uname
)
==
"Darwin"
]
;
then
IS_OSX
=
1
;
fi
function
abspath
{
python
-c
"import os.path; print(os.path.abspath('
$1
'))"
...
...
docker_build_wrap.sh
View file @
1b069e81
...
...
@@ -17,7 +17,7 @@ WHEEL_SDIR=${WHEEL_SDIR:-wheelhouse}
MULTIBUILD_DIR
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
# This next also sources common utils.
source
$MULTIBUILD_DIR
/manylinux_utils.sh
source
$MULTIBUILD_DIR
/
docker_lib
_builders.sh
source
$MULTIBUILD_DIR
/
library
_builders.sh
# Set PATH for chosen Python, Unicode width
export
PATH
=
"
$(
cpython_path
$PYTHON_VERSION
$UNICODE_WIDTH
)
/bin:
$PATH
"
...
...
docker_lib
_builders.sh
→
library
_builders.sh
View file @
1b069e81
...
...
@@ -13,6 +13,11 @@ XZ_VERSION="${XZ_VERSION:-5.2.2}"
LIBYAML_VERSION
=
"
${
LIBYAML_VERSION
:-
0
.1.5
}
"
OPENBLAS_VERSION
=
"
${
OPENBLAS_VERSION
:-
0
.2.18
}
"
if
[
$(
uname
)
==
"Darwin"
]
;
then
ARCH_FLAGS
=
${
ARCH_FLAGS
:-
"-arch i386 -arch x86_64"
}
export
CFLAGS
=
"
${
CFLAGS
}
$ARCH_FLAGS
"
IS_OSX
=
1
fi
function
build_simple
{
local
name
=
$1
...
...
@@ -42,7 +47,8 @@ function build_openblas {
function
build_zlib
{
# Gives an old but safe version
if
[
-e
zlib-stamp
]
;
then return
;
fi
yum
install
-y
zlib-devel
# OSX has zlib already
if
[
-z
"
$IS_OSX
"
]
;
then
yum
install
-y
zlib-devel
;
fi
touch
zlib-stamp
}
...
...
@@ -82,7 +88,11 @@ function build_tiff {
function
build_openjpeg
{
if
[
-e
openjpeg-stamp
]
;
then return
;
fi
yum
install
-y
cmake28
if
[
-n
"
$IS_OSX
"
]
;
then
brew
install
cmake
else
yum
install
-y
cmake28
fi
curl
-LO
https://github.com/uclouvain/openjpeg/archive/version.
${
OPENJPEG_VERSION
}
.tar.gz
tar
zxf version.
${
OPENJPEG_VERSION
}
.tar.gz
(
cd
openjpeg-version.
${
OPENJPEG_VERSION
}
&&
cmake28
.
&&
make
install
)
...
...
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