Skip to content

Commit 83ffe51

Browse files
authored
Switch from setup.py to pyproject.toml (#665)
1 parent e3c3bda commit 83ffe51

4 files changed

Lines changed: 62 additions & 47 deletions

File tree

ci.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ set -exu -o pipefail
44

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

7-
python -m pip install -U pip setuptools wheel
7+
python -m pip install -U pip build
88
python -m pip --version
99

10-
python setup.py sdist --formats=zip
11-
python -m pip install dist/*.zip
10+
python -m build --sdist
11+
python -m pip install dist/*.tar.gz
1212

1313
# Actual tests
1414

lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -exu -o pipefail
44

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

7-
python -m pip install -U pip setuptools wheel
7+
python -m pip install -U pip
88
python -m pip --version
99

1010
# Dependencies

pyproject.toml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "trustme"
7+
dynamic = ["version"]
8+
description = "#1 quality TLS certs while you wait, for the discerning tester"
9+
readme = "README.rst"
10+
license = {text = "MIT OR Apache-2.0"}
11+
requires-python = ">=3.9"
12+
authors = [
13+
{ name = "Nathaniel J. Smith", email = "[email protected]" },
14+
]
15+
classifiers = [
16+
"Development Status :: 5 - Production/Stable",
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: Apache Software License",
19+
"License :: OSI Approved :: MIT License",
20+
"Programming Language :: Python :: Implementation :: CPython",
21+
"Programming Language :: Python :: Implementation :: PyPy",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3 :: Only",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
28+
"Programming Language :: Python :: 3.13",
29+
"Topic :: Security :: Cryptography",
30+
"Topic :: Software Development :: Testing",
31+
"Topic :: System :: Networking",
32+
]
33+
dependencies = [
34+
"cryptography>=3.1",
35+
"idna>=2.0",
36+
]
37+
38+
[project.urls]
39+
Homepage = "https://github.com/python-trio/trustme"
40+
41+
[tool.hatch.version]
42+
path = "src/trustme/_version.py"
43+
44+
45+
[tool.hatch.build.targets.sdist]
46+
include = [
47+
"/docs",
48+
"/src",
49+
"/tests",
50+
"/test-requirements.txt",
51+
"/README.rst",
52+
"/LICENSE",
53+
"/LICENSE.APACHE2",
54+
"/LICENSE.MIT",
55+
]
56+
57+
58+
159
[tool.towncrier]
260
# Usage:
361
# - PRs should drop a file like "issuenumber.feature" in newsfragments

setup.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)