Skip to content

Commit

Permalink
update python pkg-config file template
Browse files Browse the repository at this point in the history
  • Loading branch information
cpunion committed Nov 19, 2024
1 parent 8643fb3 commit ff21a5d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cmd/internal/install/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,18 @@ 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
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 {
Expand All @@ -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),
},
}

Expand Down

0 comments on commit ff21a5d

Please sign in to comment.