forked from AEFDI/EnergyFaultDetector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
43 lines (32 loc) · 1.23 KB
/
setup.py
File metadata and controls
43 lines (32 loc) · 1.23 KB
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
"""Setup-script for energy_fault_detector package."""
from setuptools import setup, find_packages
PACKAGE_NAME = 'energy_fault_detector' # name used by PIP
IMPORT_NAME = 'energy_fault_detector' # name used for imports
with open('requirements.txt', 'r') as f:
requirements_install = f.readlines()
with open('requirements-dev.txt', 'r') as f:
requirements_dev = f.readlines()
with open('requirements-docs.txt', 'r') as f:
requirements_docs = f.readlines()
# All the requirements
requirements = {
'install': [
r.replace('\n', '') for r in requirements_install if not r.startswith('-r ') and not r.startswith('--extra')
],
'docs': [
r.replace('\n', '') for r in requirements_docs if not r.startswith('-r ')
],
'dev': [
r.replace('\n', '') for r in requirements_dev if not r.startswith('-r ')
]
}
with open(f'{PACKAGE_NAME}/VERSION', 'r') as f:
VERSION = f.readlines()[0].strip()
if __name__ == '__main__':
setup(
name=PACKAGE_NAME,
version=VERSION,
packages=find_packages(exclude=['docs', 'tests', 'tests.*', 'notebooks']),
install_requires=requirements['install'],
extras_require={k: r for k, r in requirements.items() if k != 'install'},
)