Re: Possible python 3 issue?

Bill Deegan <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CAEyG4CHgN4Bn=9eQz2iY5uca49wqdaaY+NV2CY=vgN3RyEK8bQ@mail.gmail.com>
Peter,

If you change line 26 in src/SConscript to the following it will work:
    # Return the list of module paths
    return list(buildmodpath)

The issue is you're assigning *PATH = map().. which is fine in py27, but in
py3, you get a view into the map. (It does lazyier evaluation).
So by wrapping with list() you get a normal list and everything works
fine...

In fact.. I don't think you actually need the map.. (which you shouldn't as
with duplicate=0 it'd have to include the build and src versions of the
paths you specify)
If I change the return to return modpath, it seems to build fine as well.

-Bill


On Wed, Oct 16, 2019 at 10:26 AM Bill Deegan <[email protected]>
wrote:

> so sounds like a scanner issue then.. could it be using get_contents,
> instead of get_text_contents?
>
> On Wed, Oct 16, 2019 at 9:29 AM Mats Wichmann <[email protected]> wrote:
>
>> On 10/16/19 10:04 AM, Peter Diener wrote:
>> > Hi,
>> >
>> > I have been successfully using scons 3.1.0 with python 2.7.12 to build
>> a
>> > mostly Fortran based software project on Linux (multiple
>> distributions).
>> > I have the source tree separated from the build directory and are
>> > therefore using variantdir and an SConscript file. Recently I tried to
>> > run this with python 3.7.4 and found that it did not work as scons
>> > failed to correctly find the dependencies on module files.
>> >
>> > I was able to reproduce this with a smaller test example that mimics
>> the
>> > setup in my larger software project. I have attached a zip file with
>> > that source tree as well as build log files (in build_log.2.7.12 and
>> > build_log.3.7.4) with all errors and output when building with
>> > scons --tree=all. As can be seen from the build log files, when
>> building
>> > with python 3, scons does not seem to find the dependencies of the main
>> > program on the module files.
>> >
>> > I have also tried with the latest release version of scons 3.1.1 with
>> > the same results. It works with python 2 but not with python 3.
>> >
>> > So my question is: am I doing something wrong in my SConstruct and
>> > SConscript files that just happens to work with python 2 and not with
>> > python 3? Or is this a problem with scons and python 3?
>>
>> Possibly a bit of both.  There's an existing scons issue that points out
>> some weakness in submodule support (#3366), and given that Fortran isn't
>> the most heavily used language in the scons universe, there may still be
>> untested code paths in the conversion to Python 3, that don't get
>> exercised by what's in the test suite (there are some fairly new tests
>> in that area, which you know since you contributed there :) )
>> _______________________________________________
>> Scons-users mailing list
>> [email protected]
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.