Skip to content

Commit

Permalink
Make edb_stat_statements buildable separately from server (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans authored Jan 7, 2025
1 parent 337eef6 commit 6449b72
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
7 changes: 1 addition & 6 deletions edgedbpkg/edgedb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions edgedbpkg/pgext/edb_stat_statements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 6449b72

Please sign in to comment.