-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
85 lines (81 loc) · 2.87 KB
/
setup.py
File metadata and controls
85 lines (81 loc) · 2.87 KB
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
import sys
from setuptools import setup, find_packages, Extension
_VERSION: str = "2.5.4"
_CLI_INFO: dict[str, list[str]] = {
"console_scripts": [
"python -m errortools = _errortools.cli:main",
"logger = _errortools.cli:main",
]
}
_DESCRIPTION: str = (
"errortools - a toolset for working with Python exceptions and warnings and logging."
)
_URL: str = "https://github.com/more-abc/errortools"
_AUTHOR: str = "Evan Yang"
_AUTHOR_EMAIL: str = "quantbit@126.com"
_LICENSE: str = "MIT"
# C extension for performance
_speedup_module = Extension(
"_errortools._speedup",
sources=["_errortools/_speedup.c"],
extra_compile_args=["/O2"] if sys.platform == "win32" else ["-O3", "-march=native"],
)
if sys.version_info >= (3, 15):
setup(
name="errortools",
version=_VERSION,
description=_DESCRIPTION,
long_description=open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
url=_URL,
author=_AUTHOR,
author_email=_AUTHOR_EMAIL,
license=_LICENSE,
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.15",
"Operating System :: OS Independent",
"Typing :: Typed",
],
packages=find_packages(),
package_data={"errortools": ["py.typed"]},
include_package_data=True,
python_requires=">=3.15",
install_requires=["namebyauthor==1.0.0"],
entry_points=_CLI_INFO,
ext_modules=[_speedup_module],
)
else:
setup(
name="errortools",
version=_VERSION,
description=_DESCRIPTION,
long_description=open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
url=_URL,
author=_AUTHOR,
author_email=_AUTHOR_EMAIL,
license=_LICENSE,
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Operating System :: OS Independent",
"Typing :: Typed",
],
packages=find_packages(),
package_data={"errortools": ["py.typed"]},
include_package_data=True,
python_requires=">=3.10",
install_requires=["namebyauthor==1.0.0", "typing_extensions>=4.8.0"],
entry_points=_CLI_INFO,
ext_modules=[_speedup_module],
)