Skip to content

Commit a876512

Browse files
committed
fix(ci): handle other pg_config options required by setup.py
1 parent bb52bcf commit a876512

File tree

1 file changed

+23
-1
lines changed
  • scripts/build/pg_config_vcpkg_stub/pg_config_vcpkg_stub

1 file changed

+23
-1
lines changed

scripts/build/pg_config_vcpkg_stub/pg_config_vcpkg_stub/__init__.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,18 @@ def _main() -> None:
3939
raise ScriptError(f"libpq library not found: {f}")
4040
print(vcpkg_platform_root.joinpath("lib"))
4141

42-
elif args.includedir:
42+
elif args.includedir or args.includedir_server:
43+
# NOTE: on linux, the includedir-server dir contains pg_config.h
44+
# which we need because it includes the PG_VERSION_NUM macro.
45+
# In the vcpkg directory this file is in the includedir directory,
46+
# therefore we return the same value.
4347
if not (d := vcpkg_platform_root / "include/libpq").is_dir():
4448
raise ScriptError(f"libpq include directory not found: {d}")
4549
print(vcpkg_platform_root.joinpath("include"))
4650

51+
elif args.cppflags or args.ldflags:
52+
print("")
53+
4754
else:
4855
raise ScriptError("command not handled")
4956

@@ -63,6 +70,21 @@ def parse_cmdline() -> Namespace:
6370
action="store_true",
6471
help="show location of C header files of the client interfaces",
6572
)
73+
g.add_argument(
74+
"--includedir-server",
75+
action="store_true",
76+
help="show location of C header files for the server",
77+
)
78+
g.add_argument(
79+
"--cppflags",
80+
action="store_true",
81+
help="(dummy) show CPPFLAGS value used when PostgreSQL was built",
82+
)
83+
g.add_argument(
84+
"--ldflags",
85+
action="store_true",
86+
help="(dummy) show LDFLAGS value used when PostgreSQL was built",
87+
)
6688
opt = parser.parse_args()
6789
return opt
6890

0 commit comments

Comments
 (0)