Skip to content

Commit

Permalink
__init__.py -> Detect unsupported system and machine type (architect…
Browse files Browse the repository at this point in the history
…ure)
  • Loading branch information
jdegenstein authored May 8, 2024
1 parent 0189a56 commit afd510c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions py_lib3mf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
__version__ = '2.3.1'

import platform
from . import Lib3MF

system = platform.system().lower()

if system not in ("linux", "darwin", "windows"):
raise OSError(f"Unsupported Operating System: {system}")

machine = platform.machine().lower()

if system == "linux" and machine != "x86_64":
raise OSError(f"Unsupported Machine Type: {machine}")
elif system == "windows" and machine not in ("x86_64", "amd64")
raise OSError(f"Unsupported Machine Type: {machine}")

# skipping darwin machine check for now

0 comments on commit afd510c

Please sign in to comment.