comparison roundup/dist/command/build_scripts.py @ 5023:5e2888db6c48 pip

build_scripts: self.announce --> log.info because it is visible
author anatoly techtonik <techtonik@gmail.com>
date Mon, 11 Jan 2016 14:43:20 +0300
parents 9250620c7219
children 64c4e43fbb84
comparison
equal deleted inserted replaced
5022:9250620c7219 5023:5e2888db6c48
2 # Copyright (C) 2009 Stefan Seefeld 2 # Copyright (C) 2009 Stefan Seefeld
3 # All rights reserved. 3 # All rights reserved.
4 # For license terms see the file COPYING.txt. 4 # For license terms see the file COPYING.txt.
5 # 5 #
6 from distutils.command.build_scripts import build_scripts as base 6 from distutils.command.build_scripts import build_scripts as base
7 from distutils import log
7 import sys, os, string 8 import sys, os, string
8 9
9 class build_scripts(base): 10 class build_scripts(base):
10 """ Overload the build_scripts command and create the scripts 11 """ Overload the build_scripts command and create the scripts
11 from scratch, depending on the target platform. 12 from scratch, depending on the target platform.
104 #if not self.force and not newer(script, outfile): 105 #if not self.force and not newer(script, outfile):
105 # self.announce("not copying %s (up-to-date)" % script) 106 # self.announce("not copying %s (up-to-date)" % script)
106 # continue 107 # continue
107 108
108 if self.dry_run: 109 if self.dry_run:
109 self.announce("would create %s" % outfile) 110 log.info("would create %s" % outfile)
110 continue 111 continue
111 112
112 module = os.path.splitext(os.path.basename(script))[0] 113 module = os.path.splitext(os.path.basename(script))[0]
113 module = string.translate(module, to_module) 114 module = string.translate(module, to_module)
114 script_vars = { 115 script_vars = {
116 'package': self.package_name, 117 'package': self.package_name,
117 'module': module, 118 'module': module,
118 'prefix': self.script_preamble, 119 'prefix': self.script_preamble,
119 } 120 }
120 121
121 self.announce("creating %s" % outfile) 122 log.info("writing %s" % outfile)
122 file = open(outfile, 'w') 123 file = open(outfile, 'w')
123 124
124 try: 125 try:
125 # could just check self.target_platform, 126 # could just check self.target_platform,
126 # but looking at the script extension 127 # but looking at the script extension

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