-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
92 lines (88 loc) · 3.38 KB
/
setup.py
File metadata and controls
92 lines (88 loc) · 3.38 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
"""
Setup script for MQTTD package
"""
from setuptools import setup, find_packages # type: ignore[import-untyped]
from pathlib import Path
# Read README for long description
readme_file = Path(__file__).parent / "README.md"
long_description = readme_file.read_text() if readme_file.exists() else ""
# Read version from __init__.py
version_file = Path(__file__).parent / "mqttd" / "__init__.py"
version = "0.5.1" # Default version (will be overridden by reading from __init__.py)
if version_file.exists():
for line in version_file.read_text().splitlines():
if line.startswith("__version__"):
# Extract version, handling comments and quotes
version_str = line.split("=")[1].strip()
# Remove comments
if "#" in version_str:
version_str = version_str.split("#")[0].strip()
# Remove quotes
version = version_str.strip('"').strip("'")
break
setup(
name="mqttd",
version=version,
description="FastAPI-like MQTT/MQTTS server for Python, compatible with libcurl clients",
long_description=long_description,
long_description_content_type="text/markdown",
author="Yakub Mohammad",
author_email="yakub@arusatech.com",
url="https://github.com/arusatech/mqttd",
project_urls={
"Bug Reports": "https://github.com/arusatech/mqttd/issues",
"Source": "https://github.com/arusatech/mqttd",
"Documentation": "https://github.com/arusatech/mqttd#readme",
},
packages=find_packages(exclude=["tests", "tests.*", "examples", "examples.*", "docs", "docs.*", "reference", "reference.*"]),
python_requires=">=3.7", # Support Python 3.7+ (3.13+ recommended for no-GIL)
install_requires=[
# Redis is optional - only needed for Redis pub/sub mode
# Direct routing works without Redis
],
extras_require={
"redis": [
"redis>=5.0.0",
],
"quic": [
# Optional QUIC support via aioquic (not compatible with no-GIL Python)
"aioquic>=0.9.20",
],
"quic-ngtcp2": [
# Note: ngtcp2 must be installed as C library
# Install via system package manager or build from source
# See: https://github.com/ngtcp2/ngtcp2
],
"dev": [
"pytest>=6.0",
"pytest-asyncio>=0.18.0",
"black>=21.0",
"mypy>=0.900",
],
"all": [
"redis>=5.0.0",
"aioquic>=0.9.20",
],
},
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"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",
"Topic :: Communications",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Networking",
],
keywords="mqtt mqtts mqtt5 server broker fastapi libcurl quic http3",
zip_safe=False,
include_package_data=True,
)