summaryrefslogtreecommitdiff
path: root/wrappers/python/Makefile
blob: e13240003e088c230d9a5c1df4121a8d892d681f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.PHONY: pack test clean

EXPORTS_PATH ?= ../../exports
include $(EXPORTS_PATH)/common.mk

ifdef PLAT_NAME
override SETUP_ARGS += --plat-name=$(PLAT_NAME)
endif

# Build for current platform only
pack:
	mkdir -p eduvpncommon/lib
	./setup.py bdist_wheel $(SETUP_ARGS) --exports-lib-path="$(EXPORTS_LIB_PATH)"

test: .try-build-lib
	install "$(EXPORTS_LIB_SUBFOLDER_PATH)/$(LIB_FILE)" -Dt "eduvpncommon/lib"
	python3 -m unittest test_discovery
	rm eduvpncommon/lib/*

clean:
	rm -rf build/ dist/ *.egg-info/ lib/*
ifeq ($(CLEAN_ALL),1)
	rm -rf venv/
endif