Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91965811
build_wheels.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 16, 05:20
Size
1 KB
Mime Type
text/x-shellscript
Expires
Mon, Nov 18, 05:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22355600
Attached To
rTAMAAS tamaas
build_wheels.sh
View Options
#!/usr/bin/env bash
set
-euxo pipefail
cd
$CI_PROJECT_DIR
mkdir -p dist/wheels
mkdir -p dist/wheelhouse
# Checking all version of CPython
for
PYROOT in /opt/python/cp*;
do
MAJOR
=
$(
$PYROOT
/bin/python --version 2>&1 | cut -d
" "
-f 2 | cut -d . -f 1
)
MINOR
=
$(
$PYROOT
/bin/python --version 2>&1 | cut -d
" "
-f 2 | cut -d . -f 2
)
TAG
=
$(
basename
$PYROOT
| cut -d
"-"
-f 1
)
# Skip Python 2
[
$MAJOR
-eq 2
]
&&
continue
# Skip Beta Python 3 versions
[
$MAJOR
-eq 3
]
&&
[
$MINOR
-ge 10
]
&&
continue
# Compile
scons -j4
\
py_exec
=
"$PYROOT/bin/python$MAJOR"
\
backend
=
cpp
\
fftw_threads
=
none
\
build_static_lib
=
True
\
use_mpi
=
False
\
strip_info
=
True
\
verbose
=
True
\
THRUST_ROOT
=
$THRUST_ROOT
\
FFTW_ROOT
=
$FFTW_ROOT
\
2>&1 | tee compile.log
if
[
$?
-ne 0
]
;
then
cat config.log
fi
# Link fftw statically
static_command
=
$(
grep
'build-release/python/tamaas/_tamaas'
compile.log
\
| sed -e
's/lfftw3/l:libfftw3.a/'
\
| tr -d
'$()'
)
$static_command
# Create wheel
pushd
build-release/python
$PYROOT
/bin/python setup.py bdist_wheel
\
--python-tag
$TAG
\
--plat-name manylinux2010_x86_64
\
-d ../../dist/wheels/
popd
rm -rf build-release/python
done
for
wheel in dist/wheels/*.whl;
do
auditwheel repair
$wheel
-w dist/wheelhouse
done
Event Timeline
Log In to Comment