This repository was archived by the owner on Feb 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
105 lines (88 loc) · 3.41 KB
/
setup.py
File metadata and controls
105 lines (88 loc) · 3.41 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
import os, sys, shutil
from glob import glob
#--------------------------------------------------------------------------
# PY2EXE Setup Script
#--------------------------------------------------------------------------
if 'py2exe' in sys.argv:
from distutils.core import setup
import py2exe
shutil.rmtree('build', ignore_errors=True)
shutil.rmtree('dist', ignore_errors=True)
packages = ['mpos']
# Get Data Files
#----------------------------------------------------------------------
# Resource Files
res = os.path.abspath(os.path.join(os.getcwd(), 'mpos', 'resources'))
paths = []
for x in os.walk(res):
paths.append(x[0])
file_stuff = []
for x in paths:
file_stuff.append(glob(os.path.join(x, '*.*')))
# Info Files
info = os.path.abspath(os.path.join(os.getcwd(), 'mpos', 'info_files'))
paths = []
for x in os.walk(info):
paths.append(x[0])
info_stuff = []
for x in paths:
info_stuff.append(glob(os.path.join(x, '*.*')))
MyDataFiles = [('resources', file_stuff[0]),
('info_files', info_stuff[0]),
('Microsoft.VC90.CRT', glob(r'C:/\Users/Greg Wilson/Documents/Computing/cPPdlls/*.*'))]
setup(
options = {"py2exe": {"compressed": 2,
"optimize": 2,
"packages": packages,
"bundle_files": 3,
"dist_dir": "dist",
"xref": False,
"skip_archive": False,
"ascii": False,
"custom_boot_script": '',
}
},
windows= [
{'script': 'mini_pos.py',
'icon_resources': [(1, 'C:/\Users/Greg Wilson/Documents/Peace Corps Projects/SQ1/miniPOS/miniPOS/mpos/resources/miniPOS.ico')]
}
],
zipfile = "lib/library.zip",
packages = packages,
data_files = MyDataFiles
)
#--------------------------------------------------------------------------
# SetupTools Setup Script
#--------------------------------------------------------------------------
else:
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='miniPOS',
version="1.1",
url='http://sourceforge.net/projects/minipos',
description='A simple POS program for record keeping.',
long_description='A simple POS program for record keeping',
platforms='Any',
license='GPL3',
author='Gregory Wilson',
author_email='gwilson.sq1@gmail.com',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business :: Financial :: Point-Of-Sale',
'Topic :: Office/Business',
],
packages=['mpos'],
package_data={'mpos': ['resources/*']},
data_files =['doc/miniPOS_DOC.doc', 'doc/miniPOS_DOC.pdf'],
py_modules = ['ez_setup'],
scripts = ['mini_pos.py'],
)