fixed terminator import on setup.py

This commit is contained in:
Nicolas Valcarcel 2008-04-02 23:44:58 -05:00
parent 8ce3f6f626
commit 7ad18d591c
1 changed files with 9 additions and 1 deletions

View File

@ -4,11 +4,19 @@ from distutils.core import setup
from distutils.command.install_data import install_data from distutils.command.install_data import install_data
from distutils.dep_util import newer from distutils.dep_util import newer
from distutils.log import info from distutils.log import info
from terminator import APP_VERSION
import glob import glob
import os import os
import sys import sys
def import_terminator():
from types import ModuleType
module = ModuleType('terminator')
module_file = open('terminator', 'r')
exec module_file in module.__dict__
return module
APP_VERSION = import_terminator().APP_VERSION
class InstallData(install_data): class InstallData(install_data):
def run (self): def run (self):
self.data_files.extend (self._compile_po_files ()) self.data_files.extend (self._compile_po_files ())