-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.py
executable file
·88 lines (78 loc) · 3.23 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
81
82
83
84
85
86
87
88
import setuptools
import os
import re
with open('VERSION', 'r') as fh:
__version__ = fh.read()
with open("README.rst", "r") as fh:
long_description = fh.read()
# Update the __version__ in __init__ before installing:
# Update the __version__ in __about__ before installing:
# Path to __init__.py:
init_path = os.path.join('esa', '__init__.py')
about_path = os.path.join('esa', '__about__.py')
# Read __init__.py:
with open(init_path, 'r') as fh:
__init__ = fh.read()
# Update the version:
__init__ = re.sub(r'__version__\s*=\s*[\'"][0-9]+\.[0-9]+\.[0-9]+[\'"]',
'__version__ = "{}"'.format(__version__),
__init__)
# Write new __init__.py:
with open(init_path, 'w') as fh:
fh.write(__init__)
# Read __about__.py:
with open(about_path, 'r') as fh:
__about__ = fh.read()
# Update the version:
__about__ = re.sub(r'__version__\s*=\s*[\'"][0-9]+\.[0-9]+\.[0-9]+[\'"]',
'__version__ = "{}"'.format(__version__), __about__)
# Write new __about__.py:
with open(about_path, 'w') as fh:
fh.write(__about__)
setuptools.setup(
name='esa',
version=__version__,
description='Easy SimAuto (ESA): An easy-to-use Python connector to '
'PowerWorld Simulator Automation Server (SimAuto).',
long_description=long_description,
long_description_content_type="text/x-rst",
author='Zeyu Mao, Brandon Thayer, Yijing Liu',
url='https://github.com/mzy2240/ESA',
packages=setuptools.find_packages(),
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: Apache Software License",
"Operating System :: Microsoft :: Windows",
"Development Status :: 5 - Production/Stable",
"Environment :: Win32 (MS Windows)",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Topic :: Education",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
],
keywords=['Python', 'PowerWorld', 'PowerWorld Simulator', 'Simulator',
'PowerWorld Simulation Automation Server', 'SimAuto',
'Automation', 'Power Systems', 'Electric Power', 'Power',
'Easy SimAuto', 'ESA', 'Smart Grid', 'Numpy', 'Pandas'],
install_requires=['pandas >= 0.25', 'numpy >= 1.19.5', 'scipy', 'pywin32',
'pypiwin32', 'toolz', 'networkx', 'tqdm'],
python_requires='>=3.7',
# There are a couple tests that use networkx, and we use the magic
# of sphinx for documentation. Coverage is necessary to keep the
# coverage report up to date.
extras_require={'test': ['networkx', 'coverage', 'matplotlib'],
'doc': ['sphinx', 'tabulate', 'sphinx_press_theme'],
'dev': ['pythran', 'numba']},
license='Apache License 2.0',
# TODO: Why aren't we zip safe?
zip_safe=False
)