version for setup.py

This commit is contained in:
gwen 2013-08-29 16:38:23 +02:00 committed by Emmanuel Garette
parent 28ea4f0e90
commit b492874cbe
1 changed files with 16 additions and 1 deletions

View File

@ -1,12 +1,27 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
from os.path import dirname, abspath, join, normpath, isdir, basename
from os import listdir
def fetch_version():
"""Get version from version.in"""
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(
author="Tiramisu's team",
@ -15,7 +30,6 @@ setup(
version=fetch_version(),
description='an options controller tool',
url='http://tiramisu.labs.libre-entreprise.org/',
packages=['tiramisu'],
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 2",
@ -45,4 +59,5 @@ producing flexible and fast options access.
This version requires Python 2.6 or later.
"""
packages=packages
)