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
dae6bd6f
Commit
dae6bd6f
authored
Jun 12, 2016
by
Matthew Brett
Browse files
Add pip spec build / wheel filtering
parent
db8656e7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
15 deletions
+43
-15
manylinux
manylinux
+1
-1
supported_wheels.py
supported_wheels.py
+21
-0
travis_linux_steps.sh
travis_linux_steps.sh
+3
-2
travis_osx_steps.sh
travis_osx_steps.sh
+12
-8
travis_steps.sh
travis_steps.sh
+6
-4
No files found.
manylinux
@
880bc9c1
Compare
2781b203
...
880bc9c1
Subproject commit
2781b203f3889e04bee30c5df866b03a902235b7
Subproject commit
880bc9c1d4c875021376c8d2bb91789055d0dba2
supported_wheels.py
0 → 100755
View file @
dae6bd6f
#!/usr/bin/env python
""" Filter out wheel filenames not supported on this platform
"""
from
__future__
import
print_function
import
sys
from
wheel.install
import
WheelFile
from
pip.pep425tags
import
get_supported
def
main
():
supported
=
set
(
get_supported
())
for
fname
in
sys
.
argv
[
1
:]:
tags
=
set
(
WheelFile
(
fname
).
tags
)
if
supported
.
intersection
(
tags
):
print
(
fname
)
if
__name__
==
'__main__'
:
main
()
travis_linux_steps.sh
View file @
dae6bd6f
...
...
@@ -22,7 +22,7 @@ function build_wheels {
# BUILD_COMMIT
# BUILD_PRE_SCRIPT
# BUILD_SCRIPT
# REPO_DIR
# REPO_DIR
| PKG_SPEC
# TRAVIS_PYTHON_VERSION
#
# Build both 32- and 64-bit
...
...
@@ -58,7 +58,7 @@ function build_plat_wheels {
# BUILD_COMMIT
# BUILD_PRE_SCRIPT (can be empty)
# BUILD_SCRIPT
# REPO_DIR
# REPO_DIR
| PKG_SPEC
# TRAVIS_PYTHON_VERSION
local
plat
=
${
1
:-
x86_64
}
local
docker_image
=
quay.io/pypa/manylinux1_
$plat
...
...
@@ -72,6 +72,7 @@ function build_plat_wheels {
-e
BUILD_DEPENDS
=
"
$BUILD_DEPENDS
"
\
-e
BUILD_COMMIT
=
"
$BUILD_COMMIT
"
\
-e
BUILD_PRE_SCRIPT
=
"
$BUILD_PRE_SCRIPT
"
\
-e
PKG_SPEC
=
"
$PKG_SPEC
"
\
-e
REPO_DIR
=
"
$REPO_DIR
"
\
-v
$PWD
:/io
\
$docker_image
$intro_cmd
$BUILD_SCRIPT
...
...
travis_osx_steps.sh
View file @
dae6bd6f
...
...
@@ -19,17 +19,21 @@ function build_wheels {
# Builds wheel, puts into $WHEELHOUSE
#
# Depends on
# REPO_DIR
# REPO_DIR
| PKG_SPEC
# BUILD_DEPENDS
# BUILD_COMMIT
# WHEELHOUSE
cd
$REPO_DIR
git fetch origin
git checkout
$BUILD_COMMIT
git clean
-fxd
if
[
-n
"
$BUILD_DEPENDS
"
]
;
then
pip
install
$BUILD_DEPENDS
;
fi
pip wheel
-w
$WHEELHOUSE
--no-deps
.
cd
..
if
[
-n
"
$BUILD_DEPENDS
"
]
;
then
pip
install
$BUILD_DEPENDS
;
fi
if
[
-n
"
$REPO_DIR
"
]
;
then
cd
$REPO_DIR
git fetch origin
git checkout
$BUILD_COMMIT
git clean
-fxd
pip wheel
-w
$WHEELHOUSE
--no-deps
.
cd
..
else
pip wheel
-w
$WHEELHOUSE
--no-deps
$PKG_SPEC
fi
pip
install
delocate
delocate-listdeps
$WHEELHOUSE
/
*
.whl
# lists library dependencies
delocate-wheel
$WHEELHOUSE
/
*
.whl
# copies library dependencies into wheel
...
...
travis_steps.sh
View file @
dae6bd6f
...
...
@@ -9,14 +9,16 @@ MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}")
if
[
!
-d
"
$WHEELHOUSE
"
]
;
then
mkdir
$WHEELHOUSE
;
fi
if
[[
"
$TRAVIS_OS_NAME
"
==
"osx"
]]
;
then
source
$MULTIBUILD_DIR
/travis_osx_steps.sh
whl_tail
=
"*.whl"
else
source
$MULTIBUILD_DIR
/travis_linux_steps.sh
# Selects narrow build on Python 2.7
whl_tail
=
"*m-manylinux1_x86_64.whl"
fi
if
[
-z
"
$REPO_DIR$PKG_SPEC
"
]
;
then
echo
"Must specify REPO_DIR or PKG_SPEC"
exit
1
fi
function
install_wheel
{
if
[
-n
"
$TEST_DEPENDS
"
]
;
then
pip
install
$TEST_DEPENDS
;
fi
pip
install
$WHEELHOUSE
/
$
whl
_tail
pip
install
$(
python
$MULTIBUILD_DIR
/supported_wheels.py
$WHEELHOUSE
/
*
.
whl
)
}
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