-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
executable file
·30 lines (25 loc) · 977 Bytes
/
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
#!/usr/bin/env python3
# Copyright (c) 2018 Kevin Weiss, for HAW Hamburg <kevin.weiss@haw-hamburg.de>
#
# This file is subject to the terms and conditions of the MIT License. See the
# file LICENSE in the top level directory for more details.
# SPDX-License-Identifier: MIT
"""Setup file for memory_map_manager."""
import os
from setuptools import setup
def get_version():
"""Extract package version without importing file.
Importing cause issues with coverage,
(modules can be removed from sys.modules to prevent this)
Importing __init__.py triggers importing rest and then requests too
Inspired from pep8 setup.py
"""
with open(os.path.join('memory_map_manager', "_version.py")) as init_fd:
for line in init_fd:
if line.startswith("__version__"):
return eval(line.split("=")[-1]) # pylint:disable=eval-used
return None
setup(
version=get_version(),
setup_requires=["pytest-runner"],
)