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
db8656e7
Commit
db8656e7
authored
Jun 12, 2016
by
Matthew Brett
Browse files
Refactor unicode width logic
parent
53041500
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
manylinux
manylinux
+1
-1
travis_linux_steps.sh
travis_linux_steps.sh
+22
-1
No files found.
manylinux
@
2781b203
Compare
8e4f99b1
...
2781b203
Subproject commit
8e4f99b151b7456627ec6efe7202c4e1618c74d4
Subproject commit
2781b203f3889e04bee30c5df866b03a902235b7
travis_linux_steps.sh
View file @
db8656e7
...
@@ -5,6 +5,7 @@ set -e
...
@@ -5,6 +5,7 @@ set -e
ROOT_DIR
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
ROOT_DIR
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
UTIL_DIR
=
${
UTIL_DIR
:-${
ROOT_DIR
}
/manylinux
}
UTIL_DIR
=
${
UTIL_DIR
:-${
ROOT_DIR
}
/manylinux
}
BUILD_SCRIPT
=
${
BUILD_SCRIPT
:-
/io/
$UTIL_DIR
/build_package.sh
}
BUILD_SCRIPT
=
${
BUILD_SCRIPT
:-
/io/
$UTIL_DIR
/build_package.sh
}
UNICODE_WIDTHS
=
${
UNICODE_WIDTHS
:-
32
}
function
before_install
{
function
before_install
{
virtualenv
--python
=
python venv
virtualenv
--python
=
python venv
...
@@ -29,6 +30,25 @@ function build_wheels {
...
@@ -29,6 +30,25 @@ function build_wheels {
build_plat_wheels x86_64
build_plat_wheels x86_64
}
}
function
valid_unicode_widths
{
local
py_ver
=
${
1
:-
$TRAVIS_PYTHON_VERSION
}
local
ok_widths
=
""
if
[
"
${
py_ver
:0:1
}
"
==
2
]
;
then
local
py2
=
1
;
fi
for
width
in
${
@
:2
}
;
do
if
[
"
$width
"
==
32
]
;
then
ok_widths
=
"
$ok_widths
32"
elif
[
"
$width
"
==
16
]
;
then
if
[
-n
"
$py2
"
]
;
then
ok_widths
=
"
$ok_widths
16"
fi
else
echo
"Invalid unicode width
$width
"
exit
1
fi
done
echo
$ok_widths
}
function
build_plat_wheels
{
function
build_plat_wheels
{
# Builds wheels
# Builds wheels
#
#
...
@@ -44,10 +64,11 @@ function build_plat_wheels {
...
@@ -44,10 +64,11 @@ function build_plat_wheels {
local
docker_image
=
quay.io/pypa/manylinux1_
$plat
local
docker_image
=
quay.io/pypa/manylinux1_
$plat
docker pull
$docker_image
docker pull
$docker_image
if
[
"
$plat
"
==
"i686"
]
;
then
local
intro_cmd
=
linux32
;
fi
if
[
"
$plat
"
==
"i686"
]
;
then
local
intro_cmd
=
linux32
;
fi
local
widths
=
$(
valid_unicode_widths
$TRAVIS_PYTHON_VERSION
$UNICODE_WIDTHS
)
docker run
--rm
\
docker run
--rm
\
-e
UTIL_DIR
=
"
$UTIL_DIR
"
\
-e
UTIL_DIR
=
"
$UTIL_DIR
"
\
-e
PYTHON_VERSION
=
"
$TRAVIS_PYTHON_VERSION
"
\
-e
PYTHON_VERSION
=
"
$TRAVIS_PYTHON_VERSION
"
\
-e
UNICODE_WIDTHS
=
"
$
UNICODE_WIDTHS
"
\
-e
UNICODE_WIDTHS
=
"
$
widths
"
\
-e
BUILD_DEPENDS
=
"
$BUILD_DEPENDS
"
\
-e
BUILD_DEPENDS
=
"
$BUILD_DEPENDS
"
\
-e
BUILD_COMMIT
=
"
$BUILD_COMMIT
"
\
-e
BUILD_COMMIT
=
"
$BUILD_COMMIT
"
\
-e
BUILD_PRE_SCRIPT
=
"
$BUILD_PRE_SCRIPT
"
\
-e
BUILD_PRE_SCRIPT
=
"
$BUILD_PRE_SCRIPT
"
\
...
...
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