Update of /cvsroot/python/python/dist/src/Tools/idle In directory usw-pr-cvs1:/tmp/cvs-serv5208/Tools/idle Modified Files: setup.py Log Message: Add --check-tkinter to setup.py. Install IDLE. Fixes #634078. Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/idle/setup.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** setup.py 8 Aug 2001 20:26:14 -0000 1.3 --- setup.py 6 Nov 2002 21:59:33 -0000 1.4 *************** *** 1,3 **** ! import os,glob from distutils.core import setup from distutils.command.build_py import build_py --- 1,3 ---- ! import os, glob, sys from distutils.core import setup from distutils.command.build_py import build_py *************** *** 5,8 **** --- 5,25 ---- import idlever + try: + pos = sys.argv.index("--check-tkinter") + except ValueError: + pass + else: + del sys.argv[pos] + try: + import _tkinter + except ImportError: + print >>sys.stderr, "Cannot install IDLE without _tkinter" + raise SystemExit + + try: + package_dir = os.path.join(os.environ["SRCDIR"], "Tools", "idle") + except KeyError: + package_dir = "." + # name of idle package idlelib = "idlelib" *************** *** 25,29 **** dir = os.path.dirname(outfile) self.mkpath(dir) ! self.copy_file(name, outfile, preserve_mode = 0) for name in Icons: outfile = self.get_plain_outfile(self.build_lib, --- 42,47 ---- dir = os.path.dirname(outfile) self.mkpath(dir) ! self.copy_file(os.path.join(package_dir, name), outfile, ! preserve_mode = 0) for name in Icons: outfile = self.get_plain_outfile(self.build_lib, *************** *** 36,40 **** def get_source_files(self): # returns the .py files, the .txt files, and the icons ! icons = [os.path.join("Icons",name) for name in Icons] return build_py.get_source_files(self)+txt_files+icons --- 54,59 ---- def get_source_files(self): # returns the .py files, the .txt files, and the icons ! icons = [os.path.join(package_dir, "Icons",name) for name in Icons] ! txts = [os.path.join(package_dir, name) for name in txt_files] return build_py.get_source_files(self)+txt_files+icons *************** *** 76,81 **** cmdclass = {'build_py':idle_build_py, 'install_lib':idle_install_lib}, ! package_dir = {idlelib:'.'}, packages = [idlelib], ! scripts = ['idle'] ) --- 95,100 ---- cmdclass = {'build_py':idle_build_py, 'install_lib':idle_install_lib}, ! package_dir = {idlelib: package_dir}, packages = [idlelib], ! scripts = [os.path.join(package_dir, 'idle')] )
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4