-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
handle_centos() { | ||
local package=$1 | ||
yum -y install yum-utils gcc | ||
yum config-manager --set-enabled powertools | ||
yum localinstall -y $package | ||
export CMAKE_OPTIONS="-DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON .." | ||
|
||
} | ||
|
||
handle_default() { | ||
local package=$1 | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y rpm | ||
sudo dpkg -i $package | ||
export CMAKE_OPTIONS="-DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON .." | ||
} | ||
|
||
handle_opensuse() { | ||
local package=$1 | ||
zypper in -y --allow-unsigned-rpm $package | ||
export CMAKE_OPTIONS="-DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON .." | ||
} | ||
|
||
handle_"$1" "$2" | ||
|
||
python3 -m pip install pylibiio --no-binary :all: | ||
# Build project | ||
mkdir -p build | ||
cd build | ||
cmake $CMAKE_OPTIONS | ||
sudo make && sudo make package && make test | ||
sudo make install | ||
ldconfig | ||
cd .. | ||
cd bindings/python | ||
pip install -r requirements_dev.txt | ||
export LD_LIBRARY_PATH=/usr/local/lib/ | ||
python3 -m pip install pytest | ||
python3 -m pytest -vs --skip-scan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters