Commit 8dee3397 authored by André Anjos's avatar André Anjos

[setup] Do not build a library to avoid C++ API incompatibilities (see #2)

parent ac051da7
Pipeline #25641 passed with stage
in 22 minutes and 41 seconds
# import Libraries of other lib packages
import bob.io.base
# import our own Library
import bob.extension
bob.extension.load_bob_library('bob.learn.boosting', __file__)
import bob.io.base
# versioning
from bob.learn.boosting import version
......
......@@ -23,7 +23,7 @@ bob_packages = ['bob.core', 'bob.io.base']
from setuptools import setup, find_packages, dist
dist.Distribution(dict(setup_requires=['bob.extension', 'bob.blitz'] + bob_packages))
from bob.blitz.extension import Extension, Library, build_ext
from bob.blitz.extension import Extension, build_ext
from bob.extension.utils import load_requirements
build_requires = load_requirements()
......@@ -31,6 +31,11 @@ build_requires = load_requirements()
# Define package version
version = open("version.txt").read().rstrip()
# Local include directory
import os
package_dir = os.path.dirname(os.path.realpath(__file__))
include_dir = os.path.join(package_dir, 'bob', 'learn', 'boosting', 'include')
packages = ['boost']
boost_modules = ['system']
......@@ -78,24 +83,7 @@ setup(
version = version,
packages = packages,
boost_modules = boost_modules,
),
Library(
'bob.learn.boosting.bob_learn_boosting',
[
"bob/learn/boosting/cpp/LossFunction.cpp",
"bob/learn/boosting/cpp/JesorskyLoss.cpp",
"bob/learn/boosting/cpp/StumpMachine.cpp",
"bob/learn/boosting/cpp/LUTMachine.cpp",
"bob/learn/boosting/cpp/BoostedMachine.cpp",
"bob/learn/boosting/cpp/LUTTrainer.cpp",
],
bob_packages = bob_packages,
version = version,
packages = packages,
boost_modules = boost_modules,
include_dirs=[include_dir],
),
Extension(
......@@ -111,11 +99,20 @@ setup(
"bob/learn/boosting/boosted_machine.cpp",
"bob/learn/boosting/lut_trainer.cpp",
"bob/learn/boosting/cpp/LossFunction.cpp",
"bob/learn/boosting/cpp/JesorskyLoss.cpp",
"bob/learn/boosting/cpp/StumpMachine.cpp",
"bob/learn/boosting/cpp/LUTMachine.cpp",
"bob/learn/boosting/cpp/BoostedMachine.cpp",
"bob/learn/boosting/cpp/LUTTrainer.cpp",
],
bob_packages = bob_packages,
version = version,
packages = packages,
boost_modules = boost_modules,
include_dirs=[include_dir],
),
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment