summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2003-01-21 04:42:50 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2003-01-21 04:42:50 (GMT)
commit2da75faa871a1f8b7389c41319e1a1d3926b9852 (patch)
tree8be8c1cd1415dc3b2737fede2934ac86bb5e6ed0
parentb3b22f3a299c6549724519be53cddff6734bcc1a (diff)
downloadcpython-2da75faa871a1f8b7389c41319e1a1d3926b9852.zip
cpython-2da75faa871a1f8b7389c41319e1a1d3926b9852.tar.gz
cpython-2da75faa871a1f8b7389c41319e1a1d3926b9852.tar.bz2
1. Restore the rest of Python IDLE setup.py Rev 1.4 (Python SF 634078)
(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)
-rw-r--r--Lib/idlelib/setup.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/idlelib/setup.py b/Lib/idlelib/setup.py
index 060f8ff..4269273 100644
--- a/Lib/idlelib/setup.py
+++ b/Lib/idlelib/setup.py
@@ -9,8 +9,6 @@ idle_name = "idle"
# Name of 'package' to be installed in site-packages:
pkgname = idle_name + "lib"
-pkg_dir = "."
-
try:
pos = sys.argv.index("--check-tkinter")
except ValueError:
@@ -23,6 +21,11 @@ else:
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']
@@ -30,7 +33,7 @@ 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):
@@ -52,7 +55,7 @@ class IDLE_Builder(build_py):
[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):