Skip to content

Commit

Permalink
Add back in Python 3.9 compatiblity (#45)
Browse files Browse the repository at this point in the history
* add back python 3.9 compatibility

* update pipeline

* adapt pipeline for 3.9
  • Loading branch information
akaszynski authored Jun 24, 2021
1 parent dad9981 commit dd9a389
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .ci/build_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ case $PYTHON_VERSION in
3.8)
PYBIN="/opt/python/cp38-cp38/bin"
;;
3.9)
PYBIN="/opt/python/cp39-cp39/bin"
;;
esac

# build, don't install
Expand Down
5 changes: 4 additions & 1 deletion .ci/macos-install-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ case $PYTHON_VERSION in
FULL_VERSION=3.7.9
;;
3.8)
FULL_VERSION=3.8.5
FULL_VERSION=3.8.9
;;
3.9)
FULL_VERSION=3.9.5
;;
esac

Expand Down
10 changes: 8 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ jobs:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
variables:
DISPLAY: ':99.0'
PYVISTA_OFF_SCREEN: 'True'
Expand Down Expand Up @@ -57,8 +59,10 @@ jobs:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
pool:
vmImage: 'vs2017-win2016'
vmImage: 'windows-2019'
steps:
- task: UsePythonVersion@0
inputs:
Expand All @@ -82,6 +86,8 @@ jobs:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
pool:
vmImage: 'macOS-10.15'
steps:
Expand Down
15 changes: 3 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,28 +95,18 @@ def compilerName():
# 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'
raise RuntimeError('\n\n``ansys-mapdl-reader`` requires 64-bit Python due to vtk.\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(
name='ansys-mapdl-reader',
packages=['ansys.mapdl.reader', 'ansys.mapdl.reader.examples'],
version=__version__,
description='Pythonic interface to files generated by MAPDL',
long_description=open('README.rst').read(),
long_description_content_type='text/x-rst',
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
Expand All @@ -129,6 +119,7 @@ def compilerName():
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
url='https://github.com/pyansys/pymapdl-reader',

Expand Down

0 comments on commit dd9a389

Please sign in to comment.