Skip to content

Commit

Permalink
windows support for 3.7 and 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuminjie committed Aug 11, 2020
1 parent eef221c commit ac7a49e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
39 changes: 24 additions & 15 deletions openseespy-pip/openseespy/opensees/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,38 @@
try:
from openseespy.opensees.linux.opensees import *
except:
raise RuntimeError('Failed to import openseespy.')
raise RuntimeError('Failed to import openseespy on Linux.')

elif sys.platform.startswith('win'):

try:
from openseespy.opensees.win.opensees import *
except:
raise RuntimeError('Failed to import openseespy.')
# try:
# from openseespy.opensees.win.opensees import *
# except:
# raise RuntimeError('Failed to import openseespy.')
# python 3.7 is required
# if sys.version_info[0] == 3 and sys.version_info[1] == 7:
if sys.version_info[0] == 3 and sys.version_info[1] == 7:

try:
from openseespy.opensees.win.py37.opensees import *

except:

# try:
# from openseespy.opensees.win.opensees import *
raise RuntimeError(
'Failed to import openseespy on Windows for Python 3.7')

# except:
if sys.version_info[0] == 3 and sys.version_info[1] == 8:

# raise RuntimeError(
# 'Failed to import openseespy. Anaconda is recommended https://www.anaconda.com/distribution/')
try:
from openseespy.opensees.win.py38.opensees import *

# else:
# raise RuntimeError(
# 'Python version 3.7 is needed for Windows (Anaconda is recommended https://www.anaconda.com/distribution/)')
except:

raise RuntimeError(
'Failed to import openseespy on Windows for Python 3.8')

else:
raise RuntimeError(
'Python version 3.7 or 3.8 is needed for Windows')

# if sys.version_info[1] == 6:

Expand All @@ -55,4 +65,3 @@
else:

raise RuntimeError(sys.platform+' is not supported yet')

Empty file.
Empty file.

0 comments on commit ac7a49e

Please sign in to comment.