Mercurial > libervia-web
annotate setup.py @ 1442:a06a5b510e2e
/!\ package is being renamed to libervia-web following global name change /!\
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 18 Jun 2021 16:21:18 +0200 |
parents | c34e973587bd |
children | 15bb2673eb72 |
rev | line source |
---|---|
1216 | 1 #!/usr/bin/env python3 |
1239 | 2 |
1442
a06a5b510e2e
/!\ package is being renamed to libervia-web following global name change /!\
Goffi <goffi@goffi.org>
parents:
1441
diff
changeset
|
3 # Libervia Web Frontend |
1398
556df721aa69
install (setup.py): update console script name and setup:
Goffi <goffi@goffi.org>
parents:
1357
diff
changeset
|
4 # Copyright (C) 2011-2021 Jérôme Poisson (goffi@goffi.org) |
818 | 5 # Copyright (C) 2013-2016 Adrien Cossa (souliane@mailoo.org) |
360
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
6 |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
7 # This program is free software: you can redistribute it and/or modify |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
8 # it under the terms of the GNU Affero General Public License as published by |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
9 # the Free Software Foundation, either version 3 of the License, or |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
10 # (at your option) any later version. |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
11 |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
12 # This program is distributed in the hope that it will be useful, |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
15 # GNU Affero General Public License for more details. |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
16 |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
17 # You should have received a copy of the GNU Affero General Public License |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
19 |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
20 from setuptools import setup |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
21 import os |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
22 |
1442
a06a5b510e2e
/!\ package is being renamed to libervia-web following global name change /!\
Goffi <goffi@goffi.org>
parents:
1441
diff
changeset
|
23 NAME = "libervia-web" |
a06a5b510e2e
/!\ package is being renamed to libervia-web following global name change /!\
Goffi <goffi@goffi.org>
parents:
1441
diff
changeset
|
24 # NOTE: directory is still "libervia" for compatibility reason, should be changed for 0.9 |
a06a5b510e2e
/!\ package is being renamed to libervia-web following global name change /!\
Goffi <goffi@goffi.org>
parents:
1441
diff
changeset
|
25 DIR_NAME = "libervia" |
360
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
26 |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
27 install_requires = [ |
1441
c34e973587bd
install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents:
1413
diff
changeset
|
28 "libervia-backend >=0.8.0b1, <0.9.0", |
c34e973587bd
install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents:
1413
diff
changeset
|
29 "libervia-templates >=0.8.0b1, <0.9.0", |
c34e973587bd
install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents:
1413
diff
changeset
|
30 'twisted[tls] >=20.3.0, <21.3.0', |
c34e973587bd
install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents:
1413
diff
changeset
|
31 "zope.interface <5.5.0", |
c34e973587bd
install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents:
1413
diff
changeset
|
32 'pyopenssl <21.0.0', |
c34e973587bd
install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents:
1413
diff
changeset
|
33 "jinja2 >=2.9, <3.1", |
c34e973587bd
install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents:
1413
diff
changeset
|
34 'shortuuid <1.1', |
c34e973587bd
install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents:
1413
diff
changeset
|
35 "autobahn <21.4.0", |
c34e973587bd
install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents:
1413
diff
changeset
|
36 "brython >=3.9.2, <3.10", |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
37 ] |
1216 | 38 long_description = """\ |
1442
a06a5b510e2e
/!\ package is being renamed to libervia-web following global name change /!\
Goffi <goffi@goffi.org>
parents:
1441
diff
changeset
|
39 Web frontend for Libervia (formerly Salut à Toi), a multi-frontends and multi-purposes XMPP client. |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
40 It features chat, blog, forums, events, tickets, merge requests, file sharing, photo albums, etc. |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
41 It is also a decentralized, XMPP based web framework. |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
42 """ |
360
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
43 |
1442
a06a5b510e2e
/!\ package is being renamed to libervia-web following global name change /!\
Goffi <goffi@goffi.org>
parents:
1441
diff
changeset
|
44 with open(os.path.join(DIR_NAME, "VERSION")) as v: |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
45 VERSION = v.read().strip() |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
46 is_dev_version = VERSION.endswith("D") |
360
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
47 |
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
48 |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
49 def libervia_dev_version(): |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
50 """Use mercurial data to compute version""" |
360
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
51 |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
52 def version_scheme(version): |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
53 return VERSION.replace("D", ".dev0") |
360
9834136b15ed
added setup.py for the installation with setuptools
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
54 |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
55 def local_scheme(version): |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
56 return "+{rev}.{distance}".format(rev=version.node[1:], distance=version.distance) |
449
981ed669d3b3
/!\ reorganize all the file hierarchy, move the code and launching script to src:
souliane <souliane@mailoo.org>
parents:
447
diff
changeset
|
57 |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
58 return {"version_scheme": version_scheme, "local_scheme": local_scheme} |
449
981ed669d3b3
/!\ reorganize all the file hierarchy, move the code and launching script to src:
souliane <souliane@mailoo.org>
parents:
447
diff
changeset
|
59 |
981ed669d3b3
/!\ reorganize all the file hierarchy, move the code and launching script to src:
souliane <souliane@mailoo.org>
parents:
447
diff
changeset
|
60 |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
61 setup( |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
62 name=NAME, |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
63 version=VERSION, |
1442
a06a5b510e2e
/!\ package is being renamed to libervia-web following global name change /!\
Goffi <goffi@goffi.org>
parents:
1441
diff
changeset
|
64 description="Web frontend for Libervia", |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
65 long_description=long_description, |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
66 author="Association « Salut à Toi »", |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
67 author_email="contact@goffi.org", |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
68 url="https://www.salut-a-toi.org", |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
69 classifiers=[ |
1223
4976eb0f5315
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
1222
diff
changeset
|
70 "Programming Language :: Python :: 3 :: Only", |
4976eb0f5315
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
1222
diff
changeset
|
71 "Programming Language :: Python :: 3.7", |
1398
556df721aa69
install (setup.py): update console script name and setup:
Goffi <goffi@goffi.org>
parents:
1357
diff
changeset
|
72 "Programming Language :: Python :: 3.8", |
556df721aa69
install (setup.py): update console script name and setup:
Goffi <goffi@goffi.org>
parents:
1357
diff
changeset
|
73 "Programming Language :: Python :: 3.9", |
1223
4976eb0f5315
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
1222
diff
changeset
|
74 "Development Status :: 5 - Production/Stable", |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
75 "Environment :: Web Environment", |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
76 "Framework :: Twisted", |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
77 "License :: OSI Approved :: GNU Affero General Public License v3 " |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
78 "or later (AGPLv3+)", |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
79 "Operating System :: POSIX :: Linux", |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
80 "Topic :: Communications :: Chat", |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
81 ], |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
82 packages=["libervia", "libervia.common", "libervia.server", "twisted.plugins"], |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
83 include_package_data=True, |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
84 data_files=[(os.path.join("share", "doc", NAME), ["COPYING", "README", "INSTALL"])] |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
85 + [ |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
86 (os.path.join("share", NAME, root), [os.path.join(root, f) for f in files]) |
1216 | 87 for root, dirs, files in os.walk("themes") |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
88 ], |
1272
3a3f3bccd65b
server: Libervia server is now launched with a Python script, following backend change
Goffi <goffi@goffi.org>
parents:
1253
diff
changeset
|
89 entry_points={ |
3a3f3bccd65b
server: Libervia server is now launched with a Python script, following backend change
Goffi <goffi@goffi.org>
parents:
1253
diff
changeset
|
90 "console_scripts": [ |
1398
556df721aa69
install (setup.py): update console script name and setup:
Goffi <goffi@goffi.org>
parents:
1357
diff
changeset
|
91 "libervia-web = libervia.server.launcher:Launcher.run", |
1272
3a3f3bccd65b
server: Libervia server is now launched with a Python script, following backend change
Goffi <goffi@goffi.org>
parents:
1253
diff
changeset
|
92 ], |
3a3f3bccd65b
server: Libervia server is now launched with a Python script, following backend change
Goffi <goffi@goffi.org>
parents:
1253
diff
changeset
|
93 }, |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
94 zip_safe=False, |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
95 setup_requires=["setuptools_scm"] if is_dev_version else [], |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
96 use_scm_version=libervia_dev_version if is_dev_version else False, |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
97 install_requires=install_requires, |
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
98 package_data={"libervia": ["VERSION"]}, |
1253
6d49fae517ba
pages: browser metadata + root `_browser`:
Goffi <goffi@goffi.org>
parents:
1249
diff
changeset
|
99 python_requires=">=3.7", |
1124
28e3eb3bb217
files reorganisation and installation rework:
Goffi <goffi@goffi.org>
parents:
1121
diff
changeset
|
100 ) |