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

Use namespaces

parent 662ba989
No related branches found
No related tags found
No related merge requests found
......@@ -11,3 +11,4 @@ src
develop-eggs
built-docs
dist
sphinx
......@@ -13,7 +13,7 @@ versions = versions
;current sys.path settings. Also note that your current 'eggs' directory may
;not take precedence over that.
eggs = bob==master
bob.db.replay
xbob.db.replay
[versions]
;If you would like to pin-down the recipes package version so you are not
......
......@@ -77,10 +77,10 @@ copyright = u'%s, Idiap Research Institute' % time.strftime('%Y')
# built documents.
#
# The short X.Y version.
from replay.db import version as db_version
version = db_version()
from xbob.db.replay.driver import Interface
version = Interface().version()
# The full version, including alpha/beta/rc tags.
release = db_version()
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -6,6 +6,6 @@
Replay Attack Database
========================
.. automodule:: replay.db
.. automodule:: xbob.db.replay
.. autoclass:: replay.db.Database
.. autoclass:: xbob.db.replay.Database
......@@ -9,7 +9,7 @@ from setuptools import setup, find_packages
# parameters that define our package.
setup(
name='bob.db.replay',
name='xbob.db.replay',
version='master',
description='Replay Attack Database Access API for Bob',
url='http://github.com/bioidiap/bob.db.replay',
......@@ -24,23 +24,24 @@ setup(
zip_safe=False,
install_requires=[
"bob", # base signal proc./machine learning library
'setuptools',
'bob', # base signal proc./machine learning library
],
entry_points={
'console_scripts': [
# for tests or db creation, enable the following line:
#'replay_manager.py = bob.db.script.dbmanage:main',
],
namespace_packages = [
'xbob',
'xbob.db',
],
entry_points = {
# bob database declaration
'bob.db': [
'replay = replay.db.driver:Interface',
'replay = xbob.db.replay.driver:Interface',
],
# bob unittest declaration
'bob.test': [
'replay = replay.test:ReplayDatabaseTest',
'replay = xbob.db.replay.test:ReplayDatabaseTest',
],
},
......
#see http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
__import__('pkg_resources').declare_namespace(__name__)
#see http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
__import__('pkg_resources').declare_namespace(__name__)
......@@ -25,4 +25,5 @@ on your references:
"""
from .query import Database
__all__ = dir()
__all__ = ['Database']
File moved
File moved
......@@ -81,7 +81,7 @@ class Interface(BaseInterface):
def version(self):
import pkg_resources # part of setuptools
return pkg_resources.require('bob.db.%s' % self.name())[0].version
return pkg_resources.require('xbob.db.%s' % self.name())[0].version
def location(self):
return os.path.dirname(os.path.realpath(__file__))
......
File moved
File moved
File moved
File moved
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