Skip to content

Commit

Permalink
reverted unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
klytje committed Oct 22, 2024
1 parent 665ba0c commit 07b68b9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 26 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
# dynamically linked by pyinstaller.
# https://pyinstaller.readthedocs.io/en/stable/usage.html#making-gnu-linux-apps-forward-compatible
os_release_list = [
# 'ubuntu-20.04',
# 'windows-latest',
'ubuntu-20.04',
'ubuntu-22.04',
'windows-latest',
'macos-13',
'macos-latest',
]
Expand Down
5 changes: 0 additions & 5 deletions build_tools/get_external_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,11 @@ def get_ausaxs():
lib = "libausaxs.so"
elif _os == OS.MAC:
lib = "libausaxs.dylib"
# lib = "libausaxs-" + platform.machine() + ".dylib"
if lib is not None:
# we have to use a relative path since the package is not installed yet
base_loc = "src/sas/sascalc/calculator/ausaxs/lib/"
response = requests.get(url+lib)

# rename macos lib to a generic name without the architecture suffix
if _os is OS.MAC:
lib = "libausaxs.dylib"

with open(base_loc+lib, "wb") as f:
f.write(response.content)

Expand Down
17 changes: 1 addition & 16 deletions src/sas/sascalc/calculator/ausaxs/architecture.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from enum import Enum
import platform

class OS(Enum):
WIN = 0
Expand Down Expand Up @@ -32,18 +31,4 @@ def get_shared_lib_extension():
return ".so"
elif _os == OS.MAC:
return ".dylib"
return ""

def get_ausaxs_filename():
"""
Get the AUSAXS shared library filename for the current operating system.
"""
_os = get_os()
lib = None
if _os == OS.WIN:
lib = "libausaxs.dll"
elif _os == OS.LINUX:
lib = "libausaxs.so"
elif _os == OS.MAC:
lib = "libausaxs-" + platform.machine() + ".dylib"
return lib
return ""
3 changes: 0 additions & 3 deletions src/sas/sascalc/calculator/ausaxs/ausaxs_sans_debye.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ def _attach_hooks():
return None, lib_state.FAILED

path = loc.joinpath("libausaxs" + ext)
logging.info(f"AUSAXS: Library is {'present' if path.exists() else 'not present'}. Attempting to load library from {path}.")

ausaxs_state = lib_state.READY
try:
# evaluate_sans_debye func
Expand All @@ -45,7 +43,6 @@ def _attach_hooks():
]
ausaxs.evaluate_sans_debye.restype = None # don't expect a return value
ausaxs_state = lib_state.READY
logging.info("AUSAXS: Successfully hooked into external library.")
except Exception as e:
ausaxs_state = lib_state.FAILED
logging.warning("AUSAXS: Failed to hook into external library; using default Debye implementation")
Expand Down

0 comments on commit 07b68b9

Please sign in to comment.