[Idle-dev] CVS: idle MANIFEST.in,1.1,1.2 PyShell.py,1.43,1.44 idlever.py,1.6,1.7 setup.py,1.9,1.10

Kurt B. Kaiser kbk@users.sourceforge.net
Sun, 22 Dec 2002 19:31:51 -0800


Update of /cvsroot/idlefork/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv12963

Modified Files:
	MANIFEST.in PyShell.py idlever.py setup.py 
Log Message:
M MANIFEST.in
M PyShell.py
M idlever.py
M setup.py

1. Update MANIFEST.in to include all non-pure Python files
2. PyShell and idlever reflect Rev 0.9a0
3. setup.py modified to install IDLE as a collection of modules with
   a .pth file living at the idlelib level in site-packages.  This was
   done to make it easier to run from the source directory prior to
   installing IDLE.  This approach may change back to the package
   technique depending on what happens with the Mac installation
   development.


Index: MANIFEST.in
===================================================================
RCS file: /cvsroot/idlefork/idle/MANIFEST.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** MANIFEST.in	30 Nov 2002 17:51:41 -0000	1.1
--- MANIFEST.in	23 Dec 2002 03:31:49 -0000	1.2
***************
*** 1,2 ****
--- 1,9 ----
+ # Many of these entries are unnecessary because of the extra file copying
+ # built into IDLE's setup.py.  However, if that should change, they may
+ # become necessary and meanwhile do no harm.
+ include *.bat
+ include *.def
+ include *.gif
+ include *.pyw
  include *.txt
  include idle

Index: PyShell.py
===================================================================
RCS file: /cvsroot/idlefork/idle/PyShell.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** PyShell.py	21 Dec 2002 21:39:11 -0000	1.43
--- PyShell.py	23 Dec 2002 03:31:49 -0000	1.44
***************
*** 800,804 ****
      def begin(self):
          self.resetoutput()
!         self.write("Python %s on %s\n%s\nGRPC IDLE Fork %s\n" %
                     (sys.version, sys.platform, self.COPYRIGHT,
                      idlever.IDLE_VERSION))
--- 800,804 ----
      def begin(self):
          self.resetoutput()
!         self.write("Python %s on %s\n%s\nIDLEfork %s\n" %
                     (sys.version, sys.platform, self.COPYRIGHT,
                      idlever.IDLE_VERSION))

Index: idlever.py
===================================================================
RCS file: /cvsroot/idlefork/idle/idlever.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** idlever.py	14 Sep 2002 04:24:43 -0000	1.6
--- idlever.py	23 Dec 2002 03:31:49 -0000	1.7
***************
*** 1 ****
! IDLE_VERSION = "0.8.9"
--- 1 ----
! IDLE_VERSION = "0.9a0"

Index: setup.py
===================================================================
RCS file: /cvsroot/idlefork/idle/setup.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** setup.py	22 Dec 2002 01:48:28 -0000	1.9
--- setup.py	23 Dec 2002 03:31:49 -0000	1.10
***************
*** 7,10 ****
--- 7,19 ----
  idle_name = "idle"
  
+ # IDLE not being imported as a package by its script.  It is now being
+ # installed as a collection of modules in a directory in .../site-packages/,
+ # with a .pth file which will add IDLE to sys.path
+ 
+ # Name of 'package' to be installed in site-packages:
+ pkgname = idle_name + "lib"
+ 
+ pkg_dir = "."
+ 
  try:
      pos = sys.argv.index("--check-tkinter")
***************
*** 19,43 ****
          raise SystemExit
  
! try:
!     package_dir = os.path.join(os.environ["SRCDIR"], "Tools", idle_name)
! except KeyError:
!     package_dir = "."
! 
! # name of package to be installed in site-packages
! pkgname = idle_name + "lib"
! 
! # the normal build_py would not incorporate the .txt or config files
! txt_files = ['extend.txt', 'help.txt', 'CREDITS.txt', 'LICENSE.txt']
  txt_files += ['config-extensions.def', 'config-highlight.def',
                'config-keys.def', 'config-main.def']
! Icons = glob.glob1("Icons","*.gif")
! 
! # Create a .pth file to live in site-packages; Python will add IDLE to
! # sys.path:
  
! pathfile = idle_name + ".pth"
! pfile = open(pathfile, 'w')
! pfile.write(pkgname +'\n')
! pfile.close()
  
  class IDLE_Builder(build_py):
--- 28,39 ----
          raise SystemExit
  
! # the normal build_py would not incorporate anything but .py files
! txt_files = ['extend.txt', 'help.txt', 'CREDITS.txt', 'LICENSE.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")
  
  class IDLE_Builder(build_py):
***************
*** 50,78 ****
          # Copies all .py files, then also copies the txt and gif files
          build_py.run(self)
-         assert self.packages == [pkgname]
          for name in txt_files:
!             outfile = self.get_plain_outfile(self.build_lib, [pkgname], name)
              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,
!                                              [pkgname, "Icons"], name)
              dir = os.path.dirname(outfile)
              self.mkpath(dir)
              self.copy_file(os.path.join("Icons", name),
                             outfile, preserve_mode = 0)
-         # Copy the .pth file to the same level as the package directory
-         outfile = self.get_plain_outfile(self.build_lib, [], pathfile)
-         dir = os.path.dirname(outfile)
-         self.mkpath(dir)
-         self.copy_file(os.path.join(package_dir, pathfile), outfile,
-                        preserve_mode=0)
  
      def get_source_files(self):
          # returns the .py files, the .txt and .def 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
  
--- 46,67 ----
          # Copies all .py files, then also copies the txt and gif files
          build_py.run(self)
          for name in txt_files:
!             outfile = self.get_plain_outfile(self.build_lib, [], name)
              dir = os.path.dirname(outfile)
              self.mkpath(dir)
!             self.copy_file(os.path.join(pkg_dir, name), outfile,
                             preserve_mode = 0)
          for name in Icons:
              outfile = self.get_plain_outfile(self.build_lib,
!                                              ["Icons"], name)
              dir = os.path.dirname(outfile)
              self.mkpath(dir)
              self.copy_file(os.path.join("Icons", name),
                             outfile, preserve_mode = 0)
  
      def get_source_files(self):
          # returns the .py files, the .txt and .def files, and the icons
!         icons = [os.path.join(pkg_dir, "Icons",name) for name in Icons]
!         txts = [os.path.join(pkg_dir, name) for name in txt_files]
          return build_py.get_source_files(self) + txt_files + icons
  
***************
*** 83,92 ****
              return outputs
          for name in txt_files:
!             filename = self.get_plain_outfile(self.build_lib,
!                                               [pkgname], name)
              outputs.append(filename)
          for name in Icons:
              filename = self.get_plain_outfile(self.build_lib,
!                                               [pkgname, "Icons"], name)
              outputs.append(filename)
          return outputs
--- 72,80 ----
              return outputs
          for name in txt_files:
!             filename = self.get_plain_outfile(self.build_lib, [], name)
              outputs.append(filename)
          for name in Icons:
              filename = self.get_plain_outfile(self.build_lib,
!                                               ["Icons"], name)
              outputs.append(filename)
          return outputs
***************
*** 105,131 ****
        author = "Guido van Rossum et. al.",
        author_email = "idle-dev@python.org",
-       maintainer = "Kurt B. Kaiser",
-       maintainer_email = "kbk@shore.net",
        license = "PSF: www.python.org",
        url = "https://sourceforge.net/projects/idlefork/",
        long_description =
! """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.
! 
! IDLEfork 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
! which is newly initiated for each run.  At version 0.9 the RPC was changed to
! incorporate code by GvR, which supports the debugger.  IDLEfork also
! incorporates a GUI configuration utilility.  For further details, refer to
! idlefork.sourceforge.net.
! 
  """,
  
        cmdclass = {'build_py':IDLE_Builder,
                    'install_lib':IDLE_Installer},
!       package_dir = {pkgname: package_dir},
!       packages = [pkgname],
!       scripts = [os.path.join(package_dir, idle_name)]
        )
--- 93,117 ----
        author = "Guido van Rossum et. al.",
        author_email = "idle-dev@python.org",
        license = "PSF: www.python.org",
        url = "https://sourceforge.net/projects/idlefork/",
        long_description =
! """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.
! 
! IDLEfork 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 which is newly initiated for each run.  At version 0.9
! the RPC was changed to incorporate code by GvR, which supports the
! debugger.  IDLEfork also incorporates a GUI configuration utilility.
! For further details, refer to idlefork.sourceforge.net.
  """,
  
        cmdclass = {'build_py':IDLE_Builder,
                    'install_lib':IDLE_Installer},
!       package_dir = {pkgname: pkg_dir},
!       extra_path = pkgname,
!       py_modules = [f.split('.')[0] for f in glob.glob("*.py")],
!       scripts = [os.path.join(pkg_dir, idle_name)]
        )