forked from switch-model/switch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
90 lines (82 loc) · 3.26 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
89
90
"""Setup script for Switch.
Use "pip install --upgrade ." to install a copy in the site packages directory.
Use "pip install --upgrade --editable ." to install Switch to be run from its
current location.
Optional dependencies can be added during the initial install or later by
running a command like this:
pip install --upgrade --editable .[advanced,database_access]
Use "pip uninstall switch" to uninstall switch from your system.
"""
import os
from setuptools import setup, find_packages
# Get the version number. Strategy #3 from https://packaging.python.org/single_source_version/
version_path = os.path.join(os.path.dirname(__file__), 'switch_model', 'version.py')
version = {}
with open(version_path) as f:
exec(f.read(), version)
__version__ = version['__version__']
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
setup(
name='switch_model',
version=__version__,
maintainer='Switch Authors',
maintainer_email='[email protected]',
url='http://switch-model.org',
license='Apache License 2.0',
platforms=["any"],
description='Switch Power System Planning Model',
long_description=read('README'),
long_description_content_type="text/markdown",
classifiers=[
# from https://pypi.org/classifiers/
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Education',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
'Operating System :: Unix',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering',
'Topic :: Software Development :: Libraries :: Python Modules'
],
packages=find_packages(include=['switch_model', 'switch_model.*']),
keywords=[
'renewable', 'power', 'energy', 'electricity',
'production cost', 'capacity expansion',
'planning', 'optimization'
],
python_requires='>=2.7.12',
install_requires=[
# Pyomo 4.4.1+ works with glpk 4.60+
'Pyomo >=4.4.1, <=5.6.8',
# pyutilib 6.0 breaks compatibility, and earlier versions of Pyomo
# will cheerfully install it, so we explicitly block it
'pyutilib <=5.7.3',
'pint', # needed by Pyomo when we run our tests, but not included
'testfixtures', # used for standard tests
'pandas', # used for input upgrades and testing that functionality
],
extras_require={
# packages used for advanced demand response, progressive hedging
# note: rpy2 discontinued support for Python 2 as of rpy2 2.9.0
'advanced': [
'numpy', 'scipy',
'rpy2<2.9.0;python_version<"3.0"',
'rpy2;python_version>="3.0"',
'sympy'
],
'dev': ['ipdb'],
'plotting': ['ggplot'],
'database_access': ['psycopg2-binary']
},
entry_points={
'console_scripts': ['switch = switch_model.main:main']
},
)