1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
--- a/pglast/parser.pyx
+++ b/pglast/parser.pyx
@@ -117,7 +117,7 @@ cdef extern from "pg_query.h" nogil:
void pg_query_free_scan_result(PgQueryScanResult result)
-cdef extern from "src/pg_query_internal.h" nogil:
+cdef extern from "pg_query/pg_query_internal.h" nogil:
ctypedef struct PgQueryInternalParsetreeAndError:
structs.List* tree
char* stderr_buffer
@@ -144,7 +144,7 @@ cdef extern from "protobuf-c/protobuf-c.
int value)
-cdef extern from "protobuf/pg_query.pb-c.h" nogil:
+cdef extern from "pg_query/pg_query.pb-c.h" nogil:
ctypedef enum PgQuery__Token:
pass
--- a/setup.py
+++ b/setup.py
@@ -31,6 +31,7 @@ with (here / 'version.txt').open(encodin
LIBPG_QUERY_DIR = str(Path('libpg_query'))
INCLUDE_DIR = str(Path('libpg_query') / 'src' / 'postgres' / 'include')
+INCLUDE_DIR = subprocess.check_output(["/usr/lib/postgresql/15/bin/pg_config", "--includedir-server"]).decode().rstrip()
VENDOR_DIR = str(Path('libpg_query') / 'vendor')
@@ -74,7 +75,7 @@ setup(
packages=find_packages('.'),
- cmdclass={'build_ext': BuildLibPgQueryFirst},
+ #cmdclass={'build_ext': BuildLibPgQueryFirst},
ext_modules=cythonize([
Extension('pglast.parser', [extension_source],
libraries=['pg_query'],
|