forked from damianfraszczak/nsdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
66 lines (59 loc) · 1.87 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
import os
import re
from setuptools import find_packages, setup
def read(*path_parts):
"""Retrieve content of a text file."""
file_path = os.path.join(os.path.dirname(__file__), *path_parts)
with open(file_path) as file_obj:
return file_obj.read()
def find_version(*path_parts):
"""Find the current version string."""
version_file_contents = read(*path_parts)
version_match = re.search(
r'^__version__ = ["\'](?P<version>[^"\']*)["\']',
version_file_contents,
re.M,
)
if not version_match:
raise RuntimeError("Unable to find version string.")
version = version_match.group("version")
return version
setup(
name="nsdlib",
version=find_version("src", "nsdlib", "version.py"),
license="MIT",
description="Network source detection library",
url="https://github.com/damianfraszczak/nsdlib",
author="Damian Frąszczak, Edyta Frąszczak",
author_email="[email protected]",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
],
keywords="propagation-source-detection outbreaks-detection propagation-reconstruction complex-networks",
install_requires=[
"networkx>=3.0",
"numpy",
"scipy",
],
long_description=read("README.md"),
long_description_content_type="text/markdown",
extras_require={
"lint": [
"bandit",
"black",
"flake8",
"flake8-debugger",
"flake8-docstrings",
"flake8-isort",
"mypy",
"pylint",
],
},
package_dir={"": "src"},
packages=find_packages(where="src"),
)