Commit 1a0cc8cd authored by Manuel Günther's avatar Manuel Günther

Loading our own Library.

parent 060b8d76
...@@ -16,7 +16,7 @@ before_install: ...@@ -16,7 +16,7 @@ before_install:
- python -c 'import numpy.__config__ as c; print(""); print("Numpy configuration"); print("-------------------"); c.show(); print("")' - python -c 'import numpy.__config__ as c; print(""); print("Numpy configuration"); print("-------------------"); c.show(); print("")'
- sudo add-apt-repository -y ppa:biometrics/bob - sudo add-apt-repository -y ppa:biometrics/bob
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -qq --force-yes libboost-all-dev libblitz1-dev libatlas-dev libatlas-base-dev liblapack-dev; - sudo apt-get install -qq --force-yes libboost-all-dev libblitz1-dev libatlas-dev libatlas-base-dev liblapack-dev
- if [ -n "${NUMPYSPEC}" ]; then sudo apt-get install -qq gfortran; fi - if [ -n "${NUMPYSPEC}" ]; then sudo apt-get install -qq gfortran; fi
- if [ -n "${NUMPYSPEC}" ]; then pip install --upgrade pip setuptools; 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; 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; fi
......
# import Libraries of other lib packages
import bob.core
# import our own Library
import bob.extension
bob.extension.load_bob_library('bob.math', __file__)
from ._library import __version__ from ._library import __version__
from ._library import * from ._library import *
......
...@@ -3,15 +3,13 @@ ...@@ -3,15 +3,13 @@
# Andre Anjos <andre.anjos@idiap.ch> # Andre Anjos <andre.anjos@idiap.ch>
# Mon 16 Apr 08:18:08 2012 CEST # Mon 16 Apr 08:18:08 2012 CEST
bob_packages = ['bob.core']
from setuptools import setup, find_packages, dist from setuptools import setup, find_packages, dist
dist.Distribution(dict(setup_requires=['bob.blitz', 'bob.core', 'numpy'])) dist.Distribution(dict(setup_requires=['bob.blitz', 'numpy'] + bob_packages))
from bob.blitz.extension import Extension, Library, build_ext from bob.blitz.extension import Extension, Library, build_ext
from bob.extension.utils import uniq, find_library from bob.extension.utils import uniq, find_library
import os
import sys
package_dir = os.path.dirname(os.path.realpath(__file__))
target_dir = os.path.join(package_dir, 'bob', 'math')
def get_flags(keys): def get_flags(keys):
"""Returns link/include flags for LAPACK/BLAS based on what NumPy uses """Returns link/include flags for LAPACK/BLAS based on what NumPy uses
...@@ -147,18 +145,17 @@ setup( ...@@ -147,18 +145,17 @@ setup(
'setuptools', 'setuptools',
'bob.blitz', 'bob.blitz',
'bob.core', 'bob.core',
'bob.extension',
], ],
namespace_packages=[ namespace_packages=[
"bob", "bob",
], ],
ext_modules = [ ext_modules = [
Extension("bob.math.version", Extension("bob.math.version",
[ [
"bob/math/version.cpp", "bob/math/version.cpp",
], ],
version = version, version = version,
system_include_dirs = math_flags.get('system_include_dirs', []), system_include_dirs = math_flags.get('system_include_dirs', []),
library_dirs = math_flags.get('library_dirs', []), library_dirs = math_flags.get('library_dirs', []),
...@@ -166,8 +163,8 @@ setup( ...@@ -166,8 +163,8 @@ setup(
define_macros = math_flags.get('define_macros', []), define_macros = math_flags.get('define_macros', []),
extra_compile_args = math_flags['extra_compile_args'], extra_compile_args = math_flags['extra_compile_args'],
extra_link_args = math_flags.get('extra_link_args', []), extra_link_args = math_flags.get('extra_link_args', []),
bob_packages = ['bob.core'], bob_packages = bob_packages,
), ),
Library("bob.math.bob_math", Library("bob.math.bob_math",
[ [
...@@ -185,7 +182,7 @@ setup( ...@@ -185,7 +182,7 @@ setup(
"bob/math/cpp/sqrtm.cpp", "bob/math/cpp/sqrtm.cpp",
], ],
version = version, version = version,
bob_packages = ['bob.core'], bob_packages = bob_packages,
system_include_dirs = math_flags['system_include_dirs'], system_include_dirs = math_flags['system_include_dirs'],
library_dirs = math_flags['library_dirs'], library_dirs = math_flags['library_dirs'],
libraries = math_flags['libraries'], libraries = math_flags['libraries'],
...@@ -201,9 +198,9 @@ setup( ...@@ -201,9 +198,9 @@ setup(
"bob/math/scatter.cpp", "bob/math/scatter.cpp",
"bob/math/lp_interior_point.cpp", "bob/math/lp_interior_point.cpp",
"bob/math/main.cpp", "bob/math/main.cpp",
], ],
version = version, version = version,
bob_packages = ['bob.core'], bob_packages = bob_packages,
system_include_dirs = math_flags['system_include_dirs'], system_include_dirs = math_flags['system_include_dirs'],
library_dirs = math_flags['library_dirs'], library_dirs = math_flags['library_dirs'],
libraries = math_flags['libraries'], libraries = math_flags['libraries'],
...@@ -217,9 +214,6 @@ setup( ...@@ -217,9 +214,6 @@ setup(
'build_ext': build_ext 'build_ext': build_ext
}, },
entry_points={
},
classifiers = [ classifiers = [
'Development Status :: 3 - Alpha', 'Development Status :: 3 - Alpha',
'Intended Audience :: Developers', 'Intended Audience :: Developers',
...@@ -228,6 +222,6 @@ setup( ...@@ -228,6 +222,6 @@ setup(
'Programming Language :: Python', 'Programming Language :: Python',
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Libraries :: Python Modules',
], ],
) )
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