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

Upgrade to discrete xbob.io packages

parent 7cc65896
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,8 @@ extensions = xbob.buildout
auto-checkout = *
develop = src/xbob.extension
src/xbob.blitz
src/xbob.io
src/xbob.io.base
src/xbob.io.image
src/xbob.ip.color
src/xbob.ip.draw
.
......@@ -18,13 +19,14 @@ develop = src/xbob.extension
; options for xbob.buildout extension
debug = true
verbose = true
prefixes = /idiap/group/torch5spro/nightlies/last/bob/linux-x86_64-release
prefixes = /idiap/group/torch5spro/releases/preview/install/linux-x86_64-release
/Users/andre/work/bob/b/dbg/
[sources]
xbob.extension = git https://github.com/bioidiap/xbob.extension branch=prototype
xbob.blitz = git https://github.com/bioidiap/xbob.blitz
xbob.io = git https://github.com/bioidiap/xbob.io
xbob.io.base = git https://github.com/bioidiap/xbob.io.base
xbob.io.image = git https://github.com/bioidiap/xbob.io.image
xbob.ip.color = git https://github.com/bioidiap/xbob.ip.color
xbob.ip.draw = git https://github.com/bioidiap/xbob.ip.draw
......
......@@ -7,14 +7,14 @@
"""
from setuptools import setup, find_packages, dist
dist.Distribution(dict(setup_requires=['xbob.blitz', 'xbob.io']))
dist.Distribution(dict(setup_requires=['xbob.blitz', 'xbob.io.base']))
from xbob.blitz.extension import Extension
import xbob.io
import xbob.io.base
version = '2.0.0a0'
packages = ['boost', 'opencv>=2.0', 'bob-io>=1.2.2']
include_dirs = [xbob.io.get_include()]
include_dirs = [xbob.io.base.get_include()]
setup(
......@@ -34,7 +34,8 @@ setup(
install_requires=[
'setuptools',
'xbob.blitz',
'xbob.io', #for tests
'xbob.io.base',
'xbob.io.image', #for tests
'xbob.ip.color', #for tests
'xbob.ip.draw', #for doc generation
'matplotlib', #for doc generation
......
......@@ -7,7 +7,7 @@
#include <xbob.blitz/cppapi.h>
#include <xbob.blitz/cleanup.h>
#include <xbob.io/api.h>
#include <xbob.io.base/api.h>
#include <structmember.h>
#include <xbob.extension/documentation.h>
......
......@@ -10,7 +10,7 @@
#endif
#include <xbob.blitz/capi.h>
#include <xbob.blitz/cleanup.h>
#include <xbob.io/api.h>
#include <xbob.io.base/api.h>
#include <xbob.extension/documentation.h>
extern PyTypeObject PyBobIpFlandmark_Type;
......@@ -81,9 +81,18 @@ static PyObject* create_module (void) {
Py_INCREF(&PyBobIpFlandmark_Type);
if (PyModule_AddObject(m, "Flandmark", (PyObject *)&PyBobIpFlandmark_Type) < 0) return 0;
/* imports xbob.blitz C-API + dependencies */
if (import_xbob_blitz() < 0) return 0;
if (import_xbob_io() < 0) return 0;
/* imports dependencies */
if (import_xbob_blitz() < 0) {
PyErr_Print();
PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME);
return 0;
}
if (import_xbob_io_base() < 0) {
PyErr_Print();
PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME);
return 0;
}
Py_INCREF(m);
return m;
......
......@@ -11,7 +11,8 @@ import numpy
import functools
import pkg_resources
import nose.tools
import xbob.io
import xbob.io.base
import xbob.io.image
import xbob.ip.color
from . import Flandmark
......@@ -119,7 +120,7 @@ def test_is_outside():
@opencv_available
def test_lena_opencv():
img = xbob.io.load(LENA)
img = xbob.io.base.load(LENA)
gray = xbob.ip.color.rgb_to_gray(img)
(x, y, width, height) = opencv_detect(gray)[0]
......@@ -132,7 +133,7 @@ def test_lena_opencv():
def test_lena():
img = xbob.io.load(LENA)
img = xbob.io.base.load(LENA)
gray = xbob.ip.color.rgb_to_gray(img)
(x, y, width, height) = LENA_BBX[0]
......@@ -146,7 +147,7 @@ def test_lena():
@opencv_available
def test_multi_opencv():
img = xbob.io.load(MULTI)
img = xbob.io.base.load(MULTI)
gray = xbob.ip.color.rgb_to_gray(img)
bbx = opencv_detect(gray)
......@@ -160,7 +161,7 @@ def test_multi_opencv():
def test_multi():
img = xbob.io.load(MULTI)
img = xbob.io.base.load(MULTI)
gray = xbob.ip.color.rgb_to_gray(img)
flm = Flandmark()
......
......@@ -20,7 +20,7 @@
#endif
#include <xbob.blitz/capi.h>
#include <xbob.blitz/cleanup.h>
#include <xbob.io/config.h>
#include <xbob.io.base/config.h>
static int dict_set(PyObject* d, const char* key, const char* value) {
PyObject* v = Py_BuildValue("s", value);
......@@ -98,8 +98,8 @@ static PyObject* xbob_blitz_version() {
/**
* xbob.io c/c++ api version
*/
static PyObject* xbob_io_version() {
return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(XBOB_IO_API_VERSION));
static PyObject* xbob_io_base_version() {
return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(XBOB_IO_BASE_API_VERSION));
}
static PyObject* build_version_dictionary() {
......@@ -115,7 +115,7 @@ static PyObject* build_version_dictionary() {
if (!dict_steal(retval, "Python", python_version())) return 0;
if (!dict_steal(retval, "NumPy", numpy_version())) return 0;
if (!dict_steal(retval, "xbob.blitz", xbob_blitz_version())) return 0;
if (!dict_steal(retval, "xbob.io", xbob_io_version())) return 0;
if (!dict_steal(retval, "xbob.io", xbob_io_base_version())) return 0;
Py_INCREF(retval);
return retval;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment