Page MenuHomec4science

setup.py.in
No OneTemporary

File Metadata

Created
Fri, Nov 1, 02:32

setup.py.in

from distutils.core import setup
from distutils.core import setup, Extension
import os
import sys
os.environ['CC'] = '@CMAKE_CXX_COMPILER@'
os.environ['CXX'] = '@CMAKE_CXX_COMPILER@'
def cmake_to_list(cmake_list):
if cmake_list == '':
return []
return cmake_list.split(';')
# https://stackoverflow.com/a/29634231
# Remove the "-Wstrict-prototypes" compiler option, which isn't valid for C++.
import distutils.sysconfig
cfg_vars = distutils.sysconfig.get_config_vars()
for key, value in cfg_vars.items():
if type(value) == str:
cfg_vars[key] = value.replace("-Wstrict-prototypes", "")
# ==================================
setup(
name='akantu',
license='LGPLv3',
version='@AKANTU_VERSION@',
py_modules=['akantu'],
ext_modules=[Extension(
'_akantu',
cmake_to_list('@_ext_files@'),
include_dirs=cmake_to_list('@_inc_dirs@'),
language='c++',
libraries=cmake_to_list('@_akantu_lib_name@'),
library_dirs=cmake_to_list('@_lib_dirs@'),
runtime_library_dirs=cmake_to_list('@_lib_dirs@'),
extra_compile_args=cmake_to_list('@_flags@')
)]
)

Event Timeline