Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name 'SCons' is not defined #216

Closed
ryandesign opened this issue May 25, 2023 · 2 comments
Closed

NameError: name 'SCons' is not defined #216

ryandesign opened this issue May 25, 2023 · 2 comments

Comments

@ryandesign
Copy link
Contributor

Trying to build gpick 0.3 release tarball with scons, after fixing #215, if I specify CFLAGS as in CFLAGS=-Os scons it fails:

scons: Reading SConscript files ...
NameError: name 'SCons' is not defined:
  File "/opt/local/var/macports/build/_Volumes_Shared_macports-ports_graphics_gpick/gpick/work/gpick-0.3/SConstruct", line 2:
    SConscript(['SConscript'], variant_dir = 'build', duplicate = 0)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/SCons/Script/SConscript.py", line 662:
    return method(*args, **kw)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/SCons/Script/SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/opt/local/var/macports/build/_Volumes_Shared_macports-ports_graphics_gpick/gpick/work/gpick-0.3/SConscript", line 54:
    env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
thezbyg added a commit that referenced this issue Jun 1, 2023
Add missing SCons.Util import.

Issue #216.
Issue #217.
@thezbyg
Copy link
Owner

thezbyg commented Jun 1, 2023

SConscript file is missing SCons.Util import. This can be fixed by adding import SCons.Util after other imports.

@ryandesign
Copy link
Contributor Author

adding import SCons.Util after other imports

Thanks, I agree that fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants