-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
executable file
·35 lines (30 loc) · 1.03 KB
/
setup.py
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
#!/usr/bin/env python
from distutils.core import setup, Extension
import subprocess
def pkg_config(*args):
return subprocess.check_output(('pkg-config',)+args).decode('utf-8').split()
def unflag(args):
return [x[2:] for x in args]
pyvrui_module = Extension(
'_pyvrui',
['pyvrui.i'],
swig_opts = ['-c++'] + pkg_config('--cflags-only-I', 'Vrui'),
include_dirs = ['./src'] + unflag(pkg_config('--cflags-only-I', 'Vrui')),
extra_compile_args = pkg_config('--cflags-only-other', 'Vrui'),
library_dirs = unflag(pkg_config('--libs-only-L', 'Vrui')),
libraries = unflag(pkg_config('--libs-only-l', 'Vrui')),
extra_link_args = pkg_config('--libs-only-other', 'Vrui')
)
setup(
name = 'pyvrui',
version = '0.1.0',
author = 'Jordan Van Aalsburg',
author_email = '[email protected]',
url = 'https://github.com/comscictr/pyvrui',
description = 'Python interface for Vrui',
ext_modules = [pyvrui_module],
py_modules = ['pyvrui'],
data_files = [
('examples', ['examples/*.py'])
]
)