Merge remote-tracking branch 'muelli/master'
[jelmer/calypso.git] / setup.py
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 #
4 # This file is part of Calypso Server - Calendar Server
5 # Copyright © 2009-2011 Guillaume Ayoub
6 #
7 # This library is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with Calypso.  If not, see <http://www.gnu.org/licenses/>.
19
20 """
21 Calypso CalDAV server
22 ======================
23
24 The Calypso Project is a CalDAV calendar server.  It aims to be a light
25 solution, easy to use, easy to install, easy to configure.  As a consequence,
26 it requires few software dependances and is pre-configured to work
27 out-of-the-box.
28
29 The Calypso Project runs on most of the UNIX-like platforms (Linux, BSD,
30 MacOS X) and Windows.  It is known to work with Evolution 2.30+, Lightning 0.9+
31 and Sunbird 0.9+. It is free and open-source software, released under GPL
32 version 3.
33
34 For further information, please visit the `Calypso Website
35 <http://www.calypso.org/>`_.
36
37 """
38
39 import os
40 from distutils.command.build_scripts import build_scripts
41 from setuptools import setup
42
43 try:
44     from calypso import VERSION
45 except ImportError, e:
46     print 'Error importing Calypso, probably dependencies are not installed'
47     print e
48     VERSION = '0.0.1'
49     print 'Assuming version %s' % VERSION
50
51 # build_scripts is known to have a lot of public methods
52 # pylint: disable=R0904
53 class BuildScripts(build_scripts):
54     """Build the package."""
55     def run(self):
56         """Run building."""
57         # These lines remove the .py extension from the calypso executable
58         self.mkpath(self.build_dir)
59         for script in self.scripts:
60             root, _ = os.path.splitext(script)
61             self.copy_file(script, os.path.join(self.build_dir, root))
62 # pylint: enable=R0904
63
64
65 # When the version is updated, ``calypso.VERSION`` must be modified.
66 # A new section in the ``NEWS`` file must be added too.
67 setup(
68     name="Calypso",
69     version=VERSION,
70     description="CalDAV and CardDAV Server",
71     long_description=__doc__,
72     author="Keith Packard",
73     author_email="keithp@keithp.com",
74     url="http://keithp.com/",
75     download_url="http://keithp.com/git/calypso",
76     license="GNU GPL v3",
77     platforms="Any",
78     packages=["calypso", "calypso.acl"],
79     provides=["calypso"],
80     install_requires=["vobject",],
81     scripts=["calypso.py"],
82     cmdclass={"build_scripts": BuildScripts},
83     keywords=["calendar", "CalDAV"],
84     classifiers=[
85         "Development Status :: 4 - Beta",
86         "Environment :: Console",
87         "Environment :: Web Environment",
88         "Intended Audience :: End Users/Desktop",
89         "Intended Audience :: Information Technology",
90         "License :: OSI Approved :: GNU General Public License (GPL)",
91         "Operating System :: OS Independent",
92         "Programming Language :: Python :: 2",
93         "Programming Language :: Python :: 2.5",
94         "Programming Language :: Python :: 2.6",
95         "Programming Language :: Python :: 2.7",
96         "Programming Language :: Python :: 3",
97         "Programming Language :: Python :: 3.0",
98         "Programming Language :: Python :: 3.1",
99         "Topic :: Office/Business :: Groupware"])