Skip to content

Commit 8640341

Browse files
committed
build: move build systems to pyproject
1 parent d69e487 commit 8640341

2 files changed

Lines changed: 55 additions & 73 deletions

File tree

default.nix

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,6 @@ let
3333
autoPatchelfIgnoreMissingDeps = true;
3434
})
3535
);
36-
buildSystemOverlay =
37-
final: prev:
38-
lib.mapAttrs
39-
(
40-
name: value:
41-
prev.${name}.overrideAttrs (old: {
42-
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ (final.resolveBuildSystem value);
43-
})
44-
)
45-
{
46-
pygraphviz = {
47-
setuptools = [ ];
48-
};
49-
cbor = {
50-
setuptools = [ ];
51-
};
52-
warc3-wet-clueweb09 = {
53-
setuptools = [ ];
54-
};
55-
};
5636
packageOverlay =
5737
final: prev:
5838
lib.mapAttrs (name: value: prev.${name}.overrideAttrs value) {
@@ -66,20 +46,9 @@ let
6646
buildInputs = (old.buildInputs or [ ]) ++ [ onetbb ];
6747
};
6848
zlib-state = old: {
69-
nativeBuildInputs =
70-
(old.nativeBuildInputs or [ ])
71-
++ (final.resolveBuildSystem {
72-
setuptools = [ ];
73-
});
7449
buildInputs = (old.buildInputs or [ ]) ++ [ zlib ];
7550
};
7651
pystemmer = old: {
77-
nativeBuildInputs =
78-
(old.nativeBuildInputs or [ ])
79-
++ (final.resolveBuildSystem {
80-
setuptools = [ ];
81-
cython = [ ];
82-
});
8352
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/pystemmer/default.nix
8453
PYSTEMMER_SYSTEM_LIBSTEMMER = "${lib.getDev libstemmer}/include";
8554
NIX_CFLAGS_COMPILE = [ "-I${lib.getDev libstemmer}/include" ];
@@ -170,7 +139,6 @@ let
170139
pyproject-build-systems.overlays.wheel
171140
projectOverlay
172141
cudaOverlay
173-
buildSystemOverlay
174142
packageOverlay
175143
]
176144
);

pyproject.toml

Lines changed: 55 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,44 @@ authors = [{ name = "Mirko Lenz", email = "mirko@mirkolenz.com" }]
66
readme = "README.md"
77
license = "MIT"
88
keywords = [
9-
"cbr",
10-
"case-based reasoning",
11-
"api",
12-
"similarity",
13-
"nlp",
14-
"retrieval",
15-
"cli",
16-
"tool",
17-
"library",
9+
"cbr",
10+
"case-based reasoning",
11+
"api",
12+
"similarity",
13+
"nlp",
14+
"retrieval",
15+
"cli",
16+
"tool",
17+
"library",
1818
]
1919
classifiers = [
20-
"Development Status :: 4 - Beta",
21-
"Environment :: Console",
22-
"Framework :: Pytest",
23-
"Intended Audience :: Developers",
24-
"Intended Audience :: Science/Research",
25-
"Natural Language :: English",
26-
"Operating System :: OS Independent",
27-
"Programming Language :: Python :: 3.13",
28-
"Programming Language :: Python :: 3.14",
29-
"Programming Language :: Python :: 3",
30-
"Topic :: Scientific/Engineering :: Artificial Intelligence",
31-
"Topic :: Scientific/Engineering :: Information Analysis",
32-
"Topic :: Software Development :: Libraries :: Python Modules",
33-
"Topic :: Utilities",
34-
"Typing :: Typed",
20+
"Development Status :: 4 - Beta",
21+
"Environment :: Console",
22+
"Framework :: Pytest",
23+
"Intended Audience :: Developers",
24+
"Intended Audience :: Science/Research",
25+
"Natural Language :: English",
26+
"Operating System :: OS Independent",
27+
"Programming Language :: Python :: 3.13",
28+
"Programming Language :: Python :: 3.14",
29+
"Programming Language :: Python :: 3",
30+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
31+
"Topic :: Scientific/Engineering :: Information Analysis",
32+
"Topic :: Software Development :: Libraries :: Python Modules",
33+
"Topic :: Utilities",
34+
"Typing :: Typed",
3535
]
3636
requires-python = ">=3.13,<4"
3737
dependencies = [
38-
"frozendict>=2,<3",
39-
"numpy>=2,<3",
40-
"orjson>=3,<4",
41-
"polars>=1,<2",
42-
"pydantic>=2,<3",
43-
"pyyaml>=6,<7",
44-
"rtoml>=0.12,<1",
45-
"scipy>=1,<2",
46-
"xmltodict>=1,<2",
38+
"frozendict>=2,<3",
39+
"numpy>=2,<3",
40+
"orjson>=3,<4",
41+
"polars>=1,<2",
42+
"pydantic>=2,<3",
43+
"pyyaml>=6,<7",
44+
"rtoml>=0.12,<1",
45+
"scipy>=1,<2",
46+
"xmltodict>=1,<2",
4747
]
4848

4949
[project.optional-dependencies]
@@ -86,16 +86,18 @@ timeseries = ["minineedle>=3,<4"]
8686

8787
# Entry points
8888
api = [
89-
"cbrkit[cli]",
90-
"fastapi>=0.100,<1",
91-
"pydantic-settings>=2,<3",
92-
"python-multipart>=0.0.15,<1",
93-
"uvicorn[standard]>=0.30,<1",
94-
"fastmcp>=3,<4",
89+
"cbrkit[cli]",
90+
"fastapi>=0.100,<1",
91+
"pydantic-settings>=2,<3",
92+
"python-multipart>=0.0.15,<1",
93+
"uvicorn[standard]>=0.30,<1",
94+
"fastmcp>=3,<4",
9595
]
9696

9797
# Bundle
98-
all = ["cbrkit[anthropic,api,bm25,chromadb,chunking,cohere,eval,google,graphs,graphviz,instructor,lancedb,levenshtein,nltk,ollama,openai,openai-agents,pandas,pydantic-ai,spacy,sql,timeseries,transformers,voyageai,zvec]"]
98+
all = [
99+
"cbrkit[anthropic,api,bm25,chromadb,chunking,cohere,eval,google,graphs,graphviz,instructor,lancedb,levenshtein,nltk,ollama,openai,openai-agents,pandas,pydantic-ai,spacy,sql,timeseries,transformers,voyageai,zvec]",
100+
]
99101

100102
[project.urls]
101103
Repository = "https://github.com/wi2trier/cbrkit"
@@ -117,11 +119,23 @@ build-backend = "uv_build"
117119

118120
[tool.pytest]
119121
testpaths = ["src", "tests"]
120-
addopts = ["--cov=src/cbrkit", "--cov-report=term-missing", "--doctest-modules", "--import-mode=importlib"]
122+
addopts = [
123+
"--cov=src/cbrkit",
124+
"--cov-report=term-missing",
125+
"--doctest-modules",
126+
"--import-mode=importlib",
127+
]
121128
doctest_optionflags = ["NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL", "ELLIPSIS"]
122129

123130
[tool.uv]
124131
default-groups = ["dev", "test", "docs"]
125132

133+
[tool.uv.extra-build-dependencies]
134+
pygraphviz = ["setuptools"]
135+
cbor = ["setuptools"]
136+
warc3-wet-clueweb09 = ["setuptools"]
137+
zlib-state = ["setuptools"]
138+
pystemmer = ["setuptools", "cython"]
139+
126140
[tool.ruff.lint.pydocstyle]
127141
convention = "google"

0 commit comments

Comments
 (0)