1
|
|
|
#!/usr/bin/env python |
2
|
|
|
# -*- encoding: utf-8 -*- |
3
|
|
|
|
4
|
|
|
from glob import glob |
5
|
|
|
from os.path import basename, dirname, join, splitext |
6
|
|
|
import io |
7
|
|
|
import re |
8
|
|
|
|
9
|
|
|
from setuptools import find_packages, setup |
10
|
|
|
|
11
|
|
|
|
12
|
|
|
def read(*names, **kwargs): |
13
|
|
|
with io.open( |
14
|
|
|
join(dirname(__file__), *names), |
15
|
|
|
encoding=kwargs.get("encoding", "utf8"), |
16
|
|
|
) as fh: |
17
|
|
|
return fh.read() |
18
|
|
|
|
19
|
|
|
|
20
|
|
|
long_description = "%s\n%s" % ( |
21
|
|
|
re.compile("^.. start-badges.*^.. end-badges", re.M | re.S).sub( |
22
|
|
|
"", read("README.rst") |
23
|
|
|
), |
24
|
|
|
"\n".join( |
25
|
|
|
[ |
26
|
|
|
re.sub(":[a-z]+:`~?(.*?)`", r"``\1``", read(path)) |
27
|
|
|
for path in glob("docs/whatsnew/*") |
28
|
|
|
] |
29
|
|
|
), |
30
|
|
|
) |
31
|
|
|
|
32
|
|
|
|
33
|
|
|
setup( |
34
|
|
|
name="oemof.db", |
35
|
|
|
# Unfortunately we can't use a `__version__` attribute on `oemof.db` as |
36
|
|
|
# we can't import that module here. It depends on packages which might |
37
|
|
|
# not be available prior to installation. |
38
|
|
|
version="0.0.6", |
39
|
|
|
license="MIT", |
40
|
|
|
description=( |
41
|
|
|
"Open Energy Modelling Framework" |
42
|
|
|
" - An extension for all database related things" |
43
|
|
|
), |
44
|
|
|
long_description=long_description, |
45
|
|
|
long_description_content_type="text/x-rst", |
46
|
|
|
author="oemof developer group", |
47
|
|
|
author_email="[email protected]", |
48
|
|
|
url="https://github.com/oemof/oemof.db", |
49
|
|
|
packages=["oemof"] + ["oemof." + p for p in find_packages("src/oemof")], |
50
|
|
|
package_dir={"": "src"}, |
51
|
|
|
py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")], |
52
|
|
|
include_package_data=True, |
53
|
|
|
zip_safe=False, |
54
|
|
|
classifiers=[ |
55
|
|
|
# complete classifier list: |
56
|
|
|
# http://pypi.python.org/pypi?%3Aaction=list_classifiers |
57
|
|
|
"Development Status :: 4 - Beta", |
58
|
|
|
"Intended Audience :: Developers", |
59
|
|
|
"License :: OSI Approved :: MIT License", |
60
|
|
|
"Operating System :: Unix", |
61
|
|
|
"Operating System :: POSIX", |
62
|
|
|
"Operating System :: Microsoft :: Windows", |
63
|
|
|
"Programming Language :: Python", |
64
|
|
|
"Programming Language :: Python :: 3", |
65
|
|
|
"Programming Language :: Python :: 3.6", |
66
|
|
|
"Programming Language :: Python :: 3.7", |
67
|
|
|
"Programming Language :: Python :: 3.8", |
68
|
|
|
"Programming Language :: Python :: Implementation :: CPython", |
69
|
|
|
# uncomment if you test on these interpreters: |
70
|
|
|
# 'Programming Language :: Python :: Implementation :: IronPython', |
71
|
|
|
# 'Programming Language :: Python :: Implementation :: Jython', |
72
|
|
|
# 'Programming Language :: Python :: Implementation :: Stackless', |
73
|
|
|
"Topic :: Utilities", |
74
|
|
|
], |
75
|
|
|
project_urls={ |
76
|
|
|
"Documentation": "https://oemofdb.readthedocs.io/", |
77
|
|
|
"Changelog": "https://oemofdb.readthedocs.io/en/latest/changelog.html", |
78
|
|
|
"Issue Tracker": "https://github.com/oemof/oemof.db/issues", |
79
|
|
|
}, |
80
|
|
|
keywords=[ |
81
|
|
|
# eg: 'keyword1', 'keyword2', 'keyword3', |
82
|
|
|
], |
83
|
|
|
python_requires=">=3.6", |
84
|
|
|
install_requires=[ |
85
|
|
|
"oemof.solph", |
86
|
|
|
"sqlalchemy >= 1.0", |
87
|
|
|
"keyring", |
88
|
|
|
"pandas >=0.19.1", |
89
|
|
|
], |
90
|
|
|
extras_require={ |
91
|
|
|
# eg: |
92
|
|
|
# 'rst': ['docutils>=0.11'], |
93
|
|
|
# ':python_version=="2.6"': ['argparse'], |
94
|
|
|
}, |
95
|
|
|
) |
96
|
|
|
|