2014-05-16 15:35:16 +02:00
|
|
|
#!/usr/bin/env python
|
2019-06-27 23:55:33 +02:00
|
|
|
|
2014-05-16 15:35:16 +02:00
|
|
|
import os
|
|
|
|
import sys
|
2021-09-21 00:14:17 +02:00
|
|
|
import subprocess
|
|
|
|
|
2019-07-28 19:43:28 +02:00
|
|
|
from setuptools import setup, find_packages
|
2014-05-16 15:35:16 +02:00
|
|
|
|
2021-09-21 00:14:58 +02:00
|
|
|
version = (
|
|
|
|
subprocess.check_output(
|
|
|
|
"head debian/changelog -n1 | awk '{print $2}' | tr -d '()'", shell=True
|
|
|
|
)
|
|
|
|
.decode()
|
|
|
|
.strip()
|
|
|
|
)
|
2019-07-20 12:27:32 +02:00
|
|
|
|
2014-05-16 15:35:16 +02:00
|
|
|
# Extend installation
|
|
|
|
locale_files = []
|
2017-07-26 05:14:16 +02:00
|
|
|
|
2014-05-16 15:35:16 +02:00
|
|
|
if "install" in sys.argv:
|
|
|
|
# Evaluate locale files
|
2021-08-23 15:25:51 +02:00
|
|
|
for f in os.listdir("locales"):
|
|
|
|
if f.endswith(".json"):
|
|
|
|
locale_files.append("locales/%s" % f)
|
2014-05-16 15:35:16 +02:00
|
|
|
|
2020-12-04 22:15:36 +01:00
|
|
|
install_deps = [
|
2021-08-23 15:25:51 +02:00
|
|
|
"psutil",
|
|
|
|
"pytz",
|
|
|
|
"pyyaml",
|
|
|
|
"toml",
|
|
|
|
"gevent-websocket",
|
|
|
|
"bottle",
|
2021-10-20 11:38:29 +02:00
|
|
|
"prompt-toolkit>=3.0",
|
2021-09-23 01:01:01 +02:00
|
|
|
"pygments",
|
2020-12-04 22:15:36 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
test_deps = [
|
2021-08-23 15:25:51 +02:00
|
|
|
"pytest",
|
|
|
|
"pytest-cov",
|
|
|
|
"pytest-env",
|
|
|
|
"pytest-mock",
|
2021-09-17 16:23:01 +02:00
|
|
|
"mock",
|
2021-08-23 15:25:51 +02:00
|
|
|
"requests",
|
|
|
|
"requests-mock",
|
|
|
|
"webtest",
|
2020-12-04 22:15:36 +01:00
|
|
|
]
|
2021-09-21 00:14:17 +02:00
|
|
|
|
2020-12-04 22:15:36 +01:00
|
|
|
extras = {
|
2021-08-23 15:25:51 +02:00
|
|
|
"install": install_deps,
|
|
|
|
"tests": test_deps,
|
2020-12-04 22:15:36 +01:00
|
|
|
}
|
|
|
|
|
2021-08-23 15:25:51 +02:00
|
|
|
setup(
|
|
|
|
name="Moulinette",
|
2021-09-21 00:14:17 +02:00
|
|
|
version=version,
|
2021-08-23 15:25:51 +02:00
|
|
|
description="Prototype interfaces quickly and easily",
|
|
|
|
author="Yunohost Team",
|
|
|
|
author_email="yunohost@yunohost.org",
|
2021-09-21 00:14:17 +02:00
|
|
|
url="https://yunohost.org",
|
2021-08-23 15:25:51 +02:00
|
|
|
license="AGPL",
|
|
|
|
packages=find_packages(exclude=["test"]),
|
2021-11-16 18:15:09 +01:00
|
|
|
data_files=[("/usr/share/moulinette/locales", locale_files)],
|
2023-09-27 20:11:16 +02:00
|
|
|
python_requires=">=3.11.0,<3.12",
|
2021-08-23 15:25:51 +02:00
|
|
|
install_requires=install_deps,
|
|
|
|
tests_require=test_deps,
|
|
|
|
extras_require=extras,
|
|
|
|
)
|