File: setup.py

package info (click to toggle)
mypy 0.812-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 18,596 kB
  • sloc: python: 74,869; cpp: 11,212; ansic: 3,935; makefile: 238; sh: 13
file content (27 lines) | stat: -rw-r--r-- 889 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Build script for mypyc C runtime library unit tests.

The tests are written in C++ and use the Google Test framework.
"""

from distutils.core import setup, Extension
import sys

if sys.platform == 'darwin':
    kwargs = {'language': 'c++'}
    compile_args = []
else:
    kwargs = {}  # type: ignore
    compile_args = ['--std=c++11']

setup(name='test_capi',
      version='0.1',
      ext_modules=[Extension(
          'test_capi',
          ['test_capi.cc', 'init.c', 'int_ops.c', 'list_ops.c', 'exc_ops.c', 'generic_ops.c'],
          depends=['CPy.h', 'mypyc_util.h', 'pythonsupport.h'],
          extra_compile_args=['-Wno-unused-function', '-Wno-sign-compare'] + compile_args,
          library_dirs=['../external/googletest/make'],
          libraries=['gtest'],
          include_dirs=['../external/googletest', '../external/googletest/include'],
          **kwargs
      )])