Some initial work on modernizing the analyzer app. This replace any custom logger or `logging` based logger with the logging tools from `libretime_shared.logging` and `loguru`. - rename cli to main - use pathlib in setup.py - add api-client and shared package as dev deps - rework main entrypoint cli to use click and shared helpers - remove unused imports - replace logging with logger - rework analyzer app using shared abstract app - move analyzer log path to systemd service - change analyzer working dir BREAKING CHANGE: The analyzer cli has been reworked and uses new flags / environnement variables for configuration. `--debug` flag becomes `--log-level <level>` `--rmq-config-file` flag becomes `--config <filepath>` `--http-retry-queue-file` flag becomes `--retry-queue-filepath`. `retry-queue-filepath` default value changed from `/tmp/airtime_analyzer_http_retries` to `retry_queue` in the working dir. `LIBRETIME_CONF_DIR` environnement variable replaced by `LIBRETIME_CONFIG_FILEPATH`. BREAKING CHANGE: When running analyzer as a systemd service, the working directory is now /var/lib/libretime/analyzer.
47 lines
1.4 KiB
Python
47 lines
1.4 KiB
Python
from os import chdir
|
|
from pathlib import Path
|
|
|
|
from setuptools import setup
|
|
|
|
# Change directory since setuptools uses relative paths
|
|
here = Path(__file__).parent
|
|
chdir(here)
|
|
|
|
setup(
|
|
name="libretime-analyzer",
|
|
version="0.1",
|
|
description="Libretime Analyzer",
|
|
author="LibreTime Contributors",
|
|
url="https://github.com/libretime/libretime",
|
|
project_urls={
|
|
"Bug Tracker": "https://github.com/libretime/libretime/issues",
|
|
"Documentation": "https://libretime.org",
|
|
"Source Code": "https://github.com/libretime/libretime",
|
|
},
|
|
license="AGPLv3",
|
|
packages=["libretime_analyzer"],
|
|
entry_points={
|
|
"console_scripts": [
|
|
"libretime-analyzer=libretime_analyzer.main:cli",
|
|
]
|
|
},
|
|
python_requires=">=3.6",
|
|
install_requires=[
|
|
"mutagen>=1.31.0",
|
|
"pika>=1.0.0",
|
|
"file-magic",
|
|
"requests>=2.7.0",
|
|
"rgain3==1.1.1",
|
|
"PyGObject>=3.34.0",
|
|
# If this version is changed, it needs changing in the install script too
|
|
"pycairo==1.19.1",
|
|
],
|
|
extras_require={
|
|
"dev": [
|
|
"distro",
|
|
f"libretime-api-client @ file://localhost/{here.parent / 'api_client'}#egg=libretime_api_client",
|
|
f"libretime-shared @ file://localhost/{here.parent / 'shared'}#egg=libretime_shared",
|
|
],
|
|
},
|
|
zip_safe=False,
|
|
)
|