-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
52 lines (43 loc) · 1.18 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python3.6
from distutils.core import setup, Extension
from distutils.command.build import build as _build
from pathlib import Path
# Thanks https://scipy-cookbook.readthedocs.io/items/SWIG_NumPy_examples.html
import numpy
numpy_include = numpy.get_include()
class build(_build):
sub_commands = [
('build_ext', _build.has_ext_modules),
('build_py', _build.has_pure_modules),
('build_clib', _build.has_c_libraries),
('build_scripts', _build.has_scripts),
]
pyospray_module = Extension(
'_pyospray',
sources=['src/pyospray/pyospray.i'],
swig_opts=['-py3', '-threads', '-I/usr/include/ospray'],
include_dirs=[numpy_include],
libraries=['ospray'],
)
setup(
cmdclass={'build': build},
name='pyospray',
packages=['pyospray'],
package_dir={'pyospray': 'src/pyospray'},
package_data={'pyospray': ['data/*.txt']},
version='0.1.0',
description="Python wrapper around the OSPRay renderer with both the native and a Pythonic API",
author='Tanner Hobson',
author_email='[email protected]',
url='https://github.com/player1537/pyospray',
keywords=[
'path-tracer',
'ospray',
'ray-tracing',
'visualization',
'renderering',
],
ext_modules=[
pyospray_module,
],
)