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