File: setup.py.in

package info (click to toggle)
apertium 3.9.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,024 kB
  • sloc: cpp: 22,288; ansic: 4,875; xml: 2,566; python: 1,428; sh: 1,117; lex: 1,088; makefile: 591
file content (39 lines) | stat: -rw-r--r-- 1,293 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
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python3

'''
Setup for SWIG Python bindings for apertium
'''
from distutils.core import Extension, setup
from sys import platform

compile_args = '@CPPFLAGS@'.split() + '@CXXFLAGS@'.split() + '@LTTOOLBOX_CFLAGS@'.split() + '@ICU_CFLAGS@'.split()
link_args = []
if platform == 'darwin':
    compile_args += ['-stdlib=libc++', '-mmacosx-version-min=10.7']
    link_args.append('-mmacosx-version-min=10.7')

apertium_core_module = Extension(
    name='_apertium_core',
    language='c++',
    sources=['apertium_core.i'],
    swig_opts=['-c++', '-I..', '-I@top_srcdir@/apertium', '-Wall'],
    include_dirs=['@top_srcdir@', '@top_srcdir@/apertium'] + '@LIBXML2_CFLAGS@'.replace('-I', '').split(),
    library_dirs=['@top_srcdir@/apertium/.libs'],
    libraries = ['apertium'],
    extra_compile_args=compile_args,
    extra_link_args=link_args,
)

setup(
    name='@PACKAGE@',
    version='@PACKAGE_VERSION@',
    description='SWIG interface to @PACKAGE_NAME@',
    long_description='SWIG interface to @PACKAGE_NAME@ for use in apertium-python',
    # TODO: author, maintainer, url
    author_email='@PACKAGE_BUGREPORT@',
    license='GPL-3.0+',
    maintainer_email='@PACKAGE_BUGREPORT@',
    ext_modules=[apertium_core_module],
    py_modules=['apertium_core'],
    data_files=[],
)