summaryrefslogtreecommitdiff
path: root/wrappers/python/Makefile
diff options
context:
space:
mode:
authorStevenWdV <stevenwdv@gmail.com>2022-01-24 14:59:25 +0100
committerStevenWdV <stevenwdv@gmail.com>2022-01-24 16:24:57 +0100
commite544c6fa9e15e7277da79e2464243e90b2706b8c (patch)
treede6613747e0e34a799089d4677f9833a85748712 /wrappers/python/Makefile
parentaab2e4b966c82b67eb0e204060e5ea6cd4ea15cf (diff)
Cleanup
Added variables to Makefiles to specify custom exports/ directory; Split exception classes in Java & C#; Added more comments; Renamed library and Go package; Removed real (pure) tests; Added generate_lib.ps1 to generate import .lib for Windows (Swift); Moved built Go libraries to exports/lib/; Switch to hopefully faster Swift GitHub Action.
Diffstat (limited to 'wrappers/python/Makefile')
-rw-r--r--wrappers/python/Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/wrappers/python/Makefile b/wrappers/python/Makefile
index be4beaa..ba4cf5f 100644
--- a/wrappers/python/Makefile
+++ b/wrappers/python/Makefile
@@ -1,15 +1,27 @@
.PHONY: pack test clean
+EXPORTS_PATH ?= ../../exports
+EXPORTS_LIB_PATH ?= $(EXPORTS_PATH)/lib
+
+ifneq ($(MAKECMDGOALS),clean)
+include $(EXPORTS_PATH)/platform.mk
+endif
+
ifdef PLAT_NAME
SETUP_ARGS += --plat-name=$(PLAT_NAME)
endif
# Build for current platform only
pack:
- ./setup.py bdist_wheel $(SETUP_ARGS)
+ ./setup.py bdist_wheel $(SETUP_ARGS) --exports-lib-path="$(EXPORTS_LIB_PATH)"
test:
- $(MAKE) -C ../../exports copy-to COPY_TARGET=../wrappers/python/eduvpncommon/lib
+ifneq ($(EXPORTS_PATH),)
+ifneq ($(wildcard $(EXPORTS_PATH)/Makefile),)
+ $(MAKE) -C "$(EXPORTS_PATH)"
+endif
+endif
+ install "$(EXPORTS_LIB_PATH)/$(GOOS)/$(GOARCH)/$(LIB_FILE)" -Dt "eduvpncommon/lib"
python3 -m unittest test_discovery
rm eduvpncommon/lib/*