Skip to content

Commit 3af74ad

Browse files
Migrate to setuptools 77 with PEP 639 and drop Python 3.8/3.9
- Switch from hatchling to setuptools>=77 build backend - Use modern PEP 639 license specifiers (license-files) - Configure setuptools_scm to write version to _version.py - Drop Python 3.8 and 3.9 support (requires-python >= 3.10) - Add SETUPTOOLS_SCM_OVERRIDES_FOR_INICONFIG to use no-local-version scheme on main branch instead of SETUPTOOLS_SCM_PRETEND_VERSION hack - Remove hatch configuration and test environments This modernizes the build system and uses setuptools_scm's official override mechanism for controlling version schemes per branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 340c77e commit 3af74ad

3 files changed

Lines changed: 15 additions & 29 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
uses: hynek/build-and-inspect-python-package@v2
2323
with:
2424
attest-build-provenance-github: true
25+
env:
26+
SETUPTOOLS_SCM_OVERRIDES_FOR_INICONFIG: ${{ github.ref == 'refs/heads/main' && 'local_scheme="no-local-version"' || '' }}
2527

2628
test:
2729
needs: build-and-inspect

pyproject.toml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
[build-system]
2-
build-backend = "hatchling.build"
2+
build-backend = "setuptools.build_meta"
33
requires = [
4-
"hatch-vcs",
5-
"hatchling>=1.26",
4+
"setuptools>=77",
5+
"setuptools-scm>=8",
66
]
77

88
[project]
99
name = "iniconfig"
1010
description = "brain-dead simple config-ini parsing"
1111
readme = "README.rst"
1212
license = "MIT"
13+
license-files = [ "LICENSE" ]
1314
authors = [
1415
{ name = "Ronny Pfannschmidt", email = "opensource@ronnypfannschmidt.de" },
1516
{ name = "Holger Krekel", email = "holger.krekel@gmail.com" },
1617
]
17-
requires-python = ">=3.8"
18+
requires-python = ">=3.10"
1819
classifiers = [
1920
"Development Status :: 4 - Beta",
2021
"Intended Audience :: Developers",
21-
"License :: OSI Approved :: MIT License",
2222
"Operating System :: MacOS :: MacOS X",
2323
"Operating System :: Microsoft :: Windows",
2424
"Operating System :: POSIX",
2525
"Programming Language :: Python :: 3 :: Only",
26-
"Programming Language :: Python :: 3.8",
27-
"Programming Language :: Python :: 3.9",
2826
"Programming Language :: Python :: 3.10",
2927
"Programming Language :: Python :: 3.11",
3028
"Programming Language :: Python :: 3.12",
@@ -37,29 +35,15 @@ dynamic = [
3735
]
3836
urls.Homepage = "https://github.com/pytest-dev/iniconfig"
3937

40-
[tool.setuptools_scm]
41-
42-
[tool.hatch.version]
43-
source = "vcs"
38+
[tool.setuptools]
39+
packages = [ "iniconfig" ]
40+
package-dir = { "" = "src" }
4441

45-
[tool.hatch.build.hooks.vcs]
46-
version-file = "src/iniconfig/_version.py"
47-
48-
[tool.hatch.build.targets.sdist]
49-
include = [
50-
"/src",
51-
"/testing",
52-
]
42+
[tool.setuptools.package-data]
43+
iniconfig = [ "py.typed" ]
5344

54-
[tool.hatch.envs.test]
55-
dependencies = [
56-
"pytest",
57-
]
58-
[tool.hatch.envs.test.scripts]
59-
default = "pytest {args}"
60-
61-
[[tool.hatch.envs.test.matrix]]
62-
python = [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
45+
[tool.setuptools_scm]
46+
write_to = "src/iniconfig/_version.py"
6347

6448
[tool.pytest.ini_options]
6549
testpaths = "testing"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)