Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sc #12

Merged
merged 2 commits into from
Jun 5, 2023
Merged

sc #12

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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