Skip to content

Commit

Permalink
Changed the build backend to hatchling. Ones who want to use `setup…
Browse files Browse the repository at this point in the history
…tools` can change `build-system` section of `pyproject.toml`, the specific config for it was kept.
  • Loading branch information
KOLANICH committed Oct 25, 2022
1 parent 7d9f2b8 commit c9a6343
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fi

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)"

python -m pip install -U pip setuptools setuptools_scm wheel build
python -m pip install -U pip hatchling build
python -m pip --version

python -m build -nsx .
Expand Down
15 changes: 12 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"
requires = ["hatchling>=1.8.0"]
build-backend = "hatchling.build"
#requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4.3"]
#build-backend = "setuptools.build_meta"

[project]
name = "trio"
version = "0.22.0"
authors = [{name = "Nathaniel J. Smith", email = "njs@pobox.com"}]
license = {text = "MIT OR Apache-2.0"}
description = "A friendly Python library for async concurrency and I/O"
Expand Down Expand Up @@ -45,13 +46,21 @@ dependencies = [
"cffi>=1.14; os_name == 'nt' and implementation_name != 'pypy'",
"exceptiongroup >= 1.0.0rc9; python_version < '3.11'",
]
dynamic = ["version"]

[tool.hatch.version]
path = "trio/_version.py"

[tool.setuptools]
include-package-data = true

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

[tool.setuptools_scm]
write_to = "trio/_version.py"
write_to_template = "__version__ = \"{version}\"\n"

[tool.black]
target-version = ['py37']

Expand Down

0 comments on commit c9a6343

Please sign in to comment.