forked from kcjengr/qtpyvcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
119 lines (101 loc) · 3.92 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import os
import versioneer
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
if os.getenv('DEB_BUILD') == 'true' or os.getenv('USER') == 'root':
"/usr/share/doc/linuxcnc/examples/sample-configs/sim"
# list of (destination, source_file) tuples
DATA_FILES = [
('/usr/lib/x86_64-linux-gnu/qt5/plugins/designer/', [
'pyqt5designer/Qt5.7.1-64bit/libpyqt5_py2.so',
'pyqt5designer/Qt5.7.1-64bit/libpyqt5_py3.so']),
]
# list of (destination, source_dir) tuples
DATA_DIRS = [
('/usr/share/doc/linuxcnc/examples/sample-configs/sim', 'linuxcnc/configs'),
]
if os.getenv('USER') == 'root':
try:
os.rename('/usr/lib/x86_64-linux-gnu/qt5/plugins/designer/libpyqt5.so',
'/usr/lib/x86_64-linux-gnu/qt5/plugins/designer/libpyqt5.so.old')
except:
pass
else:
# list of (destination, source_file) tuples
DATA_FILES = [
('~/', ['scripts/.xsessionrc',]),
]
# list of (destination, source_dir) tuples
DATA_DIRS = [
('~/linuxcnc/configs/sim.qtpyvcp', 'linuxcnc/configs/sim.qtpyvcp'),
('~/linuxcnc/nc_files/qtpyvcp', 'linuxcnc/nc_files/qtpyvcp'),
# ('~/linuxcnc/vcps', 'examples'),
]
def data_files_from_dirs(data_dirs):
data_files = []
for dest_dir, source_dir in data_dirs:
dest_dir = os.path.expanduser(dest_dir)
for root, dirs, files in os.walk(source_dir):
root_files = [os.path.join(root, i) for i in files]
dest = os.path.join(dest_dir, os.path.relpath(root, source_dir))
data_files.append((dest, root_files))
return data_files
data_files = [(os.path.expanduser(dest), src_list) for dest, src_list in DATA_FILES]
data_files.extend(data_files_from_dirs(DATA_DIRS))
setup(
name="qtpyvcp",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
author="Kurt Jacobson",
author_email="[email protected]",
description="Qt and Python based Virtual Control Panel framework for LinuxCNC.",
long_description=long_description,
long_description_content_type="text/markdown",
license="GNU General Public License v2 (GPLv2)",
url="https://github.com/kcjengr/qtpyvcp",
download_url="https://github.com/kcjengr/qtpyvcp/archive/master.zip",
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Manufacturing',
'Intended Audience :: End Users/Desktop',
'Topic :: Software Development :: Widget Sets',
'Topic :: Software Development :: User Interfaces',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Programming Language :: Python :: 3.9',
],
packages=find_packages(),
data_files=data_files,
include_package_data=True,
install_requires=[
'HiYaPyCo',
'oyaml',
],
entry_points={
'console_scripts': [
'qtpyvcp=qtpyvcp.app:main',
'qcompile=qtpyvcp.tools.qcompile:main',
'editvcp=qtpyvcp.tools.editvcp:main',
'plasma_tooldbpipe=qtpyvcp.tools.plasma_tooldbpipe:main',
'plasma_gcode_preprocessor=qtpyvcp.tools.plasma_gcode_preprocessor:main',
# example VCPs
'mini=examples.mini:main',
'brender=examples.brender:main',
# test VCPs
'vtk_test=video_tests.vtk_test:main',
'opengl_test=video_tests.opengl_test:main',
'qtpyvcp_test=video_tests.qtpyvcp_test:main',
],
'qtpyvcp.example_vcp': [
'mini=examples.mini',
'brender=examples.brender',
'actions=examples.actions',
],
'qtpyvcp.test_vcp': [
'vtk_test=video_tests.vtk_test',
'opengl_test=video_tests.opengl_test',
'qtpyvcp_test=video_tests.qtpyvcp_test',
],
},
)