Skip to content

Commit

Permalink
Merge pull request #330 from foxever/master
Browse files Browse the repository at this point in the history
bind: fixed LDFLAGS on windows if python include path contains capital letters
  • Loading branch information
rcoreilly authored Dec 12, 2023
2 parents 5bc603e + 385862d commit 5597cfd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bind/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,10 @@ else:
raw.LibDir = filepath.ToSlash(raw.LibDir)

// on windows these can be empty -- use include dir which is usu good
// replace suffix case insensitive 'include' with 'libs'
if raw.LibDir == "" && raw.IncDir != "" {
raw.LibDir = raw.IncDir
if strings.HasSuffix(raw.LibDir, "include") {
raw.LibDir = raw.LibDir[:len(raw.LibDir)-len("include")] + "libs"
}
regexInc := regexp.MustCompile(`(?i)\binclude$`)
raw.LibDir = regexInc.ReplaceAllString(raw.IncDir, "libs")
fmt.Printf("no LibDir -- copy from IncDir: %s\n", raw.LibDir)
}

Expand Down

0 comments on commit 5597cfd

Please sign in to comment.