Files
ktransformers/kt-kernel/pyproject.toml
Jianwei Dong 15c624dcae Fix/sglang kt detection (#1875)
* [feat]: simplify sglang installation with submodule, auto-sync CI, and version alignment

- Add kvcache-ai/sglang as git submodule at third_party/sglang (branch = main)
- Add top-level install.sh for one-click source installation (sglang + kt-kernel)
- Add sglang-kt as hard dependency in kt-kernel/pyproject.toml
- Add CI workflow to auto-sync sglang submodule daily and create PR
- Add CI workflow to build and publish sglang-kt to PyPI
- Integrate sglang-kt build into release-pypi.yml (version.py bump publishes both packages)
- Align sglang-kt version with ktransformers via SGLANG_KT_VERSION env var injection
- Update Dockerfile to use submodule and inject aligned version
- Update all 13 doc files, CLI hints, and i18n strings to reference new install methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [build]: bump version to 0.5.2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [build]: rename PyPI package from kt-kernel to ktransformers

Users can now `pip install ktransformers` to get everything
(sglang-kt is auto-installed as a dependency).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert "[build]: rename PyPI package from kt-kernel to ktransformers"

This reverts commit e0cbbf6364.

* [build]: add ktransformers meta-package for PyPI

`pip install ktransformers` now works as a single install command.
It pulls kt-kernel (which in turn pulls sglang-kt).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [fix]: show sglang-kt package version in kt version command

- Prioritize sglang-kt package version (aligned with ktransformers)
  over sglang internal __version__
- Update display name from "sglang" to "sglang-kt"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [fix]: improve sglang-kt detection in kt doctor and kt version

Recognize sglang-kt package name as proof of kvcache-ai fork installation.
Previously both commands fell through to "PyPI (not recommended)" for
non-editable local source installs. Now version.py reuses the centralized
check_sglang_installation() logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [build]: bump version to 0.5.2.post1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 16:54:48 +08:00

103 lines
2.4 KiB
TOML

[build-system]
# Minimum versions: setuptools for setup.py declarative usage, wheel for bdist_wheel
requires = ["setuptools>=61", "wheel", "cmake>=3.16", "pybind11"]
build-backend = "setuptools.build_meta"
[project]
name = "kt-kernel"
# Version is dynamically read from ../version.py via setup.py
dynamic = ["version"]
description = "KT-Kernel: High-performance kernel operations for KTransformers (AMX/AVX/KML optimizations)"
readme = "README.md"
authors = [{ name = "kvcache-ai" }]
# Use SPDX string form (table form deprecated in newer setuptools)
license = "Apache-2.0"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: C++",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
]
requires-python = ">=3.8"
dependencies = [
# Core dependencies
"torch>=2.0.0",
"safetensors>=0.4.0",
"compressed-tensors>=0.7.0",
"numpy>=1.24.0",
"triton>=2.0.0",
"gguf>=0.17.0",
# CLI dependencies
"typer[all]>=0.9.0",
"rich>=13.0.0",
"pyyaml>=6.0",
"httpx>=0.25.0",
"packaging>=23.0",
# SGLang (kvcache-ai fork)
"sglang-kt",
# Development dependencies
"black>=25.9.0",
]
[project.optional-dependencies]
test = [
"pytest>=7.0.0",
"psutil>=5.9.0",
]
[project.scripts]
kt = "kt_kernel.cli.main:main"
[project.urls]
Homepage = "https://github.com/kvcache-ai"
[tool.setuptools]
packages = [
"kt_kernel",
"kt_kernel.utils",
"kt_kernel.cli",
"kt_kernel.cli.commands",
"kt_kernel.cli.config",
"kt_kernel.cli.utils",
"kt_kernel.cli.completions",
]
include-package-data = true
[tool.setuptools.package-dir]
kt_kernel = "python"
"kt_kernel.utils" = "python/utils"
"kt_kernel.cli" = "python/cli"
"kt_kernel.cli.commands" = "python/cli/commands"
"kt_kernel.cli.config" = "python/cli/config"
"kt_kernel.cli.utils" = "python/cli/utils"
"kt_kernel.cli.completions" = "python/cli/completions"
[tool.setuptools.package-data]
"kt_kernel.cli.completions" = ["*.bash", "*.fish", "_kt"]
[tool.setuptools.exclude-package-data]
# (empty)
[tool.cpuinfer]
# Custom section (example). You can place build options documentation here.
# CPUINFER_CPU_INSTRUCT: NATIVE|FANCY|AVX512|AVX2
# CPUINFER_ENABLE_AMX: ON/OFF
# CPUINFER_VERBOSE: 1/0
[tool.black]
# Code style for Black formatter
line-length = 120
target-version = ["py311"]
exclude = '''
(
/(\.
| build
| dist
| temp
| __pycache__
| kt_kernel\.egg-info
| third_party
)/
)
'''