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
39981413
Commit
39981413
authored
Aug 18, 2016
by
Matthew Brett
Browse files
Refactor docker build commands to generalize
Allow other build commands to Docker
parent
d607df84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
docker_build_wrap.sh
docker_build_wrap.sh
+2
-2
travis_linux_steps.sh
travis_linux_steps.sh
+34
-0
No files found.
docker_build_wrap.sh
View file @
39981413
#!/bin/bash
# Depends on:
#
REPO_DIR
#
BUILD_COMMANDS
# PYTHON_VERSION
# BUILD_COMMIT (may be used by config.sh)
# UNICODE_WIDTH (can be empty)
...
...
@@ -29,4 +29,4 @@ cd /io
# `common_utils.sh` via `manylinux_utils.sh`.
source
config.sh
build_wheel
$REPO_DIR
$BUILD_COMMANDS
travis_linux_steps.sh
View file @
39981413
...
...
@@ -44,9 +44,43 @@ function build_wheel {
local
repo_dir
=
${
1
:-
$REPO_DIR
}
[
-z
"
$repo_dir
"
]
&&
echo
"repo_dir not defined"
&&
exit
1
local
plat
=
${
2
:-
$PLAT
}
build_multilinux
$plat
"build_wheel
$repo_dir
"
}
function
build_index_wheel
{
# Builds wheel from an index (e.g pypi), puts into $WHEEL_SDIR
#
# In fact wraps the actual work which happens in the container.
#
# Depends on
# PLAT (can be passed in as argument)
# MB_PYTHON_VERSION
# UNICODE_WIDTH (optional)
# BUILD_DEPENDS (optional)
# MANYLINUX_URL (optional)
# WHEEL_SDIR (optional)
local
project_spec
=
$1
[
-z
"
$project_spec
"
]
&&
echo
"project_spec not defined"
&&
exit
1
local
plat
=
${
2
:-
$PLAT
}
build_multilinux
$plat
"build_index_wheel
$project_spec
"
}
function
build_multilinux
{
# Runs passed build commands in manylinux container
#
# Depends on
# MB_PYTHON_VERSION
# UNICODE_WIDTH (optional)
# BUILD_DEPENDS (optional)
# MANYLINUX_URL (optional)
# WHEEL_SDIR (optional)
local
plat
=
$1
[
-z
"
$plat
"
]
&&
echo
"plat not defined"
&&
exit
1
local
build_cmds
=
"
$2
"
local
docker_image
=
quay.io/pypa/manylinux1_
$plat
docker pull
$docker_image
docker run
--rm
\
-e
BUILD_COMMANDS
=
"
$build_cmds
"
\
-e
PYTHON_VERSION
=
"
$MB_PYTHON_VERSION
"
\
-e
UNICODE_WIDTH
=
"
$UNICODE_WIDTH
"
\
-e
BUILD_COMMIT
=
"
$BUILD_COMMIT
"
\
...
...
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