From ff21a5dad60714db2db07b614b58b893b701c6c1 Mon Sep 17 00:00:00 2001 From: Li Jie Date: Tue, 19 Nov 2024 21:25:14 +0800 Subject: [PATCH] update python pkg-config file template --- cmd/internal/install/python.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cmd/internal/install/python.go b/cmd/internal/install/python.go index d85051c..00b3921 100644 --- a/cmd/internal/install/python.go +++ b/cmd/internal/install/python.go @@ -183,7 +183,7 @@ func generatePkgConfig(pythonPath, pkgConfigDir string) error { // Template for the pkg-config file pcTemplate := `prefix=${pcfiledir}/../.. exec_prefix=${prefix} -libdir=${exec_prefix}/lib +libdir=${exec_prefix} includedir=${prefix}/include Name: Python @@ -191,9 +191,10 @@ Description: Embed Python into an application Requires: Version: %s Libs.private: -Libs: -L${libdir} -lpython%s -Cflags: -I${includedir}/python%s +Libs: -L${libdir} -lpython313 +Cflags: -I${includedir} ` + // TODO: need update libs // Create the main pkg-config files files := []struct { @@ -202,19 +203,19 @@ Cflags: -I${includedir}/python%s }{ { fmt.Sprintf("python-%s.pc", version), - fmt.Sprintf(pcTemplate, version, version, version), + fmt.Sprintf(pcTemplate, version), }, { fmt.Sprintf("python-%s-embed.pc", version), - fmt.Sprintf(pcTemplate, version, version, version), + fmt.Sprintf(pcTemplate, version), }, { "python3.pc", - fmt.Sprintf(pcTemplate, version, version, version), + fmt.Sprintf(pcTemplate, version), }, { "python3-embed.pc", - fmt.Sprintf(pcTemplate, version, version, version), + fmt.Sprintf(pcTemplate, version), }, }