forked from sommer/loxodo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·81 lines (75 loc) · 2.2 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
#!/usr/bin/env python
"""
py2app/py2exe build script for Loxodo.
Usage (Mac OS X):
python setup.py py2app
Usage (Windows):
python setup.py py2exe
"""
import sys
from setuptools import setup
if sys.platform == 'darwin':
extra_options = dict(
name="Loxodo",
setup_requires = ['py2app'],
app = ['loxodo.py'],
options = dict(
py2app = dict(
argv_emulation = True,
iconfile = 'resources/loxodo-icon.icns',
packages = ['src', 'wx'],
site_packages = True,
resources = ['resources', 'locale', 'LICENSE.txt', 'README.txt']
)
)
)
setup(**extra_options)
elif sys.platform == 'win32':
import py2exe
import os
# create list of needed data files
dataFiles = []
for subdir in ('resources', 'locale'):
for root, dirs, files in os.walk(subdir):
if not files:
next
files = []
for filename in files:
files.append(os.path.join(root, filename))
if not files:
next
dataFiles.append((root, files))
extra_options = dict(
setup_requires = ['py2exe'],
windows = ['loxodo.py'],
data_files = dataFiles,
options = dict(
py2exe = dict(
excludes = 'ppygui'
)
)
)
setup(**extra_options)
else:
extra_options = dict(
name = 'Loxodo',
author = 'Christoph Sommer',
author_email = '[email protected]',
url = 'http://www.christoph-sommer.de/loxodo/',
description = 'A Password Safe V3 compatible password vault',
download_url = 'http://github.com/sommer/loxodo/zipball/master',
license = 'GPL-2.0+',
scripts = [ 'loxodo.py' ],
packages = ['src',
'src.frontends',
'src.frontends.cmdline',
'src.frontends.wx',
'src.twofish'],
package_data = {
'src.frontends.wx': [
'../../../resources/*',
'../../../locale/de/LC_MESSAGES/*'
],
},
)
setup(**extra_options)