version for setup.py
This commit is contained in:
parent
28ea4f0e90
commit
b492874cbe
17
setup.py
17
setup.py
|
@ -1,12 +1,27 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
from os.path import dirname, abspath, join, normpath, isdir, basename
|
||||||
|
from os import listdir
|
||||||
|
|
||||||
|
|
||||||
def fetch_version():
|
def fetch_version():
|
||||||
"""Get version from version.in"""
|
"""Get version from version.in"""
|
||||||
return file('VERSION', 'r').readline().strip()
|
return file('VERSION', 'r').readline().strip()
|
||||||
|
|
||||||
|
def return_storages():
|
||||||
|
"returns all the storage plugins that are living in tiramisu/storage"
|
||||||
|
here = dirname(abspath(__file__))
|
||||||
|
storages_path = normpath(join(here, 'tiramisu', 'storage'))
|
||||||
|
dir_content = [ content for content in listdir(storages_path) \
|
||||||
|
if not content =='__pycache__']
|
||||||
|
storages = filter(isdir, [join(storages_path, content) \
|
||||||
|
for content in dir_content])
|
||||||
|
storage_list = [basename(storage) for storage in storages]
|
||||||
|
return storage_list
|
||||||
|
|
||||||
|
packages = ['tiramisu', 'tiramisu.storage']
|
||||||
|
packages.extend(return_storages())
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
author="Tiramisu's team",
|
author="Tiramisu's team",
|
||||||
|
@ -15,7 +30,6 @@ setup(
|
||||||
version=fetch_version(),
|
version=fetch_version(),
|
||||||
description='an options controller tool',
|
description='an options controller tool',
|
||||||
url='http://tiramisu.labs.libre-entreprise.org/',
|
url='http://tiramisu.labs.libre-entreprise.org/',
|
||||||
packages=['tiramisu'],
|
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 2",
|
"Programming Language :: Python :: 2",
|
||||||
|
@ -45,4 +59,5 @@ producing flexible and fast options access.
|
||||||
|
|
||||||
This version requires Python 2.6 or later.
|
This version requires Python 2.6 or later.
|
||||||
"""
|
"""
|
||||||
|
packages=packages
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue