-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
66 lines (49 loc) · 1.79 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
from pathlib import Path
from setuptools import find_packages
from setuptools import setup
from pathlib import Path
import os
def get_version():
from importlib.machinery import SourceFileLoader
version = SourceFileLoader('version', 'bisect_scanner/version.py').load_module()
return version.__version__
VERSION = get_version()
try:
from pip._internal.req import parse_requirements
except ImportError:
from pip.req import parse_requirements
basepath = Path(os.path.dirname(__file__))
requirements_path = basepath / Path("requirements.txt")
install_reqs = [*parse_requirements(str(requirements_path), session="hack")]
dev_requirements_path = basepath / Path("requirements-dev.txt")
dev_install_reqs = [*parse_requirements(str(dev_requirements_path), session="hack")]
try:
reqs = [str(ir.req) for ir in install_reqs]
except AttributeError:
reqs = [str(ir.requirement) for ir in install_reqs]
try:
dev_reqs = [str(ir.req) for ir in dev_install_reqs]
except AttributeError:
dev_reqs = [str(ir.requirement) for ir in dev_install_reqs]
README = (Path(__file__).absolute().parent / "README.md").read_text()
setup(
name="bisect_scanner",
version=VERSION,
url="https://github.com/Gaunt/bisect_scanner",
license="MIT",
author="Karel Novak",
author_email="novakk5@gmail.com",
description="Scan for balance history",
long_description_content_type="text/markdown",
long_description=README,
packages=find_packages(exclude=("tests",)),
install_requires=reqs,
tests_require=dev_reqs,
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
)