setup.py 3.47 KB
Newer Older
Keith Packard's avatar
Keith Packard committed
1
#!/usr/bin/python3
2
# -*- coding: utf-8 -*-
3
#
Keith Packard's avatar
Keith Packard committed
4
# This file is part of Calypso Server - Calendar Server
Guillaume Ayoub's avatar
Guillaume Ayoub committed
5
# Copyright © 2009-2011 Guillaume Ayoub
6 7 8 9 10 11 12 13 14 15 16 17
#
# 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
Keith Packard's avatar
Keith Packard committed
18
# along with Calypso.  If not, see <http://www.gnu.org/licenses/>.
19

20
"""
Keith Packard's avatar
Keith Packard committed
21
Calypso CalDAV server
22
======================
23

Keith Packard's avatar
Keith Packard committed
24
The Calypso Project is a CalDAV calendar server.  It aims to be a light
25 26 27 28
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.

Keith Packard's avatar
Keith Packard committed
29
The Calypso Project runs on most of the UNIX-like platforms (Linux, BSD,
30 31 32
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.
33

Keith Packard's avatar
Keith Packard committed
34
For further information, please visit the `Calypso Website
35
<https://keithp.com/blogs/calypso/>`_.
36 37 38

"""

39 40
import os
from distutils.command.build_scripts import build_scripts
41
from setuptools import setup
42

43 44
try:
    from calypso import VERSION
Keith Packard's avatar
Keith Packard committed
45 46 47
except ImportError as e:
    print('Error importing Calypso, probably dependencies are not installed')
    print(e)
48
    VERSION = '0.0.1'
Keith Packard's avatar
Keith Packard committed
49
    print('Assuming version %s' % VERSION)
50

51 52
# build_scripts is known to have a lot of public methods
# pylint: disable=R0904
53 54 55 56
class BuildScripts(build_scripts):
    """Build the package."""
    def run(self):
        """Run building."""
Keith Packard's avatar
Keith Packard committed
57
        # These lines remove the .py extension from the calypso executable
58 59 60 61
        self.mkpath(self.build_dir)
        for script in self.scripts:
            root, _ = os.path.splitext(script)
            self.copy_file(script, os.path.join(self.build_dir, root))
62
# pylint: enable=R0904
63 64


Keith Packard's avatar
Keith Packard committed
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(
Keith Packard's avatar
Keith Packard committed
68
    name="calypso",
69
    version=VERSION,
Keith Packard's avatar
Keith Packard committed
70
    description="CalDAV and CardDAV Server",
71
    long_description=__doc__,
Keith Packard's avatar
Keith Packard committed
72 73
    author="Keith Packard",
    author_email="keithp@keithp.com",
74
    url="https://keithp.com/blogs/calypso/",
75
    download_url="https://anonscm.debian.org/cgit/calypso/calypso.git/",
76
    license="GNU GPL v3",
77
    platforms="Any",
Keith Packard's avatar
Keith Packard committed
78 79
    packages=["calypso", "calypso.acl"],
    provides=["calypso"],
80
    install_requires=["daemon","vobject"],
81
    tests_require=['nose>=0.11.1'],
Keith Packard's avatar
Keith Packard committed
82
    scripts=["calypso.py"],
83
    cmdclass={"build_scripts": BuildScripts},
84
    keywords=["calendar", "CalDAV"],
85
    classifiers=[
86
        "Development Status :: 5 - Production/Stable",
87 88 89 90 91 92
        "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",
93 94 95 96
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
97
        "Topic :: Office/Business :: Groupware"])