about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml18
-rw-r--r--.travis.yml53
-rw-r--r--optional_requirements.txt2
-rw-r--r--requirements.txt3
4 files changed, 19 insertions, 57 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 1a2c6ef9..5a6b3b38 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -11,41 +11,27 @@ environment:
       APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
       PLATFORM_TOOLSET: v141
       PYTHON: c:\Python27
-      Z3_PKG_NAME: z3-4.6.0-x86-win
 
     - platform: x64
       APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
       PLATFORM_TOOLSET: v141
       PYTHON: c:\Python27-x64
-      Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.6.0-x64-win\include
-      Z3_LIBRARIES: c:\projects\triton\build\z3-4.6.0-x64-win\bin\libz3.lib
-      Z3_PKG_NAME: z3-4.6.0-x64-win
 
       # on_finish:
       #  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
 
 install:
   - cmd: cd c:\projects\miasm
-  - cmd: mkdir build
-  - cmd: cd build
-  - cmd: echo Downloading z3...
-  - cmd: appveyor DownloadFile https://github.com/Z3Prover/z3/releases/download/z3-4.6.0/%Z3_PKG_NAME%.zip
-  - cmd: 7z x %Z3_PKG_NAME%.zip
-  - "%PYTHON%\\Scripts\\pip.exe install pyparsing llvmlite"
-  - cmd: git clone https://github.com/serpilliere/elfesteem
-  - cmd: cd elfesteem
-  - "%PYTHON%\\python.exe setup.py install"
+  - cmd: "%PYTHON%\\python.exe -m pip install -r requirements.txt"
+  - cmd: "%PYTHON%\\python.exe -m pip install -r optional_requirements.txt"
 
 build_script:
   - cmd: if "%platform%"=="Win32" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
   - cmd: if "%platform%"=="x64" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
-  - cmd: cd c:\projects\miasm
   - "%PYTHON%\\python.exe setup.py build"
   - "%PYTHON%\\python.exe setup.py install"
 
 test_script:
-  - cmd: set PYTHONPATH=c:\projects\miasm\build\%Z3_PKG_NAME%\bin\python
-  - cmd: set PATH=c:\projects\miasm\build\%Z3_PKG_NAME%\bin;%PATH%
   - cmd: cd c:\projects\miasm\test
   - "%PYTHON%\\python.exe test_all.py"
 
diff --git a/.travis.yml b/.travis.yml
index 6aa9eb63..60c4defd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,50 +1,21 @@
 sudo: false
-dist: trusty
 language: python
-python:
-- "2.7"
+python: 2.7
 addons:
-    apt:
-        sources: ['llvm-toolchain-trusty-6.0', 'ubuntu-toolchain-r-test']
-        packages:
-            - make
-            - gcc
-            - python-virtualenv
-            - unzip
-            - llvm-6.0
-            - llvm-6.0-dev
-            - g++-5
+  apt:
+    sources: ['llvm-toolchain-trusty-6.0', 'ubuntu-toolchain-r-test']
+    packages:
+      - llvm-6.0
+      - llvm-6.0-dev
+      - g++-5
+env: CXX=g++-5 LLVM_CONFIG=llvm-config-6.0
 before_script:
+- pip install -r optional_requirements.txt
 # codespell
 - "pip install codespell && git ls-files | xargs codespell --ignore-words=.codespell_ignore 2>/dev/null"
-- "cd .."
-- "export LLVM_CONFIG=$(which llvm-config-6.0)"
-- "export CXX=$(which g++-5)"
-# make virtual env
-- "python /usr/lib/python2.7/dist-packages/virtualenv.py virtualenv;"
-- "cd virtualenv;"
-- "source bin/activate;"
-# install llvmlite
-- "pip install enum34"
-- "pip install llvmlite"
-# install elfesteem
-- "git clone https://github.com/serpilliere/elfesteem elfesteem && cd elfesteem && python setup.py install && cd ..;"
-# install pyparsing
-- "pip install pyparsing"
-# install pycparser
-- "pip install pycparser"
-# install z3 with a known to working version
-- "wget https://github.com/serpilliere/z3-prebuild/raw/master/z3.tgz"
-- "tar xzf z3.tgz"
-- "cd z3/build"
-- "make install"
-- "cd ../.."
-# Miasm
-- "cd ..;"
-- "cd miasm;"
 # turn deprecation warning into RuntimeError
 - "find . -name '*.py' | xargs sed -i 's/warnings\\.warn(/raise RuntimeError(/g'"
 # install
-- "python setup.py build build_ext -I$(pwd)/../virtualenv/include -L$(pwd)/../virtualenv/tinycc"
-- "python setup.py install"
-script: "python -c 'import z3; x = z3.BitVec(chr(0x41), 32)' && cd test && python test_all.py && git ls-files -o --exclude-standard"
+- python setup.py build build_ext
+- python setup.py install
+script: cd test && python test_all.py && git ls-files -o --exclude-standard
diff --git a/optional_requirements.txt b/optional_requirements.txt
new file mode 100644
index 00000000..d6a28948
--- /dev/null
+++ b/optional_requirements.txt
@@ -0,0 +1,2 @@
+pycparser
+z3-solver==4.5.1.0
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 00000000..acdef10b
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+pyparsing
+git+https://github.com/serpilliere/elfesteem@master#egg=elfesteem-0.1
+llvmlite==0.26.0