-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
58 lines (49 loc) · 1.54 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Distutils setup script for tilde """
import os
import re
from distutils.core import setup
data_files_list = []
packages=[]
package_dirs={}
package_data={}
def add_files(target, root, ignore=None):
ignore = ignore or re.compile("(^|/)(\.svn|RCS|CVS|\.hg|\.bzr|_darcs|\.git)(/|$)")
for dirpath, dirnames, filenames in os.walk(root):
ret = []
reltarget = os.path.join(target, dirpath[len(root)+1:])
for filename in filenames:
filepath = os.path.join(dirpath, filename)
if not ignore.search(os.path.join(reltarget, filename)):
ret.append(filepath)
if len(ret) > 0:
data_files_list.append(
(reltarget, ret )
)
#Add all templates
add_files("/usr/share/tilde", "share")
# obtain name and version from the debian changelog
dch_data = open("debian/changelog").readline().split()
dch_name = dch_data[0]
dch_version = dch_data[1][1:-1]
setup(#cmdclass={'build_py': CompileI18nBuildWrapper},
name=dch_name,
version=dch_version,
description="tilde home management system",
author="Vincent Vinet",
author_email="[email protected]",
url="http://www.revolutionlinux.com/",
license="GPLv3",
platforms=["Linux"],
long_description="""Tilde home management system""",
packages=[
'tilde',
'twisted.plugins',
],
package_data={
'twisted' : ['plugins/tilde.py'],
},
scripts=["bin/tilded"],
data_files = data_files_list,
)