From 5fc87917a3a09883356644132be54f4d894fbe65 Mon Sep 17 00:00:00 2001
From: Manuel Guenther <manuel.guenther@idiap.ch>
Date: Wed, 20 Aug 2014 12:26:52 +0200
Subject: [PATCH] Switched to new build system; removed dependency on bob.

---
 .travis.yml  | 13 ++++---------
 buildout.cfg |  5 +++--
 setup.py     | 30 +++++++++++++++++-------------
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index cb2b3f1..5dc655f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,19 +14,14 @@ matrix:
     - NUMPYSPEC===1.8.0
 before_install:
 - sudo add-apt-repository -y ppa:biometrics/bob
-- sudo add-apt-repository -y ppa:biometrics/bob.preview
 - sudo apt-get update -qq
-- sudo apt-get install -qq --force-yes bob-dev
-- sudo apt-get install -qq --force-yes libjpeg8-dev libnetpbm10-dev libpng12-dev libtiff4-dev
-  libgif-dev
+- sudo apt-get install -qq --force-yes libboost-all-dev libblitz1-dev libhdf5-serial-dev
+- sudo apt-get install -qq --force-yes libjpeg8-dev libnetpbm10-dev libpng12-dev libtiff4-dev libgif-dev
 - sudo apt-get install -qq --force-yes python-opencv libcv-dev libcvaux-dev libopencv-dev
 - sudo apt-get install -qq --force-yes python-matplotlib
-- if [ -n "${NUMPYSPEC}" ]; then sudo apt-get install -qq --force-yes libatlas-dev
-  libatlas-base-dev liblapack-dev gfortran; fi
+- if [ -n "${NUMPYSPEC}" ]; then sudo apt-get install -qq --force-yes libatlas-dev libatlas-base-dev liblapack-dev gfortran; fi
 - if [ -n "${NUMPYSPEC}" ]; then pip install --upgrade pip setuptools; fi
-- if [ -n "${NUMPYSPEC}" ]; then pip install --find-links http://wheels.astropy.org/
-  --find-links http://wheels2.astropy.org/ --use-wheel numpy$NUMPYSPEC sphinx nose
-  matplotlib; fi
+- if [ -n "${NUMPYSPEC}" ]; then pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel numpy$NUMPYSPEC sphinx nose matplotlib; fi
 - pip install cpp-coveralls
 install:
 - python bootstrap.py
diff --git a/buildout.cfg b/buildout.cfg
index aca0dea..92eefd5 100644
--- a/buildout.cfg
+++ b/buildout.cfg
@@ -10,6 +10,7 @@ extensions = bob.buildout
 auto-checkout = *
 develop = src/bob.extension
           src/bob.blitz
+          src/bob.core
           src/bob.io.base
           src/bob.io.image
           src/bob.ip.color
@@ -19,13 +20,13 @@ develop = src/bob.extension
 ; options for bob.buildout extension
 debug = true
 verbose = true
-prefixes = /idiap/group/torch5spro/releases/preview/install/linux-x86_64-release
-           /Users/andre/work/bob/b/dbg/
 
 [sources]
 bob.extension = git https://github.com/bioidiap/bob.extension
 bob.blitz = git https://github.com/bioidiap/bob.blitz
+bob.core = git https://github.com/bioidiap/bob.core
 bob.io.base = git https://github.com/bioidiap/bob.io.base
+; For test and documentation generation only:
 bob.io.image = git https://github.com/bioidiap/bob.io.image
 bob.ip.color = git https://github.com/bioidiap/bob.ip.color
 bob.ip.draw = git https://github.com/bioidiap/bob.ip.draw
diff --git a/setup.py b/setup.py
index d266f27..d60e95a 100644
--- a/setup.py
+++ b/setup.py
@@ -6,15 +6,16 @@
 """Bindings for flandmark
 """
 
+bob_packages = ['bob.core', 'bob.io.base']
+
 from setuptools import setup, find_packages, dist
-dist.Distribution(dict(setup_requires=['bob.blitz', 'bob.io.base']))
+dist.Distribution(dict(setup_requires=['bob.blitz'] + bob_packages))
 from bob.blitz.extension import Extension
-import bob.io.base
 
 version = '2.0.0a0'
-packages = ['boost', 'opencv>=2.0', 'bob-io>=1.2.2']
 
-include_dirs = [bob.io.base.get_include()]
+packages = ['boost', 'opencv>=2.0']
+boost_modules = ['system']
 
 setup(
 
@@ -34,6 +35,7 @@ setup(
     install_requires=[
       'setuptools',
       'bob.blitz',
+      'bob.core',
       'bob.io.base',
       'bob.io.image', #for tests
       'bob.ip.color', #for tests
@@ -44,30 +46,32 @@ setup(
     namespace_packages=[
       "bob",
       "bob.ip",
-      ],
+    ],
 
     ext_modules=[
       Extension("bob.ip.flandmark.version",
         [
           "bob/ip/flandmark/version.cpp",
-          ],
-        include_dirs = include_dirs,
+        ],
+        bob_packages = bob_packages,
         version = version,
         packages = packages,
-        ),
+        boost_modules = boost_modules,
+      ),
+
       Extension("bob.ip.flandmark._library",
         [
           "bob/ip/flandmark/flandmark_detector.cpp",
           "bob/ip/flandmark/liblbp.cpp",
           "bob/ip/flandmark/flandmark.cpp",
           "bob/ip/flandmark/main.cpp",
-          ],
-        include_dirs = include_dirs,
+        ],
+        bob_packages = bob_packages,
         version = version,
         packages = packages,
-        boost_modules = ['system'],
-        ),
-      ],
+        boost_modules = boost_modules,
+      ),
+    ],
 
     classifiers = [
       'Development Status :: 5 - Production/Stable',
-- 
GitLab