diff --git a/edb/buildmeta.py b/edb/buildmeta.py index 52d9f700d84..8b0f6e3f4f2 100644 --- a/edb/buildmeta.py +++ b/edb/buildmeta.py @@ -222,7 +222,8 @@ def get_extension_dir_path() -> pathlib.Path: def hash_dirs( dirs: Sequence[Tuple[str, str]], *, - extra_files: Optional[Sequence[Union[str, pathlib.Path]]]=None + extra_files: Optional[Sequence[Union[str, pathlib.Path]]]=None, + extra_data: Optional[bytes] = None, ) -> bytes: def hash_dir(dirname, ext, paths): with os.scandir(dirname) as it: @@ -247,6 +248,8 @@ def hash_dir(dirname, ext, paths): with open(path, 'rb') as f: h.update(f.read()) h.update(str(sys.version_info[:2]).encode()) + if extra_data is not None: + h.update(extra_data) return h.digest() diff --git a/pyproject.toml b/pyproject.toml index 40ccf5f24b4..2b36cc93b62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ description = "Gel Server" requires-python = '>=3.12.0' dynamic = ["version"] dependencies = [ - 'edgedb==3.0.0b3', + 'edgedb==3.0.0b4', 'httptools>=0.6.0', 'immutables>=0.18', @@ -103,7 +103,7 @@ requires = [ "wheel", "parsing ~= 2.0", - "edgedb==3.0.0b3", + "edgedb==3.0.0b4", ] # Custom backend needed to set up build-time sys.path because # setup.py needs to import `edb.buildmeta`. diff --git a/setup.py b/setup.py index eb04feda751..c5bd488e138 100644 --- a/setup.py +++ b/setup.py @@ -691,12 +691,18 @@ def run(self): print(binascii.hexlify(rust_hash).decode()) elif self.type == 'ext': - ext_hash = hash_dirs([ - (pkg_dir, '.pyx'), - (pkg_dir, '.pyi'), - (pkg_dir, '.pxd'), - (pkg_dir, '.pxi'), - ]) + import gel + + ext_hash = hash_dirs( + [ + (pkg_dir, '.pyx'), + (pkg_dir, '.pyi'), + (pkg_dir, '.pxd'), + (pkg_dir, '.pxi'), + ], + # protocol.pyx for tests links to edgedb-python binary + extra_data=gel.__version__.encode(), + ) print( binascii.hexlify(ext_hash).decode() + '-' + _get_libpg_query_source_stamp()