Skip to content

Commit

Permalink
Merge pull request #12 from ZihengSun/main
Browse files Browse the repository at this point in the history
sc
  • Loading branch information
ZihengSun authored Jun 5, 2023
2 parents 9efb33b + 57e5d9f commit 9134c4c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 1 addition & 3 deletions pygeoweaver/jdk_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ def install_jdk():
print('Unsupported architecture.')

elif system == 'Linux':
# https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.18%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.18_10.tar.gz
# https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.18_10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.18_10.tar.gz
if architecture == 'x86_64':
install_jdk_linux('11.0.18-10', 'jdk_x64_linux_hotspot')
elif architecture == 'aarch64':
Expand Down Expand Up @@ -124,7 +122,7 @@ def set_jdk_env_vars(jdk_install_dir):

if not check_java:
with open(os.path.expanduser("~/.bashrc"), "a") as bashrc:
bashrc.write(f'\nexport JAVA_HOME="{jdk_install_dir}"\n')
bashrc.write(f'export JAVA_HOME="{jdk_install_dir}"\n')
bashrc.write(f'export PATH="$JAVA_HOME/bin:$PATH"\n')
print('JDK environment variables set.')

Expand Down
1 change: 0 additions & 1 deletion pygeoweaver/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pkill -f geoweaver.jar

echo "Check Java.."
source ~/.bashrc
java -version

echo "Start Geoweaver.."
nohup java -jar ~/geoweaver.jar > ~/geoweaver.log &
Expand Down
11 changes: 6 additions & 5 deletions pygeoweaver/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ def get_java_bin_from_which():
if system == 'Darwin' or system == 'Linux':

try:

print("Executing: ", f'{get_root_dir()}/java_bin.sh')

output = subprocess.check_output([f'{get_root_dir()}/java_bin.sh'], encoding='utf-8')
java_bin_sh = f'{get_root_dir()}/java_bin.sh'

os.chmod(java_bin_sh, 0o755)

output = subprocess.check_output([java_bin_sh], encoding='utf-8')

java_bin_path = output.strip()

Expand Down Expand Up @@ -68,8 +70,7 @@ def get_java_bin_path():

if java_bin_path is None:
java_bin_path = get_java_bin_from_which()

print("java_bin_path: ", java_bin_path)

return java_bin_path


Expand Down
4 changes: 2 additions & 2 deletions 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.6.13"
version = "0.6.14"
authors = [
{ name="Geoweaver team", email="[email protected]" },
]
Expand All @@ -22,7 +22,7 @@ classifiers = [

[tool.poetry]
name = "pygeoweaver"
version = "0.6.13"
version = "0.6.14"
description = "This is a wrapper package of the Geoweaver app."
authors = ["Geoweaver team <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 9134c4c

Please sign in to comment.