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 @@
* Copyright (C) Idiap Research Institute, Martigny, Switzerland
*/
#include "Ceps.h"
#include <bob.ap/Ceps.h>
#include <bob.core/assert.h>
bob::ap::Ceps::Ceps(const double sampling_frequency,
......
......@@ -6,7 +6,7 @@
* Copyright (C) Idiap Research Institute, Martigny, Switzerland
*/
#include "Energy.h"
#include <bob.ap/Energy.h>
#include <bob.core/assert.h>
bob::ap::Energy::Energy(const double sampling_frequency, const double win_length_ms,
......
......@@ -8,7 +8,7 @@
#include <stdexcept>
#include "FrameExtractor.h"
#include <bob.ap/FrameExtractor.h>
#include <bob.core/check.h>
bob::ap::FrameExtractor::FrameExtractor(const double sampling_frequency,
......
......@@ -7,7 +7,7 @@
* Copyright (C) Idiap Research Institute, Martigny, Switzerland
*/
#include "Spectrogram.h"
#include <bob.ap/Spectrogram.h>
#include <bob.core/assert.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 @@
#ifndef BOB_AP_TYPES_H
#define BOB_AP_TYPES_H
#include "cpp/FrameExtractor.h"
#include "cpp/Energy.h"
#include "cpp/Spectrogram.h"
#include "cpp/Ceps.h"
#include <bob.ap/FrameExtractor.h>
#include <bob.ap/Energy.h>
#include <bob.ap/Spectrogram.h>
#include <bob.ap/Ceps.h>
/**
* Represents either an FrameExtractor
......
......@@ -20,6 +20,7 @@
#include <bob.blitz/capi.h>
#include <bob.blitz/cleanup.h>
#include <bob.core/config.h>
#include <bob.sp/config.h>
static int dict_set(PyObject* d, const char* key, const char* value) {
PyObject* v = Py_BuildValue("s", value);
......@@ -101,6 +102,13 @@ static PyObject* bob_core_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() {
PyObject* retval = PyDict_New();
......@@ -114,6 +122,7 @@ static PyObject* build_version_dictionary() {
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.core", bob_core_version())) return 0;
if (!dict_steal(retval, "bob.sp", bob_sp_version())) return 0;
Py_INCREF(retval);
return retval;
......
......@@ -5,7 +5,7 @@
from setuptools import setup, find_packages, dist
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'
......@@ -29,7 +29,7 @@ setup(
'setuptools',
'bob.blitz',
'bob.core',
'bob.sp', # for testing
'bob.sp',
'scipy', # for testing
],
......@@ -43,15 +43,22 @@ setup(
"bob/ap/version.cpp",
],
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/FrameExtractor.cpp",
"bob/ap/cpp/Spectrogram.cpp",
"bob/ap/cpp/Ceps.cpp",
],
version = version,
bob_packages = ['bob.core', 'bob.sp']
),
Extension("bob.ap._library",
[
"bob/ap/energy.cpp",
"bob/ap/frame_extractor.cpp",
"bob/ap/spectrogram.cpp",
......@@ -59,11 +66,14 @@ setup(
"bob/ap/main.cpp",
],
version = version,
# TODO: version the packages ?
bob_packages = ['bob.core', 'bob.sp']
),
],
cmdclass = {
'build_ext': build_ext
},
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
......
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