Skip to content

Commit ff21a5d

Browse files
committed
update python pkg-config file template
1 parent 8643fb3 commit ff21a5d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

cmd/internal/install/python.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,18 @@ func generatePkgConfig(pythonPath, pkgConfigDir string) error {
183183
// Template for the pkg-config file
184184
pcTemplate := `prefix=${pcfiledir}/../..
185185
exec_prefix=${prefix}
186-
libdir=${exec_prefix}/lib
186+
libdir=${exec_prefix}
187187
includedir=${prefix}/include
188188
189189
Name: Python
190190
Description: Embed Python into an application
191191
Requires:
192192
Version: %s
193193
Libs.private:
194-
Libs: -L${libdir} -lpython%s
195-
Cflags: -I${includedir}/python%s
194+
Libs: -L${libdir} -lpython313
195+
Cflags: -I${includedir}
196196
`
197+
// TODO: need update libs
197198

198199
// Create the main pkg-config files
199200
files := []struct {
@@ -202,19 +203,19 @@ Cflags: -I${includedir}/python%s
202203
}{
203204
{
204205
fmt.Sprintf("python-%s.pc", version),
205-
fmt.Sprintf(pcTemplate, version, version, version),
206+
fmt.Sprintf(pcTemplate, version),
206207
},
207208
{
208209
fmt.Sprintf("python-%s-embed.pc", version),
209-
fmt.Sprintf(pcTemplate, version, version, version),
210+
fmt.Sprintf(pcTemplate, version),
210211
},
211212
{
212213
"python3.pc",
213-
fmt.Sprintf(pcTemplate, version, version, version),
214+
fmt.Sprintf(pcTemplate, version),
214215
},
215216
{
216217
"python3-embed.pc",
217-
fmt.Sprintf(pcTemplate, version, version, version),
218+
fmt.Sprintf(pcTemplate, version),
218219
},
219220
}
220221

0 commit comments

Comments
 (0)