apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <pgollu...@p6m7g8.com>
Subject Re: python3.1
Date Tue, 15 Jun 2010 00:05:40 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At some point I made all of these changes and the python actually ran.
Unfortunately, it didn't generate the outputs correctly so apr didn't
build successfully.

I haven't dropped this on the floor, I've just been busy, I'll get back
to it RSN.


On 05/25/10 12:40, Arfrever Frehtes Taifersar Arahesis wrote:
> 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
>>  
> 


- -- 
- ------------------------------------------------------------------------
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C
Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354
VP Apache Infrastructure; Member, Apache Software Foundation
Committer,                        FreeBSD Foundation
Consultant,                       P6M7G8 Inc.
Sr. System Admin,                 Ridecharge Inc.

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iD8DBQFMFsPUdbiP+9ubjBwRAn7mAJ48cpdBaqdPUXi01Am9G+UqngY08ACfbk0d
wb/O5lJEvuM4JL6snvu+VJo=
=uqfy
-----END PGP SIGNATURE-----

Mime
View raw message