Mercurial > libervia-desktop-kivy
changeset 127:9d3d700a65b7
setup: proper setup.py:
setup.py is working, but there is two issues with Kivy: cython need to be installed first, and stable version currently doesn't work with most recent cython (cf. https://github.com/kivy/kivy/issues/5375 and https://github.com/kivy/kivy/issues/5606).
A requirements.txt has been added to use dev version of sat + dev version of kivy which works with latest cython.
Once cython is installed, pip install -r requirements.txt works fine.
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 05 Apr 2018 18:47:02 +0200 |
parents | cd99f70ea592 |
children | d3ebe8caa26b |
files | requirements.txt setup.py |
diffstat | 2 files changed, 89 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/requirements.txt Thu Apr 05 18:47:02 2018 +0200 @@ -0,0 +1,3 @@ +-e git+https://github.com/kivy/kivy.git#egg=kivy +-e hg+https://repos.goffi.org/sat#egg=sat +-e .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/setup.py Thu Apr 05 18:47:02 2018 +0200 @@ -0,0 +1,86 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- + +# Cagou: a SàT frontend +# Copyright (C) 2009-2016 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', + 'pillow', + 'sat', +] + +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 + + def local_scheme(version): + # XXX: setuptools_scm seems buggy and the '+' and the '_' are replaced by '-' + # breaking the local version identifier scheme + # cf. https://github.com/pypa/setuptools_scm/issues/237 + 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=u'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=['Development Status :: 3 - Alpha', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 2 :: Only', + '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={'cagou': ['VERSION']}, + python_requires='~=2.7', + )