gns3-server/pyproject.toml
YueGuobin cd1d28729a feat: make AI Copilot an optional dependency
This change makes AI Copilot features optional to reduce installation
size and support restricted environments.

Changes:
- Split AI dependencies into ai-requirements.txt
- Add ai-copilot optional dependency in pyproject.toml
- Add import protection in gns3server/agent/__init__.py
- Return 501 for AI endpoints when dependencies not installed
- Add gns3server-uninstall-ai-copilot command for cleanup
- Update README with installation and uninstallation instructions

Installation:
- Basic: pip install gns3-server
- With AI: pip install gns3-server[ai-copilot]
- Development: pip install gns3-server[ai-copilot,dev]

Uninstallation:
- gns3server-uninstall-ai-copilot
2026-03-18 15:21:23 +08:00

57 lines
1.9 KiB
TOML

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "gns3-server"
description = "GNS3 graphical interface for the GNS3 server."
license-files = ["LICENSE"]
authors = [
{ name = "Jeremy Grossmann", email = "developers@gns3.com" }
]
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Framework :: FastAPI",
"Intended Audience :: Information Technology",
"Topic :: System :: Networking",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython"
]
dynamic = ["version", "dependencies", "optional-dependencies"]
[tool.setuptools]
packages = ["gns3server"]
[tool.setuptools.dynamic]
version = {attr = "gns3server.version.__version__"}
dependencies = {file = "requirements.txt"}
[tool.setuptools.dynamic.optional-dependencies]
# Development dependencies
dev = {file = ['dev-requirements.txt']}
# Optional components (can be installed individually or combined)
ai-copilot = {file = ['ai-requirements.txt']}
# terraform = {file = ['terraform-requirements.txt']} # Future component
[project.urls]
"Homepage" = "http://gns3.com"
"Repository" = "http://github.com/GNS3/gns3-server"
"Bug tracker" = "http://github.com/GNS3/gns3-server/issues"
[project.scripts]
gns3server = "gns3server.main:main"
gns3vmnet = "gns3server.utils.vmnet:main"
gns3server-uninstall-ai-copilot = "gns3server.utils.uninstall_ai_copilot:main"