~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Marius Kruger
  • Date: 2008-10-14 11:53:22 UTC
  • mto: This revision was merged to the branch mainline in revision 240.
  • Revision ID: amanic@gmail.com-20081014115322-d93f030tn7g7gprc
add restart

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# You should have received a copy of the GNU General Public License
16
16
# along with this program; if not, write to the Free Software
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 
18
19
"""Loggerhead is a web viewer for projects in bazaar"""
19
20
 
20
 
from distutils.core import setup, Command
21
 
from distutils.command.install_data import install_data
22
 
from distutils.dep_util import newer
23
 
from distutils.log import info
24
 
import glob
25
 
import os
26
 
import sys
 
21
 
 
22
from distutils.core import setup
27
23
import loggerhead
28
 
import bzrlib
29
 
 
30
 
 
31
 
# Make sure you have all required dependencies
32
 
if sys.version_info < (2, 4):
33
 
    sys.stderr.write("[ERROR] Not a supported Python version. Need 2.4+\n")
34
 
    sys.exit(1)
35
 
 
36
 
bzrlib_version = bzrlib.version_info[:2]
37
 
try:
38
 
    from bzrlib.trace import warning
39
 
except ImportError:
40
 
    from warnings import warn as warning
41
 
if bzrlib_version < loggerhead.required_bzrlib:
42
 
    from bzrlib.errors import BzrError
43
 
    warning('Installed Bazaar version %s is too old to be used with loggerhead'
44
 
            ' %s.' % (bzrlib.__version__, __version__))
45
 
    raise BzrError('Version mismatch: %r, %r' % (version_info, 
46
 
                                                 bzrlib.version_info) )
47
 
 
48
 
try:
49
 
    import paste
50
 
except ImportError:
51
 
    raise errors.BzrCommandError("python-paste not installed.")
52
 
try:
53
 
    import simpletal
54
 
except ImportError:
55
 
    raise errors.BzrCommandError("python-simpletal not installed.")
56
 
 
57
 
 
58
 
 
59
 
class InstallData(install_data):
60
 
    def run(self):
61
 
        install_data.run(self)
 
24
 
62
25
 
63
26
setup(
64
27
    name = "loggerhead",
68
31
    maintainer = "Michael Hudson",
69
32
    maintainer_email = "michael.hudson@canonical.com",
70
33
    scripts = ["start-loggerhead", "stop-loggerhead", "serve-branches"],
71
 
    packages = ["loggerhead",
72
 
               ],
73
 
    package_data = {"loggerhead":["templates/*"]},
74
 
    data_files=[
75
 
                ('share/man/man1',['start-loggerhead.1', 'stop-loggerhead.1']),
76
 
                ('share/doc/loggerhead', ['loggerhead.conf.example'])
77
 
               ],
78
 
    cmdclass={'install_data':InstallData}
 
34
    packages = ["loggerhead", 
 
35
                "loggerhead/apps", 
 
36
                "loggerhead/controllers", 
 
37
                "loggerhead/templates"],
 
38
    package_data = {"loggerhead":["templates/*.pt", 
 
39
                                  "static/css/*.css", 
 
40
                                  "static/javascript/*", 
 
41
                                  "static/images/*"]},
 
42
    data_files = [
 
43
        ('share/man/man1',['start-loggerhead.1', 'stop-loggerhead.1', 
 
44
                           'serve-branches.1']),
 
45
        ('share/doc/loggerhead', ['loggerhead.conf.example']),
 
46
        ],
79
47
    )
80