xref: /freebsd/contrib/libucl/python/setup.py (revision 0b3105a37d7adcadcb720112fed4dc4e8040be99)
1import distutils.ccompiler
2import distutils.sysconfig
3from distutils.core import setup, Extension
4import os
5
6
7compiler  = distutils.ccompiler.new_compiler()
8search_paths=[os.path.expanduser('~/{}'), '/opt/local/{}', '/usr/local/{}', '/usr/{}']
9lib_paths = [ a.format("lib") for a in search_paths]
10inc_paths = [ a.format("include") for a in search_paths]
11
12uclmodule = Extension('ucl',
13        include_dirs = inc_paths,
14        library_dirs = lib_paths,
15        libraries = ['ucl'],
16        sources = ['src/uclmodule.c'],
17        runtime_library_dirs = lib_paths,
18        language='c')
19
20setup(name='ucl',
21    version='1.0',
22    description='ucl parser and emmitter',
23    ext_modules = [uclmodule],
24    author="Eitan Adler",
25    author_email="lists@eitanadler.com",
26    url="https://github.com/vstakhov/libucl/",
27    license="MIT",
28    classifiers=["Development Status :: 3 - Alpha",
29        "Intended Audience :: Developers",
30        "License :: DFSG approved",
31        "License :: OSI Approved :: MIT License",
32        "Programming Language :: C",
33        "Programming Language :: Python :: 3",
34        "Programming Language :: Python :: Implementation :: CPython",
35        "Topic :: Software Development :: Libraries",
36        ]
37    )
38