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

Build failure when scons uses python 3 #103

Description

@ryandesign

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(...)?

Activity

  1. ryandesign commented on Feb 22, 2023

    @ryandesign
    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.

  2. added a commit that references this issue on Feb 22, 2023
    8571170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions