commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue-common ./setup.py scripts/.cvsignore scrip...


From: Reinhard Mueller
Subject: gnue-common ./setup.py scripts/.cvsignore scrip...
Date: Mon, 29 Sep 2003 08:23:59 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue-common
Branch:         
Changes by:     Reinhard Mueller <address@hidden>       03/09/29 08:23:57

Modified files:
        .              : setup.py 
        scripts        : .cvsignore 
Added files:
        scripts        : gnue-schema 
Removed files:
        scripts        : gnue-schema.in 

Log message:
        Scripts are no longer generated at install time. Manpages are only 
generated on
        posix systems.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/setup.py.diff?tr1=1.75&tr2=1.76&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/scripts/gnue-schema?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/scripts/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: gnue-common/scripts/.cvsignore
diff -c gnue-common/scripts/.cvsignore:1.1 gnue-common/scripts/.cvsignore:1.2
*** gnue-common/scripts/.cvsignore:1.1  Tue May 21 01:33:10 2002
--- gnue-common/scripts/.cvsignore      Mon Sep 29 08:23:56 2003
***************
*** 1,36 ****
- *.lo
- *.bak
- *.pyc
- .deps
- .libs
- _libs
- Makefile
- Makefile.in
- aclocal.m4
- config.cache
- config.guess
- config.h
- config.h.in
- config.h.win32
- config.log
- config.status
- config.sub
- configure
- configure.scan
- libtool
- ltconfig
- ltmain.sh
- stamp-h
- stamp-h.in
- stamp.h
- version.h
- config.h.in
- .exrc
- install-sh
- missing
- mkinstalldirs
- ABOUT-NLS
- build
- setup.cfg
  grpcdoc
  gtestcvs
--- 1,2 ----
Index: gnue-common/setup.py
diff -c gnue-common/setup.py:1.75 gnue-common/setup.py:1.76
*** gnue-common/setup.py:1.75   Sat Sep 27 19:23:01 2003
--- gnue-common/setup.py        Mon Sep 29 08:23:55 2003
***************
*** 78,87 ****
                               'prune translations/CVS'],
                   preserve_path = 1),
       Data_Files (base_dir = 'install_data',
-                  copy_to = 'share/man/man1',
-                  template = ['recursive-include man *.1'],
-                  preserve_path = 0),
-      Data_Files (base_dir = 'install_data',
                   copy_to = 'share/doc/gnue-common',
                   template = ['recursive-include doc *',
                               'prune doc/CVS',
--- 78,83 ----
***************
*** 96,115 ****
  # 
-----------------------------------------------------------------------------
  
  def build_files ():
-   # First check if we have everything installed we need to build the
-   # distribution
  
!   # is gsscvs available (to build man pages)?
!   if not os.path.isfile ("scripts/gsscvs"):
!     print "Could not find file 'scripts/gsscvs'.  Please run 'setup-cvs.py'."
!     sys.exit (1)
! 
!   # 
---------------------------------------------------------------------------
! 
!   print "building man page"
!   if os.system ("mkdir -p man && cd man " \
!                  + " && ../scripts/gsscvs --generate-man-page") != 0:
!     sys.exit (1)
  
  # 
-----------------------------------------------------------------------------
  # Check dependencies for installation:
--- 92,100 ----
  # 
-----------------------------------------------------------------------------
  
  def build_files ():
  
!   # nothing to do here
!   pass
  
  # 
-----------------------------------------------------------------------------
  # Check dependencies for installation:
***************
*** 132,137 ****
--- 117,123 ----
  import distutils.command.sdist
  import distutils.command.build
  import distutils.command.install
+ import distutils.command.install_scripts
  from setupext import Data_Files, install_Data_Files
  
  # 
-----------------------------------------------------------------------------
***************
*** 180,186 ****
  except ValueError:
    pass
  
! if (sys.platform != "win32" and not have_prefix and "install" in sys.argv) \
     or have_setupcfg:
    os.system ("cp %s setup.cfg" % setupcfg)
  else:
--- 166,172 ----
  except ValueError:
    pass
  
! if (os.name == "posix" and not have_prefix and "install" in sys.argv) \
     or have_setupcfg:
    os.system ("cp %s setup.cfg" % setupcfg)
  else:
***************
*** 370,376 ****
    def run (self):
      check_dependencies ()
  
!     self._generate_scripts ()
  
      self._write_gnue_pth ()
  
--- 356,362 ----
    def run (self):
      check_dependencies ()
  
!     # self._generate_scripts ()
  
      self._write_gnue_pth ()
  
***************
*** 378,383 ****
--- 364,391 ----
  
      distutils.command.install.install.run (self)
  
+ # 
=============================================================================
+ # install_scripts: Generate man pages after installing
+ # 
=============================================================================
+ 
+ class install_scripts (distutils.command.install_scripts.install_scripts):
+ 
+   def run (self):
+     distutils.command.install_scripts.install_scripts.run (self)
+ 
+     if os.name == "posix":
+       instcmd = self.get_finalized_command ("install")
+       man1dir = os.path.join (instcmd.install_data, "share", "man", "man1")
+       if not os.path.isdir (man1dir):
+         os.makedirs (man1dir)
+       olddir = os.getcwd ()
+       os.chdir (man1dir)
+       for script in self.get_outputs ():
+         print "building man page for %s" % os.path.basename (script)
+         os.system ("PYTHONPATH=" + instcmd.install_lib + " " + \
+                    script + " --generate-man-page")
+       os.chdir (olddir)
+ 
  # 
-----------------------------------------------------------------------------
  # Get all packages in a directory
  # 
-----------------------------------------------------------------------------
***************
*** 434,441 ****
         data_files       = setup_params ["data_files"],
  
         # Override certain command classes with our own ones
!        cmdclass = {"build": build,
                     "install": install,
                     "install_data": install_Data_Files})
  
  # 
-----------------------------------------------------------------------------
--- 442,451 ----
         data_files       = setup_params ["data_files"],
  
         # Override certain command classes with our own ones
!        cmdclass = {"sdist": sdist,
!                    "build": build,
                     "install": install,
+                    "install_scripts": install_scripts,
                     "install_data": install_Data_Files})
  
  # 
-----------------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]