Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
7beadc90
Commit
7beadc90
authored
Aug 26, 2019
by
Markus Mirz
Browse files
add script to build wheels packages
parent
3720605b
Changes
1
Show whitespace changes
Inline
Side-by-side
Packaging/Python/build_wheels.sh
0 → 100644
View file @
7beadc90
#!/bin/bash
set
-e
-x
VILLAS_VERSION
=
0.8.0
# Set up DPsim dependencies
curl https://packages.fein-aachen.org/redhat/fein.repo
>
/etc/yum.repos.d/fein.repo
# Enable Extra Packages for Enterprise Linux (EPEL) repo
yum
-y
install
epel-release
# Toolchain
yum
-y
install
\
devtoolset-7-toolchain
\
pkgconfig make cmake3
\
git
tar
\
expat-devel
\
graphviz-devel
\
sundials-devel
\
gsl-devel
\
libxml2-devel
\
# libvillas-devel-${VILLAS_VERSION} \
# villas-node-${VILLAS_VERSION}
# rm -rf spdlog
# git clone --recursive https://github.com/gabime/spdlog.git
# mkdir -p spdlog/build
# pushd spdlog/build
# cmake ..
# make -j$(nproc) install
# popd
# Make cmake3 the default
update-alternatives
--install
/usr/bin/cmake cmake /usr/bin/cmake3 1
# Compile wheels
for
PYDIR
in
/opt/python/
{
cp35,cp36,cp37
}
-
*
;
do
LIB
=(
${
PYDIR
}
/lib/python
*
)
INC
=(
${
PYDIR
}
/include/python
*
)
EXC
=
${
PYDIR
}
/bin/python3
export
CMAKE_OPTS
=
"-DWITH_EIGEN_SUBMODULE=ON
\
-DWITH_CIM_SUBMODULE=ON
\
-DPYTHON_EXECUTABLE=
${
EXC
}
\
-DPYTHON_INCLUDE_DIR=
${
INC
}
\
-DPYTHON_LIBRARY=
${
LIB
}
"
"
${
PYDIR
}
/bin/pip"
install
-r
/dpsim/requirements.txt
"
${
PYDIR
}
/bin/pip"
wheel /dpsim/
-w
wheelhouse/
done
# Bundle external shared libraries into the wheels
for
whl
in
wheelhouse/
*
.whl
;
do
auditwheel repair
"
$whl
"
--plat
$PLAT
-w
/dpsim/
done
# Install packages and test
for
PYDIR
in
/opt/python/
{
cp35,cp36,cp37
}
-
*
;
do
"
${
PYDIR
}
/bin/pip"
install
python-manylinux-demo
--no-index
-f
/io/wheelhouse
(
cd
"
$HOME
"
;
"
${
PYDIR
}
/bin/nosetests"
pymanylinuxdemo
)
done
\ No newline at end of file
Write
Preview
Supports
Markdown
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