from distutils.core import setup from distutils.extension import Extension import os import sys import glob examples_dir = '/usr/share/compi/examples' try: os.makedirs(examples_dir) except: pass try: from src.config import version as compi_version except: compi_version = "0.4.1" setup( name = "compi", version = compi_version, author = "Fernando Ruiz Humanes", author_email = "fruiz@forja.guadalinex.org", url = "http://forja.guadalinex.org/repositorio/projects/compi/", download_url = "http://forja.guadalinex.org/repositorio/frs/?group_id=31", package_dir = {'compi': 'src'}, packages = ['compi'], py_modules = [e[:-3] for e in glob.glob("src/*.py")], data_files=[('/usr/share/applications/', ['compi.desktop']), ('/usr/share/compi/compi%s/translations/en/LC_MESSAGES' % compi_version.replace('.',''), ['translations/en/LC_MESSAGES/compi.mo']), (examples_dir, [os.path.join('examples', e) for e in os.listdir('examples')]), ('/usr/share/pixmaps/', [os.path.join('images', e) for e in os.listdir('images')])], ) pyversion = "%s.%s" % (sys.version_info[0], sys.version_info[1]) if len(sys.argv) > 1 and sys.argv[1] == "install": try: os.chmod("/usr/lib/python%s/site-packages/compi/compi.py" % pyversion, 0755) if not os.path.exists("/usr/bin/compi"): os.symlink("/usr/lib/python%s/site-packages/compi/compi.py" % pyversion,"/usr/bin/compi") except: pass