-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
80 lines (67 loc) · 1.99 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
79
80
#! /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": [
"-std=c++11",
],
"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"))
common_flags["library_dirs"].append(os.path.join(sys.prefix, "lib"))
ext_modules = [
Extension(
"pymt_child.lib.child",
["pymt_child/lib/child.pyx"],
libraries=libraries + ["child"],
**common_flags
),
]
entry_points = {
"pymt.plugins": [
"Child=pymt_child.bmi:Child",
]
}
def read(filename):
with open(filename, "r") as fp:
return fp.read()
long_description = u"\n\n".join(
[read("README.rst"), read("CREDITS.rst"), read("CHANGES.rst")]
)
setup(
name="pymt_child",
author="Eric Hutton",
author_email="[email protected]",
description="PyMT plugin for pymt_child",
long_description=long_description,
version="0.2.2.dev0",
url="https://github.com/mcflugen/pymt_child",
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(),
ext_modules=ext_modules,
packages=find_packages(),
entry_points=entry_points,
include_package_data=True,
)