comparison setup.py @ 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
children 98a485512289
comparison
equal deleted inserted replaced
126:cd99f70ea592 127:9d3d700a65b7
1 #!/usr/bin/env python2
2 # -*- coding: utf-8 -*-
3
4 # Cagou: a SàT frontend
5 # Copyright (C) 2009-2016 Jérôme Poisson (goffi@goffi.org)
6 # Copyright (C) 2013-2016 Adrien Cossa (souliane@mailoo.org)
7
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU Affero General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU Affero General Public License for more details.
17
18 # You should have received a copy of the GNU Affero General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 from setuptools import setup, find_packages
22 import os
23 import textwrap
24
25 NAME = 'cagou'
26
27 install_requires = [
28 'kivy',
29 'pillow',
30 'sat',
31 ]
32
33 with open(os.path.join(NAME, 'VERSION')) as f:
34 VERSION = f.read().strip()
35 is_dev_version = VERSION.endswith('D')
36
37
38 def cagou_dev_version():
39 """Use mercurial data to compute version"""
40 def version_scheme(version):
41 return VERSION
42
43 def local_scheme(version):
44 # XXX: setuptools_scm seems buggy and the '+' and the '_' are replaced by '-'
45 # breaking the local version identifier scheme
46 # cf. https://github.com/pypa/setuptools_scm/issues/237
47 return "+{rev}_{distance}".format(
48 rev=version.node[1:],
49 distance=version.distance)
50
51 return {'version_scheme': version_scheme,
52 'local_scheme': local_scheme}
53
54
55 setup(name=NAME,
56 version=VERSION,
57 description=u'Desktop/Android frontend for Salut à Toi XMPP client',
58 long_description=textwrap.dedent("""\
59 Cagou is a desktop/Android frontend for Salut à Toi.
60 It provides native graphical interface with a modern user interface,
61 using touch screen abilitiy when available, and with split ability inspired from Blender
62 """),
63 author='Association « Salut à Toi »',
64 author_email='contact@goffi.org',
65 url='https://salut-a-toi.org',
66 classifiers=['Development Status :: 3 - Alpha',
67 'Programming Language :: Python :: 2.7',
68 'Programming Language :: Python :: 2 :: Only',
69 'Environment :: X11 Applications',
70 'Framework :: Twisted',
71 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
72 'Operating System :: POSIX :: Linux',
73 'Operating System :: Android',
74 'Topic :: Internet :: XMPP',
75 'Topic :: Communications :: Chat',
76 'Intended Audience :: End Users/Desktop',
77 ],
78 packages=find_packages(),
79 scripts=['bin/cagou'],
80 zip_safe=False,
81 setup_requires=['setuptools_scm'] if is_dev_version else [],
82 use_scm_version=cagou_dev_version if is_dev_version else False,
83 install_requires=install_requires,
84 package_data={'cagou': ['VERSION']},
85 python_requires='~=2.7',
86 )