]> granicus.if.org Git - python/commitdiff
Properly find and install icons even if calling setup.py from the build dir.
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 16 Jan 2003 11:03:33 +0000 (11:03 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 16 Jan 2003 11:03:33 +0000 (11:03 +0000)
Tools/idle/setup.py

index 71549a865002701bcf805b90027aa83821a07998..b96909244b6c83be83e4c7cdde9fdae4c18c1afe 100644 (file)
@@ -26,7 +26,7 @@ idlelib = "idlelib"
 
 # the normal build_py would not incorporate the .txt files
 txt_files = ['config-unix.txt','config-win.txt','config.txt', 'help.txt']
-Icons = glob.glob1("Icons","*.gif")
+Icons = glob.glob1(os.path.join(package_dir,"Icons"),"*.gif")
 class idle_build_py(build_py):
     def get_plain_outfile(self, build_dir, package, file):
         # like get_module_outfile, but does not append .py
@@ -48,7 +48,7 @@ class idle_build_py(build_py):
                                              [idlelib,"Icons"], name)
             dir = os.path.dirname(outfile)
             self.mkpath(dir)
-            self.copy_file(os.path.join("Icons",name),
+            self.copy_file(os.path.join(package_dir, "Icons", name),
                            outfile, preserve_mode = 0)
 
     def get_source_files(self):