changes in setup.py to filter "exe" files and the and the "lib" directory
authorgreg
Wed, 16 Jan 2008 17:03:29 +0100
changeset 104 340b858bf93e
parent 103 c4488f56aca1
child 105 7d138444b832
changes in setup.py to filter "exe" files and the and the "lib" directory
setup.py
--- a/setup.py	Tue Jan 15 10:53:18 2008 +0100
+++ b/setup.py	Wed Jan 16 17:03:29 2008 +0100
@@ -18,9 +18,13 @@
     for element in os.listdir(directory):
         element_path=os.path.join(base_dir, element)
         if os.path.isdir(element_path):
-            generate(element_path)
+            basename_element=os.path.basename(element_path)
+            if basename_element == "lib":
+                generate(element_path)
         elif os.path.isfile(element_path):
-            listfile.append(element_path)
+            ext_element=os.path.splitext(element)
+            if ext_element[1] == ".exe" or ext_element[1] == ".h" or ext_element[1] == ".txt" or ext_element[1] == ".c":
+                listfile.append(element_path)
 
 generate("")