commit-gnue
[Top][All Lists]
Advanced

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

gnue/gnuef setup.cfg setup.py setup_cvs_devel.sh


From: Jason Cater
Subject: gnue/gnuef setup.cfg setup.py setup_cvs_devel.sh
Date: Wed, 30 May 2001 10:54:17 -0700

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    01/05/30 10:54:17

Modified files:
        gnuef          : setup.cfg setup.py setup_cvs_devel.sh 

Log message:
        Modified setup.py so it installs python files in /usr/local/gnue. (this 
is settable by end-user by modifying setup.cfg or specifying --prefix on the 
command line).  It also modified sh scripts by adding site-specific 
installation settings.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/setup.cfg.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/setup.py.diff?cvsroot=OldCVS&tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/setup_cvs_devel.sh.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gnue/gnuef/setup.cfg
diff -u gnue/gnuef/setup.cfg:1.2 gnue/gnuef/setup.cfg:1.3
--- gnue/gnuef/setup.cfg:1.2    Thu Jan 25 14:39:30 2001
+++ gnue/gnuef/setup.cfg        Wed May 30 10:54:17 2001
@@ -1,2 +1,46 @@
+#
+# Copyright 2001 Free Software Foundation
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+[install]
+
+
+# Where to install GNUe's application files... 
+prefix = /usr/local/gnue 
+
+# Where to install GNUe executable symlinks... 
+exec_prefix = /usr/local/bin
+
+
+
+###############################################
+#
+# We recommend you do not change anything below 
+# this line unless you know what you are doing 
+#
+###############################################
+
+install_lib=%(prefix)s/lib/python
+install_data=%(prefix)s
+install_scripts=%(exec_prefix)s
+
 [bdist_rpm]
 doc_files = README, README.curses, samples
+
Index: gnue/gnuef/setup.py
diff -u gnue/gnuef/setup.py:1.18 gnue/gnuef/setup.py:1.19
--- gnue/gnuef/setup.py:1.18    Thu May 10 09:18:02 2001
+++ gnue/gnuef/setup.py Wed May 30 10:54:17 2001
@@ -1,4 +1,25 @@
 #!/usr/bin/env python
+#
+# Copyright 2001 Free Software Foundation
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+
 import sys
 import string
 import os.path
@@ -6,6 +27,7 @@
 
 try:
   from distutils.core import setup
+  from distutils.command.build_scripts import build_scripts
   from setupext import Data_Files, install_Data_Files
 except ImportError:
   print """
@@ -27,23 +49,22 @@
   
 if 'build' in sys.argv:
   # Verify that gnue-common is installed
-  try:
-    print "Checking for GNUe Common....",
-    from gnue import common
-    if common.__dict__.has_key('VERSION'): 
-      print "OK (version %s)" % common.VERSION
-    else: 
-      print "OK"
-  except ImportError:
-    print """
-You will need to install gnue-common
-before gnuef will function.  You can
-obtain a copy from 
-
-http://gnue.org/index.cgi/downloads
-"""
-    sys.exit()
-
+#  try:
+#    print "Checking for GNUe-Common....",
+#    from gnue import common
+#    if common.__dict__.has_key('VERSION'): 
+#      print "OK (version %s)" % common.VERSION
+#    else: 
+#      print "OK"
+#  except ImportError:
+#    print """
+#You will need to install gnue-common
+#before gnuef will function.  You can
+#obtain a copy from 
+#
+#http://gnue.org/index.cgi/downloads
+#"""
+#    sys.exit()
 
   # Verify that PyXML is installed
   try:
@@ -65,7 +86,7 @@
   #
   UIOK = 0
 
-  print "Checking for avalable UI drivers...."
+  print "Checking for available UI drivers...."
   # PyNcurses 
   try: 
     print "  Pyncurses....",
@@ -87,12 +108,13 @@
   # wxPython
   try:
     print "  wxPython....",
-    from wxPython.wx import *
+#    from wxPython.wx import *
     print "OK"
     UIOK = 1
   except ImportError:
     print "No"
 
+
   if UIOK != 1:
     print """
 No valid UI drivers are installed on this machine:
@@ -102,6 +124,50 @@
 """
     sys.exit()
 
+class my_build_scripts(build_scripts): 
+  def finalize_options(self): 
+    build_scripts.finalize_options(self)
+
+    if self.finalized: 
+      return
+
+    dict = self.distribution.get_option_dict("install")
+    print dict
+
+    gnue_env = \
+           "#######\n" \
+         + "# The following variable were set when GNUe was installed\n\n" \
+         + "PYTHONLIB=%s:$PYTHONLIB\n" % dict['install_lib'][1] \
+         + "INST_GNUE_CONNECTIONS=%s/etc/connections.conf\n" % 
dict['prefix'][1] \
+         + "PYTHON=python\n" \
+         + "INSTALL_LIB=%s\n" % dict['install_lib'][1] \
+         + "INSTALL_PREFIX=%s\n" % dict['prefix'][1] \
+         + "export INST_GNUE_CONNECTIONS PYTHON INSTALL_LIB\n" \
+         + "export INSTALL_PREFIX PYTHONLIB\n" \
+         + "#######\n"
+
+    for script in self.scripts: 
+
+      fin = open(script+".in", "r")
+      fout = open(script, "w")
+
+      print "Generating script %s from %s.in" % (script,script) 
+
+      lines = fin.readlines()
+
+      for i in range(0, len(lines)): 
+        if string.strip(lines[i]) == "__GNUEENV__": 
+          lines[i] = gnue_env
+
+      fout.writelines(lines)
+
+      fin.close()
+      fout.close()
+          
+  
+              
+
+
 #
 # Verify DB driver of some sort installed
 #
@@ -112,15 +178,14 @@
   """
 
 docs = [
-    Data_Files(
-               copy_to = os.path.splitdrive(sys.prefix)[0]+'/usr/local/gnue',
-                            template = string.split(docfiles,"\n"),
-                            preserve_path = 1)
+    Data_Files( 
+               base_dir = "install_data",
+               copy_to = "doc/forms",
+               template = string.split(docfiles,"\n"),
+               preserve_path = 1)
       ]
-
-print os.path.splitdrive(sys.prefix)[0]+'/usr/local/gnue/shared',
 
-setup (name = "gnue-forms",
+setup (name = "GNUe-Forms",
        version = "0.0.7",
        description = "GNU Enterprise Forms",
        long_description = "",
@@ -128,7 +193,8 @@
        author_email = "address@hidden",
        url = "http://www.gnue.org";,
        # Override certain command classes with our own ones
-       cmdclass = {'install_data':install_Data_Files},
+       cmdclass = {'install_data':install_Data_Files, 
+                   'build_scripts':my_build_scripts},
 
        data_files = docs,
        
Index: gnue/gnuef/setup_cvs_devel.sh
diff -u gnue/gnuef/setup_cvs_devel.sh:1.3 gnue/gnuef/setup_cvs_devel.sh:1.4
--- gnue/gnuef/setup_cvs_devel.sh:1.3   Tue May 22 19:39:59 2001
+++ gnue/gnuef/setup_cvs_devel.sh       Wed May 30 10:54:17 2001
@@ -13,7 +13,7 @@
     echo "**Creating client/gfcvs**"
    (
      echo "PYTHONPATH=`pwd`/client:\$PYTHONPATH"
-     echo "`pwd`/client/gfclient \$*" 
+     echo "python `pwd`/client/gnue/forms/GFClient.py \$*" 
    ) > client/gfcvs  
 
-    echo "  ... you may want to copy client/gfcvs to /usr/local/bin"
+    echo "  ... you may want to symlink client/gfcvs to /usr/local/bin"



reply via email to

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