Repository navigation
Expand file tree
/
Copy pathrelease.py
More file actions
119 lines (106 loc) · 3.48 KB
/
Copy pathrelease.py
File metadata and controls
119 lines (106 loc) · 3.48 KB
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
119
"""
Copyright (c) 2017, Jairus Martin.
Distributed under the terms of the GPL v3 License.
The full license is in the file COPYING.txt, distributed with this software.
Created on Dec 5, 2017
@author
"""
import os
import sys
import importlib
from glob import glob
from os.path import dirname, split
from cx_Freeze import setup, Executable
from cx_Freeze import Executable, hooks, setup
from cx_Freeze.hooks.qthooks import (
IS_WINDOWS,
QtHook,
_get_qt_files,
_qt_implementation,
)
def find_enaml_files(*modules):
""" Find .enaml files to include in the zip """
files = {}
for name in modules:
mod = importlib.import_module(name)
mod_path = dirname(mod.__file__)
pkg_root = dirname(mod_path)
for file_type in ['enaml', 'png']:
for f in glob('{}/**/*.{}'.format(mod_path, file_type),
recursive=True):
pkg = f.replace(pkg_root+os.path.sep, '')
files[f] = pkg
return files.items()
def find_data_files(*modules):
files = {}
for name in modules:
mod = importlib.import_module(name)
mod_path = name#mod.__file__# if hasattr(mod, '__file__') else name
pkg_root = name#dirname(mod_path)
for f in glob('{}/**/*.png'.format(mod_path), recursive=True):
pkg = f.replace(pkg_root+os.path.sep, '')
files[f] = pkg
return files.items()
setup(
name='Inkcut',
author="Inkcut team",
author_email="frmdstryr@gmail.com",
license='GPLv3',
url='https://github.com/inkcut/inkcut/',
description="An application for controlling 2D plotters",
long_description=open("README.md").read(),
version='1.0',
install_requires=[
'PyQt5', 'enaml', 'enamlx', 'QScintilla', 'autobahn',
'qt5reactor', 'qtconsole', 'jsonpickle', 'pozetron-cli', 'jedi',
'pyserial',
],
options=dict(
build_exe=dict(
packages=[
'inkcut',
'enaml',
'enamlx',
'pygments',
'ipykernel',
'zmq'
],
zip_include_packages=[
'atom',
'asn1crypto', 'asyncio', 'attr', 'autobahn', 'automat',
'collections', 'concurrent', 'constantly', 'ctypes', 'curses',
'cffi', 'cryptography',
'dateutil', 'dbm', 'distutils',
'email', 'enaml', 'enamlx', 'encodings',
'html', 'http',
'idna', 'importlib', 'incremental', 'ipykernel', 'IPython',
'ipython_genutils',
'jedi', 'json', 'jsonpickle', 'jupyter_client', 'jupyter_core',
'logging', 'libfuturize',
'multiprocessing',
'OpenSSL',
'parso', 'past', 'pexpect', 'pkg_resources', 'ply',
'prompt_toolkit', 'ptyprocess', 'pydoc_data', 'pyflakes',
'pygments', 'pycparser',
'qtconsole', 'qt5reactor', 'qtpy',
'sqlite3', 'setuptools', 'serial',
'traitlets', 'traitlets', 'txaio', 'tornado',
'tkinter', 'test',
'unittest', 'urllib',
'wcwidth',
'xml', 'xmlrpc',
#'zmq',
],
)
),
executables=[
Executable(
"main.py",
base="gui",
icon="inkcut/res/icons/logo." + ("ico" if IS_WINDOWS else "png"),
target_name="inkcut",
shortcut_name="Inkcut" if IS_WINDOWS else None,
shortcut_dir="DesktopFolder" if IS_WINDOWS else None,
)
]
)