tiramisu/setup.py

75 lines
2.4 KiB
Python
Raw Normal View History

2012-07-13 11:22:00 +02:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
2013-09-16 14:02:55 +02:00
from os.path import dirname, abspath, join, normpath, isdir
2013-08-29 16:38:23 +02:00
from os import listdir
2016-04-07 15:53:48 +02:00
import os
package_name = os.environ.get('PACKAGE_DST', 'tiramisu')
2012-07-13 11:22:00 +02:00
def fetch_version():
2013-09-01 23:09:50 +02:00
"""Get version from version.in"""
2018-08-14 11:42:53 +02:00
return open('VERSION', 'r').readline().strip()
2016-03-10 14:50:27 +01:00
def return_files(component):
2013-08-29 16:38:23 +02:00
here = dirname(abspath(__file__))
2016-03-10 14:50:27 +01:00
path = normpath(join(here, 'tiramisu', component))
dir_content = [content for content in listdir(path)
2013-09-16 14:02:55 +02:00
if not content == '__pycache__']
2016-03-10 14:50:27 +01:00
paths = filter(isdir, [join(path, content)
2013-08-29 16:38:23 +02:00
for content in dir_content])
2016-03-10 14:50:27 +01:00
lst = ['.'.join(path.split('/')[-3:]) for path in paths]
2019-01-28 17:28:14 +01:00
#lst = [package_name + '.' + '.'.join(path.split('/')[-2:]) for path in paths]
2016-03-10 14:50:27 +01:00
return lst
2013-08-29 16:38:23 +02:00
2016-04-07 15:53:48 +02:00
packages = [package_name, package_name + '.storage', package_name + '.option']
2016-03-10 14:50:27 +01:00
packages.extend(return_files('storage'))
packages.extend(return_files('option'))
2016-04-07 15:53:48 +02:00
if package_name != 'tiramisu':
package_dir = {package_name: 'tiramisu'}
else:
package_dir = {}
2016-03-10 14:50:27 +01:00
2012-07-13 11:22:00 +02:00
setup(
2013-09-01 23:09:50 +02:00
author="Tiramisu's team",
2013-08-29 12:15:12 +02:00
author_email='contact@cadoles.com',
2016-04-07 15:53:48 +02:00
name=package_name,
version=fetch_version(),
2013-09-01 23:09:50 +02:00
description='an options controller tool',
url='http://tiramisu.labs.libre-entreprise.org/',
classifiers=[
"Programming Language :: Python",
2013-09-02 15:06:55 +02:00
"Programming Language :: Python :: 2",
2013-09-01 23:09:50 +02:00
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
2013-09-01 23:09:50 +02:00
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Linguistic"
],
long_description="""\
An options controller tool
-------------------------------------
Due to more and more available options required to set up an operating system,
compiler options or whatever, it became quite annoying to hand the necessary
options to where they are actually used and even more annoying to add new
options. To circumvent these problems the configuration control was
introduced...
Tiramisu is an options handler and an options controller, wich aims at
producing flexible and fast options access.
This version requires Python 2.6 or later.
2013-09-16 14:02:55 +02:00
""",
2016-04-07 15:53:48 +02:00
packages=packages,
package_dir=package_dir
2012-07-13 11:22:00 +02:00
)