build: Move non-primarily deps to optional extras

This commit is contained in:
Karim shoair
2025-08-20 03:58:10 +03:00
parent 85885d9962
commit 6b8d861b92
2 changed files with 13 additions and 5 deletions
+12 -2
View File
@@ -58,7 +58,6 @@ classifiers = [
dependencies = [
"lxml>=6.0.0",
"cssselect>=1.3.0",
"IPython>=8.37", # The last version that supports Python 3.10
"click>=8.2.1",
"orjson>=3.11.2",
"tldextract>=5.3.0",
@@ -68,8 +67,19 @@ dependencies = [
"camoufox>=0.4.11",
"geoip2>=5.1.0",
"msgspec>=0.19.0",
]
[project.optional-dependencies]
ai = [
"mcp>=1.13.0",
"markdownify>=1.2.0",
"mcp[cli]>=1.13.0",
]
shell = [
"IPython>=8.37", # The last version that supports Python 3.10
"markdownify>=1.2.0",
]
all = [
"scrapling[ai,shell]",
]
[project.urls]
+1 -3
View File
@@ -10,10 +10,8 @@ envlist = pre-commit,py{310,311,312,313}
usedevelop = True
changedir = tests
deps =
playwright==1.52.0
rebrowser-playwright==1.52.0
camoufox
-r{toxinidir}/tests/requirements.txt
extras = ai,shell
commands =
# Run browser tests without parallelization (avoid browser conflicts)
pytest --cov=scrapling --cov-report=xml -k "DynamicFetcher or StealthyFetcher" --verbose