From b60ecf2fe5ddfe506e02093286b3931873187e91 Mon Sep 17 00:00:00 2001 From: StevenWdV Date: Fri, 4 Feb 2022 01:18:12 +0100 Subject: More Makefile cleanup, support building in folder with spaces --- wrappers/python/Makefile | 15 +++------------ wrappers/python/README.md | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) (limited to 'wrappers/python') diff --git a/wrappers/python/Makefile b/wrappers/python/Makefile index ba4cf5f..f46f06d 100644 --- a/wrappers/python/Makefile +++ b/wrappers/python/Makefile @@ -1,11 +1,7 @@ .PHONY: pack test clean EXPORTS_PATH ?= ../../exports -EXPORTS_LIB_PATH ?= $(EXPORTS_PATH)/lib - -ifneq ($(MAKECMDGOALS),clean) -include $(EXPORTS_PATH)/platform.mk -endif +include $(EXPORTS_PATH)/common.mk ifdef PLAT_NAME SETUP_ARGS += --plat-name=$(PLAT_NAME) @@ -15,13 +11,8 @@ endif pack: ./setup.py bdist_wheel $(SETUP_ARGS) --exports-lib-path="$(EXPORTS_LIB_PATH)" -test: -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" +test: .try_build_lib + install "$(EXPORTS_LIB_SUBFOLDER_PATH)/$(LIB_FILE)" -Dt "eduvpncommon/lib" python3 -m unittest test_discovery rm eduvpncommon/lib/* diff --git a/wrappers/python/README.md b/wrappers/python/README.md index bce492e..6f0bec1 100644 --- a/wrappers/python/README.md +++ b/wrappers/python/README.md @@ -34,7 +34,7 @@ You could also reference the discovery module directly and copy the library for folder. If you do not build this as part of the full repository, specify `EXPORTS_PATH="path/to/exports-folder"` when calling -make. This folder must contain `platform.mk` and the `lib/` folder with built libraries. +make. This folder must contain `common.mk` and the `lib/` folder with built libraries. Test: -- cgit v1.2.3