Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated the metadata from setup.cfg into PEP 621-compliant pyproject.toml. #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Add any project-specific files here:

sniffio/_version.py

# Sphinx docs
docs/build/
Expand Down
8 changes: 4 additions & 4 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ pip install -U pip setuptools wheel

if [ "$CHECK_FORMATTING" = "1" ]; then
pip install yapf==${YAPF_VERSION}
if ! yapf -rpd setup.py sniffio; then
if ! yapf -rpd sniffio; then
cat <<EOF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Formatting problems were found (listed above). To fix them, run

pip install yapf==${YAPF_VERSION}
yapf -rpi setup.py sniffio
yapf -rpi sniffio

in your local checkout.

Expand All @@ -43,8 +43,8 @@ EOF
exit 0
fi

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

# Actual tests
pip install -Ur test-requirements.txt
Expand Down
1 change: 1 addition & 0 deletions newsfragments/33.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Moved the metadata into ``PEP 621``-compliant ``pyproject.toml``.
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
[build-system]
requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4.3"]
build-backend = "setuptools.build_meta"

[project]
name = "sniffio"
authors = [{name = "Nathaniel J. Smith", email = "[email protected]"}]
license = {text = "MIT OR Apache-2.0"}
description = "Sniff out which async library your code is running under"
readme = "README.rst"
keywords = ["async", "trio", "asyncio"]
classifiers = [
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: Apache Software License",
"Framework :: Trio",
"Framework :: AsyncIO",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Intended Audience :: Developers",
"Development Status :: 5 - Production/Stable",
]
urls = {Homepage = "https://github.com/python-trio/sniffio"}
requires-python = ">=3.7"
dynamic = ["version"]

[project.optional-dependencies]
testing = ["curio"]

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

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

[tool.setuptools.package-data]
sniffio = ["py.typed"]

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

[tool.towncrier]
package = "sniffio"
filename = "docs/source/history.rst"
Expand Down
39 changes: 0 additions & 39 deletions setup.py

This file was deleted.

3 changes: 0 additions & 3 deletions sniffio/_version.py

This file was deleted.