mirror of
https://github.com/commaai/msgq.git
synced 2026-06-11 23:44:58 +08:00
add proper Python packaging with pyproject.toml
Add build-system section, move dev deps to optional, add MANIFEST.in for C++/Cython source distribution, and export BASEDIR/INCLUDE_PATH from __init__.py for consumers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1
MANIFEST.in
Normal file
1
MANIFEST.in
Normal file
@@ -0,0 +1 @@
|
||||
recursive-include msgq *.h *.cc *.pyx *.pxd
|
||||
@@ -1,4 +1,8 @@
|
||||
# must be built with scons
|
||||
import os
|
||||
|
||||
BASEDIR = os.path.dirname(os.path.abspath(__file__))
|
||||
INCLUDE_PATH = os.path.abspath(os.path.join(BASEDIR, "../"))
|
||||
|
||||
from msgq.ipc_pyx import Context, Poller, SubSocket, PubSocket, SocketEventHandle, toggle_fake_events, \
|
||||
set_fake_prefix, get_fake_prefix, delete_fake_prefix, wait_for_one_event
|
||||
from msgq.ipc_pyx import MultiplePublishersError, IpcError
|
||||
|
||||
@@ -1,33 +1,34 @@
|
||||
[project]
|
||||
name = "msgq"
|
||||
version = "0.0.1"
|
||||
description = "Code powering the comma.ai panda"
|
||||
readme = "README.md"
|
||||
version = "0.1.0"
|
||||
description = "Lock-free IPC message queue and VisionIPC"
|
||||
requires-python = ">=3.11,<3.13"
|
||||
license = {text = "MIT"}
|
||||
authors = [{name = "comma.ai"}]
|
||||
classifiers = [
|
||||
"Natural Language :: English",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Topic :: System :: Hardware",
|
||||
]
|
||||
dependencies = [
|
||||
"setuptools", # for distutils
|
||||
"Cython",
|
||||
"scons",
|
||||
"ruff",
|
||||
"parameterized",
|
||||
"coverage",
|
||||
"numpy",
|
||||
"pytest",
|
||||
"pytest-retry",
|
||||
"cppcheck",
|
||||
"cpplint",
|
||||
"codespell",
|
||||
"ty",
|
||||
"lefthook",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"setuptools", "Cython", "scons", "ruff",
|
||||
"parameterized", "coverage", "numpy",
|
||||
"pytest", "pytest-retry",
|
||||
"cppcheck", "cpplint", "codespell", "ty", "lefthook",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools]
|
||||
include-package-data = true
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
"msgq" = ["*.h", "*.cc", "*.pyx", "*.pxd"]
|
||||
"msgq.visionipc" = ["*.h", "*.cc", "*.pyx", "*.pxd"]
|
||||
"msgq.logger" = ["*.h"]
|
||||
|
||||
# https://beta.ruff.rs/docs/configuration/#using-pyprojecttoml
|
||||
[tool.ruff]
|
||||
lint.select = ["E", "F", "W", "PIE", "C4", "ISC", "RUF100", "A"]
|
||||
|
||||
Reference in New Issue
Block a user