[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue-common setup.py
From: |
Reinhard Mueller |
Subject: |
gnue-common setup.py |
Date: |
Mon, 29 Sep 2003 11:11:42 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue-common
Branch:
Changes by: Reinhard Mueller <address@hidden> 03/09/29 11:11:42
Modified files:
. : setup.py
Log message:
_generate_scripts is no longer needed.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/setup.py.diff?tr1=1.80&tr2=1.81&r1=text&r2=text
Patches:
Index: gnue-common/setup.py
diff -c gnue-common/setup.py:1.80 gnue-common/setup.py:1.81
*** gnue-common/setup.py:1.80 Mon Sep 29 11:09:11 2003
--- gnue-common/setup.py Mon Sep 29 11:11:42 2003
***************
*** 234,292 ****
self.install_config = os.path.join (self.install_data, "etc")
#
---------------------------------------------------------------------------
- # Build the commands to place into the scripts
- #
---------------------------------------------------------------------------
-
- def _build_gnue_env (self):
- if sys.platform != 'win32':
- gnue_env = ""
- else:
- # FIXME: Can this be moved into BaseApp.py ?
- # Or into the scripts ?
- gnue_env = \
- "#######\n" \
- + "# The following variables were set when GNUe was installed\n" \
- + "# (Generated for a Win32 system)\n" \
- + "import os, sys\n" \
- + "if __name__ == '__main__': \n" \
- + " _BASE =
os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]),'..'))\n" \
- + " try:\n" \
- + " os.environ['PATH']=
os.path.abspath(os.path.dirname(sys.argv[0])) + ';' + os.environ['PATH']\n" \
- + " except KeyError:\n" \
- + " os.environ['PATH']=
os.path.abspath(os.path.dirname(sys.argv[0]))\n" \
- + "else: \n" \
- + " _BASE =
os.path.abspath(os.path.join(os.path.dirname(__file__),'..'))\n" \
- + "os.putenv('PYTHONCASEOK','1')\n" \
- + "if os.path.isdir(os.path.join(_BASE,'extras')):\n" \
- + " sys.path.append(os.path.join(_BASE,'extras'))\n" \
- + "#######\n\n"
- return gnue_env
-
- #
---------------------------------------------------------------------------
- # Generate the real scripts
- #
---------------------------------------------------------------------------
-
- def _generate_scripts (self):
- gnue_env = self._build_gnue_env ()
-
- for script in self.distribution.scripts:
- print "building script %s" % script
-
- fin = open(script+".in", "r")
- fout = open(script, "w")
-
- 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()
-
- #
---------------------------------------------------------------------------
# Quote a path: remove --root and duplicate backslashes
#
---------------------------------------------------------------------------
--- 234,239 ----
***************
*** 353,360 ****
def run (self):
check_dependencies ()
-
- # self._generate_scripts ()
self._write_gnue_pth ()
--- 300,305 ----
- gnue-common setup.py, (continued)
- gnue-common setup.py, Bajusz Tamás, 2003/09/24
- gnue-common setup.py, Reinhard Mueller, 2003/09/25
- gnue-common setup.py, Jan Ischebeck, 2003/09/25
- gnue-common setup.py, Reinhard Mueller, 2003/09/25
- gnue-common setup.py, Bajusz Tamás, 2003/09/26
- gnue-common setup.py, Reinhard Mueller, 2003/09/26
- gnue-common setup.py, Reinhard Mueller, 2003/09/29
- gnue-common setup.py, Reinhard Mueller, 2003/09/29
- gnue-common setup.py, Reinhard Mueller, 2003/09/29
- gnue-common setup.py, Reinhard Mueller, 2003/09/29
- gnue-common setup.py,
Reinhard Mueller <=
- gnue-common setup.py, Reinhard Mueller, 2003/09/29
- gnue-common setup.py, Reinhard Mueller, 2003/09/30