-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
41 lines (33 loc) · 1.2 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
import sys
from pathlib import Path
from typing import List
projet_dir: Path = Path(__file__).resolve().parent
source_dir: Path = projet_dir / "src"
sys.path.insert(0,str(source_dir))
from sensorsim import LICENCE, AUTHOR, AUTHOR_EMAIL, PROJECT, DESCRIPTION, __version__ as VERSION
from setuptools import setup, find_packages
def parse_requirements(filename: str) -> List[str]:
"""Load requirements from pip requirements file"""
with open(filename, "r") as f:
lines: List[str] = []
for l in f:
l.strip()
if l and not l.startswith('#'):
lines.append(l)
return lines
requirements: List[str] = parse_requirements("requirements.txt")
if __name__ == "__main__":
setup(
name=PROJECT,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
keywords=['sensorsim'],
packages=find_packages(str(source_dir)),
package_dir= {"sensorsim":str(source_dir / "sensorsim")},
url='https://github.com/adriengoeller/python-sensor-simulation',
python_requires='>=3',
license='LICENSE',
description=DESCRIPTION,
long_description=open('README.md').read(),
)