72 lines
2.2 KiB
Python
72 lines
2.2 KiB
Python
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import re
|
|
from setuptools import setup, find_packages
|
|
|
|
# Read version directly from version.py file without importing
|
|
def get_version():
|
|
version_file = os.path.join(os.path.dirname(__file__), 'src', 'kumacli', 'cmd', 'version.py')
|
|
with open(version_file, 'r', encoding='utf-8') as f:
|
|
content = f.read()
|
|
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", content, re.M)
|
|
if version_match:
|
|
return version_match.group(1)
|
|
raise RuntimeError("Unable to find version string.")
|
|
|
|
__version__ = get_version()
|
|
|
|
with open("README.md", "r", encoding="utf-8") as fh:
|
|
long_description = fh.read()
|
|
|
|
setup(
|
|
name="kumacli",
|
|
version=__version__,
|
|
author="Uptime Kuma CLI",
|
|
description="A command-line interface for Uptime Kuma",
|
|
long_description=long_description,
|
|
long_description_content_type="text/markdown",
|
|
url="https://git.ipng.ch/ipng/kumacli",
|
|
packages=find_packages(where="src"),
|
|
package_dir={"": "src"},
|
|
classifiers=[
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: System Administrators",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: System :: Monitoring",
|
|
"Topic :: System :: Systems Administration",
|
|
],
|
|
python_requires=">=3.8",
|
|
install_requires=[
|
|
"uptime-kuma-api>=1.0.0",
|
|
],
|
|
extras_require={
|
|
"dev": [
|
|
"pytest>=6.0",
|
|
"pytest-cov>=2.0",
|
|
],
|
|
"test": [
|
|
"pytest>=6.0",
|
|
"pytest-cov>=2.0",
|
|
],
|
|
},
|
|
entry_points={
|
|
"console_scripts": [
|
|
"kumacli=kumacli.kumacli:main",
|
|
],
|
|
},
|
|
keywords="uptime kuma monitoring cli",
|
|
project_urls={
|
|
"Bug Reports": "https://git.ipng.ch/ipng/kumacli/issues",
|
|
"Source": "https://git.ipng.ch/ipng/kumacli",
|
|
},
|
|
)
|