-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·31 lines (24 loc) · 1.17 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·31 lines (24 loc) · 1.17 KB
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
#!/usr/bin/env python
"""
setup.py file for GDAL Viewshed
"""
from distutils.core import setup, Extension
# This bit added by JJH to import GDAl framework before compiling
# import os
# os.environ['LDFLAGS'] = '-framework GDAL'
viewshed_module = Extension('_viewshed',
sources=['viewshed_wrap.cxx', 'viewshed.cpp'],
extra_link_args=['-stdlib=libc++'],
# THIS STUFF FOR FRAMEWORK VERSION (one or the other?)
# extra_compile_args = ["-std=c++11", "-F/Library/Frameworks/","-framework", "GDAL", "-O3"],
# extra_compile_args = ["-stdlib=libc++", "-std=c++11", "-O3"],
# THIS STUFF FOR BREW VERSION
extra_compile_args = ["-L/usr/local/Cellar/gdal/2.4.1_1/lib", "-I/usr/local/Cellar/gdal/2.4.1_1/include", "-lgdal", "-std=c++11", "-O3", "-v"],
)
setup (name = 'viewshed',
version = '0.1',
author = "jonnyhuck",
description = """SWIG Python interface to GDAL Viewshed""",
ext_modules = [viewshed_module],
py_modules = ["viewshed"],
)