radicale/setup.py

121 lines
4.2 KiB
Python
Raw Normal View History

2009-09-01 19:09:11 +02:00
#!/usr/bin/python
# -*- coding: utf-8 -*-
2009-09-01 19:09:11 +02:00
#
# This file is part of Radicale Server - Calendar Server
# Copyright © 2009-2010 Guillaume Ayoub
2009-09-01 19:09:11 +02:00
#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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/>.
2010-04-12 12:23:22 +02:00
"""
2010-04-13 01:30:47 +02:00
Radicale CalDAV server
======================
2010-04-12 12:23:22 +02:00
2010-04-13 01:30:47 +02:00
The Radicale 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 Radicale Project runs on most of the UNIX-like platforms (Linux, *BSD,
MacOS X) and Windows. It is known to work with Lightning and Sunbird 0.9+. It
is free and open-source software, released under GPL version 3.
For further information, please visit the `Radicale Website
<http://www.radicale.org/>`_.
2010-04-12 12:23:22 +02:00
"""
2009-09-01 19:09:11 +02:00
import os
import shutil
from distutils.core import setup, Command
from distutils.command.build_scripts import build_scripts
class BuildScripts(build_scripts):
2010-04-12 12:23:22 +02:00
"""Build the package."""
2009-09-01 19:09:11 +02:00
def run(self):
2010-04-12 12:23:22 +02:00
"""Run building."""
2009-09-01 19:09:11 +02:00
self.mkpath(self.build_dir)
for script in self.scripts:
2009-09-01 19:43:36 +02:00
root, _ = os.path.splitext(script)
2009-09-01 19:09:11 +02:00
self.copy_file(script, os.path.join(self.build_dir, root))
class Clean(Command):
2010-04-12 12:23:22 +02:00
"""Clean up package temporary files."""
2009-09-01 19:09:11 +02:00
description = "clean up package temporary files"
user_options = []
def initialize_options(self):
2010-04-12 12:23:22 +02:00
"""Pre-processing."""
2009-09-01 19:09:11 +02:00
pass
def finalize_options(self):
2010-04-12 12:23:22 +02:00
"""Post-processing."""
2009-09-01 19:09:11 +02:00
pass
def run(self):
2010-04-12 12:23:22 +02:00
"""Run clean up."""
2009-09-01 19:09:11 +02:00
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):
2010-04-12 12:23:22 +02:00
"""Return if ``filename`` should be considered as temporary."""
2009-09-01 19:43:36 +02:00
return (os.path.splitext(filename)[1] == ".pyc" or
os.path.splitext(filename)[1] == ".pyo" or
2009-09-01 19:09:11 +02:00
filename.endswith("~") or
(filename.startswith("#") and filename.endswith("#")))
setup(
name="Radicale",
2010-04-12 03:15:07 +02:00
version="0.2",
2010-04-13 01:30:47 +02:00
description="CalDAV Server",
long_description=__doc__,
2009-09-01 19:09:11 +02:00
author="Guillaume Ayoub",
author_email="guillaume.ayoub@kozea.fr",
url="http://www.radicale.org/",
2010-04-13 01:49:35 +02:00
download_url = "http://radicale.org/src/radicale/Radicale-0.2.tar.gz",
2009-09-01 19:09:11 +02:00
license="GNU GPL v3",
2010-04-13 01:30:47 +02:00
platforms="Any",
2010-02-10 23:52:50 +01:00
packages=["radicale", "radicale.acl"],
2010-04-13 01:30:47 +02:00
provides=["radicale"],
2009-09-01 19:09:11 +02:00
scripts=["radicale.py"],
2010-04-13 01:30:47 +02:00
cmdclass={"clean": Clean,
"build_scripts": BuildScripts},
2010-04-13 01:49:35 +02:00
keywords=["calendar", "CalDAV"],
2010-04-13 01:30:47 +02:00
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 :: 3",
"Programming Language :: Python :: 3.0",
"Programming Language :: Python :: 3.1",
"Topic :: Office/Business :: Groupware"])