-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
101 lines (93 loc) · 2.5 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import find_packages, setup
from setuptools_rust import Binding, RustExtension
from pathlib import Path
short_description = "No description has been added so far."
version = "0.1.2"
try:
if (Path().parent / "README.md").is_file():
import m2r
long_description = m2r.parse_from_file(Path().parent / "README.md")
else:
raise AssertionError("missing README file")
except (ImportError, AssertionError):
long_description = short_description
requirements = [
"Click>=6.0",
]
build_requirements = [
"setuptools-rust",
"twine",
"wheel",
"cibuildwheel",
]
test_requirements = [
"tox",
"pytest",
"pytest-cov",
"pytest-xdist",
"pytest-sugar",
"mypy",
"pyfakefs",
]
coverage_requirements = ["coverage"]
formatting_requirements = ["flake8", "black==21.8b0"]
tool_requirements = [
"m2r",
"mistune==0.8.4",
"invoke",
"pre-commit",
"bump2version",
]
dev_requirements = (
requirements
+ build_requirements
+ test_requirements
+ coverage_requirements
+ formatting_requirements
+ tool_requirements
)
setup(
author="romnn",
author_email="[email protected]",
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Operating System :: OS Independent",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
entry_points={
"console_scripts": [
"box=box.cli:main",
]
},
python_requires=">=3.6",
install_requires=requirements,
tests_require=test_requirements,
extras_require=dict(dev=dev_requirements, test=test_requirements),
license="MIT",
description=short_description,
long_description=long_description,
include_package_data=True,
package_data={"box": []},
keywords="box",
name="box",
rust_extensions=[RustExtension("box", binding=Binding.PyO3)],
packages=find_packages(
include=["box"], exclude=["target"]
),
test_suite="tests",
url="https://github.com/romnn/box",
version=version,
zip_safe=False,
)