update setup.py

This commit is contained in:
Emmanuel Garette 2016-03-10 14:50:27 +01:00
parent 3b872cb8c9
commit 8c733d5303
2 changed files with 12 additions and 9 deletions

View file

@ -10,20 +10,22 @@ def fetch_version():
return file('VERSION', 'r').readline().strip()
def return_storages():
"returns all the storage plugins that are living in tiramisu/storage"
def return_files(component):
here = dirname(abspath(__file__))
storages_path = normpath(join(here, 'tiramisu', 'storage'))
dir_content = [content for content in listdir(storages_path)
path = normpath(join(here, 'tiramisu', component))
dir_content = [content for content in listdir(path)
if not content == '__pycache__']
storages = filter(isdir, [join(storages_path, content)
paths = filter(isdir, [join(path, content)
for content in dir_content])
storage_list = ['.'.join(storage.split('/')[-3:]) for storage in storages]
return storage_list
lst = ['.'.join(path.split('/')[-3:]) for path in paths]
return lst
packages = ['tiramisu', 'tiramisu.storage']
packages.extend(return_storages())
packages = ['tiramisu', 'tiramisu.storage', 'tiramisu.option']
packages.extend(return_files('storage'))
packages.extend(return_files('option'))
print packages
setup(
author="Tiramisu's team",
author_email='contact@cadoles.com',

View file

@ -171,3 +171,4 @@ def test_owner_masterslaves():
cfg.cfgimpl_get_values().setowner(c, owners.user, 0)
assert cfg.cfgimpl_get_values().getowner(c, 0) == owners.user
assert cfg.cfgimpl_get_values().getowner(c, 1) == owners.default
assert cfg.str == ['yes', None]