Update setup script
This commit is contained in:
parent
17096867f7
commit
5d83d626f6
2 changed files with 31 additions and 10 deletions
8
llvmpy/build.py
Normal file
8
llvmpy/build.py
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
from os import chdir
|
||||||
|
from os.path import dirname
|
||||||
|
import sys, subprocess
|
||||||
|
|
||||||
|
scriptdir = dirname(__file__)
|
||||||
|
chdir(scriptdir)
|
||||||
|
|
||||||
|
subprocess.check_call([sys.executable, 'gen/gen.py', 'api', 'src'])
|
||||||
33
setup.py
33
setup.py
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE, check_call
|
||||||
from distutils.core import setup, Extension
|
from distutils.core import setup, Extension
|
||||||
|
|
||||||
import versioneer
|
import versioneer
|
||||||
|
|
@ -141,22 +141,30 @@ if sys.platform == 'win32':
|
||||||
else:
|
else:
|
||||||
macros.append(('_GNU_SOURCE', None))
|
macros.append(('_GNU_SOURCE', None))
|
||||||
|
|
||||||
|
# auto generate bindings
|
||||||
|
check_call([sys.executable, 'llvmpy/build.py'])
|
||||||
|
|
||||||
extra_link_args = ldflags.split()
|
extra_link_args = ldflags.split()
|
||||||
kwds = dict(
|
kwds = dict(
|
||||||
ext_modules = [
|
ext_modules = [
|
||||||
Extension(
|
Extension(
|
||||||
name='llvm._core',
|
name='llvmpy._api',
|
||||||
sources=['llvm/_core.cpp', 'llvm/wrap.cpp', 'llvm/extra.cpp'],
|
sources=['llvmpy/api.cpp'],
|
||||||
define_macros = macros,
|
define_macros = macros,
|
||||||
include_dirs = ['/usr/include', incdir],
|
include_dirs = [incdir, 'llvmpy/include'],
|
||||||
library_dirs = [libdir],
|
library_dirs = [libdir],
|
||||||
libraries = libs_core,
|
libraries = libs_core,
|
||||||
extra_objects = objs_core,
|
extra_objects = objs_core,
|
||||||
extra_link_args = extra_link_args),
|
extra_link_args = extra_link_args),
|
||||||
|
|
||||||
Extension(name='llvm._dwarf',
|
Extension(
|
||||||
sources=['llvm/_dwarf.cpp'],
|
name='llvmpy._capsule',
|
||||||
include_dirs=[incdir])
|
sources=['llvmpy/capsule.cpp'],
|
||||||
|
include_dirs=['llvmpy/include'],
|
||||||
|
)
|
||||||
|
# Extension(name='llvm._dwarf',
|
||||||
|
# sources=['llvm/_dwarf.cpp'],
|
||||||
|
# include_dirs=[incdir])
|
||||||
],
|
],
|
||||||
cmdclass = versioneer.get_cmdclass(),
|
cmdclass = versioneer.get_cmdclass(),
|
||||||
)
|
)
|
||||||
|
|
@ -173,12 +181,17 @@ setup(
|
||||||
name = 'llvmpy',
|
name = 'llvmpy',
|
||||||
version=versioneer.get_version(),
|
version=versioneer.get_version(),
|
||||||
description = 'Python bindings for LLVM',
|
description = 'Python bindings for LLVM',
|
||||||
author = 'R Mahadevan',
|
author = 'R Mahadevan, Siu Kwan Lam',
|
||||||
maintainer = 'Continuum Analytics, Inc.',
|
maintainer = 'Continuum Analytics, Inc.',
|
||||||
maintainer_email = 'llvmpy@continuum.io',
|
maintainer_email = 'llvmpy@continuum.io',
|
||||||
url = 'http://www.llvmpy.org/',
|
url = 'http://www.llvmpy.org/',
|
||||||
packages = ['llvm', 'llvm_cbuilder', 'llpython'],
|
packages = ['llvm', 'llvm_cbuilder', 'llpython',
|
||||||
py_modules = ['llvm.core'],
|
'llvmpy.api', 'llvmpy.api.llvm'],
|
||||||
|
py_modules = ['llvmpy',
|
||||||
|
'llvmpy._capsule',
|
||||||
|
'llvmpy._api',
|
||||||
|
'llvmpy.capsule',
|
||||||
|
'llvmpy.extra'],
|
||||||
license = "BSD",
|
license = "BSD",
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue