view setup.py @ 353:19422bbd9c8e

core (widgets handler): refactoring: - CagouWidget now has class properties (to be overridden when needed) which indicate how if the widget handle must add a wrapping ScreenManager (global_screen_manager) or show all instances of the class in a Carousel (collection_carousel). If none of those options is used, a ScrollView will be wrapping the widget, to be sure that the widget will be resized correctly when necessary (without it, the widget could still be drawn in the backround when the size is too small and overflow on the WidgetWrapper, this would be the case with WidgetSelector) - some helper methods/properties have been added to CagouWidget. Check docstrings for details - better handling of (in)visible widget in WidgetsHandler - thanks to the new wrapping ScrollView, WidgetSelect will show scroll bars if the available space is too small. - bugs fixes
author Goffi <goffi@goffi.org>
date Fri, 17 Jan 2020 18:44:35 +0100
parents 544c437f5094
children 5d994be1161b
line wrap: on
line source

#!/usr/bin/env python3

# Cagou: a SàT frontend
# Copyright (C) 2009-2019  Jérôme Poisson (goffi@goffi.org)
# Copyright (C) 2013-2016 Adrien Cossa (souliane@mailoo.org)

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program 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 Affero General Public License for more details.

# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from setuptools import setup, find_packages
import os
import textwrap

NAME = 'cagou'

install_requires = [
    'kivy>=1.10.0',
    'kivy_garden.modernmenu',
    'kivy_garden.contextmenu>=0.1.0.dev1',
    'pillow',
    'plyer',
    'sat>=0.7.0dev0',
]

with open(os.path.join(NAME, 'VERSION')) as f:
    VERSION = f.read().strip()
is_dev_version = VERSION.endswith('D')


def cagou_dev_version():
    """Use mercurial data to compute version"""
    def version_scheme(version):
        return VERSION.replace('D', '.dev0')

    def local_scheme(version):
        return "+{rev}.{distance}".format(
            rev=version.node[1:],
            distance=version.distance)

    return {'version_scheme': version_scheme,
            'local_scheme': local_scheme}


setup(
    name=NAME,
    version=VERSION,
    description="Desktop/Android frontend for Salut à Toi XMPP client",
    long_description=textwrap.dedent("""\
        Cagou is a desktop/Android frontend for Salut à Toi.
        It provides native graphical interface with a modern user interface,
        using touch screen abilitiy when available, and with split ability inspired from Blender
        """),
    author="Association « Salut à Toi »",
    author_email="contact@goffi.org",
    url="https://salut-a-toi.org",
    classifiers=[
        "Programming Language :: Python :: 3 :: Only",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Development Status :: 5 - Production/Stable",
        "Environment :: X11 Applications",
        "Framework :: Twisted",
        "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
        "Operating System :: POSIX :: Linux",
        "Operating System :: Android",
        "Topic :: Internet :: XMPP",
        "Topic :: Communications :: Chat",
        "Intended Audience :: End Users/Desktop",
    ],
    packages=find_packages(),
    scripts=["bin/cagou"],
    zip_safe=False,
    setup_requires=["setuptools_scm"] if is_dev_version else [],
    use_scm_version=cagou_dev_version if is_dev_version else False,
    install_requires=install_requires,
    package_data={"": ["*.kv"], "cagou": ["VERSION"]},
    python_requires=">=3.6",
)