After running env.ParseConfig, the environment variable "CPPPATH" is populated, but the Fortran equivalents "F90PATH" and friends are not. A nice to have would be for env.ParseConfig to populate these Fotran variables so libraries that install Fortran stubs in /usr/include like FFTW3 could be found auto-magically.
Required information
- Link to SCons Users thread discussing your issue: Discord thread
- Version of SCons: 4.10.1
- Version of Python: 3.14.3
- Which python distribution if applicable: conda-forge
- How you installed SCons: pip install scons
- What Platform are you on? RHEL8 (tested on, original author of thread mentioned macOS)
- How to reproduce your issue? See below
Additional context
SConstruct
env = Environment()
env.ParseConfig("pkg-config fftw3 --cflags --libs")
# If FFTW3 was installed in /usr/include, we need additional flags
if env.get("CPPPATH") is None:
env.ParseConfig("pkg-config fftw3 --cflags --libs --keep-system-cflags")
print("CPPPATH: ", env["CPPPATH"])
for key in ["F77PATH",
"F90PATH",
"F95PATH",
"F03PATH",
"F08PATH",
]:
# Force copy of CPPPATH to the appropriate Fortran dialect path
env[key] = env["CPPPATH"]
env.Program("mwe.f90")
mwe.f90
program mwe
use iso_c_binding
include 'fftw3.f03'
end program mwe
After running
env.ParseConfig, the environment variable"CPPPATH"is populated, but the Fortran equivalents"F90PATH"and friends are not. A nice to have would be forenv.ParseConfigto populate these Fotran variables so libraries that install Fortran stubs in/usr/includelike FFTW3 could be found auto-magically.Required information
Additional context
SConstruct
mwe.f90