Skip to content

Commit

Permalink
fix the repeated downloading of geoweaver jar on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihengSun committed Feb 13, 2024
1 parent e80d554 commit b0a5472
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pygeoweaver/jdk_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ def set_jdk_env_vars_for_linux_mac(jdk_install_dir):


def set_jdk_env_vars(jdk_install_dir):
if platform.system == "Windows":
print(f"Setting environment variables for {platform.system()}")
if platform.system() == "Windows":
set_jdk_env_vars_for_windows(jdk_install_dir)
else:
set_jdk_env_vars_for_linux_mac(jdk_install_dir)
Expand Down
5 changes: 4 additions & 1 deletion pygeoweaver/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ def get_home_dir():
"""
Get the user's home directory.
"""
return os.path.expanduser("~")
if platform.system() == "Windows":
return os.path.expandvars("%USERPROFILE%")
else:
return os.path.expanduser("~")


def get_root_dir():
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pygeoweaver"
version = "0.9.5"
version = "0.9.6"
authors = [{ name="Geoweaver team", email="[email protected]" }]
description = "This is a wrapper package of the Geoweaver app."
readme = "README.md"
Expand Down

0 comments on commit b0a5472

Please sign in to comment.