Skip to content

Commit

Permalink
Switch from setup.py to pyproject.toml (#665)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin authored Oct 7, 2024
1 parent e3c3bda commit 83ffe51
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 47 deletions.
6 changes: 3 additions & 3 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ set -exu -o pipefail

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 wheel
python -m pip install -U pip build
python -m pip --version

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

# Actual tests

Expand Down
2 changes: 1 addition & 1 deletion lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -exu -o pipefail

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 wheel
python -m pip install -U pip
python -m pip --version

# Dependencies
Expand Down
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "trustme"
dynamic = ["version"]
description = "#1 quality TLS certs while you wait, for the discerning tester"
readme = "README.rst"
license = {text = "MIT OR Apache-2.0"}
requires-python = ">=3.9"
authors = [
{ name = "Nathaniel J. Smith", email = "njs@pobox.com" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Security :: Cryptography",
"Topic :: Software Development :: Testing",
"Topic :: System :: Networking",
]
dependencies = [
"cryptography>=3.1",
"idna>=2.0",
]

[project.urls]
Homepage = "https://github.com/python-trio/trustme"

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


[tool.hatch.build.targets.sdist]
include = [
"/docs",
"/src",
"/tests",
"/test-requirements.txt",
"/README.rst",
"/LICENSE",
"/LICENSE.APACHE2",
"/LICENSE.MIT",
]



[tool.towncrier]
# Usage:
# - PRs should drop a file like "issuenumber.feature" in newsfragments
Expand Down
43 changes: 0 additions & 43 deletions setup.py

This file was deleted.

0 comments on commit 83ffe51

Please sign in to comment.