comparison setup.py @ 2901:3e53f30799e3

remove -O from script hard-coding so people can debug if they want to
author Richard Jones <richard@users.sourceforge.net>
date Thu, 11 Nov 2004 06:13:52 +0000
parents 67bf41bf8165
children 7edf7779145b
comparison
equal deleted inserted replaced
2899:09a4d6dd6dcb 2901:3e53f30799e3
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18 # 18 #
19 # $Id: setup.py,v 1.74 2004-11-10 22:27:39 richard Exp $ 19 # $Id: setup.py,v 1.75 2004-11-11 06:13:52 richard Exp $
20 20
21 from distutils.core import setup, Extension 21 from distutils.core import setup, Extension
22 from distutils.util import get_platform 22 from distutils.util import get_platform
23 from distutils.command.build_scripts import build_scripts 23 from distutils.command.build_scripts import build_scripts
24 from distutils.command.build import build 24 from distutils.command.build import build
162 # makes it possible to build both *nix-like 162 # makes it possible to build both *nix-like
163 # and windows-like scripts on win32. 163 # and windows-like scripts on win32.
164 # may be useful for cygwin. 164 # may be useful for cygwin.
165 if os.path.splitext(outfile)[1] == ".bat": 165 if os.path.splitext(outfile)[1] == ".bat":
166 file.write('@echo off\n' 166 file.write('@echo off\n'
167 'if NOT "%%_4ver%%" == "" "%(python)s" -O -c "from %(package)s.scripts.%(module)s import run; run()" %%$\n' 167 'if NOT "%%_4ver%%" == "" "%(python)s" -c "from %(package)s.scripts.%(module)s import run; run()" %%$\n'
168 'if "%%_4ver%%" == "" "%(python)s" -O -c "from %(package)s.scripts.%(module)s import run; run()" %%*\n' 168 'if "%%_4ver%%" == "" "%(python)s" -c "from %(package)s.scripts.%(module)s import run; run()" %%*\n'
169 % script_vars) 169 % script_vars)
170 else: 170 else:
171 file.write('#! %(python)s -O\n%(prefix)s' 171 file.write('#! %(python)s\n%(prefix)s'
172 'from %(package)s.scripts.%(module)s import run\n' 172 'from %(package)s.scripts.%(module)s import run\n'
173 'run()\n' 173 'run()\n'
174 % script_vars) 174 % script_vars)
175 finally: 175 finally:
176 file.close() 176 file.close()

Roundup Issue Tracker: http://roundup-tracker.org/