summaryrefslogtreecommitdiff
path: root/wrappers/python
diff options
context:
space:
mode:
authorStevenWdV <stevenwdv@gmail.com>2022-02-09 00:40:38 +0100
committerStevenWdV <stevenwdv@gmail.com>2022-02-09 00:40:38 +0100
commit2aad9b6ae61337ef94b05adc377a9ad2cbaa8eb8 (patch)
tree022c006cfac7a60fd0ab8896fac3991cf34b8fce /wrappers/python
parentb60ecf2fe5ddfe506e02093286b3931873187e91 (diff)
Add Android wrapper, remove plain Java Maven wrapper.
Fix some overrides in Makefiles.
Diffstat (limited to 'wrappers/python')
-rw-r--r--wrappers/python/.gitignore1
-rw-r--r--wrappers/python/Makefile7
-rw-r--r--wrappers/python/eduvpncommon/discovery.py2
3 files changed, 7 insertions, 3 deletions
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.
"""