Skip to content
Snippets Groups Projects
Commit 8dee3397 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

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

parent ac051da7
No related branches found
No related tags found
1 merge request!10Do not build a library to avoid C++ API incompatibilities (see #2)
Pipeline #25641 passed
# import Libraries of other lib packages # import Libraries of other lib packages
import bob.io.base
# import our own Library
import bob.extension import bob.extension
bob.extension.load_bob_library('bob.learn.boosting', __file__) import bob.io.base
# versioning # versioning
from bob.learn.boosting import version from bob.learn.boosting import version
......
...@@ -23,7 +23,7 @@ bob_packages = ['bob.core', 'bob.io.base'] ...@@ -23,7 +23,7 @@ bob_packages = ['bob.core', 'bob.io.base']
from setuptools import setup, find_packages, dist from setuptools import setup, find_packages, dist
dist.Distribution(dict(setup_requires=['bob.extension', 'bob.blitz'] + bob_packages)) 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 from bob.extension.utils import load_requirements
build_requires = load_requirements() build_requires = load_requirements()
...@@ -31,6 +31,11 @@ build_requires = load_requirements() ...@@ -31,6 +31,11 @@ build_requires = load_requirements()
# Define package version # Define package version
version = open("version.txt").read().rstrip() 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'] packages = ['boost']
boost_modules = ['system'] boost_modules = ['system']
...@@ -78,24 +83,7 @@ setup( ...@@ -78,24 +83,7 @@ setup(
version = version, version = version,
packages = packages, packages = packages,
boost_modules = boost_modules, boost_modules = boost_modules,
), include_dirs=[include_dir],
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,
), ),
Extension( Extension(
...@@ -111,11 +99,20 @@ setup( ...@@ -111,11 +99,20 @@ setup(
"bob/learn/boosting/boosted_machine.cpp", "bob/learn/boosting/boosted_machine.cpp",
"bob/learn/boosting/lut_trainer.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, bob_packages = bob_packages,
version = version, version = version,
packages = packages, packages = packages,
boost_modules = boost_modules, boost_modules = boost_modules,
include_dirs=[include_dir],
), ),
], ],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment