setup.py
author greg
Mon, 18 May 2009 07:58:41 +0200
changeset 345 a3520d75a722
parent 85 af97c60e759c
permissions -rwxr-xr-x
get the WaitPythonCommands return (semaphore error code) to quit python_iterator loop when semaphore is destroyed
85
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
     1
import os,sys,glob
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
     2
from distutils.core import setup
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
     3
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
     4
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
     5
install_dir=os.path.join("LOLITech","beremiz")
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
     6
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
     7
data_files=[]
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
     8
os.getcwd()
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
     9
os.chdir(os.getcwd())
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    10
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    11
def generate(base_dir):
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    12
    listfile=[]
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    13
    if base_dir == "":
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    14
        directory = "."
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    15
    else:
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    16
        directory = base_dir
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    17
    data_files.append((os.path.join(install_dir, base_dir), listfile))
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    18
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    19
    for element in os.listdir(directory):
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    20
        element_path=os.path.join(base_dir, element)
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    21
        if os.path.isdir(element_path):
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    22
            generate(element_path)
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    23
        elif os.path.isfile(element_path):
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    24
            listfile.append(element_path)
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    25
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    26
generate("")
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    27
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    28
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    29
setup(name='Beremiz',
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    30
      version='0.1',
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    31
      description='Open Source framework for automation',
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    32
      author='Edouard Tisserant, Laurent Bessard',
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    33
      author_email='edouard.tisserant@lolitech.fr,laurent.bessard@lolitech.fr,gregory.trelat@lolitech.fr',
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    34
      url='http://www.beremiz.org',
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    35
      license='GPL',
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    36
      windows=["Beremiz.py"],
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    37
      scripts=['beremiz_postinst.py'],
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    38
      data_files=data_files, # Add files to install
af97c60e759c add setup.py and beremiz_postinst.py to build windows installer
greg
parents:
diff changeset
    39
)