diff --git a/.github/workflows/testing-and-deployment.yml b/.github/workflows/testing-and-deployment.yml index 2c0bd9a9..7c2fff86 100644 --- a/.github/workflows/testing-and-deployment.yml +++ b/.github/workflows/testing-and-deployment.yml @@ -132,6 +132,10 @@ jobs: quay.io/pypa/manylinux2014_x86_64 \ /io/.ci/build_wheels.sh ${{ matrix.python-version }} + - name: Install VTK on Python 3.10 + if: matrix.python-version == '3.10' + run: pip install --find-links https://wheels.pyvista.org/ vtk + - name: Build wheel on Windows if: ${{ runner.os == 'Windows' }} run: | diff --git a/README.rst b/README.rst index 935071cb..612caf06 100644 --- a/README.rst +++ b/README.rst @@ -43,14 +43,32 @@ Installation ------------ Installation through pip:: - pip install ansys-mapdl-reader + pip install ansys-mapdl-reader You can also visit `pymapdl-reader `_ to download the source or releases from GitHub. +Python 3.10 Extra Instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Loading and Plotting an ANSYS Archive File -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PyMAPDL-Reader requires the `VTK library `_ which, at the +moment, is not available for Python 3.10 in `their official channel +`_. + +If you wish to install PyMAPDL-Reader in Python 3.10, you can still do it by +using the unofficial VTK wheel from PyVista using ``--find-links``. This tells ``pip`` to look for vtk at `wheels.pyvista.org `_. Use this with:: + + pip install ansys-mapdl-reader --find-links https://wheels.pyvista.org/ + +Please visit `Unofficial VTK Wheels for Python 3.10 +`_ for further details. + + +Examples +-------- + +Loading and Plotting a MAPDL Archive File +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ANSYS archive files containing solid elements (both legacy and modern), can be loaded using Archive and then converted to a vtk object. @@ -215,7 +233,7 @@ movie_filename and animate it with: Reading a Full File -------------------- +~~~~~~~~~~~~~~~~~~~ This example reads in the mass and stiffness matrices associated with the above example. @@ -277,6 +295,7 @@ you will need to install your own C++ compiler. We recommend: To get the package up and running. + License and Acknowledgments --------------------------- The ``ansys-mapdl-reader`` module is licensed under the MIT license. diff --git a/setup.py b/setup.py index a9d697ef..d2db0e32 100644 --- a/setup.py +++ b/setup.py @@ -109,19 +109,6 @@ def compiler_name(): 'Please check the version of Python installed at\n' '%s' % sys.executable) - -if sys.version_info.minor == 10 and is64: - # use pip to check if vtk is available or installed - sys_name = platform.system() - if sys_name == 'Linux': - install_requires.append( - 'vtk @ https://github.com/pyvista/pyvista-wheels/raw/main/vtk-9.1.0.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl', - ) - elif sys_name == 'Windows': - install_requires.append( - 'vtk @ https://github.com/pyvista/pyvista-wheels/raw/main/vtk-9.1.0.dev0-cp310-cp310-win_amd64.whl', - ) - setup( name='ansys-mapdl-reader', packages=['ansys.mapdl.reader', 'ansys.mapdl.reader.examples'],