Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Build failure when scons uses python 3 #103

Open
ryandesign opened this issue Feb 22, 2023 · 1 comment · May be fixed by #104
Open

Build failure when scons uses python 3 #103

ryandesign opened this issue Feb 22, 2023 · 1 comment · May be fixed by #104

Comments

@ryandesign
Copy link

As reported to MacPorts, field3d does not build when scons uses python 3:

scons: Reading SConscript files ...
  File "BuildSupport.py", line 276

    print cmd

    ^^^^^^^^^

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
@ryandesign
Copy link
Author

The next error after that is:

AttributeError: 'dict' object has no attribute 'has_key':
  File "SConstruct", line 46:
    SConscript("SConscript")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/SCons/Script/SConscript.py", line 660:
    return method(*args, **kw)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/SCons/Script/SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "SConscript", line 49:
    setupEnv(libEnv)
  File "BuildSupport.py", line 231:
    env.SetOption('num_jobs', numCPUs())
  File "BuildSupport.py", line 253:
    if os.sysconf_names.has_key("SC_NPROCESSORS_ONLN"):

From python 3 documentation:

Removed. dict.has_key() – use the in operator instead.

ryandesign added a commit to ryandesign/Field3D that referenced this issue Feb 22, 2023
@ryandesign ryandesign linked a pull request Feb 22, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant