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

Change packaging to use setuptools declarative config in setup.cfg #296

Open
wants to merge 2 commits into
base: main
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
53 changes: 51 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
[bdist_wheel]
universal=1
[metadata]
name = daphne
version = attr: daphne.__version__
url = https://github.com/django/daphne
author = Django Software Foundation
author_email = [email protected]
description = Django ASGI (HTTP/WebSocket) server
long_description = file: README.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 :: Only
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Topic :: Internet :: WWW/HTTP

[options]
python_requires = >=3.5
package_dir =
twisted = daphne/twisted
packages = find_namespace:
include_package_data = true
zip_safe = false
install_requires =
twisted[tls] >= 18.7
autobahn >= 0.18
asgiref ~= 3.2
setup_requires =
pytest-runner

[options.packages.find]
exclude =
tests

[options.entry_points]
console_scripts =
daphne = daphne.cli:CommandLineInterface.entrypoint

[options.extras_require]
tests =
hypothesis == 4.23
pytest ~= 3.10
pytest-asyncio ~= 0.8

[tool:pytest]
addopts = tests/
Expand Down
48 changes: 2 additions & 46 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
import os
from setuptools import setup

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="[email protected]",
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]>=18.7", "autobahn>=0.18", "asgiref~=3.2"],
setup_requires=["pytest-runner"],
extras_require={
"tests": ["hypothesis==4.23", "pytest~=3.10", "pytest-asyncio~=0.8"]
},
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.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Internet :: WWW/HTTP",
],
)
setup()