Mercurial > libervia-templates
comparison setup.py @ 224:22a082143bc0
install (setup.py): setup.py is now Python 3
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 09 Nov 2019 19:49:46 +0100 |
parents | 471d3b7fc282 |
children | c270f1b01112 |
comparison
equal
deleted
inserted
replaced
223:5db3aacee4a3 | 224:22a082143bc0 |
---|---|
1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python3 |
2 # -*- coding: utf-8 -*- | |
3 | 2 |
4 # SàT templates: collection of templates | 3 # SàT templates: collection of templates |
4 # Copyright (C) 2017-2019 Jérôme Poisson (goffi@goffi.org) | |
5 # Copyright (C) 2017 Xavier Maillard (xavier@maillard.im) | 5 # Copyright (C) 2017 Xavier Maillard (xavier@maillard.im) |
6 | 6 |
7 # This program is free software: you can redistribute it and/or modify | 7 # This program is free software: you can redistribute it and/or modify |
8 # it under the terms of the GNU Affero General Public License as published by | 8 # it under the terms of the GNU Affero General Public License as published by |
9 # the Free Software Foundation, either version 3 of the License, or | 9 # the Free Software Foundation, either version 3 of the License, or |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 import os | 20 import os |
21 from setuptools import setup, find_packages | 21 from setuptools import setup, find_packages |
22 | 22 |
23 NAME = 'sat_templates' | 23 NAME = "sat_templates" |
24 | 24 |
25 | 25 |
26 with open(os.path.join(NAME, 'VERSION')) as f: | 26 with open(os.path.join(NAME, "VERSION")) as f: |
27 VERSION = f.read().strip() | 27 VERSION = f.read().strip() |
28 is_dev_version = VERSION.endswith('D') | 28 is_dev_version = VERSION.endswith("D") |
29 | 29 |
30 | 30 |
31 def sat_templates_dev_version(): | 31 def sat_templates_dev_version(): |
32 """Use mercurial data to compute version""" | 32 """Use mercurial data to compute version""" |
33 def version_scheme(version): | 33 def version_scheme(version): |
34 return VERSION.replace('D', '.dev0') | 34 return VERSION.replace("D", ".dev0") |
35 | 35 |
36 def local_scheme(version): | 36 def local_scheme(version): |
37 return "+{rev}.{distance}".format( | 37 return "+{rev}.{distance}".format( |
38 rev=version.node[1:], | 38 rev=version.node[1:], |
39 distance=version.distance) | 39 distance=version.distance) |
40 | 40 |
41 return {'version_scheme': version_scheme, | 41 return {"version_scheme": version_scheme, |
42 'local_scheme': local_scheme} | 42 "local_scheme": local_scheme} |
43 | 43 |
44 | 44 |
45 setup_info = dict( | 45 setup_info = dict( |
46 name=NAME, | 46 name=NAME, |
47 version=VERSION, | 47 version=VERSION, |
48 description=u'Templates for Salut à Toi XMPP client', | 48 description="Templates for Salut à Toi XMPP client", |
49 long_description=u'SàT Template is a common module which can be used by any SàT ' | 49 long_description="SàT Template is a common module which can be used by any SàT " |
50 u'frontend to generate documents (mostly HTML but not only).', | 50 "frontend to generate documents (mostly HTML but not only).", |
51 author='Association « Salut à Toi »', | 51 author="Association « Salut à Toi »", |
52 author_email='contact@salut-a-toi.org', | 52 author_email="contact@salut-a-toi.org", |
53 url='https://salut-a-toi.org', | 53 url="https://salut-a-toi.org", |
54 classifiers=[ | 54 classifiers=[ |
55 'Development Status :: 3 - Alpha', | 55 "Programming Language :: Python :: 3 :: Only", |
56 'Programming Language :: Python :: 2.7', | 56 "Programming Language :: Python :: 3.7", |
57 'Programming Language :: Python :: 2 :: Only', | 57 "Programming Language :: Python :: 3.8", |
58 'License :: OSI Approved :: GNU Affero General Public License v3 or later ' | 58 "Development Status :: 5 - Production/Stable", |
59 '(AGPLv3+)', | 59 "License :: OSI Approved :: GNU Affero General Public License v3 or later " |
60 "(AGPLv3+)", | |
60 ], | 61 ], |
61 install_requires=[], | 62 install_requires=[], |
62 setup_requires=['setuptools_scm'] if is_dev_version else [], | 63 setup_requires=["setuptools_scm"] if is_dev_version else [], |
63 use_scm_version=sat_templates_dev_version if is_dev_version else False, | 64 use_scm_version=sat_templates_dev_version if is_dev_version else False, |
64 packages=find_packages(), | 65 packages=find_packages(), |
65 zip_safe=False, | 66 zip_safe=False, |
67 python_requires=">=3.7", | |
66 ) | 68 ) |
67 | 69 |
68 setup(**setup_info) | 70 setup(**setup_info) |