author | lbessard |
Tue, 07 Oct 2008 14:33:52 +0200 | |
changeset 147 | f34f9084a20e |
parent 104 | 340b858bf93e |
permissions | -rwxr-xr-x |
103 | 1 |
import os,sys |
2 |
from distutils.core import setup |
|
3 |
||
4 |
install_dir=os.path.join("LOLITech","matiec") |
|
5 |
||
6 |
data_files=[] |
|
7 |
os.getcwd() |
|
8 |
os.chdir(os.getcwd()) |
|
9 |
||
10 |
def generate(base_dir): |
|
11 |
listfile=[] |
|
12 |
if base_dir == "": |
|
13 |
directory = "." |
|
14 |
else: |
|
15 |
directory = base_dir |
|
16 |
data_files.append((os.path.join(install_dir, base_dir), listfile)) |
|
17 |
||
18 |
for element in os.listdir(directory): |
|
19 |
element_path=os.path.join(base_dir, element) |
|
20 |
if os.path.isdir(element_path): |
|
104
340b858bf93e
changes in setup.py to filter "exe" files and the and the "lib" directory
greg
parents:
103
diff
changeset
|
21 |
basename_element=os.path.basename(element_path) |
340b858bf93e
changes in setup.py to filter "exe" files and the and the "lib" directory
greg
parents:
103
diff
changeset
|
22 |
if basename_element == "lib": |
340b858bf93e
changes in setup.py to filter "exe" files and the and the "lib" directory
greg
parents:
103
diff
changeset
|
23 |
generate(element_path) |
103 | 24 |
elif os.path.isfile(element_path): |
104
340b858bf93e
changes in setup.py to filter "exe" files and the and the "lib" directory
greg
parents:
103
diff
changeset
|
25 |
ext_element=os.path.splitext(element) |
340b858bf93e
changes in setup.py to filter "exe" files and the and the "lib" directory
greg
parents:
103
diff
changeset
|
26 |
if ext_element[1] == ".exe" or ext_element[1] == ".h" or ext_element[1] == ".txt" or ext_element[1] == ".c": |
340b858bf93e
changes in setup.py to filter "exe" files and the and the "lib" directory
greg
parents:
103
diff
changeset
|
27 |
listfile.append(element_path) |
103 | 28 |
|
29 |
generate("") |
|
30 |
||
31 |
setup(name='MatIEC', |
|
32 |
version='0.1', |
|
33 |
description='IEC to C Compiler', |
|
34 |
author='Mario de Sousa, Edouard Tisserant, Laurent Bessard', |
|
35 |
author_email='edouard.tisserant@lolitech.fr,laurent.bessard@lolitech.fr,gregory.trelat@lolitech.fr', |
|
36 |
url='http://www.beremiz.org', |
|
37 |
license='GPL', |
|
38 |
data_files=data_files, # Add files to install |
|
39 |
) |