-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
139 lines (118 loc) · 5.17 KB
/
Copy pathsetup.py
File metadata and controls
139 lines (118 loc) · 5.17 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
"""
Setup script for crash_sight - A zero-dependency debugging engine for Python.
This script configures the package metadata, dependencies, and build
configuration for distribution via PyPI or direct installation.
Usage:
pip install .
# or for development:
pip install -e .
"""
import os
from setuptools import setup, find_packages
def read_readme() -> str:
"""
Safely read the README.md file for long_description.
Falls back to a default description if the file is missing or
cannot be read due to encoding issues.
Returns:
str: The content of README.md or a fallback description.
"""
readme_path: str = os.path.join(os.path.dirname(__file__), "README.md")
try:
if os.path.exists(readme_path):
with open(readme_path, "r", encoding="utf-8") as f:
return f.read()
else:
return "crash_sight: A zero-dependency debugging engine for Python that intercepts unhandled exceptions, extracts post-mortem state, masks sensitive data, and provides formatted crash reports with an interactive debugging REPL."
except (IOError, UnicodeDecodeError, OSError):
return "crash_sight: A zero-dependency debugging engine for Python."
setup(
# ── Package Identity ──────────────────────────────────────────────
name="crash_sight",
version="1.1.0",
description=(
"A zero-dependency debugging engine for Python that intercepts "
"unhandled exceptions, extracts post-mortem state, masks sensitive "
"data, and provides formatted crash reports with an interactive "
"debugging REPL."
),
long_description=read_readme(),
long_description_content_type="text/markdown",
# ── Author & License ──────────────────────────────────────────────
author="crash_sight Team",
author_email="nagibmnagib01@gmail.com",
url="https://github.com/annaqibz01/crash_sight",
project_urls={
"Documentation": "https://crash-sight.readthedocs.io/",
"Source Code": "https://github.com/annaqibz01/crash_sight",
"Bug Tracker": "https://github.com/annaqibz01/crash_sight/issues",
},
license="MIT",
license_files=("LICENSE",),
# ── Classification & Keywords ─────────────────────────────────────
classifiers=[
# Maturity
"Development Status :: 5 - Production/Stable",
# Intended audience
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
# Topic
"Topic :: Software Development :: Debuggers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Monitoring",
# License
"License :: OSI Approved :: MIT License",
# Python versions (3.8 through 3.14)
"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",
# Environment & OS
"Operating System :: OS Independent",
"Environment :: Console",
# Type
"Typing :: Typed",
],
keywords=[
"debugging",
"debugger",
"exception",
"crash",
"post-mortem",
"repl",
"error-handling",
"developer-tools",
"zero-dependency",
],
# ── Package Discovery ─────────────────────────────────────────────
packages=find_packages(
where=".",
exclude=[
"tests",
"tests.*",
"*.tests",
"*.tests.*",
],
),
include_package_data=True,
package_data={
"crash_sight": ["py.typed"], # PEP 561 marker for typed packages
},
# ── Dependencies ──────────────────────────────────────────────────
# Zero-dependency library: only uses Python Standard Library
python_requires=">=3.8, <3.15",
install_requires=[], # Explicitly empty to assert zero-dependency nature
# ── Entry Points ──────────────────────────────────────────────────
entry_points={
"console_scripts": [
# Optional: CLI entry point for manual crash report inspection
"crash-sight=crash_sight.cli:main",
],
},
# ── Build Configuration ───────────────────────────────────────────
zip_safe=False, # Prevents ZIP-egg installation for better compatibility
)