make the package a package
This commit is contained in:
parent
914faa6596
commit
aed1337137
7 changed files with 58 additions and 1 deletions
26
pygomx-module/Makefile
Normal file
26
pygomx-module/Makefile
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
SOURCE_GO=$(shell find ../libmxclient/ -iname "*.go")
|
||||
|
||||
.PHONY:
|
||||
all: _pygomx.o libmxclient.h
|
||||
mkdir -p build/lib
|
||||
cp *.so build/lib
|
||||
|
||||
_pygomx.o: libmxclient.h build_ffi.py
|
||||
python3 build_ffi.py
|
||||
|
||||
libmxclient.h: ../libmxclient/go.mod ../libmxclient/go.sum $(SOURCE_GO)
|
||||
cd ../libmxclient/ && \
|
||||
CGO_ENABLED=1 go build -buildmode=c-archive -o ../pygomx-module/libmxclient.a .
|
||||
|
||||
.PHONY:
|
||||
clean:
|
||||
-rm _pygomx.*
|
||||
-rm libmxclient.*
|
||||
-rm -r dist/
|
||||
-rm -r build/
|
||||
-rm -r pygomx_module.egg-info
|
||||
|
||||
.PHONY:
|
||||
install: all
|
||||
python setup.py bdist_wheel
|
||||
python setup.py install
|
||||
Loading…
Add table
Add a link
Reference in a new issue