greg@103: import os,sys greg@103: from distutils.core import setup greg@103: greg@103: install_dir=os.path.join("LOLITech","matiec") greg@103: greg@103: data_files=[] greg@103: os.getcwd() greg@103: os.chdir(os.getcwd()) greg@103: greg@103: def generate(base_dir): greg@103: listfile=[] greg@103: if base_dir == "": greg@103: directory = "." greg@103: else: greg@103: directory = base_dir greg@103: data_files.append((os.path.join(install_dir, base_dir), listfile)) greg@103: greg@103: for element in os.listdir(directory): greg@103: element_path=os.path.join(base_dir, element) greg@103: if os.path.isdir(element_path): greg@104: basename_element=os.path.basename(element_path) greg@104: if basename_element == "lib": greg@104: generate(element_path) greg@103: elif os.path.isfile(element_path): greg@104: ext_element=os.path.splitext(element) greg@104: if ext_element[1] == ".exe" or ext_element[1] == ".h" or ext_element[1] == ".txt" or ext_element[1] == ".c": greg@104: listfile.append(element_path) greg@103: greg@103: generate("") greg@103: greg@103: setup(name='MatIEC', greg@103: version='0.1', greg@103: description='IEC to C Compiler', greg@103: author='Mario de Sousa, Edouard Tisserant, Laurent Bessard', greg@103: author_email='edouard.tisserant@lolitech.fr,laurent.bessard@lolitech.fr,gregory.trelat@lolitech.fr', greg@103: url='http://www.beremiz.org', greg@103: license='GPL', greg@103: data_files=data_files, # Add files to install greg@103: )