Move script entrypoints from setup.py to pyproject.toml (#6366)

The latest victim of the ongoing march of Python packaging deprecations
is the `entry_points` argument.  We stopped doing dynamic things to
entrypoints in `setup.py` some time ago anyway, so it's an easy fix.
This commit is contained in:
Elvis Pranskevichus 2023-10-26 10:35:44 -07:00 committed by GitHub
parent fbc47370af
commit cc8ef6d958
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 11 deletions

View file

@ -2,7 +2,7 @@
name = "edgedb-server"
description = "EdgeDB Server"
requires-python = '>=3.10.0'
dynamic = ["entry-points", "version"]
dynamic = ["version"]
dependencies = [
'edgedb==1.6.0',
@ -24,6 +24,11 @@ dependencies = [
'aiosmtplib~=2.0',
]
[project.scripts]
edgedb-server = "edb.server.main:main"
edb = "edb.tools.edb:edbcommands"
edgedb = "edb.cli:rustcli"
[project.optional-dependencies]
test = [
'black~=21.7b0',

View file

@ -918,18 +918,8 @@ def _version():
return buildmeta.get_version_from_scm(ROOT_PATH)
_entry_points = {
'edgedb-server = edb.server.main:main',
'edgedb = edb.cli:rustcli',
'edb = edb.tools.edb:edbcommands',
}
setuptools.setup(
version=_version(),
entry_points={
"console_scripts": _entry_points,
},
cmdclass={
'build': build,
'build_metadata': build_metadata,