commit-gnue
[Top][All Lists]
Advanced

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

gnue/gnuef README setup.py setup_cvs_devel.sh


From: James Thompson
Subject: gnue/gnuef README setup.py setup_cvs_devel.sh
Date: Tue, 05 Jun 2001 22:16:55 -0700

CVSROOT:        /cvs
Module name:    gnue
Changes by:     James Thompson <address@hidden> 01/06/05 22:16:55

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

Log message:
        Moved functionality of setup_cvs_devel.sh into setup.py
        Called via setup.py devel

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/README.diff?cvsroot=OldCVS&tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/setup.py.diff?cvsroot=OldCVS&tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/setup_cvs_devel.sh.diff?cvsroot=OldCVS&tr1=1.10&tr2=1.11&r1=text&r2=text

Patches:
Index: gnue/gnuef/README
diff -u gnue/gnuef/README:1.17 gnue/gnuef/README:1.18
--- gnue/gnuef/README:1.17      Fri May 25 01:17:10 2001
+++ gnue/gnuef/README   Tue Jun  5 22:16:55 2001
@@ -43,7 +43,7 @@
 To use without installing (or run newer code w/o overwriting
                            existing install)
 
-  run ./setup_cvs_devel.sh from the top gnuef directory.
+  run ./setup.py devel 
 
   This allows you to keep both an installed version on the
   system for production use while allowing you to use your 
Index: gnue/gnuef/setup.py
diff -u gnue/gnuef/setup.py:1.20 gnue/gnuef/setup.py:1.21
--- gnue/gnuef/setup.py:1.20    Wed May 30 11:00:52 2001
+++ gnue/gnuef/setup.py Tue Jun  5 22:16:55 2001
@@ -22,9 +22,82 @@
 
 import sys
 import string
+import os
 import os.path
 
+def developer_install():
+  pwd = os.getcwd()
+  gfcvs = """     
+     if [ "z$GNUE_CONNECTIONS" = "z" ]
+      then
+       if [ -f /usr/local/gnue/etc/connections.conf ]
+       then
+         GNUE_CONNECTIONS=/usr/local/gnue/etc/connections.conf
+         export GNUE_CONNECTIONS
+       fi
+     fi
+     if [ "z$INSTALL_PREFIX" = "z" ]
+     then
+       INSTALL_PREFIX=/usr/local/gnue/
+       export INSTALL_PREFIX
+     fi
+     PYTHONPATH=%s/.cvsdevelbase:$PYTHONPATH; export PYTHONPATH
+     python %s/.cvsdevelbase/gnue/forms/GFClient.py $*
+  """ % (pwd, pwd)
+
+  gfdes = """
+  if [ "z$GNUE_CONNECTIONS" = "z" ]
+  then
+    GNUE_CONNECTIONS=/usr/local/gnue/etc/connections.conf
+    export GNUE_CONNECTIONS
+  fi
+  PYTHONPATH=%s/.cvsdevelbase:$PYTHONPATH; export PYTHONPATH
+  python %s/.cvsdevelbase/gnue/forms/designer/GFDesigner.py $*
+  )
+  """  % (pwd, pwd)
+
+  if os.path.isdir('.cvsdevelbase'):
+    os.system ('rm -rf .cvsdevelbase')
+
+  os.makedirs('.cvsdevelbase/gnue/forms')
+  os.system ("""
+    cd .cvsdevelbase/gnue
+    ln -s ../../src/__init__.py .
+    ln -s ../../../gnue-common/gnue/common common
+    ln -s ../../../gnue-reports/src reports
+    cd forms
+    ln -s ../../../src/* .
+    ln -s ../../../designer/src designer
+  """)
+
+  print "Creating client/gfcvs"
+  file = open('client/gfcvs','w')
+  file.write(gfcvs)
+  file.close
+  os.system ('chmod 700 client/gfcvs')
+  
+  print "Creating designer/gfdes"
+  file = open('designer/gfdes','w')
+  file.write(gfdes)
+  file.close
+  os.system('chmod 700 designer/gfdes')
+
+  if not os.path.islink('/usr/local/bin/gfcvs') or not 
os.path.islink('/usr/local/bin/gfdes'):
+    print "We will now create symlinks to client/gfcvs and designer/gfdes in 
/usr/local/bin"
+    print "You will be prompted for the root password on the machine to do 
this."
+    raw_input ("Press Control-D to abort or any other key to continue")
+
+    string = 'su -c "ln -s `pwd`/client/gfcvs /usr/local/bin/gfcvs;ln -s 
`pwd`/designer/gfdes /usr/local/bin/gfdes"'
+    os.system(string)
+
+  sys.exit()
+
 
+# bypass the install for devel installs
+if 'devel' in sys.argv:
+  developer_install()
+
+
 try:
   from distutils.core import setup
   from distutils.command.build_scripts import build_scripts
@@ -203,4 +276,6 @@
        package_dir = {"gnue.forms" : "src"},
        scripts = ["client/gfclient"]
        )
+
+
 
Index: gnue/gnuef/setup_cvs_devel.sh
diff -u gnue/gnuef/setup_cvs_devel.sh:1.10 gnue/gnuef/setup_cvs_devel.sh:1.11
--- gnue/gnuef/setup_cvs_devel.sh:1.10  Mon Jun  4 20:25:23 2001
+++ gnue/gnuef/setup_cvs_devel.sh       Tue Jun  5 22:16:55 2001
@@ -1,5 +1,7 @@
 #!/bin/sh
-
+#
+# This script is obsolete.  See the setup.py file for the new one
+#
 if test -d .cvsdevelbase
 then 
  rm -rf .cvsdevelbase



reply via email to

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