Skip to content

Commit

Permalink
Move crazy paths into shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary committed Oct 2, 2024
1 parent 8527ff8 commit b0662c9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
3 changes: 0 additions & 3 deletions internal/types/numbers/tokenCalculations.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import (
)

/*
#cgo darwin CFLAGS: -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -I/Users/seanmcgary/Code/sidecar/sqlite-extensions
#cgo darwin LDFLAGS: -L/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/lib -lpython3.12 -L/Users/seanmcgary/Code/sidecar/sqlite-extensions/build/lib -lcalculations
#cgo darwin LDFLAGS: -Wl,-rpath,/Users/seanmcgary/Code/sidecar/sqlite-extensions/build/lib
#include <stdlib.h>
#include "calculations.h"
*/
Expand Down
10 changes: 10 additions & 0 deletions scripts/goTest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

export PROJECT_ROOT=$(pwd)
export CGO_CFLAGS="-I${PROJECT_ROOT}/sqlite-extensions"
export CGO_LDFLAGS="-L${PROJECT_ROOT}/sqlite-extensions/build/lib -lcalculations -Wl,-rpath,${PROJECT_ROOT}/sqlite-extensions/build/lib"
export PYTHONPATH="/Users/seanmcgary/Code/sidecar/sqlite-extensions:$PYTHONPATH"
export CGO_ENABLED=1
export TESTING=true

go test $@
5 changes: 5 additions & 0 deletions sqlite-extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
```bash
PYTHONPATH="/Users/seanmcgary/Code/sidecar/sqlite-extensions:$PYTHONPATH" lldb -- /opt/homebrew/opt/sqlite/bin/sqlite3
```

### Go test example
```bash
PYTHONPATH="/Users/seanmcgary/Code/sidecar/sqlite-extensions:$PYTHONPATH" CGO_ENABLED=1 TESTING=true go test -v ./internal/types/numbers -v -p 1 -run '^Test_Numbers$'
```

0 comments on commit b0662c9

Please sign in to comment.