#!/usr/bin/python
-# -*- coding: utf-8; indent-tabs-mode: nil; -*-
+# -*- coding: utf-8 -*-
#
-# This file is part of Radicale Server - Calendar Server
-# Copyright © 2008-2009 Guillaume Ayoub
-# Copyright © 2008 Nicolas Kandel
-# Copyright © 2008 Pascal Halter
+# This file is part of Calypso Server - Calendar Server
+# Copyright © 2009-2011 Guillaume Ayoub
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with Radicale. If not, see <http://www.gnu.org/licenses/>.
+# along with Calypso. If not, see <http://www.gnu.org/licenses/>.
-import os
-import shutil
+"""
+Calypso CalDAV server
+======================
+
+The Calypso Project is a CalDAV calendar server. It aims to be a light
+solution, easy to use, easy to install, easy to configure. As a consequence,
+it requires few software dependances and is pre-configured to work
+out-of-the-box.
+
+The Calypso Project runs on most of the UNIX-like platforms (Linux, BSD,
+MacOS X) and Windows. It is known to work with Evolution 2.30+, Lightning 0.9+
+and Sunbird 0.9+. It is free and open-source software, released under GPL
+version 3.
+
+For further information, please visit the `Calypso Website
+<http://keithp.com/blogs/calypso/>`_.
-from distutils.core import setup, Command
+"""
+
+import os
from distutils.command.build_scripts import build_scripts
+from setuptools import setup
+
+try:
+ from calypso import VERSION
+except ImportError, e:
+ print 'Error importing Calypso, probably dependencies are not installed'
+ print e
+ VERSION = '0.0.1'
+ print 'Assuming version %s' % VERSION
+# build_scripts is known to have a lot of public methods
+# pylint: disable=R0904
class BuildScripts(build_scripts):
+ """Build the package."""
def run(self):
+ """Run building."""
+ # These lines remove the .py extension from the calypso executable
self.mkpath(self.build_dir)
for script in self.scripts:
- root, ext = os.path.splitext(script)
+ root, _ = os.path.splitext(script)
self.copy_file(script, os.path.join(self.build_dir, root))
+# pylint: enable=R0904
-class Clean(Command):
- description = "clean up package temporary files"
- user_options = []
-
- def initialize_options(self):
- pass
-
- def finalize_options(self):
- pass
-
- def run(self):
- path = os.path.abspath(os.path.dirname(__file__))
- for pathname, _, files in os.walk(path):
- for filename in filter(self._should_remove, files):
- os.unlink(os.path.join(pathname, filename))
-
- for folder in ("build", "dist"):
- if os.path.isdir(os.path.join(path, folder)):
- shutil.rmtree(os.path.join(path, folder))
-
- if os.path.isfile(os.path.join(path, "MANIFEST")):
- os.unlink(os.path.join(path, "MANIFEST"))
-
- @staticmethod
- def _should_remove(filename):
- return (os.path.splitext(filename) == ".pyc" or
- os.path.splitext(filename) == ".pyo" or
- filename.endswith("~") or
- (filename.startswith("#") and filename.endswith("#")))
-
+# When the version is updated, ``calypso.VERSION`` must be modified.
+# A new section in the ``NEWS`` file must be added too.
setup(
- name="Radicale",
- version="0.0",
- description="Radicale CalDAV Server",
- author="Guillaume Ayoub",
- author_email="guillaume.ayoub@kozea.fr",
- url="http://www.radicale.org/",
+ name="calypso",
+ version=VERSION,
+ description="CalDAV and CardDAV Server",
+ long_description=__doc__,
+ author="Keith Packard",
+ author_email="keithp@keithp.com",
+ url="http://keithp.com/blogs/calypso/",
+ download_url="https://anonscm.debian.org/cgit/calypso/calypso.git/",
license="GNU GPL v3",
- requires=["twisted.web"],
- packages=["radicale", "radicale.acl", "radicale.support"],
- scripts=["radicale.py"],
- cmdclass={'clean': Clean,
- "build_scripts": BuildScripts})
+ platforms="Any",
+ packages=["calypso", "calypso.acl"],
+ provides=["calypso"],
+ install_requires=["daemon","vobject"],
+ test_requires=['nose>=0.11.1'],
+ scripts=["calypso.py"],
+ cmdclass={"build_scripts": BuildScripts},
+ keywords=["calendar", "CalDAV"],
+ classifiers=[
+ "Development Status :: 4 - Beta",
+ "Environment :: Console",
+ "Environment :: Web Environment",
+ "Intended Audience :: End Users/Desktop",
+ "Intended Audience :: Information Technology",
+ "License :: OSI Approved :: GNU General Public License (GPL)",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 2.5",
+ "Programming Language :: Python :: 2.6",
+ "Programming Language :: Python :: 2.7",
+ "Topic :: Office/Business :: Groupware"])