Skip to content

Commit

Permalink
Update the packaging scripts (Issue #63)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhowland committed Apr 3, 2018
1 parent 9a240f0 commit cdd796f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
32 changes: 13 additions & 19 deletions keymapper/cxFreeze_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,18 @@
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.

import os
import sys
import os.path
from cx_Freeze import setup, Executable
from glob import glob
from easykeymap import __version__
from easykeymap.version import __version__

# fixing cx_Freeze's failures
install_path = sys.exec_prefix
# doesn't copy the tcl/tk dependencies
tcl_dll_path = os.path.join(install_path, 'DLLs', 'tcl86t.dll')
tk_dll_path = os.path.join(install_path, 'DLLs', 'tk86t.dll')
# can't process TCL search without this
os.environ['TCL_LIBRARY'] = os.path.join(install_path, 'tcl', 'tcl8.6')
os.environ['TK_LIBRARY'] = os.path.join(install_path, 'tcl', 'tk8.6')
# includes DLLs from TortoiseSVN for no reason
TortoiseSVN_prefix = 'C:\\Program Files\\TortoiseSVN'

data_files = [
"easykeymap\\builds",
"easykeymap\\configs",
"easykeymap\\exttools",
"easykeymap\\icons",
"easykeymap\\manuals",
"easykeymap\\newboard_template.txt"
"easykeymap\\res"
]

setup(
Expand All @@ -56,19 +43,26 @@
platforms = 'any',
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications :: GTK',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: C',
'Topic :: Utilities',
],

options = {
"build_exe": {
'packages': ['easykeymap', 'easykeymap.boards', 'easykeymap.templates'],
'include_files': [tcl_dll_path, tk_dll_path] + data_files,
'packages': ['easykeymap', 'easykeymap.boards', 'easykeymap.gui', 'easykeymap.templates'],
'include_files': data_files,
# 'include_msvcr': True,
'bin_path_excludes': [TortoiseSVN_prefix],
'zip_include_packages': '*',
Expand All @@ -78,10 +72,10 @@

executables = [
Executable(
"main.py",
"easykeymap\\__main__.py",
base="Win32GUI",
targetName="easykeymap.exe",
icon="easykeymap\\icons\\keycap.ico",
icon="easykeymap\\res\\keycap.ico",
copyright="Copyright 2016 David Howland"
)
]
Expand Down
14 changes: 11 additions & 3 deletions keymapper/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.

from setuptools import setup, find_packages
from easykeymap import __version__
from easykeymap.version import __version__

setup(
name = 'easykeymap',
Expand All @@ -32,21 +32,29 @@
platforms = 'any',
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications :: GTK',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: C',
'Topic :: Utilities',
],
install_requires = ['wxPython >= 4.0.1'],
packages = find_packages(),
package_data = {
'easykeymap': ['builds/*.hex', 'configs/*.cfg', 'configs/*.txt', 'icons/*.ico', 'manuals/*.txt']
'easykeymap': ['builds/*.hex', 'configs/*.cfg', 'res/*.*']
},
entry_points = {
'gui_scripts': [
'easykeymap = easykeymap.gui:main',
'easykeymap = easykeymap.__main__:main',
]
}
)

0 comments on commit cdd796f

Please sign in to comment.