From cc8ef6d95822219ab5c955072736a147c0d027af Mon Sep 17 00:00:00 2001 From: Elvis Pranskevichus Date: Thu, 26 Oct 2023 10:35:44 -0700 Subject: [PATCH] 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. --- pyproject.toml | 7 ++++++- setup.py | 10 ---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6affdab3e..8bcb355fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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', diff --git a/setup.py b/setup.py index 225624f99..17f046d79 100644 --- a/setup.py +++ b/setup.py @@ -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,