From d65ca7231af5b686a7bc17f5a151e697358e0e01 Mon Sep 17 00:00:00 2001 From: "Kurt B. Kaiser" Date: Mon, 16 Jul 2001 07:08:20 +0000 Subject: [PATCH] Added installation instructions. Added a patch which modifies idlefork so that it can co-exist with "official" IDLE in the site-packages directory. This patch is not necessary if only idlefork IDLE is installed. See INSTALLATION for further details. --- Lib/idlelib/INSTALLATION | 54 +++++++++++ Lib/idlelib/coexist.patch | 186 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 240 insertions(+) create mode 100644 Lib/idlelib/INSTALLATION create mode 100644 Lib/idlelib/coexist.patch diff --git a/Lib/idlelib/INSTALLATION b/Lib/idlelib/INSTALLATION new file mode 100644 index 00000000000..d9011d0acbf --- /dev/null +++ b/Lib/idlelib/INSTALLATION @@ -0,0 +1,54 @@ +IDLE Fork Installation on Linux: + +Until the tarball is released, you must download a CVS copy. An excellent +place for it is + +/usr/local/src/PythonX.X/Tools/idlefork, assuming that's where your Python +source is located. Put the correct version in for X.X . + +# cd /usr/local/src/PythonX.X/Tools + +Now do the CVS login and checkout: + +# cvs -d:pserver:anonymous@cvs.idlefork.sourceforge.net:/cvsroot/idlefork login + +Type an for the password. + +# cvs -z3 -d:pserver:anonymous@cvs.idlefork.sourceforge.net:/cvsroot/idlefork \ + -d idlefork checkout idle + +The -d option to checkout puts the files in an idlefork directory, so you don't +step on "official" idle. + +# cd idlefork +# su to root + +# python setup.py install + +# echo "idle" > /usr/local/lib/pythonX.X/site-packages.pth + +This last is necessary so idle can find itself. I hope we can create/append +this file via setup.py at some point, but it needs to be done manually now, and +it only needs to be done once (unless you totally remove and reinstall python +itself). + +# exit from root + +NOTE that the above procedure will install idlefork IDLE on top of any +"official" IDLE that may be already installed. If you wish to avoid doing +that, there is a patch file, coexist.patch, in the idlefork directory. If, +_*before*_ you install idle, you run + +# patch -p0 < coexist.patch + +idlefork will be modified so that it installs as .../site-packages/fildlelib, +idle as fidle, and idles as fidles. (If you previously installed without +patching, remove the idlefork/build directory before running the install.) + +NOTE: You must then append "fidlelib" to site-packages.pth ! + +Then "official" IDLE and idlefork IDLE will exist side by side for comparision. +And if idlefork is temporarily broken :-(, well, you have your old IDLE ways. + +This is obviously an expedient development hack, but if popular, I imagine +there could be a setup option. diff --git a/Lib/idlelib/coexist.patch b/Lib/idlelib/coexist.patch new file mode 100644 index 00000000000..85f32cd455d --- /dev/null +++ b/Lib/idlelib/coexist.patch @@ -0,0 +1,186 @@ +? coexist.diff +? fidle +? build +? install.kbk +? coexist.patch +Index: PyShell.py +=================================================================== +RCS file: /cvsroot/idlefork/idle/PyShell.py,v +retrieving revision 1.6 +diff -c -r1.6 PyShell.py +*** PyShell.py 2001/07/16 05:25:12 1.6 +--- PyShell.py 2001/07/16 05:53:22 +*************** +*** 470,476 **** + + def begin(self): + self.resetoutput() +! self.write("Python %s on %s\n%s\nIDLE Fork %s -- press F1 for help\n" % + (sys.version, sys.platform, self.COPYRIGHT, + idlever.IDLE_VERSION)) + try: +--- 470,476 ---- + + def begin(self): + self.resetoutput() +! self.write("Python %s on %s\n%s\nFIDLE Fork %s -- press F1 for help\n" % + (sys.version, sys.platform, self.COPYRIGHT, + idlever.IDLE_VERSION)) + try: +Index: setup.py +=================================================================== +RCS file: /cvsroot/idlefork/idle/setup.py,v +retrieving revision 1.4 +diff -c -r1.4 setup.py +*** setup.py 2001/07/16 04:00:10 1.4 +--- setup.py 2001/07/16 05:53:22 +*************** +*** 5,11 **** + import idlever + + # name of idle package +! idlelib = "idlelib" + + # the normal build_py would not incorporate the .txt files + txt_files = ['config-unix.txt','config-win.txt','config.txt', 'help.txt'] +--- 5,11 ---- + import idlever + + # name of idle package +! idlelib = "fidlelib" + + # the normal build_py would not incorporate the .txt files + txt_files = ['config-unix.txt','config-win.txt','config.txt', 'help.txt'] +*************** +*** 55,69 **** + + # Arghhh. install_lib thinks that all files returned from build_py's + # get_outputs are bytecode files + class idle_install_lib(install_lib): + def _bytecode_filenames(self, files): + files = [n for n in files if n.endswith('.py')] + return install_lib._bytecode_filenames(self,files) +- + +! setup(name="IDLE", + version = idlever.IDLE_VERSION, +! description = "IDLE, the Python IDE", + author = "Guido van Rossum", + author_email = "guido@python.org", + #url = +--- 55,69 ---- + + # Arghhh. install_lib thinks that all files returned from build_py's + # get_outputs are bytecode files ++ + class idle_install_lib(install_lib): + def _bytecode_filenames(self, files): + files = [n for n in files if n.endswith('.py')] + return install_lib._bytecode_filenames(self,files) + +! setup(name="FIDLE", + version = idlever.IDLE_VERSION, +! description = "FIDLE, the Forked Python IDE", + author = "Guido van Rossum", + author_email = "guido@python.org", + #url = +*************** +*** 71,81 **** + """IDLE is a Tkinter based IDE for Python. It is written in 100% pure + Python and works both on Windows and Unix. It features a multi-window + text editor with multiple undo, Python colorizing, and many other things, +! as well as a Python shell window and a debugger.""", + + cmdclass = {'build_py':idle_build_py, + 'install_lib':idle_install_lib}, + package_dir = {idlelib:'.'}, + packages = [idlelib], +! scripts = ['idle', 'idles'] + ) +--- 71,86 ---- + """IDLE is a Tkinter based IDE for Python. It is written in 100% pure + Python and works both on Windows and Unix. It features a multi-window + text editor with multiple undo, Python colorizing, and many other things, +! as well as a Python shell window and a debugger. +! +! FIDLE is a separate line of development which was initiated by D. Scherer +! at CMU as part of Visual Python. It features execution in a separate +! process, with a fresh environment for each run. For further details, +! refer to idlefork.sourceforge.net.""", + + cmdclass = {'build_py':idle_build_py, + 'install_lib':idle_install_lib}, + package_dir = {idlelib:'.'}, + packages = [idlelib], +! scripts = ['fidle', 'fidles'] + ) +*** /dev/null Tue May 5 16:32:27 1998 +--- fidle Sat Jul 14 12:40:25 2001 +*************** +*** 0 **** +--- 1,12 ---- ++ #! /usr/bin/env python ++ ++ import os ++ import sys ++ from fidlelib import IdleConf ++ ++ idle_dir = os.path.dirname(IdleConf.__file__) ++ IdleConf.load(idle_dir) ++ ++ # defer importing Pyshell until IdleConf is loaded ++ from fidlelib import PyShell ++ PyShell.main() +*** idle Sat Jul 14 12:40:36 2001 +--- /dev/null Tue May 5 16:32:27 1998 +*************** +*** 1,12 **** +- #! /usr/bin/env python +- +- import os +- import sys +- from idlelib import IdleConf +- +- idle_dir = os.path.dirname(IdleConf.__file__) +- IdleConf.load(idle_dir) +- +- # defer importing Pyshell until IdleConf is loaded +- from idlelib import PyShell +- PyShell.main() +--- 0 ---- +*** /dev/null Tue May 5 16:32:27 1998 +--- fidles Mon Jul 16 02:25:48 2001 +*************** +*** 0 **** +--- 1,13 ---- ++ #! /usr/bin/env python ++ ++ import os ++ import sys ++ from fidlelib import IdleConf ++ ++ idle_dir = os.path.dirname(IdleConf.__file__) ++ IdleConf.load(idle_dir) ++ ++ # defer importing Pyshell until IdleConf is loaded ++ from fidlelib import PyShell ++ # open a shell instead of an editor window ++ PyShell.main(0) +*** idles Mon Jul 16 02:27:23 2001 +--- /dev/null Tue May 5 16:32:27 1998 +*************** +*** 1,13 **** +- #! /usr/bin/env python +- +- import os +- import sys +- from idlelib import IdleConf +- +- idle_dir = os.path.dirname(IdleConf.__file__) +- IdleConf.load(idle_dir) +- +- # defer importing Pyshell until IdleConf is loaded +- from idlelib import PyShell +- # open a shell instead of an editor window +- PyShell.main(0) +--- 0 ----