1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

Put the executable script in the radicale package

This commit is contained in:
Guillaume Ayoub 2011-11-03 17:47:35 +01:00
parent 42bec467f5
commit 64f786f5a5
5 changed files with 209 additions and 158 deletions

View file

@ -36,27 +36,11 @@ For further information, please visit the `Radicale Website
"""
import os
from distutils.core import setup
from distutils.command.build_scripts import build_scripts
import radicale
# 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 radicale executable
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))
# pylint: enable=R0904
# When the version is updated, ``radicale.VERSION`` must be modified.
# A new section in the ``NEWS`` file must be added too.
setup(
@ -73,8 +57,7 @@ setup(
platforms="Any",
packages=["radicale", "radicale.acl"],
provides=["radicale"],
scripts=["radicale.py"],
cmdclass={"build_scripts": BuildScripts},
scripts=["bin/radicale"],
keywords=["calendar", "CalDAV"],
classifiers=[
"Development Status :: 4 - Beta",