2010-05-25 08:31:10 Philip M. Gollucci napisaĆ(a):
> $./buildconf
> buildconf: checking installation...
> buildconf: python version 3.1.2 (ok)
> buildconf: autoconf version 2.62 (ok)
> buildconf: libtool version 2.2.6b (ok)
> buildconf: copying libtool helper files using /usr/local/bin/libtoolize
> buildconf: creating include/arch/unix/apr_private.h.in ...
> buildconf: creating configure ...
> buildconf: generating 'make' outputs ...
> Traceback (most recent call last):
> File "build/gen-build.py", line 251, in <module>
> main()
> File "build/gen-build.py", line 67, in main
> objects, dirs = write_objects(f, legal_deps, h_deps, files)
> File "build/gen-build.py", line 205, in write_objects
> f.write('%s: %s .make.dirs %s\n' % (obj, file, string.join(vals)))
> AttributeError: 'module' object has no attribute 'join'
Use str.join() instead of string.join():
f.write('%s: %s .make.dirs %s\n' % (obj, file, ' '.join(vals)))
> Index: build/gen-build.py
> ===================================================================
> --- build/gen-build.py (revision 947805)
> +++ build/gen-build.py (working copy)
> ...
> @@ -45,7 +48,7 @@
> dsp_file = None
>
> headers = get_files(parser.get('options', 'headers'))
> -
> +
This change is not needed.
> # compute the relevant headers, along with the implied includes
> legal_deps = { }
> for fname in headers:
> ...
> @@ -125,7 +128,7 @@
> f.write('OBJECTS_%s = %s\n\n' % (platform, string.join(group)))
>
> f.write('HEADERS = $(top_srcdir)/%s\n\n' % string.join(headers, '
> $(top_srcdir)/'))
> - f.write('SOURCE_DIRS = %s $(EXTRA_SOURCE_DIRS)\n\n' %
> string.join(dirs.keys()))
> + f.write('SOURCE_DIRS = %s $(EXTRA_SOURCE_DIRS)\n\n' %
> string.join(list(dirs.keys())))
f.write('SOURCE_DIRS = %s $(EXTRA_SOURCE_DIRS)\n\n' % ' '.join(dirs.keys()))
>
> if parser.has_option('options', 'modules'):
> modules = parser.get('options', 'modules')
> @@ -163,14 +166,14 @@
>
> # Build a list of all necessary directories in build tree
> alldirs = { }
> - for dir in dirs.keys():
> + for dir in list(dirs.keys()):
This change is not needed.
> d = dir
> while d:
> alldirs[d] = None
> d = os.path.dirname(d)
>
> # Sort so 'foo' is before 'foo/bar'
> - keys = alldirs.keys()
> + keys = list(alldirs.keys())
> keys.sort()
> f.write('BUILD_DIRS = %s\n\n' % string.join(keys))
>
> ...
> @@ -213,7 +216,7 @@
> if line[:8] != '#include':
> continue
> inc = _re_include.match(line).group(1)
> - if inc in legal_deps.keys():
> + if inc in list(legal_deps.keys()):
This change is not needed.
> deps[inc] = legal_deps[inc]
> return deps
> _re_include = re.compile('#include *["<](.*)[">]')
> @@ -224,10 +227,10 @@
> altered = 1
> while altered:
> altered = 0
> - for hdr, deps in header_deps.items():
> + for hdr, deps in list(header_deps.items()):
This change is not needed.
> # print hdr, deps
> start = len(deps)
> - for dep in deps.keys():
> + for dep in list(deps.keys()):
> deps.update(header_deps.get(dep, {}))
> if len(deps) != start:
> altered = 1
> @@ -237,8 +240,9 @@
>
> def get_files(patterns):
> files = [ ]
> - for pat in string.split(patterns):
> - files.extend(map(clean_path, glob.glob(pat)))
> +# for pat in string.split(patterns):
> + for pat in patterns.split():
> + files.extend(list(map(clean_path, glob.glob(pat))))
list.extend() accepts any iterable, so the second change (map -> list(map)) is
not needed.
> files.sort()
> return files
>
--
Arfrever Frehtes Taifersar Arahesis
signature.asc
Description: This is a digitally signed message part.
