Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2206cd1

Browse files
committed
Properly find and install icons even if calling setup.py from the build dir.
1 parent 6f2adc7 commit 2206cd1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Tools/idle/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
# the normal build_py would not incorporate the .txt files
2828
txt_files = ['config-unix.txt','config-win.txt','config.txt', 'help.txt']
29-
Icons = glob.glob1("Icons","*.gif")
29+
Icons = glob.glob1(os.path.join(package_dir,"Icons"),"*.gif")
3030
class idle_build_py(build_py):
3131
def get_plain_outfile(self, build_dir, package, file):
3232
# like get_module_outfile, but does not append .py
@@ -48,7 +48,7 @@ def run(self):
4848
[idlelib,"Icons"], name)
4949
dir = os.path.dirname(outfile)
5050
self.mkpath(dir)
51-
self.copy_file(os.path.join("Icons",name),
51+
self.copy_file(os.path.join(package_dir, "Icons", name),
5252
outfile, preserve_mode = 0)
5353

5454
def get_source_files(self):

0 commit comments

Comments
 (0)