"""Packaging for the openYuanrong Agent Runtime CLI (`ar`)."""
import os
import re
import setuptools
ROOT_DIR = os.path.dirname(__file__)
def get_version():
"""Read __version__ from ar_cli/__init__.py."""
init_path = os.path.join(ROOT_DIR, "ar_cli", "__init__.py")
with open(init_path, "r", encoding="utf-8") as f:
content = f.read()
match = re.search(r'^__version__\s*=\s*["\']([^"\']+)["\']', content, re.MULTILINE)
if not match:
raise RuntimeError("Unable to find __version__ in ar_cli/__init__.py")
return os.getenv("BUILD_VERSION") or match.group(1)
setuptools.setup(
name="openyuanrong-agentruntime",
version=get_version(),
author="openyuanrong",
description="openYuanrong Agent Runtime CLI (ar): deploy and invoke agents",
classifiers=[
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: Apache Software License",
],
python_requires=">=3.9",
packages=setuptools.find_packages(exclude=("tests", "tests.*")),
install_requires=[
"click>=8.1",
"requests>=2.28",
],
entry_points={
"console_scripts": [
"ar=ar_cli.main:main",
]
},
)