Version management, next version is 0.3.

This commit is contained in:
Guillaume Ayoub 2010-05-31 00:49:52 +02:00
parent dbe614552a
commit 054950be54
4 changed files with 22 additions and 5 deletions

3
NEWS
View File

@ -6,10 +6,11 @@
NEWS
------
0.5 - **Not released yet**
0.3 - **Not released yet**
==========================
* Evolution support
* Version management
0.2 - Snowflakes

View File

@ -43,6 +43,10 @@ import radicale
# Get command-line options
parser = optparse.OptionParser()
parser.add_option(
"-v", "--version", action="store_true",
default=False,
help="show version and exit")
parser.add_option(
"-d", "--daemon", action="store_true",
default=radicale.config.getboolean("server", "daemon"),
@ -76,6 +80,11 @@ for option in parser.option_list:
value = getattr(options, key)
radicale.config.set("server", key, value)
# Print version and exit if the option is given
if options.version:
print(radicale.VERSION)
sys.exit()
# Fork if Radicale is launched as daemon
if options.daemon:
if os.fork():

View File

@ -49,6 +49,8 @@ except ImportError:
from radicale import acl, config, ical, xmlutils
VERSION = "0.3-git"
def _check(request, function):
"""Check if user has sufficient rights for performing ``request``."""
authorization = request.headers.get("Authorization", None)

View File

@ -38,17 +38,22 @@ For further information, please visit the `Radicale Website
from distutils.core import setup
# When the version is updated, ``version`` and ``download_url`` must be modified
# A new section in the ``NEWS`` file must be added too
import radicale
# When the version is updated, ``radicale.VERSION`` must be modified and
# ``download_url`` must be uncommented. A new section in the ``NEWS`` file
# must be added too.
setup(
name="Radicale",
version="0.5-git",
version=radicale.VERSION,
description="CalDAV Server",
long_description=__doc__,
author="Guillaume Ayoub",
author_email="guillaume.ayoub@kozea.fr",
url="http://www.radicale.org/",
#download_url="http://radicale.org/src/radicale/Radicale-0.5.tar.gz",
#download_url="http://www.radicale.org/src/radicale/Radicale-%s.tar.gz" % \
# radicale.VERSION,
license="GNU GPL v3",
platforms="Any",
packages=["radicale", "radicale.acl"],