diff options
| author | Charles BIENVENUE <charles.bienvenue@polymtl.ca> | 2025-11-05 22:47:07 +0000 |
|---|---|---|
| committer | Charles BIENVENUE <charles.bienvenue@polymtl.ca> | 2025-11-05 22:47:07 +0000 |
| commit | 2109f3ade9d6a202c413ed9ad3e3475caa944ae3 (patch) | |
| tree | 7e9ad87417236520023804b629e15e572bcb7c9d /PyGan/src/setup_lcm.py | |
| parent | 8e8dd16f67ed325e2bf7fca0a9d878a18e6911ae (diff) | |
Parallel Build, OpenMP Support with Fortran 90, and Improved Module Dependencies
Diffstat (limited to 'PyGan/src/setup_lcm.py')
| -rw-r--r-- | PyGan/src/setup_lcm.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/PyGan/src/setup_lcm.py b/PyGan/src/setup_lcm.py index 79e7891..76829b4 100644 --- a/PyGan/src/setup_lcm.py +++ b/PyGan/src/setup_lcm.py @@ -22,16 +22,25 @@ def main(): extralink=["-lnvc","-lnvcpumath"] elif Compiler == "LLVMTOOLS": libdir="../../lib/"+mach+"_llvm" - libNv=" " + libNv=None extralink=[ ] elif Compiler == "INTELTOOLS": libdir="../../lib/"+mach+"_intel" - libNv=" " + libNv=None extralink=[ ] else: libdir="../../lib/"+mach - libNv=" " + libNv=None extralink=[ ] + # Filter out missing/empty library dirs to avoid "-L " warnings + def _dirs(*paths): + out=[] + for p in paths: + if p and isinstance(p, str) and os.path.isdir(p): + out.append(p) + return out + lib_dirs = _dirs(libdir, libNv) + rpath_dirs = _dirs(libNv) setup(name="Lcm", version="5.0", description="Python interface for the lcm C library API", @@ -41,8 +50,8 @@ def main(): ext_modules=[Extension("lcm", ["lcmmodule.c"], extra_link_args = extralink, include_dirs=["../../../Ganlib/src",incdir], - library_dirs=[libdir,libNv], - runtime_library_dirs=[libNv], + library_dirs=lib_dirs, + runtime_library_dirs=rpath_dirs, libraries=["Ganlib"] ) ]) if __name__ == "__main__": |
