Commit b5be4c3e authored by Manuel Günther's avatar Manuel Günther

Switched to new bob.extension version; moved headers to include/bob.ap

parent bab7be80
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Copyright (C) Idiap Research Institute, Martigny, Switzerland * Copyright (C) Idiap Research Institute, Martigny, Switzerland
*/ */
#include "Ceps.h" #include <bob.ap/Ceps.h>
#include <bob.core/assert.h> #include <bob.core/assert.h>
bob::ap::Ceps::Ceps(const double sampling_frequency, bob::ap::Ceps::Ceps(const double sampling_frequency,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Copyright (C) Idiap Research Institute, Martigny, Switzerland * Copyright (C) Idiap Research Institute, Martigny, Switzerland
*/ */
#include "Energy.h" #include <bob.ap/Energy.h>
#include <bob.core/assert.h> #include <bob.core/assert.h>
bob::ap::Energy::Energy(const double sampling_frequency, const double win_length_ms, bob::ap::Energy::Energy(const double sampling_frequency, const double win_length_ms,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <stdexcept> #include <stdexcept>
#include "FrameExtractor.h" #include <bob.ap/FrameExtractor.h>
#include <bob.core/check.h> #include <bob.core/check.h>
bob::ap::FrameExtractor::FrameExtractor(const double sampling_frequency, bob::ap::FrameExtractor::FrameExtractor(const double sampling_frequency,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Copyright (C) Idiap Research Institute, Martigny, Switzerland * Copyright (C) Idiap Research Institute, Martigny, Switzerland
*/ */
#include "Spectrogram.h" #include <bob.ap/Spectrogram.h>
#include <bob.core/assert.h> #include <bob.core/assert.h>
#include <bob.core/cast.h> #include <bob.core/cast.h>
......
/**
* @author Manuel Guenther <manuel.guenther@idiap.ch>
* @date Mon Aug 18 16:08:58 CEST 2014
*
* @brief General directives for all modules in bob.ap
*/
#ifndef BOB_AP_CONFIG_H
#define BOB_AP_CONFIG_H
/* Macros that define versions and important names */
#define BOB_AP_API_VERSION 0x0200
#endif /* BOB_AP_CONFIG_H */
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
#ifndef BOB_AP_TYPES_H #ifndef BOB_AP_TYPES_H
#define BOB_AP_TYPES_H #define BOB_AP_TYPES_H
#include "cpp/FrameExtractor.h" #include <bob.ap/FrameExtractor.h>
#include "cpp/Energy.h" #include <bob.ap/Energy.h>
#include "cpp/Spectrogram.h" #include <bob.ap/Spectrogram.h>
#include "cpp/Ceps.h" #include <bob.ap/Ceps.h>
/** /**
* Represents either an FrameExtractor * Represents either an FrameExtractor
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <bob.blitz/capi.h> #include <bob.blitz/capi.h>
#include <bob.blitz/cleanup.h> #include <bob.blitz/cleanup.h>
#include <bob.core/config.h> #include <bob.core/config.h>
#include <bob.sp/config.h>
static int dict_set(PyObject* d, const char* key, const char* value) { static int dict_set(PyObject* d, const char* key, const char* value) {
PyObject* v = Py_BuildValue("s", value); PyObject* v = Py_BuildValue("s", value);
...@@ -101,6 +102,13 @@ static PyObject* bob_core_version() { ...@@ -101,6 +102,13 @@ static PyObject* bob_core_version() {
return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(BOB_CORE_API_VERSION)); return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(BOB_CORE_API_VERSION));
} }
/**
* bob.sp c/c++ api version
*/
static PyObject* bob_sp_version() {
return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(BOB_SP_API_VERSION));
}
static PyObject* build_version_dictionary() { static PyObject* build_version_dictionary() {
PyObject* retval = PyDict_New(); PyObject* retval = PyDict_New();
...@@ -114,6 +122,7 @@ static PyObject* build_version_dictionary() { ...@@ -114,6 +122,7 @@ static PyObject* build_version_dictionary() {
if (!dict_steal(retval, "NumPy", numpy_version())) return 0; if (!dict_steal(retval, "NumPy", numpy_version())) return 0;
if (!dict_steal(retval, "bob.blitz", bob_blitz_version())) return 0; if (!dict_steal(retval, "bob.blitz", bob_blitz_version())) return 0;
if (!dict_steal(retval, "bob.core", bob_core_version())) return 0; if (!dict_steal(retval, "bob.core", bob_core_version())) return 0;
if (!dict_steal(retval, "bob.sp", bob_sp_version())) return 0;
Py_INCREF(retval); Py_INCREF(retval);
return retval; return retval;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
from setuptools import setup, find_packages, dist from setuptools import setup, find_packages, dist
dist.Distribution(dict(setup_requires=['bob.blitz', 'bob.core', 'bob.sp'])) dist.Distribution(dict(setup_requires=['bob.blitz', 'bob.core', 'bob.sp']))
from bob.blitz.extension import Extension from bob.blitz.extension import Extension, Library, build_ext
version = '2.0.0a0' version = '2.0.0a0'
...@@ -29,29 +29,36 @@ setup( ...@@ -29,29 +29,36 @@ setup(
'setuptools', 'setuptools',
'bob.blitz', 'bob.blitz',
'bob.core', 'bob.core',
'bob.sp', # for testing 'bob.sp',
'scipy', # for testing 'scipy', # for testing
], ],
namespace_packages=[ namespace_packages=[
"bob", "bob",
], ],
ext_modules = [ ext_modules = [
Extension("bob.ap.version", Extension("bob.ap.version",
[ [
"bob/ap/version.cpp", "bob/ap/version.cpp",
], ],
version = version, version = version,
bob_packages = ['bob.core'] bob_packages = ['bob.core', 'bob.sp']
), ),
Extension("bob.ap._library",
Library("bob.ap.bob_ap",
[ [
"bob/ap/cpp/Energy.cpp", "bob/ap/cpp/Energy.cpp",
"bob/ap/cpp/FrameExtractor.cpp", "bob/ap/cpp/FrameExtractor.cpp",
"bob/ap/cpp/Spectrogram.cpp", "bob/ap/cpp/Spectrogram.cpp",
"bob/ap/cpp/Ceps.cpp", "bob/ap/cpp/Ceps.cpp",
],
version = version,
bob_packages = ['bob.core', 'bob.sp']
),
Extension("bob.ap._library",
[
"bob/ap/energy.cpp", "bob/ap/energy.cpp",
"bob/ap/frame_extractor.cpp", "bob/ap/frame_extractor.cpp",
"bob/ap/spectrogram.cpp", "bob/ap/spectrogram.cpp",
...@@ -59,10 +66,13 @@ setup( ...@@ -59,10 +66,13 @@ setup(
"bob/ap/main.cpp", "bob/ap/main.cpp",
], ],
version = version, version = version,
# TODO: version the packages ?
bob_packages = ['bob.core', 'bob.sp'] bob_packages = ['bob.core', 'bob.sp']
), ),
], ],
cmdclass = {
'build_ext': build_ext
},
classifiers = [ classifiers = [
'Development Status :: 3 - Alpha', 'Development Status :: 3 - Alpha',
...@@ -72,6 +82,6 @@ setup( ...@@ -72,6 +82,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