diff --git a/hsds/basenode.py b/hsds/basenode.py index 402f5c39..c1802d5b 100644 --- a/hsds/basenode.py +++ b/hsds/basenode.py @@ -33,7 +33,7 @@ from .util.k8sClient import getDnLabelSelector, getPodIps from . import hsds_logger as log -HSDS_VERSION = "0.8.3" +HSDS_VERSION = "0.8.4" def getVersion(): diff --git a/hsds/hsds_app.py b/hsds/hsds_app.py index 5924d722..6f08e905 100644 --- a/hsds/hsds_app.py +++ b/hsds/hsds_app.py @@ -65,9 +65,13 @@ def get_cmd_dir(): sys_bin_dir = os.path.join(sys.exec_prefix, bin_dir) if os.path.isdir(sys_bin_dir): logging.debug(f"sys bin_dir: {sys_bin_dir}") - if os.path.isfile(os.path.join(sys_bin_dir, hsds_shortcut)): - logging.info(f"using cmd_dir: {sys_bin_dir}") - return sys_bin_dir + hsds_executable = os.path.join(sys_bin_dir, hsds_shortcut) + # window builds add on a .exe suffix, + # so check with and without the suffix + for suffix in ("", ".exe"): + if os.path.isfile(hsds_executable + suffix): + logging.info(f"using cmd_dir: {sys_bin_dir}") + return sys_bin_dir # fall back to just use __file__.parent bin_dir = Path(__file__).parent @@ -260,11 +264,11 @@ def run(self): py_exe = sys.executable cmd_path = os.path.join(self._cmd_dir, "hsds-node") + if not os.path.isfile(cmd_path): - # search corresponding location for windows installs - cmd_path = os.path.join(sys.exec_prefix, "Scripts") - cmd_path = os.path.join(cmd_path, "hsds-node-script.py") - if not os.path.isfile(cmd_path): + if os.path.isfile(cmd_path + ".exe"): + cmd_path += ".exe" + else: raise FileNotFoundError("can't find hsds-node executable") for i in range(count): diff --git a/pyproject.toml b/pyproject.toml index 92cb105b..29447e89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] requires-python = ">=3.8" -version = "0.8.3" +version = "0.8.4" dependencies = [ "aiohttp == 3.8.5", diff --git a/tests/integ/dataset_test.py b/tests/integ/dataset_test.py index 0f6b930c..9a729e55 100755 --- a/tests/integ/dataset_test.py +++ b/tests/integ/dataset_test.py @@ -681,6 +681,12 @@ def testResizableDataset(self): self.assertEqual(rsp.status_code, 201) rspJson = json.loads(rsp.text) + # reduce the size to 5 elements + # payload = {"shape": 5} + # rsp = self.session.put(req, data=json.dumps(payload), headers=headers) + # self.assertEqual(rsp.status_code, 201) + # rspJson = json.loads(rsp.text) + # verify updated-shape using the GET shape request rsp = self.session.get(req, headers=headers) self.assertEqual(rsp.status_code, 200)