diff --git a/bob/io/base/cpp/CodecRegistry.cpp b/bob/io/base/cpp/CodecRegistry.cpp
index 229d5802f0eaf6538b83d440ebdeeda4ab862488..1f6c6d05c19187cda37d8bfc1255d24b54a0a9cf 100644
--- a/bob/io/base/cpp/CodecRegistry.cpp
+++ b/bob/io/base/cpp/CodecRegistry.cpp
@@ -14,7 +14,7 @@
 
 #include <bob.io.base/CodecRegistry.h>
 
-#include <bob/core/logging.h>
+#include <bob.core/logging.h>
 
 boost::shared_ptr<bob::io::base::CodecRegistry> bob::io::base::CodecRegistry::instance() {
   static boost::shared_ptr<bob::io::base::CodecRegistry> s_instance(new CodecRegistry());
diff --git a/bob/io/base/cpp/HDF5Attribute.cpp b/bob/io/base/cpp/HDF5Attribute.cpp
index e701aced85c99ade1009ded61aaaf8e1e46b30cc..0a782042d4193fee0cd8c312709baf4103d7406e 100644
--- a/bob/io/base/cpp/HDF5Attribute.cpp
+++ b/bob/io/base/cpp/HDF5Attribute.cpp
@@ -9,7 +9,7 @@
 
 #include <boost/format.hpp>
 
-#include <bob/core/logging.h>
+#include <bob.core/logging.h>
 
 #include <bob.io.base/HDF5Attribute.h>
 
diff --git a/bob/io/base/cpp/HDF5Dataset.cpp b/bob/io/base/cpp/HDF5Dataset.cpp
index 59b20939f77394d1ce287555bc397200d9fc5347..9fb6a0a232db5efbfa7f71e3e206cb22534419ab 100644
--- a/bob/io/base/cpp/HDF5Dataset.cpp
+++ b/bob/io/base/cpp/HDF5Dataset.cpp
@@ -11,7 +11,7 @@
 #include <boost/make_shared.hpp>
 #include <boost/shared_array.hpp>
 
-#include <bob/core/logging.h>
+#include <bob.core/logging.h>
 
 #include <bob.io.base/HDF5Utils.h>
 #include <bob.io.base/HDF5Group.h>
diff --git a/bob/io/base/cpp/HDF5Group.cpp b/bob/io/base/cpp/HDF5Group.cpp
index aab916684071b0f51c260483f15c3a4dd3f0766d..6c39b18b559def62a5ba6245426bd267bdd379e5 100644
--- a/bob/io/base/cpp/HDF5Group.cpp
+++ b/bob/io/base/cpp/HDF5Group.cpp
@@ -13,7 +13,7 @@
 #include <boost/format.hpp>
 #include <boost/algorithm/string.hpp>
 
-#include <bob/core/logging.h>
+#include <bob.core/logging.h>
 
 #include <bob.io.base/HDF5Group.h>
 #include <bob.io.base/HDF5Utils.h>
diff --git a/bob/io/base/cpp/HDF5Types.cpp b/bob/io/base/cpp/HDF5Types.cpp
index 16795bf8ba17e07326bcef4807cfe61188b15ab4..0f38566863e7b727b5c36d4b68232de0ca0f7b14 100644
--- a/bob/io/base/cpp/HDF5Types.cpp
+++ b/bob/io/base/cpp/HDF5Types.cpp
@@ -24,7 +24,7 @@
 #warning Disabling MT locks because Boost < 1.35!
 #endif
 
-#include <bob/core/logging.h>
+#include <bob.core/logging.h>
 
 #include <bob.io.base/HDF5Types.h>
 
diff --git a/bob/io/base/cpp/HDF5Utils.cpp b/bob/io/base/cpp/HDF5Utils.cpp
index b735be4a22414eee60c8d3a30c83b2246648b881..12c13ea807ea3c44c564fbbbddb1f0b3c1bbde50 100644
--- a/bob/io/base/cpp/HDF5Utils.cpp
+++ b/bob/io/base/cpp/HDF5Utils.cpp
@@ -10,7 +10,7 @@
 #include <boost/format.hpp>
 #include <boost/make_shared.hpp>
 
-#include <bob/core/logging.h>
+#include <bob.core/logging.h>
 
 #include <bob.io.base/HDF5Utils.h>
 
diff --git a/setup.py b/setup.py
index d3eac6e1516469f234f98bcff7b8fcf8692bfa41..fd99dddc81c31bf490db1e993fbfa534316f2295 100644
--- a/setup.py
+++ b/setup.py
@@ -6,15 +6,12 @@
 from setuptools import setup, find_packages, dist
 dist.Distribution(dict(setup_requires=['bob.blitz', 'bob.core']))
 from bob.extension.utils import egrep, find_header, find_library
-from bob.blitz.extension import Extension
-import bob.core
+from bob.blitz.extension import Extension, Library, build_ext
 
 import os
 package_dir = os.path.dirname(os.path.realpath(__file__))
-package_dir = os.path.join(package_dir, 'bob', 'io', 'base', 'include')
-include_dirs = [package_dir, bob.core.get_include()]
+target_dir = os.path.join(package_dir, 'bob', 'io', 'base')
 
-packages = ['bob-core >= 1.2.2']
 version = '2.0.0a0'
 
 def libhdf5_version(header):
@@ -160,13 +157,13 @@ setup(
         [
           "bob/io/base/version.cpp",
           ],
-        packages = packages,
-        include_dirs = include_dirs,
         define_macros = define_macros,
         extra_compile_args = extra_compile_args,
         version = version,
+        bob_packages = ['bob.core'],
         ),
-      Extension("bob.io.base._library",
+
+      Library("bob_io_base",
         [
           "bob/io/base/cpp/CodecRegistry.cpp",
           "bob/io/base/cpp/CSVFile.cpp",
@@ -187,23 +184,40 @@ setup(
           "bob/io/base/cpp/array.cpp",
           "bob/io/base/cpp/array_type.cpp",
           "bob/io/base/cpp/blitz_array.cpp",
+        ],
+        package_directory = package_dir,
+        target_directory = target_dir,
+        libraries = libraries,
+        library_dirs = library_dirs,
+        include_dirs = [hdf5_pkg.include_directory],
+        define_macros = define_macros,
+        version = version,
+        bob_packages = ['bob.core', 'bob.blitz'],
+        packages = ['boost'],
+      ),
 
+      Extension("bob.io.base._library",
+        [
           "bob/io/base/bobskin.cpp",
           "bob/io/base/codec.cpp",
           "bob/io/base/file.cpp",
           "bob/io/base/hdf5.cpp",
           "bob/io/base/main.cpp",
           ],
-        packages = packages,
-        include_dirs = include_dirs,
         library_dirs = library_dirs,
-        libraries = libraries,
+        libraries = libraries + ['bob_io_base'],
         define_macros = define_macros,
         extra_compile_args = extra_compile_args,
         version = version,
+        bob_packages = ['bob.core'],
+        packages = ['boost'],
         ),
       ],
 
+    cmdclass = {
+      'build_ext': build_ext
+    },
+
     classifiers = [
       'Development Status :: 3 - Alpha',
       'Intended Audience :: Developers',