Skip to content

Commit

Permalink
1. Restore the rest of Python IDLE setup.py Rev 1.4 (Python SF 634078)
Browse files Browse the repository at this point in the history
   (Loewis) which uses 'SRCDIR' (if available) in package dir path.
2. Merge Python IDLE setup.py Rev 1.5 (Loewis) to allow installation
   from the build directory. IDLEfork SF Patch 668998 (Loewis)
  • Loading branch information
kbkaiser committed Jan 21, 2003
1 parent b3b22f3 commit 2da75fa
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Lib/idlelib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
# Name of 'package' to be installed in site-packages:
pkgname = idle_name + "lib"

pkg_dir = "."

try:
pos = sys.argv.index("--check-tkinter")
except ValueError:
Expand All @@ -23,14 +21,19 @@
print >>sys.stderr, "Cannot install IDLE without _tkinter"
raise SystemExit

try:
pkg_dir = os.path.join(os.environ['SRCDIR'], 'Tools', idle_name)
except KeyError:
pkg_dir = "."

# the normal build_py would not incorporate anything but .py files
txt_files = ['extend.txt', 'help.txt', 'CREDITS.txt', 'HISTORY.txt',
'INSTALL.txt', 'LICENSE.txt', 'NEWS.txt', 'README.txt']
txt_files += ['config-extensions.def', 'config-highlight.def',
'config-keys.def', 'config-main.def']
txt_files += [idle_name + '.bat', idle_name + '.pyw']

Icons = glob.glob1("Icons","*.gif")
Icons = glob.glob1(os.path.join(pkg_dir, "Icons"), "*.gif")

class IDLE_Builder(build_py):
def get_plain_outfile(self, build_dir, package, file):
Expand All @@ -52,7 +55,7 @@ def run(self):
[pkgname, "Icons"], name)
dir = os.path.dirname(outfile)
self.mkpath(dir)
self.copy_file(os.path.join("Icons", name),
self.copy_file(os.path.join(pkg_dir, "Icons", name),
outfile, preserve_mode = 0)

def get_source_files(self):
Expand Down

0 comments on commit 2da75fa

Please sign in to comment.