3 from distutils.core
import setup, Extension
4 from distutils.sysconfig
import get_config_vars
5 from distutils
import util
6 from distutils.command.build_ext
import build_ext
7 from distutils
import sysconfig
13 if sys.platform ==
"win32":
15 src_file = [
'pyabc.i' ]
17 define_macros.append( (
'WIN32', 1) )
18 define_macros.append( (
'ABC_DLL',
'ABC_DLLEXPORT') )
20 libraries.append(
'abcr')
21 library_dirs.append(
'./../../lib')
25 src_file = [
'pyabc_wrap.c' ]
27 if get_config_vars()[
'SIZEOF_VOID_P'] > 4:
28 define_macros.append( (
'LIN64', 1) )
30 define_macros.append( (
'LIN', 1) )
32 libraries.append(
'abc' )
33 libraries.append(
'rt' )
34 libraries.append(
'readline' )
35 library_dirs.append(
'./../../')
44 CC = sysconfig.get_config_var(
"CC")
46 if self.compiler.compiler_type ==
'unix' and (
'gcc' in CC
or 'g++' in CC):
47 for e
in self.extensions:
48 e.extra_compile_args.append(
'-Wno-strict-prototypes' )
50 build_ext.build_extensions(self)
55 define_macros=define_macros,
56 include_dirs = [
"../../src"],
57 library_dirs=library_dirs,
65 py_modules=[
'pyabc',
'getch',
'pyabc_split',
'redirect',
'reachx_cmd'],
66 cmdclass = {
'build_ext': build_ext_subclass }