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

check py38 and 64 bit #44

Merged
merged 1 commit into from
Jun 18, 2021
Merged
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
20 changes: 20 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Installation file for ansys-mapdl-reader"""
import struct
import os
import sys
from io import open as io_open
@@ -89,6 +90,25 @@ def compilerName():
'matplotlib>=3.0.0',
'tqdm>=4.45.0']

# perform python version checking
# this is necessary to avoid the new pip package checking as vtk does
# not support Python 3.9 or any 32-bit as of 17 June 2021.
is64 = struct.calcsize("P")*8 == 64
if not is64:
raise RuntimeError('\n\n``ansys-mapdl-reader`` requires 64-bit Python\n'
'Please check the version of Python installed at\n'
'%s' % sys.executable)

if sys.version_info.minor > 8:
try:
import vtk
except:
raise RuntimeError('\n\n``ansys-mapdl-reader`` supports Python 3.6 - 3.8\n'
'Python 3.9 support depends on vtk wheels, which should\n'
'be released by August 2021.\n\n'
'Installed Python:\n'
'%s' % str(sys.version.splitlines()[0]))


# Actual setup
setup(