From 2aad9b6ae61337ef94b05adc377a9ad2cbaa8eb8 Mon Sep 17 00:00:00 2001 From: StevenWdV Date: Wed, 9 Feb 2022 00:40:38 +0100 Subject: Add Android wrapper, remove plain Java Maven wrapper. Fix some overrides in Makefiles. --- wrappers/python/.gitignore | 1 + wrappers/python/Makefile | 7 +++++-- wrappers/python/eduvpncommon/discovery.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'wrappers/python') diff --git a/wrappers/python/.gitignore b/wrappers/python/.gitignore index aec5943..5f1f002 100644 --- a/wrappers/python/.gitignore +++ b/wrappers/python/.gitignore @@ -3,3 +3,4 @@ *.egg-info/ /eduvpncommon/lib/* __pycache__/ +venv/ diff --git a/wrappers/python/Makefile b/wrappers/python/Makefile index f46f06d..fd81cd9 100644 --- a/wrappers/python/Makefile +++ b/wrappers/python/Makefile @@ -4,17 +4,20 @@ EXPORTS_PATH ?= ../../exports include $(EXPORTS_PATH)/common.mk ifdef PLAT_NAME -SETUP_ARGS += --plat-name=$(PLAT_NAME) +override SETUP_ARGS += --plat-name=$(PLAT_NAME) endif # Build for current platform only pack: ./setup.py bdist_wheel $(SETUP_ARGS) --exports-lib-path="$(EXPORTS_LIB_PATH)" -test: .try_build_lib +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 diff --git a/wrappers/python/eduvpncommon/discovery.py b/wrappers/python/eduvpncommon/discovery.py index f22df58..50bcc9e 100644 --- a/wrappers/python/eduvpncommon/discovery.py +++ b/wrappers/python/eduvpncommon/discovery.py @@ -71,7 +71,7 @@ def verify(signature: bytes, signed_json: bytes, expected_file_name: str, min_si :param signature: .minisig signature file contents. :param signed_json: Signed .json file contents. :param expected_file_name: The file type to be verified, one of "server_list.json" or "organization_list.json". - :param min_sign_time: Minimum time for signature. Should be set to at least the time of the previous signature. + :param min_sign_time: Minimum time for signature (UNIX timestamp, seconds). Should be set to at least the time of the previous signature. :raises VerifyException: If signature verification fails or expectedFileName is not one of the allowed values. """ -- cgit v1.2.3