Upgrade to tox 4 (#458)

This commit is contained in:
Adam Johnson 2022-12-08 01:06:41 +00:00 committed by GitHub
parent 2015ecdd8f
commit d59c2bd424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 50 deletions

View File

@ -33,7 +33,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-py python -m pip install --upgrade tox
- name: Run tox targets for ${{ matrix.python-version }} - name: Run tox targets for ${{ matrix.python-version }}
run: tox --py current run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)

3
pyproject.toml Normal file
View File

@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

View File

@ -1,3 +1,53 @@
[metadata]
name = daphne
version = attr: daphne.__version__
url = https://github.com/django/daphne
author = Django Software Foundation
author_email = foundation@djangoproject.com
description = Django ASGI (HTTP/WebSocket) server
long_description = file: README.rst
long_description_content_type = text/x-rst
license = BSD
classifiers =
Development Status :: 4 - Beta
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Internet :: WWW/HTTP
[options]
package_dir =
twisted=daphne/twisted
packages = find:
include_package_data = True
install_requires =
asgiref>=3.5.2,<4
autobahn>=22.4.2
twisted[tls]>=22.4
python_requires = >=3.7
setup_requires =
pytest-runner
zip_safe = False
[options.entry_points]
console_scripts =
daphne = daphne.cli:CommandLineInterface.entrypoint
[options.extras_require]
tests =
django
hypothesis
pytest
pytest-asyncio
[flake8] [flake8]
exclude = venv/*,tox/*,docs/*,testproject/*,js_client/*,.eggs/* exclude = venv/*,tox/*,docs/*,testproject/*,js_client/*,.eggs/*
extend-ignore = E123, E128, E266, E402, W503, E731, W601 extend-ignore = E123, E128, E266, E402, W503, E731, W601

View File

@ -1,47 +0,0 @@
import os
from setuptools import find_packages, setup
from daphne import __version__
# We use the README as the long_description
readme_path = os.path.join(os.path.dirname(__file__), "README.rst")
with open(readme_path) as fp:
long_description = fp.read()
setup(
name="daphne",
version=__version__,
url="https://github.com/django/daphne",
author="Django Software Foundation",
author_email="foundation@djangoproject.com",
description="Django ASGI (HTTP/WebSocket) server",
long_description=long_description,
license="BSD",
zip_safe=False,
package_dir={"twisted": "daphne/twisted"},
packages=find_packages() + ["twisted.plugins"],
include_package_data=True,
install_requires=["twisted[tls]>=22.4", "autobahn>=22.4.2", "asgiref>=3.5.2,<4"],
python_requires=">=3.7",
setup_requires=["pytest-runner"],
extras_require={"tests": ["hypothesis", "pytest", "pytest-asyncio", "django"]},
entry_points={
"console_scripts": ["daphne = daphne.cli:CommandLineInterface.entrypoint"]
},
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Internet :: WWW/HTTP",
],
)

View File

@ -1,8 +1,8 @@
[tox] [tox]
envlist = envlist =
py{37,38,39,310,311} py{37,38,39,310,311}
[testenv] [testenv]
usedevelop = true
extras = tests extras = tests
commands = commands =
pytest -v {posargs} pytest -v {posargs}