Skip to content

Commit

Permalink
travis: fix test environment installation
Browse files Browse the repository at this point in the history
The CLIPS source zip seems corrupted.

Fetch CLIPS package from Debian Unstable.

Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
  • Loading branch information
noxdafox committed Mar 4, 2018
1 parent 06a78fe commit cd6c3c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ matrix:
- os: linux
sudo: required
python: pypy
env:
global:
- LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/clips_core_source_630/core/:$LD_LIBRARY_PATH
install:
- ./.travis_install.sh
script:
Expand Down
28 changes: 4 additions & 24 deletions .travis_install.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
#!/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"
DEBIAN_UNSTABLE="deb http://ftp.se.debian.org/debian/ sid main"

wget -O clips.zip $DOWNLOAD_URL
echo DEBIAN_UNSTABLE | sudo tee /etc/apt/sources.list.d/debian_unstable.list

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
sudo apt update
sudo apt install -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/

0 comments on commit cd6c3c0

Please sign in to comment.