/loggerhead/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerhead/trunk
183.2.1 by John Arbash Meinel
Add Copyright information to most files.
1
#!/usr/bin/env python
181.1.6 by Martin Albisetti
* Removed unused file
2
#
3
# Copyright (C) 2008  Canonical Ltd.
4
#                     (Authored by Martin Albisetti <argentina@gmail.com>)
183.2.1 by John Arbash Meinel
Add Copyright information to most files.
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
9
#
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
181.1.2 by Martin Albisetti
Removing left-over cruft from setup, and converting it to distutils
18
"""Loggerhead is a web viewer for projects in bazaar"""
19
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
1 by Robey Pointer
initial checkin
25
import os
181.1.2 by Martin Albisetti
Removing left-over cruft from setup, and converting it to distutils
26
import sys
181.1.5 by Martin Albisetti
Move version to __init__
27
import loggerhead
181.1.7 by Martin Albisetti
Make sure you have all required dependencies before installing
28
import bzrlib
29
30
31
# Make sure you have all required dependencies
181.1.2 by Martin Albisetti
Removing left-over cruft from setup, and converting it to distutils
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
181.1.7 by Martin Albisetti
Make sure you have all required dependencies before installing
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
181.1.2 by Martin Albisetti
Removing left-over cruft from setup, and converting it to distutils
59
class InstallData(install_data):
60
    def run(self):
61
        install_data.run(self)
58 by Robey Pointer
add setup.py info so an sdist tarball can be made
62
1 by Robey Pointer
initial checkin
63
setup(
181.1.2 by Martin Albisetti
Removing left-over cruft from setup, and converting it to distutils
64
    name = "loggerhead",
181.1.5 by Martin Albisetti
Move version to __init__
65
    version = loggerhead.__version__,
181.1.2 by Martin Albisetti
Removing left-over cruft from setup, and converting it to distutils
66
    description = "Loggerhead is a web viewer for projects in bazaar",
67
    license = "GNU GPL v2 or later",
68
    maintainer = "Michael Hudson",
69
    maintainer_email = "michael.hudson@canonical.com",
184 by Martin Albisetti
* Add start/stop scripts to setup, including serve-branches (Jelmer Vernooij)
70
    scripts = ["start-loggerhead", "stop-loggerhead", "serve-branches"],
181.1.2 by Martin Albisetti
Removing left-over cruft from setup, and converting it to distutils
71
    packages = ["loggerhead",
72
               ],
181.1.3 by Martin Albisetti
Include templates in setup
73
    package_data = {"loggerhead":["templates/*"]},
181.1.2 by Martin Albisetti
Removing left-over cruft from setup, and converting it to distutils
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}
1 by Robey Pointer
initial checkin
79
    )
80