]> scripts.mit.edu Git - wizard.git/blob - setup.py
Set admin e-mail address properly on MediaWiki >= 1.18.0
[wizard.git] / setup.py
1 import setuptools
2
3 # MONKEYPATCH: Stop egg_info from stupidly traversing the entire
4 # development directory.
5 import setuptools.command.egg_info
6 import os
7 class FileList(setuptools.command.egg_info.FileList):
8     def findall(self, dir=os.curdir):
9         """Find all files under 'dir' and return the list of full filenames
10         (relative to 'dir').
11         """
12         from stat import ST_MODE, S_ISREG, S_ISDIR, S_ISLNK
13
14         list = []
15         stack = [dir]
16         pop = stack.pop
17         push = stack.append
18
19         while stack:
20             dir = pop()
21             # BEGIN MODIFICATION
22             if dir in ("tests", "srv", ".git"):
23                 continue
24             # END MODIFICATION
25             names = os.listdir(dir)
26
27             for name in names:
28                 if dir != os.curdir:        # avoid the dreaded "./" syndrome
29                     fullname = os.path.join(dir, name)
30                 else:
31                     fullname = name
32
33                 # Avoid excess stat calls -- just one will do, thank you!
34                 stat = os.stat(fullname)
35                 mode = stat[ST_MODE]
36                 if S_ISREG(mode):
37                     list.append(fullname)
38                 elif S_ISDIR(mode) and not S_ISLNK(mode):
39                     push(fullname)
40         self.allfiles = list
41 setuptools.command.egg_info.FileList = FileList
42 # END MONKEYPATCH
43
44 setuptools.setup(
45     name = 'wizard',
46     version = '0.1.dev',
47     author = 'The Wizard Team',
48     author_email = 'scripts-team@mit.edu',
49     description = ('A next-generation autoinstall management system'),
50     license = 'MIT',
51     url = 'http://scripts.mit.edu/wizard',
52     packages = setuptools.find_packages(exclude=["tests", "plugins"]),
53     install_requires = ['decorator'], # versions?
54     keywords = "autoinstall webapp deploy",
55 )