-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
77 lines (65 loc) · 1.98 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
#! /usr/bin/env python
import os
import sys
import numpy as np
from setuptools import Extension, find_packages, setup
common_flags = {
"include_dirs": [
np.get_include(),
os.path.join(sys.prefix, "include"),
],
"library_dirs": [],
"define_macros": [],
"undef_macros": [],
"extra_compile_args": [],
"language": "c++",
}
libraries = []
# Locate directories under Windows %LIBRARY_PREFIX%.
if sys.platform.startswith("win"):
common_flags["include_dirs"].append(os.path.join(sys.prefix, "Library", "include"))
common_flags["library_dirs"].append(os.path.join(sys.prefix, "Library", "lib"))
ext_modules = [
Extension(
"pymt_heatcxx.lib.heatmodelcxx",
["pymt_heatcxx/lib/heatmodelcxx.pyx"],
libraries=libraries + ["bmiheatcxx"],
**common_flags
),
]
entry_points = {
"pymt.plugins": [
"HeatModelCxx=pymt_heatcxx.bmi:HeatModelCxx",
]
}
def read(filename):
with open(filename, "r", encoding="utf-8") as fp:
return fp.read()
long_description = u"\n\n".join(
[read("README.rst"), read("CREDITS.rst"), read("CHANGES.rst")]
)
setup(
name="pymt_heatcxx",
author="csdms",
author_email="csdms@colorado.edu",
description="PyMT plugin for pymt_heatcxx",
long_description=long_description,
version="0.2.dev0",
url="https://github.com/pymt-lab/pymt_heatcxx",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
],
keywords=["bmi", "pymt"],
install_requires=open("requirements.txt", "r").read().splitlines(),
setup_requires=["cython"],
ext_modules=ext_modules,
packages=find_packages(),
entry_points=entry_points,
include_package_data=True,
)