-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
82 lines (71 loc) · 2.48 KB
/
Copy pathsetup.py
File metadata and controls
82 lines (71 loc) · 2.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
from setuptools import setup
import os
import os.path
import glob
import sys
from setuptools.command.install import install as _install
from subprocess import call
# Produces blank file when using debian instl
#call(["bzr version-info --python > stk/bzr_version.py"], shell=True)
class install(_install):
def run(self):
_install.run(self)
try:
call(["update-desktop-database"])
except:
pass
try:
destdir = os.environ["DESTDIR"]
except KeyError:
destdir = "/usr/share/"
try:
set
except NameError:
from sets import Set
# Get all the plugin directories we have
plugin_dirs = ['stk_gui/plugins/phyml']
plugin_data_files = []
schema_dirs = ['schema']
schema_data_files = []
if sys.platform == 'win32':
extra_options = dict(
setup_requires=['py2exe'],
app=['stk_gui'],
)
else:
for plugin in plugin_dirs:
plugin_data_files.append((destdir + "plugins/phyml/",
glob.glob(plugin + '/*.py')))
for s in schema_dirs:
schema_data_files.append((destdir + "stk/schemata/schema/",
glob.glob(s + '/*.rng')))
extra_options = dict(
cmdclass={'install': install},
app=['stk'],
data_files = [(destdir + "stk/", ["stk_gui/gui/gui.glade", "stk_gui/gui/stk.png", "stk_gui/gui/stk.svg"])] +
plugin_data_files + schema_data_files +
[(destdir + "stk/schemata", ["schema/phyml"])] +
[(destdir+"icons/hicolor/48x48/apps/", ["stk_gui/gui/stk.png"])] +
[(destdir+"applications/",["debian/stk.desktop"])]
)
setup(
name='supertree-toolkit',
version='2.0',
description="Supertree data source management",
author = "The STK Team",
author_email = "jon.hill@imperial.ac.uk",
url = "https://launchpad.net/supertree-tookit",
packages = ['stk', 'dxdiff', 'stk_gui', 'stk.yapbib', 'stk.p4','stk.nameparser'],
package_dir = {
'stk': 'stk',
'dxdiff': 'dxdiff/dxdiff',
'stk_gui':'stk_gui/stk_gui',
'stk.yapbib':'stk/yapbib',
#'stk.dxdiff':'stk_gui/dxdiff/dxdiff',
# Note, we use out own P4 - better tested within STK this way and removes the requirement
# of pre-installing it. It also means we don't overwrite any previous p4 install.
'stk.p4':'stk/p4',
'stk.nameparser':'stk/nameparser'},
scripts=["stk_gui/bin/stk-gui", "stk/stk"],
**extra_options
)