-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
62 lines (48 loc) · 1.82 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
# pylint: skip-file
# type: ignore
import dataclasses as _dc
import pathlib as _pl
import itertools as _it
import setuptools as _st
with open("README.md", "r") as fh:
long_description = fh.read()
@_dc.dataclass
class _DestDirSourceFilePath:
destDir: str
sourceFilePath: str
def _getDataFilePairs():
dataDirPath = _pl.Path(__file__).parent / "data"
dataFilePaths = [p.relative_to(dataDirPath) for p in dataDirPath.rglob("*") if p.is_file()]
destDirSourcePathPairs = [
_DestDirSourceFilePath(str("pytrnsys_data" / p.parent), str("data" / p)) for p in dataFilePaths
]
sortedPairs = sorted(destDirSourcePathPairs, key=lambda dp: dp.destDir)
dataFilePairs = [
(d, [dp.sourceFilePath for dp in dps]) for d, dps in _it.groupby(sortedPairs, key=lambda dp: dp.destDir)
]
return dataFilePairs
_st.setup(
name="pytrnsys",
version_config=True,
packages=_st.find_packages(),
author="Institute for Solar Technology (SPF), OST Rapperswil",
author_email="martin.neugebauer@ost.ch",
description="pytrnsys simulation framework",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://pytrnsys.readthedocs.io",
include_package_data=True,
install_requires=["numpy", "scipy", "pandas", "matplotlib", "seaborn", "bokeh", "dataclasses-jsonschema", "lark"],
package_data={
"pytrnsys": ["py.typed", "./plot/stylesheets/*.*", "./report/latex_doc/*.*", "ddck/_parse/ddck.lark"],
},
data_files=_getDataFilePairs(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
],
scripts=["scripts/collectJsonsIntoCsv.py"],
setup_requires=["setuptools-git-versioning"],
python_requires=">=3.9",
)