def initialize_options (self):
- d = self.distribution
self.keep_temp = 0
self.control_only = 0
self.no_autorelocate = 0
self.pkg_dir = os.path.join(bdist_base, 'binary')
if not self.plat_name:
- d = self.distribution
- self.plat = d.get_platforms()
+ self.plat = self.distribution.get_platforms()
if self.distribution.has_ext_modules():
self.plat_name = [sys.platform,]
else:
log.info("installing to %s", self.pkg_dir)
self.run_command('install')
-
- # And make an archive relative to the root of the
- # pseudo-installation tree.
- archive_basename = "%s.%s" % (self.distribution.get_fullname(),
- self.plat_name)
-
if not self.keep_temp:
remove_tree(self.pkg_dir, dry_run=self.dry_run)
else:
pkg_dir = self.pkg_dir
- install = self.reinitialize_command('install', reinit_subcommands=1)
+ self.reinitialize_command('install', reinit_subcommands=1)
# build package
log.info('Building package')
self.run_command('build')
if self.subpackages:
self.subpackages=string.split(self.subpackages,",")
for pkg in self.subpackages:
- self.make_package(subpackage)
+ self.make_package(pkg)
else:
self.make_package()
# run()
try:
ok = dist.parse_command_line()
except DistutilsArgError, msg:
- script = os.path.basename(dist.script_name)
- raise SystemExit, \
- gen_usage(dist.script_name) + "\nerror: %s" % msg
+ raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
if DEBUG:
print "options (after parsing command line):"
# generate the filenames for these files
def_file = os.path.join(temp_dir, dll_name + ".def")
- exp_file = os.path.join(temp_dir, dll_name + ".exp")
lib_file = os.path.join(temp_dir, 'lib' + dll_name + ".a")
# Generate .def file
# dllwrap uses different options than gcc/ld
if self.linker_dll == "dllwrap":
- extra_preargs.extend([#"--output-exp",exp_file,
- "--output-lib",lib_file,
- ])
+ extra_preargs.extend(["--output-lib", lib_file])
# for dllwrap we have to use a special option
extra_preargs.extend(["--def", def_file])
# we use gcc/ld here and can be sure ld is >= 2.9.10
else:
# doesn't work: bfd_close build\...\libfoo.a: Invalid operation
#extra_preargs.extend(["-Wl,--out-implib,%s" % lib_file])
- # for gcc/ld the def-file is specified as any other object files
+ # for gcc/ld the def-file is specified as any object files
objects.append(def_file)
#end: if ((export_symbols is not None) and
# generate the filenames for these files
def_file = os.path.join(temp_dir, dll_name + ".def")
- lib_file = os.path.join(temp_dir, dll_name + ".lib")
# Generate .def file
contents = [
- "LIBRARY %s INITINSTANCE TERMINSTANCE" % os.path.splitext(os.path.basename(output_filename))[0],
+ "LIBRARY %s INITINSTANCE TERMINSTANCE" % \
+ os.path.splitext(os.path.basename(output_filename))[0],
"DATA MULTIPLE NONSHARED",
"EXPORTS"]
for sym in export_symbols:
while 1:
m = _findvar1_rx.search(s) or _findvar2_rx.search(s)
if m:
- name = m.group(1)
(beg, end) = m.span()
s = s[0:beg] + vars.get(m.group(1)) + s[end:]
else: