forked from ansys/pymapdl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
88 lines (75 loc) · 2.78 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
"""Installation file for ansys-mapdl-core"""
import sys
import struct
import os
from io import open as io_open
from setuptools import setup, find_namespace_packages
# Get version from version info
__version__ = None
this_file = os.path.dirname(__file__)
version_file = os.path.join(this_file, "ansys", "mapdl", "core", "_version.py")
with io_open(version_file, mode="r") as fd:
# execute file from raw string
exec(fd.read())
install_requires = [
"matplotlib>=3.0.0", # for colormaps for pyvista
"numpy>=1.14.0",
"pyvista>=0.32.0", # using new data attributes
"appdirs>=1.4.0",
"tqdm>=4.45.0",
"pyiges>=0.1.4",
"scipy>=1.3.0", # for sparse (consider optional?)
"grpcio>=1.30.0", # tested up to grpcio==1.35
"ansys-api-mapdl-v0==0.4.1", # supports at least 2020R2 - 2021R2
"ansys-mapdl-reader>=0.50.15",
"protobuf>=3.12.2", # minimum required based on latest ansys-grpc-mapdl
]
# 'grpcio-health-checking>=1.30.0',
# for CORBA
# pending depreciation to ansys-mapdl-corba
if sys.version_info[1] < 9:
install_requires.append("ansys-corba")
# these are only used when launching a MAPDL via a console. This
# feature is subject to be removed or moved out of this module.
if os.name == "linux":
install_requires.extend(["pexpect>=4.8.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
)
packages = []
for package in find_namespace_packages(include="ansys*"):
if package.startswith("ansys.mapdl.core"):
packages.append(package)
setup(
name="ansys-mapdl-core",
packages=packages,
version=__version__,
description="Python interface to MAPDL Service",
long_description=open("README.rst").read(),
license="MIT",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Information Analysis",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: MacOS",
"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",
python_requires=">=3.6.*",
keywords="ANSYS MAPDL gRPC",
package_data={"ansys.mapdl.core.examples": ["verif/*.dat", "wing.dat"]},
install_requires=install_requires,
)