-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
travis: fix test environment installation
The CLIPS source zip seems corrupted. Fetch CLIPS package from Debian Unstable. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
- Loading branch information
Showing
2 changed files
with
10 additions
and
28 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,34 +1,19 @@ | ||
#!/bin/bash | ||
|
||
WORK_DIR=$(pwd) | ||
CLIPS_DIR=$WORK_DIR/clips_core_source_630 | ||
DOWNLOAD_URL="https://downloads.sourceforge.net/project/clipsrules/CLIPS/6.30/clips_core_source_630.zip" | ||
UBUNTU_XENIAL="deb http://archive.ubuntu.com/ubuntu xenial main" | ||
DEBIAN_UNSTABLE="deb http://ftp.se.debian.org/debian/ sid main" | ||
|
||
wget -O clips.zip $DOWNLOAD_URL | ||
# https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1730627 | ||
echo $UBUNTU_XENIAL | sudo tee /etc/apt/sources.list.d/ubuntu_xenial.list | ||
sudo apt update | ||
sudo apt install -o APT::Force-LoopBreak=1 dpkg | ||
|
||
unzip clips.zip | ||
|
||
cd $CLIPS_DIR | ||
|
||
cp makefiles/makefile.lib core/Makefile | ||
|
||
cd $CLIPS_DIR/core/ | ||
|
||
sed -i 's/gcc -c/gcc -fPIC -c/g' Makefile | ||
|
||
make | ||
|
||
ld -G *.o -o libclips.so | ||
|
||
cd $WORK_DIR | ||
echo $DEBIAN_UNSTABLE | sudo tee /etc/apt/sources.list.d/debian_unstable.list | ||
sudo apt-get --allow-unauthenticated update | ||
sudo apt install -y --allow-unauthenticated -t sid libclips libclips-dev | ||
|
||
sudo pip install --upgrade pip | ||
sudo pip install --upgrade setuptools | ||
sudo pip install --upgrade pytest | ||
|
||
python setup.py build_ext --include-dirs $CLIPS_DIR/core/ --library-dirs $CLIPS_DIR/core/ | ||
python setup.py install | ||
|
||
CFLAGS="-I$CLIPS_DIR/core/" LDFLAGS="-L$CLIPS_DIR/core/" python clips/clips_build.py | ||
|
||
mv _clips* clips/ | ||
CFLAGS="-Wformat=0" pip install . |