-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathsetup.py
73 lines (65 loc) · 2.42 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
from setuptools import setup
import os
# python setup.py bdist_wheel
# python setup.py sdist
# twine upload dist/* --config-file .pypirc
def read_version_from_init(file_path="epyt/__init__.py"):
version_line = None
with open(file_path, "r", encoding="utf-8") as f:
for line in f:
if line.startswith("__version__"):
version_line = line
break
if version_line:
version_str = version_line.split("=")[1].strip().strip('"').strip("'")
return version_str
else:
raise RuntimeError("Unable to find version string.")
__version__ = read_version_from_init()
module_name = 'epyt'
data = list()
packages = list()
pack_path = os.path.join(os.getcwd(), module_name)
for root, dirs, files in os.walk(pack_path):
p = '/'
if root == pack_path:
packages = dirs
p = ''
for file in files:
data.append(f"{root[len(pack_path) + 1:]}{p}{file}")
packages = [f"{module_name}.{x}" for x in packages]
packages.append(module_name)
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name=module_name,
version=f"{__version__}",
author="Marios S. Kyriakou",
author_email="[email protected]",
description='EPyT: An EPANET-Python Toolkit for Smart Water Network Simulations. The EPyT is inspired by the '
'EPANET-Matlab Toolkit.',
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/OpenWaterAnalytics/EPyT',
project_urls={
"Bug Tracker": 'https://github.com/OpenWaterAnalytics/EPyT/issues',
},
packages=packages,
keywords='epanet, water, networks, hydraulics, quality, simulations, emt, epanet matlab toolkit',
classifiers=[
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python',
'License :: OSI Approved :: European Union Public Licence 1.2 '
'(EUPL 1.2)',
'Operating System :: OS Independent',
],
python_requires=">=3.8",
package_data={f'{module_name}': data},
install_requires=['numpy', 'matplotlib', 'pandas', 'xlsxwriter', 'setuptools'],
include_package_data=True
)