forked from Waller-Lab/DiffuserCam-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
65 lines (57 loc) · 1.97 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
53
54
55
56
57
58
59
60
61
62
63
64
65
import builtins
import setuptools
import setuptools.extension
import setuptools.command.build_ext
import sys
eigen_path = "./dvs_warping_package/eigen-3.4.0"
with open("README.md") as file:
long_description = file.read()
class build_ext(setuptools.command.build_ext.build_ext):
def finalize_options(self):
setuptools.command.build_ext.build_ext.finalize_options(self)
builtins.__NUMPY_SETUP__ = False # type: ignore
import numpy
self.include_dirs.append(numpy.get_include())
self.include_dirs.append(eigen_path) # Add Eigen path here
extra_args = []
if sys.platform == "linux":
extra_args += ["-std=c++11"]
elif sys.platform == "darwin":
extra_args += ["-std=c++11", "-stdlib=libc++"]
setuptools.setup(
name="dvs_warping_package",
version="0.0.1",
author="ICNS, Sami Arja",
author_email="sami.arja@gmail.com",
description="Event-based motion segmentation for aerial surveillance",
long_description=long_description,
long_description_content_type="text/markdown",
setup_requires=['numpy'],
install_requires=[
"cmaes >= 0.8.2",
"event_stream >= 1.4.1",
"h5py >= 3.7.0",
"matplotlib >= 3.5.2",
"numpy >= 1.23.1",
"pillow >= 9.2.0",
"scipy >= 1.8.1",
],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
],
packages=["dvs_warping_package"],
ext_modules=[
setuptools.extension.Extension(
"dvs_warping_package_extension",
language="c++",
sources=["dvs_warping_package_extension/dvs_warping_package_extension.cpp"],
include_dirs=[], # Leave this empty, it will be filled in build_ext
libraries=[],
extra_compile_args=extra_args,
extra_link_args=extra_args,
),
],
cmdclass={"build_ext": build_ext},
)