forked from raiden-network/raiden
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·87 lines (71 loc) · 2.69 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env python
from setuptools import find_packages, setup
from setuptools.command.egg_info import egg_info
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
raise SystemExit(errno)
class EggInfo(egg_info):
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
# FFS, setuptools_scm forcibly includes all files under version control into the sdist
# package, ignoring `MANIFEST.in` and `find_packages`.
# See https://github.com/pypa/setuptools_scm/issues/190
# We 'fix' this by replacing the `find_files` function with a dummy one.
# The reason this is done here and not on the top level is that setuptools_scm is a
# setup time requirement so it may not have been installed when this setup.py is initially
# executed.
try:
import setuptools_scm.integration
setuptools_scm.integration.find_files = lambda _: []
except ImportError:
pass
with open("README.rst") as readme_file:
readme = readme_file.read()
history = ""
with open("constraints.txt") as req_file:
install_requires = list(
{
requirement
for requirement in req_file
if requirement.strip() and not requirement.lstrip().startswith("#")
}
)
test_requirements = []
# Do not edit: this is maintained by bumpversion (see .bumpversion_client.cfg)
version = "0.100.3-rc5"
setup(
name="raiden",
description="",
long_description=readme + "\n\n" + history,
author="Brainbot Labs Est.",
author_email="[email protected]",
url="https://github.com/raiden-network/raiden",
packages=find_packages(include=("raiden", "raiden.*")),
package_data={"raiden": ["py.typed"]},
license="MIT",
zip_safe=False,
keywords="raiden",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
cmdclass={"test": PyTest, "egg_info": EggInfo},
use_scm_version=True,
setup_requires=["setuptools_scm"],
install_requires=install_requires,
tests_require=test_requirements,
python_requires=">=3.7",
entry_points={"console_scripts": ["raiden = raiden.__main__:main"]},
)