forked from sandialabs/MEWS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·75 lines (64 loc) · 2.32 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
from setuptools import setup, find_packages
import os
import re
import numpy as np
from distutils.core import setup
from distutils.extension import Extension
DISTNAME = 'mews'
PACKAGES = find_packages()
DESCRIPTION = 'Multi-scenario Extreme Weather Simulator (MEWS)'
AUTHOR = 'MEWS Developers'
MAINTAINER_EMAIL = '[email protected]'
LICENSE = 'Revised BSD'
URL = 'https://github.com/sandialabs/MEWS'
DEPENDENCIES = ['numpy', 'pandas', 'matplotlib','scipy','statsmodels']
try:
from Cython.Distutils import build_ext
except ImportError:
use_cython = False
else:
use_cython = True
cmdclass = {}
ext_modules = []
if use_cython:
# include_dirs is needed here for MAC OS systems
ext_modules += [
Extension("mews.cython.markov", ["mews/cython/markov.pyx"],include_dirs=[np.get_include()]),
]
cmdclass.update({'build_ext': build_ext})
else:
ext_modules += [
Extension("mews.cython.markov", ["mews/cython/markov.pyx"],include_dirs=[np.get_include()]),
]
# use README file as the long description
file_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(file_dir, 'README.md'), encoding='utf-8') as f:
LONG_DESCRIPTION = f.read()
# get version from __init__.py
with open(os.path.join(file_dir, 'mews', '__init__.py')) as f:
version_file = f.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
VERSION = version_match.group(1)
else:
raise RuntimeError("Unable to find version string.")
setup(name=DISTNAME,
cmdclass=cmdclass,
version=VERSION,
packages=PACKAGES,
ext_modules=ext_modules,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author=AUTHOR,
author_email=MAINTAINER_EMAIL,
maintainer_email=MAINTAINER_EMAIL,
license=LICENSE,
url=URL,
download_url='https://github.com/sandialabs/MEWS/archive/refs/tags/v0.0.0.tar.gz',
zip_safe=False,
install_requires=DEPENDENCIES,
scripts=[],
include_package_data=True,
include_dirs = [np.get_include()],
keywords = ["Building Energy Modeling","Infrastructure","Extreme Weather","Markov","Resilience","Energy Plus","DOE2","DOE-2"])