Skip to content

Commit c9a6343

Browse files
committed
Changed the build backend to hatchling. Ones who want to use setuptools can change build-system section of pyproject.toml, the specific config for it was kept.
1 parent 7d9f2b8 commit c9a6343

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

ci.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fi
6666

6767
python -c "import sys, struct, ssl; print('#' * 70); print('python:', sys.version); print('version_info:', sys.version_info); print('bits:', struct.calcsize('P') * 8); print('openssl:', ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO); print('#' * 70)"
6868

69-
python -m pip install -U pip setuptools setuptools_scm wheel build
69+
python -m pip install -U pip hatchling build
7070
python -m pip --version
7171

7272
python -m build -nsx .

pyproject.toml

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
[build-system]
2-
requires = ["setuptools>=61.2"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling>=1.8.0"]
3+
build-backend = "hatchling.build"
4+
#requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4.3"]
5+
#build-backend = "setuptools.build_meta"
46

57
[project]
68
name = "trio"
7-
version = "0.22.0"
89
authors = [{name = "Nathaniel J. Smith", email = "[email protected]"}]
910
license = {text = "MIT OR Apache-2.0"}
1011
description = "A friendly Python library for async concurrency and I/O"
@@ -45,13 +46,21 @@ dependencies = [
4546
"cffi>=1.14; os_name == 'nt' and implementation_name != 'pypy'",
4647
"exceptiongroup >= 1.0.0rc9; python_version < '3.11'",
4748
]
49+
dynamic = ["version"]
50+
51+
[tool.hatch.version]
52+
path = "trio/_version.py"
4853

4954
[tool.setuptools]
5055
include-package-data = true
5156

5257
[tool.setuptools.packages]
5358
find = {namespaces = false}
5459

60+
[tool.setuptools_scm]
61+
write_to = "trio/_version.py"
62+
write_to_template = "__version__ = \"{version}\"\n"
63+
5564
[tool.black]
5665
target-version = ['py37']
5766

0 commit comments

Comments
 (0)