From 8d0355a4939934b3c665f1fffe26b33f32baf7a0 Mon Sep 17 00:00:00 2001 From: kat <00-kat@proton.me> Date: Sat, 8 Aug 2026 15:44:21 +1000 Subject: [PATCH] Add README. Lest we forget what the hell this was for six months down the line. --- README.md | 32 ++++++++++++++++++++++++++++++++ pyproject.toml | 1 + 2 files changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..8a3fefb --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +`setuptools-scm-stub` +===================== + +Stub for [`setuptools-scm`] that uses a hardcoded version—the value of +`$SETUPTOOLS_SCM_PRETEND_VERSION`—instead. + +[`setuptools-scm`]: https://pypi.org/project/setuptools-scm + +Why? +---- + +`setuptools-scm`'s raison d'être is to extract the version from a `.git`/`.hg` +subdirectory, which is incompatible with reproducible builds as those +directories are not reproducible in the slightest, and is hence usually removed. +It does, however, let you override the version with a hardcoded value too, +albeit it's implementation thereof is rather poor. + +Ergo, `setuptools-scm` sans the “scm” gives you an over-engineered package that +mutates a singular variable: one that releases much too frequently, and of—to +put it mildly—questionable quality; this stub's purpose is simply to reduce the +maintenance burden on packagers who have to deal with `setuptools-scm` for zero +reason. + +How? +---- + +Simply install this package to the virtual environment in question, set the +`SETUPTOOLS_SCM_PRETEND_VERSION` environment variable to the version you want to +use during the build, and it should just work. This package does, however, +assume that you're using a single virtual environment to build a single package, +as it does not support setting the hardcoded version for a specific named +package. diff --git a/pyproject.toml b/pyproject.toml index a912dc9..d18b9f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ ] license-files = ["LICENSE-CC0", "LICENSE-APACHE"] +readme = "README.md" requires-python = ">=3.11" dependencies = ["setuptools>=45"]