Commit 988f70d6 authored by André Anjos's avatar André Anjos 💬

xbob -> bob

parent 8ebfc963
......@@ -13,8 +13,8 @@ install:
- "python bootstrap.py"
- "./bin/buildout"
script:
- "./bin/python -c 'from xbob.extension import get_config; print(get_config())'"
- "./bin/coverage run --source=xbob.extension ./bin/nosetests -sv"
- "./bin/python -c 'from bob.extension import get_config; print(get_config())'"
- "./bin/coverage run --source=bob.extension ./bin/nosetests -sv"
- "./bin/sphinx-build -b doctest doc sphinx"
- "./bin/sphinx-build -b html doc sphinx"
after_success:
......
include LICENSE README.rst bootstrap.py buildout.cfg
recursive-include xbob/extension *.h
\ No newline at end of file
recursive-include bob/extension *.h
\ No newline at end of file
This diff is collapsed.
......@@ -81,16 +81,16 @@ def generate_self_macros(extname, version):
s = extname.rsplit('.', 1)
retval = [
('XBOB_EXT_MODULE_PREFIX', '"%s"' % s[0]),
('XBOB_EXT_MODULE_NAME', '"%s"' % s[1]),
('BOB_EXT_MODULE_PREFIX', '"%s"' % s[0]),
('BOB_EXT_MODULE_NAME', '"%s"' % s[1]),
]
if sys.version_info[0] >= 3:
retval.append(('XBOB_EXT_ENTRY_NAME', 'PyInit_%s' % s[1]))
retval.append(('BOB_EXT_ENTRY_NAME', 'PyInit_%s' % s[1]))
else:
retval.append(('XBOB_EXT_ENTRY_NAME', 'init%s' % s[1]))
retval.append(('BOB_EXT_ENTRY_NAME', 'init%s' % s[1]))
if version: retval.append(('XBOB_EXT_MODULE_VERSION', '"%s"' % version))
if version: retval.append(('BOB_EXT_MODULE_VERSION', '"%s"' % version))
return retval
......
......@@ -35,7 +35,7 @@ class boost:
.. doctest::
:options: +NORMALIZE_WHITESPACE +ELLIPSIS
>>> from xbob.extension import boost
>>> from bob.extension import boost
>>> pkg = boost('>= 1.35')
>>> pkg.include_directory
'...'
......@@ -48,7 +48,7 @@ class boost:
.. doctest::
:options: +NORMALIZE_WHITESPACE +ELLIPSIS
>>> from xbob.extension import boost
>>> from bob.extension import boost
>>> pkg = boost('>= 1.35')
>>> pkg.libconfig(['python', 'system'])
(...)
......@@ -59,7 +59,7 @@ class boost:
"""
Searches for the Boost library in stock locations. Allows user to override.
If the user sets the environment variable XBOB_PREFIX_PATH, that prefixes
If the user sets the environment variable BOB_PREFIX_PATH, that prefixes
the standard path locations.
"""
......@@ -199,7 +199,7 @@ class boost:
.. doctest::
:options: +NORMALIZE_WHITESPACE +ELLIPSIS
>>> from xbob.extension import boost
>>> from bob.extension import boost
>>> pkg = boost('>= 1.34')
>>> pkg.macros()
[('HAVE_BOOST', '1'), ('BOOST_VERSION', '"..."')]
......
/**
* @file xbob/extension/include/xbob.extension/documentation.h
* @file bob/extension/include/bob.extension/documentation.h
* @date Fri Feb 21 18:29:37 CET 2014
* @author Manuel Guenther <manuel.guenther@idiap.ch>
*
......@@ -8,8 +8,8 @@
* Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
*/
#ifndef XBOB_EXTENSION_DOCUMENTATION_H_INCLUDED
#define XBOB_EXTENSION_DOCUMENTATION_H_INCLUDED
#ifndef BOB_EXTENSION_DOCUMENTATION_H_INCLUDED
#define BOB_EXTENSION_DOCUMENTATION_H_INCLUDED
#include <string>
#include <vector>
......@@ -17,7 +17,7 @@
#include <stdexcept>
#include <iostream>
namespace xbob{
namespace bob{
namespace extension{
/**
......@@ -266,7 +266,7 @@ namespace xbob{
// TODO: remove
#include <iostream>
#ifndef XBOB_SHORT_DOCSTRINGS
#ifndef BOB_SHORT_DOCSTRINGS
// removes leading and trailing spaces
static std::string _strip(const std::string& str, const std::string& sep = " []()|"){
unsigned first = 0, last = str.size();
......@@ -410,20 +410,20 @@ static void _check(std::string& doc, const std::vector<std::string>& vars, const
}
}
#endif // ! XBOB_SHORT_DOCSTRINGS
#endif // ! BOB_SHORT_DOCSTRINGS
/////////////////////////////////////////////////////////////
/// FunctionDoc
inline xbob::extension::FunctionDoc::FunctionDoc(
inline bob::extension::FunctionDoc::FunctionDoc(
const char* const function_name,
const char* const short_description,
const char* const long_description,
bool is_member_function
) : function_name(function_name), function_description(short_description), is_member(is_member_function)
{
#ifndef XBOB_SHORT_DOCSTRINGS
#ifndef BOB_SHORT_DOCSTRINGS
if (long_description){
function_description += "\n\n";
function_description += long_description;
......@@ -431,54 +431,54 @@ inline xbob::extension::FunctionDoc::FunctionDoc(
#endif
}
inline xbob::extension::FunctionDoc& xbob::extension::FunctionDoc::add_prototype(
inline bob::extension::FunctionDoc& bob::extension::FunctionDoc::add_prototype(
const char* const variables,
const char* const return_values
){
#ifndef XBOB_SHORT_DOCSTRINGS
#ifndef BOB_SHORT_DOCSTRINGS
prototype_variables.push_back(variables);
if (!return_values)
prototype_returns.push_back("");
else
prototype_returns.push_back(return_values);
#endif // XBOB_SHORT_DOCSTRINGS
#endif // BOB_SHORT_DOCSTRINGS
return *this;
}
inline xbob::extension::FunctionDoc& xbob::extension::FunctionDoc::add_parameter(
inline bob::extension::FunctionDoc& bob::extension::FunctionDoc::add_parameter(
const char* const parameter_name,
const char* const parameter_type,
const char* const parameter_description
)
{
#ifndef XBOB_SHORT_DOCSTRINGS
#ifndef BOB_SHORT_DOCSTRINGS
parameter_names.push_back(parameter_name);
parameter_types.push_back(parameter_type);
parameter_descriptions.push_back(parameter_description);
#endif // XBOB_SHORT_DOCSTRINGS
#endif // BOB_SHORT_DOCSTRINGS
return *this;
}
inline xbob::extension::FunctionDoc& xbob::extension::FunctionDoc::add_return(
inline bob::extension::FunctionDoc& bob::extension::FunctionDoc::add_return(
const char* const parameter_name,
const char* const parameter_type,
const char* const parameter_description
)
{
#ifndef XBOB_SHORT_DOCSTRINGS
#ifndef BOB_SHORT_DOCSTRINGS
return_names.push_back(parameter_name);
return_types.push_back(parameter_type);
return_descriptions.push_back(parameter_description);
#endif // XBOB_SHORT_DOCSTRINGS
#endif // BOB_SHORT_DOCSTRINGS
return *this;
}
inline const char* const xbob::extension::FunctionDoc::doc(
inline const char* const bob::extension::FunctionDoc::doc(
const unsigned alignment,
const unsigned indent
) const
{
#ifdef XBOB_SHORT_DOCSTRINGS
#ifdef BOB_SHORT_DOCSTRINGS
return function_description.c_str();
#else
if (description.empty()){
......@@ -529,12 +529,12 @@ inline const char* const xbob::extension::FunctionDoc::doc(
// return the description
return description.c_str();
#endif // XBOB_SHORT_DOCSTRINGS
#endif // BOB_SHORT_DOCSTRINGS
}
inline void xbob::extension::FunctionDoc::print_usage() const
inline void bob::extension::FunctionDoc::print_usage() const
{
#ifdef XBOB_SHORT_DOCSTRINGS
#ifdef BOB_SHORT_DOCSTRINGS
return function_description.c_str();
#else
// in case of member functions, the alignment has to be decreased further since class member function are automatically indented by 4 further spaces.
......@@ -553,7 +553,7 @@ inline void xbob::extension::FunctionDoc::print_usage() const
std::cerr << _align(_usage(function_name, prototype_variables[n], prototype_returns[n]), 0, unsigned(-1)) << "\n";
}
std::cerr << std::endl;
#endif // XBOB_SHORT_DOCSTRINGS
#endif // BOB_SHORT_DOCSTRINGS
}
......@@ -561,25 +561,25 @@ inline void xbob::extension::FunctionDoc::print_usage() const
/////////////////////////////////////////////////////////////
/// ClassDoc
inline xbob::extension::ClassDoc::ClassDoc(
inline bob::extension::ClassDoc::ClassDoc(
const char* const class_name,
const char* const short_description,
const char* const long_description
) : class_name(class_name), class_description(short_description)
{
#ifndef XBOB_SHORT_DOCSTRINGS
#ifndef BOB_SHORT_DOCSTRINGS
if (long_description){
class_description += "\n\n";
class_description += long_description;
}
#endif // ! XBOB_SHORT_DOCSTRINGS
#endif // ! BOB_SHORT_DOCSTRINGS
}
inline xbob::extension::ClassDoc& xbob::extension::ClassDoc::add_constructor(
const xbob::extension::FunctionDoc& constructor_documentation
inline bob::extension::ClassDoc& bob::extension::ClassDoc::add_constructor(
const bob::extension::FunctionDoc& constructor_documentation
)
{
#ifndef XBOB_SHORT_DOCSTRINGS
#ifndef BOB_SHORT_DOCSTRINGS
if (!constructor.empty()){
throw std::runtime_error("The class documentation can have only a single constructor documentation");
}
......@@ -587,36 +587,36 @@ inline xbob::extension::ClassDoc& xbob::extension::ClassDoc::add_constructor(
// since we indent the constructor documentation ourselves, we don't need to consider it to be a member function.
constructor.back().is_member = false;
constructor.back().function_name = class_name;
#endif // XBOB_SHORT_DOCSTRINGS
#endif // BOB_SHORT_DOCSTRINGS
return *this;
}
inline xbob::extension::ClassDoc& xbob::extension::ClassDoc::highlight(
const xbob::extension::FunctionDoc& function_documentation
inline bob::extension::ClassDoc& bob::extension::ClassDoc::highlight(
const bob::extension::FunctionDoc& function_documentation
)
{
#ifndef XBOB_SHORT_DOCSTRINGS
#ifndef BOB_SHORT_DOCSTRINGS
highlighted_functions.push_back(function_documentation);
#endif // XBOB_SHORT_DOCSTRINGS
#endif // BOB_SHORT_DOCSTRINGS
return *this;
}
inline xbob::extension::ClassDoc& xbob::extension::ClassDoc::highlight(
const xbob::extension::VariableDoc& variable_documentation
inline bob::extension::ClassDoc& bob::extension::ClassDoc::highlight(
const bob::extension::VariableDoc& variable_documentation
)
{
#ifndef XBOB_SHORT_DOCSTRINGS
#ifndef BOB_SHORT_DOCSTRINGS
highlighted_variables.push_back(variable_documentation);
#endif // XBOB_SHORT_DOCSTRINGS
#endif // BOB_SHORT_DOCSTRINGS
return *this;
}
inline char* xbob::extension::ClassDoc::doc(
inline char* bob::extension::ClassDoc::doc(
const unsigned alignment
) const
{
#ifdef XBOB_SHORT_DOCSTRINGS
#ifdef BOB_SHORT_DOCSTRINGS
return const_cast<char*>(class_description.c_str());
#else
if (description.empty()){
......@@ -642,32 +642,32 @@ inline char* xbob::extension::ClassDoc::doc(
}
}
return const_cast<char*>(description.c_str());
#endif // XBOB_SHORT_DOCSTRINGS
#endif // BOB_SHORT_DOCSTRINGS
}
/////////////////////////////////////////////////////////////
/// VariableDoc
inline xbob::extension::VariableDoc::VariableDoc(
inline bob::extension::VariableDoc::VariableDoc(
const char* const variable_name,
const char* const variable_type,
const char* const short_description,
const char* const long_description
) : variable_name(variable_name), variable_type(variable_type), variable_description(short_description)
{
#ifndef XBOB_SHORT_DOCSTRINGS
#ifndef BOB_SHORT_DOCSTRINGS
if (long_description){
variable_description += "\n\n";
variable_description += long_description;
}
#endif // ! XBOB_SHORT_DOCSTRINGS
#endif // ! BOB_SHORT_DOCSTRINGS
}
inline char* xbob::extension::VariableDoc::doc(
inline char* bob::extension::VariableDoc::doc(
const unsigned alignment
) const
{
#ifdef XBOB_SHORT_DOCSTRINGS
#ifdef BOB_SHORT_DOCSTRINGS
return const_cast<char*>(variable_description.c_str());
#else
if (description.empty()){
......@@ -678,8 +678,8 @@ inline char* xbob::extension::VariableDoc::doc(
description = _align("*" + variable_type + "* <-- " + variable_description, 0, alignment);
}
return const_cast<char*>(description.c_str());
#endif // XBOB_SHORT_DOCSTRINGS
#endif // BOB_SHORT_DOCSTRINGS
}
#endif // XBOB_EXTENSION_DOCUMENTATION_H_INCLUDED
#endif // BOB_EXTENSION_DOCUMENTATION_H_INCLUDED
......@@ -83,7 +83,7 @@ class pkgconfig:
.. doctest::
:options: +NORMALIZE_WHITESPACE +ELLIPSIS
>>> from xbob.extension import pkgconfig
>>> from bob.extension import pkgconfig
>>> blitz = pkgconfig('blitz')
>>> blitz.include_directories()
[...]
......@@ -349,7 +349,7 @@ class pkgconfig:
.. doctest::
:options: +NORMALIZE_WHITESPACE +ELLIPSIS
>>> from xbob.extension import pkgconfig
>>> from bob.extension import pkgconfig
>>> blitz = pkgconfig('blitz')
>>> blitz.package_macros()
[('HAVE_BLITZ', '1'), ('BLITZ_VERSION', '"..."')]
......
......@@ -23,7 +23,7 @@ def find_file(name, subpaths=None, prefixes=None):
This method will find all occurrences of a given name on the file system and
will return them to the user.
If the environment variable ``XBOB_PREFIX_PATH`` is set, then it is
If the environment variable ``BOB_PREFIX_PATH`` is set, then it is
considered a unix path list that is prepended to the list of prefixes to
search for. The environment variable has the highest priority on the search
order. The order on the variable for each path is respected.
......@@ -51,8 +51,8 @@ def find_file(name, subpaths=None, prefixes=None):
search = []
# Priority 1
if 'XBOB_PREFIX_PATH' in os.environ:
search += os.environ['XBOB_PREFIX_PATH'].split(os.pathsep)
if 'BOB_PREFIX_PATH' in os.environ:
search += os.environ['BOB_PREFIX_PATH'].split(os.pathsep)
# Priority 2
if prefixes:
......@@ -93,7 +93,7 @@ def find_header(name, subpaths=None, prefixes=None):
This method will find all occurrences of a given name on the file system and
will return them to the user.
If the environment variable ``XBOB_PREFIX_PATH`` is set, then it is
If the environment variable ``BOB_PREFIX_PATH`` is set, then it is
considered a unix path list that is prepended to the list of prefixes to
search for. The environment variable has the highest priority on the search
order. The order on the variable for each path is respected.
......@@ -132,7 +132,7 @@ def find_library(name, version=None, subpaths=None, prefixes=None,
This method will find all occurrences of a given name on the file system and
will return them to the user.
If the environment variable ``XBOB_PREFIX_PATH`` is set, then it is
If the environment variable ``BOB_PREFIX_PATH`` is set, then it is
considered a unix path list that is prepended to the list of prefixes to
search for. The environment variable has the highest priority on the search
order. The order on the variable for each path is respected.
......
......@@ -5,7 +5,7 @@
[buildout]
parts = scripts
develop = .
eggs = xbob.extension
eggs = bob.extension
[scripts]
recipe = xbob.buildout:scripts
recipe = bob.buildout:scripts
......@@ -58,12 +58,12 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'xbob.extension'
project = u'bob.extension'
import time
copyright = u'%s, Idiap Research Institute' % time.strftime('%Y')
# Grab the setup entry
distribution = pkg_resources.require('xbob.extension')[0]
distribution = pkg_resources.require('bob.extension')[0]
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
......@@ -129,7 +129,7 @@ if sphinx.__version__ >= "1.0":
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = 'xbob_extension'
#html_short_title = 'bob_extension'
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
......@@ -187,7 +187,7 @@ html_favicon = 'img/favicon.ico'
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'xbob_extension_doc'
htmlhelp_basename = 'bob_extension_doc'
# -- Options for LaTeX output --------------------------------------------------
......@@ -201,7 +201,7 @@ latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'xbob_extension.tex', u'Bob Extension Building',
('index', 'bob_extension.tex', u'Bob Extension Building',
u'Biometrics Group, Idiap Research Institute', 'manual'),
]
......@@ -241,7 +241,7 @@ rst_epilog = """
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'xbob_extension', u'Bob Extension Building Documentation', [u'Idiap Research Institute'], 1)
('index', 'bob_extension', u'Bob Extension Building Documentation', [u'Idiap Research Institute'], 1)
]
# Default processing flags for sphinx
......
This diff is collapsed.
......@@ -3,10 +3,10 @@
.. Sat 16 Nov 20:52:58 2013
================================
Python API to `xbob.extension`
Python API to `bob.extension`
================================
This section includes information for using the Python API of
``xbob.extension``.
``bob.extension``.
.. automodule:: xbob.extension
.. automodule:: bob.extension
......@@ -10,10 +10,10 @@ from setuptools import setup, find_packages
setup(
name="xbob.extension",
name="bob.extension",
version="0.3.0a0",
description="Helps projects building Python/C++ extensions for Bob",
url='http://github.com/bioidiap/xbob.extension',
url='http://github.com/bioidiap/bob.extension',
license="BSD",
author='Andre Anjos',
author_email='andre.anjos@idiap.ch',
......@@ -23,7 +23,7 @@ setup(
zip_safe=True,
namespace_packages=[
"xbob",
"bob",
],
install_requires=[
......
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