-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
109 lines (99 loc) · 3.29 KB
/
Copy pathsetup.py
File metadata and controls
109 lines (99 loc) · 3.29 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
"""
Setup script for GhostStream
Installation modes:
pip install ghoststream # SDK + shared models/contracts
pip install "ghoststream[server]" # Add the server runtime dependencies
SDK Usage:
from ghoststream import GhostStreamClient, TranscodeStatus
client = GhostStreamClient(manual_server="192.168.4.2:8765")
job = client.transcode(source="http://...", resolution="1080p")
print(f"Stream URL: {job.stream_url}")
"""
from setuptools import setup, find_packages
# Read version without importing the full package (avoids dependency issues)
__version__ = "1.0.0"
try:
with open("ghoststream/__init__.py", "r", encoding="utf-8") as f:
for line in f:
if line.startswith("__version__"):
__version__ = line.split("=")[1].strip().strip('"').strip("'")
break
except Exception:
pass
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
# Core SDK dependencies (minimal for client-only usage)
sdk_requirements = [
"gevent>=24.2.1",
"httpx>=0.27.0",
"pydantic>=2.6.0",
"zeroconf>=0.131.0",
]
# Full server dependencies (in addition to SDK)
server_requirements = [
# Core Framework (Specter-native: Flask + gevent)
"specter-runtime>=0.1.2",
"flask>=3.0.0",
"gevent-websocket>=0.10.1",
# Configuration
"pyyaml>=6.0.1",
"pydantic-settings>=2.2.0",
# Logging
"python-json-logger>=2.0.7",
# Dashboard (TUI)
"textual>=0.50.0",
"rich>=13.7.0",
# Utilities
"psutil>=5.9.7",
]
# All dependencies (SDK + server)
all_requirements = sdk_requirements + [
requirement for requirement in server_requirements if requirement not in sdk_requirements
]
setup(
name="ghoststream",
version=__version__,
author="GhostStream Contributors",
description="Open Source Cross-Platform Transcoding Service & SDK",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/BleedingXiko/GhostStream",
packages=find_packages(exclude=["tests", "tests.*", "examples"]),
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Multimedia :: Video :: Conversion",
"Framework :: Flask",
],
python_requires=">=3.9",
# By default, install the SDK + shared public models/contracts.
install_requires=sdk_requirements,
extras_require={
# Full server installation
"server": server_requirements,
# All dependencies (SDK + server)
"all": all_requirements,
# Development dependencies
"dev": [
"pytest>=7.4.0",
"pytest-asyncio>=0.23.0",
],
},
entry_points={
"console_scripts": [
"ghoststream=ghoststream.__main__:main",
],
},
include_package_data=True,
package_data={
"ghoststream": ["*.yaml"],
},
)