From 6449b72a22535dba82e2d7f71f88083036f4839d Mon Sep 17 00:00:00 2001 From: Elvis Pranskevichus Date: Tue, 7 Jan 2025 14:38:20 -0800 Subject: [PATCH] Make `edb_stat_statements` buildable separately from server (#129) --- edgedbpkg/edgedb/__init__.py | 7 +------ edgedbpkg/pgext/edb_stat_statements/__init__.py | 14 ++++++++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/edgedbpkg/edgedb/__init__.py b/edgedbpkg/edgedb/__init__.py index e86fe5a..e7e2c02 100644 --- a/edgedbpkg/edgedb/__init__.py +++ b/edgedbpkg/edgedb/__init__.py @@ -142,14 +142,9 @@ class EdgeDB(packages.BundledPythonPackage): pgvector.PgVector("v0.6.0"), pgvector.PgVector("v0.7.4"), libprotobuf_c.LibProtoBufC("1.5.0"), + edb_stat_statements.StatStatements("v6.0b1"), ] - def __init__( - self, version: str | poetry_version.Version, *args: Any, **kwargs: Any - ) -> None: - edb_stat_statements.StatStatements(version=version) - super().__init__(version, *args, **kwargs) - @classmethod def get_vcs_source( cls, io: cleo_io.IO, ref: str | None = None diff --git a/edgedbpkg/pgext/edb_stat_statements/__init__.py b/edgedbpkg/pgext/edb_stat_statements/__init__.py index d330e91..e7f33bb 100644 --- a/edgedbpkg/pgext/edb_stat_statements/__init__.py +++ b/edgedbpkg/pgext/edb_stat_statements/__init__.py @@ -14,16 +14,22 @@ class StatStatements(pgext.PostgresCExtension): license_id = "PostgreSQL" group = "Applications/Databases" - sources = [] # reuses edgedb-server source, see get_prepare_script + sources = [ + { + "url": "git+https://github.com/edgedb/edgedb.git", + "extras": { + "exclude_submodules": ["postgres"], + "clone_depth": 0, + }, + }, + ] artifact_build_requirements = [ "postgresql-edgedb (>=17)", ] def get_prepare_script(self, build: targets.Build) -> str: - source_dir = build.get_source_dir( - build.get_package("edgedb-server"), relative_to="pkgbuild" - ) + source_dir = build.get_source_dir(self, relative_to="pkgbuild") sdir = shlex.quote(str(source_dir / "edb_stat_statements")) return f"test ./ -ef {sdir} || cp -a {sdir}/* ./\n"