File: setup.py.in

package info (click to toggle)
lttoolbox 3.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,516 kB
  • sloc: cpp: 13,541; ansic: 3,131; python: 1,212; makefile: 17
file content (39 lines) | stat: -rw-r--r-- 1,304 bytes parent folder | download | duplicates (2)
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 lttoolbox
"""
from distutils.core import Extension, setup
from sys import platform

compile_args = '@CXXFLAGS@'.split() + '@CPPFLAGS@'.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')

lttoolbox_module = Extension(
    name='_lttoolbox',
	language='c++',
    sources=['lttoolbox.i'],
    swig_opts = ["-c++", '-I..', "-I@top_srcdir@", "-Wall"],
    include_dirs=['@top_srcdir@', '@top_srcdir@/lttoolbox'] + '@LIBXML_CFLAGS@'.replace('-I', '').split() + '@ICU_CFLAGS@'.replace('-I', '').split(),
    library_dirs=['@BUILD_LIBDIR@'],
	libraries=['lttoolbox', 'xml2', 'icuio', 'icui18n', 'icuuc', 'icudata'],
    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=[lttoolbox_module],
    py_modules=['lttoolbox'],
	data_files=[],
)