-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
87 lines (81 loc) · 2.86 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
from setuptools import setup, find_packages
import os
import re
def read(fname):
with open(fname) as fp:
content = fp.read()
return content
def get_version():
VERSIONFILE = os.path.join('src', 'sdynpy', '__init__.py')
with open(VERSIONFILE, 'rt') as f:
lines = f.readlines()
vgx = '^__version__ = \"[0-9+.0-9+.0-9+]*[a-zA-Z0-9]*\"'
for line in lines:
mo = re.search(vgx, line, re.M)
if mo:
return mo.group().split('"')[1]
raise RuntimeError('Unable to find version in %s.' % (VERSIONFILE,))
def get_ui_files(directory):
paths = []
for (path,directories,filenames) in os.walk(directory):
for filename in filenames:
if filename[-3:] == '.ui':
paths.append(os.path.join(path,filename))
return paths
setup(
name='sdynpy',
version=get_version(),
description=('A Structural Dynamics Library for Python'),
long_description=read("README.rst"),
url='https://github.com/sandialabs/sdynpy',
author='Daniel P. Rohe',
author_email='[email protected]',
license='GPLv3',
package_dir={'': 'src'},
packages=find_packages(where='src'),
zip_safe=False,
package_data={'': get_ui_files('src/sdynpy')},
include_package_data=True,
install_requires=[
"numpy",
"scipy",
"matplotlib",
"npTDMS",
"qtpy",
"PyQt5",
"pyqtgraph",
"netCDF4",
"pandas",
"python-pptx",
"Pillow",
"pyvista",
"pyvistaqt",
"openpyxl",
"vtk",
"joblib",
"psutil"
],
python_requires='>=3.8',
extras_require={
'docs': ['docutils<0.18,>=0.14', 'ipykernel', 'ipython',
'jinja2>=3.0', 'nbsphinx',
'sphinx', 'sphinx-rtd-theme', 'sphinxcontrib-bibtex',
'sphinx-copybutton'],
'testing': ['pycodestyle', 'pylint', 'pytest', 'pytest-cov'],
'all': ['docutils<0.18,>=0.14', 'ipykernel', 'ipython', 'jinja2>=3.0',
'nbsphinx', 'pycodestyle', 'pylint', 'pytest', 'pytest-cov',
'sphinx', 'sphinx-copybutton',
'sphinx-rtd-theme', 'sphinxcontrib-bibtex']},
classifiers=['Natural Language :: English',
'Operating System :: Microsoft :: Windows :: Windows 10',
'Operating System :: Microsoft :: Windows :: Windows 11',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Framework :: Pytest',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)'
]
)