-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (127 loc) · 6.63 KB
/
Copy pathpyproject.toml
File metadata and controls
134 lines (127 loc) · 6.63 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# The PyPI package built from this crate. `maturin` compiles the Rust
# extension, drops it into the pure-Python package under `python/`, and ships
# both in one wheel.
[build-system]
requires = ["maturin>=1.14,<2.0"]
build-backend = "maturin"
[project]
name = "plugmem"
# The npm package's line with the language swapped, so the two third-party
# indexes describe the same product in the same words.
description = "Python bindings for plugmem: an embedded bitemporal memory and retrieval engine for local-first applications and agents (remember / recall / revise / forget over one local database)."
readme = "README.md"
license = "MIT"
# The license *text* is not listed here on purpose: PEP 639 requires the paths
# to sit inside the project directory, and the repository has one LICENSE at
# its root. The release job copies it in before building, so the wheel carries
# it without a second copy in the tree that could drift from the original.
authors = [{ name = "Mansur Azatbek", email = "mansur62624@gmail.com" }]
# The published crates' own vocabulary, in `plugmem-cli`'s shape
# (`["plugmem", "cli", "memory", "llm", "search"]`) with the surface swapped.
# Not a fresh list: a package that describes itself in words the rest of the
# project never uses is a package nobody finds twice.
keywords = ["plugmem", "python", "memory", "llm", "search"]
# 3.10 is the floor because `abi3-py310` makes one wheel serve every version
# from here on. It reaches end of life in October 2026, but Ubuntu 22.04 LTS
# carries it until April 2027 and the flag costs nothing.
requires-python = ">=3.10"
# Every entry below is checked against the official `trove-classifiers` list.
# Each is a fact stated somewhere else in this repository, not a label picked
# to look good in a search filter.
#
# * `3 - Alpha` because every README opens with "Experimental … expect rough
# edges, broken behavior, or mistakes". That is a maturity claim and this
# is where it belongs. Not `4 - Beta`, which would imply a confidence in
# stability the project does not claim; not `2 - Pre-Alpha`, which would
# imply it might not work, and it does.
# * the three operating systems because those are exactly the platforms
# wheels are built for. `OS Independent` would be false — these are
# compiled binaries.
# * `Free Threading` because the release builds `cp314t` wheels alongside the
# abi3 ones.
#
# Two that would have passed the check are deliberately absent:
#
# * `License :: OSI Approved :: MIT License` — PEP 639 says a build backend
# MUST NOT add a license classifier next to an SPDX `license` field and MAY
# error on one. The SPDX expression above is the license statement.
# * `Topic :: Database :: Database Engines/Servers` — the parent topic is
# right, that leaf is not: "no server, no daemon" is the product.
#
# Per-version classifiers (`Python :: 3.10` … `3.14`) are also absent, and that
# is not an omission: `requires-python` already states the floor, and the abi3
# wheel works on versions released after this list would have been written.
# A fixed list could only ever understate what ships.
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Free Threading",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Rust",
"Topic :: Database",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Text Processing :: Indexing",
"Typing :: Typed",
]
# The version is the workspace version, read out of Cargo.toml by maturin.
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/m62624/plugmem"
Repository = "https://github.com/m62624/plugmem"
Documentation = "https://github.com/m62624/plugmem/blob/main/crates/plugmem-py/README.md"
[tool.maturin]
# Mixed layout: the compiled module is `plugmem._plugmem`, nested inside the
# pure-Python `plugmem` package under `python/`. That is what lets `py.typed`,
# the generated `.pyi` and the handful of Python-level generators ship next to
# the extension instead of beside it.
python-source = "python"
module-name = "plugmem._plugmem"
# Two files the sdist cannot build without, neither of which any file list
# reaches on its own. Both are copied into this crate by the job that builds
# the archive, and both land at the archive root, because that is where
# `include` puts a path relative to this file.
#
# * `LICENSE` — the repository has one, at its root, and PEP 639 wants the
# path inside the project. PyPI rejects an upload whose `License-File`
# metadata names a file the archive does not contain.
# * `skills/plugmem/SKILL.md` — `src/lib.rs` embeds it with
# `include_str!("../../../skills/plugmem/SKILL.md")`. In the archive that
# path resolves to `skills/plugmem/SKILL.md` at the root, so the copy has to
# sit in that directory here to land there. Without it the sdist uploads
# cleanly and then fails to compile on the first machine that has no wheel.
#
# A parent-relative pattern would be the obvious alternative and maturin
# refuses it outright: "include/exclude pattern must not contain `..`".
include = [
{ path = "LICENSE", format = "sdist" },
{ path = "skills/plugmem/SKILL.md", format = "sdist" },
]
# `extension-module` tells PyO3 not to link libpython, which is required for a
# wheel and wrong for `cargo test` — hence here and not in Cargo.toml.
features = ["pyo3/extension-module"]
# One wheel per platform for every CPython 3.10+ with a GIL. The free-threaded
# builds cannot use it (PEP 703 changed the object layout) and get their own
# wheels until `abi3t` lands in 3.15.
compatibility = "manylinux2014"
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.mypy]
strict = true
files = ["python", "tests"]
[tool.ruff]
# The stub is generated by `cargo run --bin stub_gen` and gated on `git diff`,
# so it cannot be hand-edited to satisfy a lint — and linting output nobody may
# touch yields findings that can only ever be ignored. Style there is the
# generator's business, and `mypy --strict` already checks the part that counts.
extend-exclude = ["python/plugmem/_plugmem.pyi"]
[tool.ruff.lint]
# Beyond the default pyflakes/pycodestyle: import order, modern syntax, bugbear,
# and ruff's own rules. The Node binding has no JS linter, so this is not
# mirroring it — it is the one thing the two jobs do differently, and it costs a
# single fast binary.
extend-select = ["I", "UP", "B", "RUF", "PIE", "FURB"]