Files
wikiq/pyproject.toml
Benjamin Mako Hill 421e9c0739 keep local files out of the source distribution
With no sdist target configured, hatchling walked the whole working tree
and included whatever it found. The resulting 8.9MB sdist carried 448
files from a virtualenv left in the repository root, plus .claude/ and
.gitmodules, while omitting the test dumps -- those are gitignored, so
the tests it did ship could not have run.

List the sdist contents explicitly. It is now 40KB of source, README and
COPYING, and both it and the wheel pass twine check. Tests run from a
clone rather than from the sdist, so test/ is deliberately excluded.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 28406563bcdb7b2f31412e511ea30f66eb3620b5)
2026-08-13 16:45:40 -07:00

63 lines
1.8 KiB
TOML

[project]
name = "mediawiki-dump-tools"
version = "0.1.1"
description = "Convert MediaWiki XML database dumps into tabular datasets for research"
readme = "README.md"
license = "GPL-3.0-or-later"
license-files = ["COPYING"]
requires-python = ">=3.11"
dependencies = [
"deltas>=0.7.0",
"more-itertools>=10.7.0",
"mwparserfromhell>=0.6.0",
"mwpersistence>=0.2.4",
"mwreverts>=0.1.5",
"mwtypes>=0.4.0",
"mwxml>=0.3.8",
"pyarrow>=20.0.0",
"sortedcontainers>=2.4.0",
]
# Two features carry dependencies that are awkward enough to install that they
# are kept out of the base install: -p legacy needs mediawiki-utilities, a 2015
# package that also pulls in a MySQL client, and --diff and -p wikidiff2 need
# pywikidiff2, which compiles a C++ extension. Everything else, including the
# default -p sequence, works with neither.
[project.optional-dependencies]
legacy = ["mediawiki-utilities>=0.4.18"]
# A wikidiff2 extra belongs here too, but pywikidiff2 is not yet published to
# PyPI, so an extra naming it could not resolve. Until it is, wikiq reports the
# git install command when --diff or -p wikidiff2 is used without it.
[project.scripts]
wikiq = "wikiq:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/wikiq"]
# Without an explicit list hatchling walks the whole working tree, which sweeps
# in any local virtualenv and editor state while still omitting the test dumps,
# since those are gitignored. Tests run from a clone of the repository rather
# than from the sdist.
[tool.hatch.build.targets.sdist]
include = [
"src/wikiq",
"README.md",
"COPYING",
"pyproject.toml",
]
[dependency-groups]
dev = [
"ipython>=8.18.1",
"memray>=1.17.2",
"pandas>=2.1.0",
"pytest>=8.4.1",
"pytest-asyncio>=1.0.0",
"pytest-benchmark>=5.1.0",
]