-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
78 lines (68 loc) · 2.19 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
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env python
import setuptools
import subprocess
from setuptools import setup
import platform
import sys
include_dirs = [a for a in (a.strip() for a in subprocess.check_output(
["pkg-config", "libxml-2.0", "--cflags-only-I"]).decode("utf-8").split("-I")) if a]
library_dirs = [a for a in (a.strip() for a in subprocess.check_output(
["pkg-config", "libxml-2.0", "--libs-only-L"]).decode("utf-8").split("-L")) if a]
libraries = [a for a in (a.strip() for a in subprocess.check_output(
["pkg-config", "libxml-2.0", "--libs-only-l"]).decode("utf-8").split("-l")) if a]
class Extension(setuptools.Extension):
def __init__(self, *args, **kwargs):
self.__include_dirs = []
super().__init__(*args, **kwargs)
@property
def include_dirs(self):
import numpy
return self.__include_dirs + [numpy.get_include()]
@include_dirs.setter
def include_dirs(self, dirs):
self.__include_dirs = dirs
install_requires = [
"numpy==1.24.4",
"pandas",
"scipy",
# Maybe make these optional?
"pandasio",
"lxml",
"matplotlib",
"shapely",
"geoalchemy2",
"pyproj",
"pyvista",
"scikit-gstat",
"bokeh",
'rasterio',
'triangle'
]
setuptools.setup(
name='emeraldtriangles',
version='0.1.5',
description='Triangle mesh transforms',
long_description='Iteratively add points to an existing mesh, calculate mesh bounding polygons etc.',
long_description_content_type="text/markdown",
author='Egil Moeller, Craig W. Christensen, et al.',
author_email='em@emrld.no',
url='https://github.com/EMeraldGeo/EmeraldTriangles',
packages=setuptools.find_packages(),
install_requires=install_requires
,
setup_requires=[
'setuptools>=18.0',
'numpy',
'cython',
],
package_data={'emeraldtriangles': ['*/*.pyx', '*/*.pxd']},
ext_modules=[
Extension(
'emeraldtriangles.io._landxml',
sources=['emeraldtriangles/io/_landxml.pyx'],
include_dirs = include_dirs,
library_dirs = library_dirs,
libraries = libraries,
),
]
)