This repository has been archived by the owner on Feb 11, 2023. It is now read-only.
forked from SteveDoyle2/pyNastran
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
86 lines (78 loc) · 3.01 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
#!/usr/bin/env python
import os
import sys
from setuptools import setup, find_packages
import pyNastran
from packages import (check_python_version, get_package_requirements,
update_version_file, LONG_DESCRIPTION)
add_vtk_qt = True
bdist = False
if 'bdist_wheel' in sys.argv:
add_vtk_qt = False
bdist = True
assert '\r' not in LONG_DESCRIPTION, LONG_DESCRIPTION
check_python_version()
install_requires = get_package_requirements(is_gui=True, add_vtk_qt=add_vtk_qt, bdist=bdist)
packages = find_packages() + ['gui/icons/*.*']
#print("packages = %s" % packages)
# set up all icons
icon_path = os.path.join('pyNastran', 'gui', 'icons')
icon_files = os.listdir(icon_path)
icon_files2 = []
for icon_file in icon_files:
if icon_file.endswith('.png'):
icon_files2.append(os.path.join(icon_path, icon_file))
exclude_words = []
packages = find_packages(exclude=['ez_setup', 'examples', 'tests'] + exclude_words)
for exclude_word in exclude_words:
packages = [package for package in packages if exclude_word not in package]
#print(packages, len(packages)) # 83
update_version_file()
setup(
name='pyNastran',
version=pyNastran.__version__,
description=pyNastran.__desc__,
long_description=LONG_DESCRIPTION,
long_description_content_type='text/x-rst',
classifiers=[
'Natural Language :: English',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
python_requires='>=3.7',
author=pyNastran.__author__,
author_email=pyNastran.__email__,
url=pyNastran.__website__,
license=pyNastran.__license__,
packages=packages,
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
#{'': ['license.txt']}
#package_data={'': ['*.png']},
#data_files=[(icon_path, icon_files2)],
package_data={
# https://pythonhosted.org/setuptools/setuptools.html#including-data-files
# If any package contains *.png files, include them:
'': ['*.png'],
#'mypkg': ['data/*.dat'],
},
entry_points={
'console_scripts': [
#'run_nastran_double_precision = pyNastran.bdf.test.run_nastran_double_precision:cmd_line',
'test_bdf = pyNastran.bdf.test.test_bdf:main',
'test_op2 = pyNastran.op2.test.test_op2:main',
'test_op4 = pyNastran.op4.test.test_op4:main',
#'test_abaqus = pyNastran.converters.abaqus.test_abaqus:main',
'test_pynastrangui = pyNastran.gui.test.test_gui:main',
'format_converter = pyNastran.converters.format_converter:cmd_line_format_converter',
'pyNastranGUI = pyNastran.gui.gui:cmd_line',
'bdf = pyNastran.bdf.mesh_utils.utils:cmd_line',
'f06 = pyNastran.f06.utils:cmd_line',
]
},
test_suite='pyNastran.all_tests',
)