diff options
| author | stainer_t <thomas.stainer@oecd-nea.org> | 2025-09-08 13:48:49 +0200 |
|---|---|---|
| committer | stainer_t <thomas.stainer@oecd-nea.org> | 2025-09-08 13:48:49 +0200 |
| commit | 7dfcc480ba1e19bd3232349fc733caef94034292 (patch) | |
| tree | 03ee104eb8846d5cc1a981d267687a729185d3f3 /PyGan/src/setup_lifo.py | |
Initial commit from Polytechnique Montreal
Diffstat (limited to 'PyGan/src/setup_lifo.py')
| -rw-r--r-- | PyGan/src/setup_lifo.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/PyGan/src/setup_lifo.py b/PyGan/src/setup_lifo.py new file mode 100644 index 0000000..731001e --- /dev/null +++ b/PyGan/src/setup_lifo.py @@ -0,0 +1,36 @@ +# +# python3 setup_lifo.py install --home=. +# +from sys import version_info +if version_info[0] == 3 and version_info[1] >= 12: + from setuptools import setup, Extension +elif version_info[0] > 3: + from setuptools import setup, Extension +else: + from distutils.core import setup, Extension + +def main(): + import os + mach = os.path.basename(os.getcwd()) + Compiler = os.environ.get("COMPILER", None) # Compiler selection + if Compiler == "NVTOOLS": + libdir="../../lib/"+mach+"_nvidia" + elif Compiler == "LLVMTOOLS": + libdir="../../lib/"+mach+"_llvm" + elif Compiler == "INTELTOOLS": + libdir="../../lib/"+mach+"_intel" + else: + libdir="../../lib/"+mach + setup(name="Lifo", + version="5.0", + description="Python interface for the lifo C library function", + author="Alain Hebert", + author_email="alain.hebert@polymtl.ca", + license="LGPL", + ext_modules=[Extension("lifo", ["lifomodule.c"], + include_dirs=["../../../Ganlib/src"], + library_dirs=[libdir], + libraries=["Ganlib"] ) ]) + +if __name__ == "__main__": + main() |
