setup.py
author etisserant
Tue, 19 Feb 2008 14:52:40 +0100
changeset 401 2c90876b9751
parent 358 4630ccf4932a
permissions -rwxr-xr-x
Fixed segfault on quit with Xenomai, due to bat parameter type in waitReceiveTaskEnd.
358
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
     1
import os,sys
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
     2
from distutils.core import setup
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
     3
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
     4
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
     5
install_dir=os.path.join("LOLITech","CanFestival-3")
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
     6
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
     7
data_files=[]
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
     8
os.getcwd()
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
     9
os.chdir(os.getcwd())
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    10
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    11
def generate(base_dir):
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    12
    listfile=[]
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    13
    if base_dir == "":
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    14
        directory = "."
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    15
    else:
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    16
        directory = base_dir
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    17
    data_files.append((os.path.join(install_dir, base_dir), listfile))
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    18
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    19
    for element in os.listdir(directory):
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    20
        element_path=os.path.join(base_dir, element)
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    21
        if os.path.isdir(element_path):
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    22
            generate(element_path)
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    23
        elif os.path.isfile(element_path):
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    24
            ext_element=os.path.splitext(element)
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    25
            if ext_element[1] != ".o" and ext_element[1] != ".pyc":
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    26
                listfile.append(element_path)
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    27
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    28
generate("")
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    29
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    30
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    31
setup(name='CanFestival-3', # Name of the executable
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    32
      version='0.1', # Version
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    33
      description='Open-Source CanOpen Stack', #description
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    34
      author='Edouard Tisserant, Laurent Bessard',
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    35
      author_email='edouard.tisserant.lolitech.fr, laurent.bessard@lolitech.fr',
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    36
      url='http://www.canfestival.org',
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    37
      license='GPL',
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    38
      scripts=['objdictedit_postinst.py'],
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    39
      data_files=data_files, # Add files to install
4630ccf4932a add setup.py and objdictedit_postinst.py to build windows installer
greg
parents:
diff changeset
    40
)