annotate setup.py @ 394:3c2bf7c30767 default tip

call: add a new button to send a file during a call.
author Goffi <goffi@goffi.org>
date Sat, 06 Apr 2024 13:08:03 +0200
parents aa30f8c20ae5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
224
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
1 #!/usr/bin/env python3
146
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
2
336
84d5af1e2619 /!\ package is being renamed to libervia-templates following global name change /!\
Goffi <goffi@goffi.org>
parents: 313
diff changeset
3 # Libervia templates: collection of templates
313
a8fa6e118813 date update
Goffi <goffi@goffi.org>
parents: 227
diff changeset
4 # Copyright (C) 2017-2021 Jérôme Poisson (goffi@goffi.org)
146
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
5 # Copyright (C) 2017 Xavier Maillard (xavier@maillard.im)
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
6
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
7 # This program is free software: you can redistribute it and/or modify
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
8 # it under the terms of the GNU Affero General Public License as published by
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
9 # the Free Software Foundation, either version 3 of the License, or
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
10 # (at your option) any later version.
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
11
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
12 # This program is distributed in the hope that it will be useful,
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
15 # GNU Affero General Public License for more details.
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
16
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
17 # You should have received a copy of the GNU Affero General Public License
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
19
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
20 import os
221
471d3b7fc282 install: fixed setup.py by using find_packages + MANIFEST.in
Goffi <goffi@goffi.org>
parents: 161
diff changeset
21 from setuptools import setup, find_packages
146
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
22
336
84d5af1e2619 /!\ package is being renamed to libervia-templates following global name change /!\
Goffi <goffi@goffi.org>
parents: 313
diff changeset
23 NAME = "libervia-templates"
84d5af1e2619 /!\ package is being renamed to libervia-templates following global name change /!\
Goffi <goffi@goffi.org>
parents: 313
diff changeset
24 # NOTE: directory is still "sat_templates" for compatibility reason,
84d5af1e2619 /!\ package is being renamed to libervia-templates following global name change /!\
Goffi <goffi@goffi.org>
parents: 313
diff changeset
25 # should be changed for 0.9
84d5af1e2619 /!\ package is being renamed to libervia-templates following global name change /!\
Goffi <goffi@goffi.org>
parents: 313
diff changeset
26 DIR_NAME = "sat_templates"
146
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
27
147
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
28
336
84d5af1e2619 /!\ package is being renamed to libervia-templates following global name change /!\
Goffi <goffi@goffi.org>
parents: 313
diff changeset
29 with open(os.path.join(DIR_NAME, "VERSION")) as f:
147
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
30 VERSION = f.read().strip()
224
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
31 is_dev_version = VERSION.endswith("D")
147
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
32
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
33
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
34 def sat_templates_dev_version():
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
35 """Use mercurial data to compute version"""
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
36 def version_scheme(version):
224
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
37 return VERSION.replace("D", ".dev0")
147
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
38
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
39 def local_scheme(version):
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
40 return "+{rev}.{distance}".format(
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
41 rev=version.node[1:],
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
42 distance=version.distance)
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
43
224
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
44 return {"version_scheme": version_scheme,
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
45 "local_scheme": local_scheme}
147
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
46
146
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
47
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
48 setup_info = dict(
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
49 name=NAME,
158
d9cc8f453baa install (setup.py): use VERSION + added description
Goffi <goffi@goffi.org>
parents: 148
diff changeset
50 version=VERSION,
336
84d5af1e2619 /!\ package is being renamed to libervia-templates following global name change /!\
Goffi <goffi@goffi.org>
parents: 313
diff changeset
51 description="Templates for Libervia XMPP client",
351
aa30f8c20ae5 v0.8.0 release
Goffi <goffi@goffi.org>
parents: 336
diff changeset
52 long_description="Libervia Template is a common module which can be used by any SàT "
224
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
53 "frontend to generate documents (mostly HTML but not only).",
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
54 author="Association « Salut à Toi »",
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
55 author_email="contact@salut-a-toi.org",
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
56 url="https://salut-a-toi.org",
221
471d3b7fc282 install: fixed setup.py by using find_packages + MANIFEST.in
Goffi <goffi@goffi.org>
parents: 161
diff changeset
57 classifiers=[
224
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
58 "Programming Language :: Python :: 3 :: Only",
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
59 "Programming Language :: Python :: 3.7",
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
60 "Programming Language :: Python :: 3.8",
336
84d5af1e2619 /!\ package is being renamed to libervia-templates following global name change /!\
Goffi <goffi@goffi.org>
parents: 313
diff changeset
61 "Programming Language :: Python :: 3.9",
224
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
62 "Development Status :: 5 - Production/Stable",
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
63 "License :: OSI Approved :: GNU Affero General Public License v3 or later "
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
64 "(AGPLv3+)",
221
471d3b7fc282 install: fixed setup.py by using find_packages + MANIFEST.in
Goffi <goffi@goffi.org>
parents: 161
diff changeset
65 ],
146
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
66 install_requires=[],
224
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
67 setup_requires=["setuptools_scm"] if is_dev_version else [],
147
33c7ce833d3f install: setup.py fix + moved "default" dir in a "sat_templates" dir:
Goffi <goffi@goffi.org>
parents: 146
diff changeset
68 use_scm_version=sat_templates_dev_version if is_dev_version else False,
221
471d3b7fc282 install: fixed setup.py by using find_packages + MANIFEST.in
Goffi <goffi@goffi.org>
parents: 161
diff changeset
69 packages=find_packages(),
227
f8f9019425c3 install: fixed package data installation
Goffi <goffi@goffi.org>
parents: 226
diff changeset
70 include_package_data=True,
161
bfe72370ca49 install (setup.py): unset zip_safe, as Libervia or jp need to access files and don't handle zip
Goffi <goffi@goffi.org>
parents: 158
diff changeset
71 zip_safe=False,
224
22a082143bc0 install (setup.py): setup.py is now Python 3
Goffi <goffi@goffi.org>
parents: 221
diff changeset
72 python_requires=">=3.7",
146
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
73 )
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
74
7dc00829c32f Instal sat_templates the python's way
Xavier Maillard <xavier@maillard.im>
parents:
diff changeset
75 setup(**setup_info)