BEFORE: /opt/aitbc/cli/ ├── aitbc_cli/ # Python package (box in a box) │ ├── commands/ │ ├── main.py │ └── ... ├── setup.py AFTER: /opt/aitbc/cli/ # Flat structure ├── commands/ # Direct access ├── main.py # Direct access ├── auth/ ├── config/ ├── core/ ├── models/ ├── utils/ ├── plugins.py └── setup.py CHANGES MADE: - Moved all files from aitbc_cli/ to cli/ root - Fixed all relative imports (from . to absolute imports) - Updated setup.py entry point: aitbc_cli.main → main - Added CLI directory to Python path in entry script - Simplified deployment.py to remove dependency on deleted core.deployment - Fixed import paths in all command files - Recreated virtual environment with new structure BENEFITS: - Eliminated 'box in a box' nesting - Simpler directory structure - Direct access to all modules - Cleaner imports - Easier maintenance and development - CLI works with both 'python main.py' and 'aitbc' commands
69 lines
1.9 KiB
Python
Executable File
69 lines
1.9 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
AITBC CLI Setup Script
|
|
"""
|
|
|
|
from setuptools import setup, find_packages
|
|
import os
|
|
|
|
# Read README file
|
|
def read_readme():
|
|
with open("README.md", "r", encoding="utf-8") as fh:
|
|
return fh.read()
|
|
|
|
# Read requirements
|
|
def read_requirements():
|
|
with open("requirements.txt", "r", encoding="utf-8") as fh:
|
|
return [line.strip() for line in fh if line.strip() and not line.startswith("#")]
|
|
|
|
setup(
|
|
name="aitbc-cli",
|
|
version="0.1.0",
|
|
author="AITBC Team",
|
|
author_email="team@aitbc.net",
|
|
description="AITBC Command Line Interface Tools",
|
|
long_description=read_readme(),
|
|
long_description_content_type="text/markdown",
|
|
url="https://aitbc.net",
|
|
project_urls={
|
|
"Homepage": "https://aitbc.net",
|
|
"Repository": "https://github.com/aitbc/aitbc",
|
|
"Documentation": "https://docs.aitbc.net",
|
|
},
|
|
packages=find_packages(),
|
|
classifiers=[
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Operating System :: OS Independent",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
"Topic :: System :: Distributed Computing",
|
|
],
|
|
python_requires=">=3.13",
|
|
install_requires=read_requirements(),
|
|
extras_require={
|
|
"dev": [
|
|
"pytest>=7.0.0",
|
|
"pytest-asyncio>=0.21.0",
|
|
"pytest-cov>=4.0.0",
|
|
"pytest-mock>=3.10.0",
|
|
"black>=22.0.0",
|
|
"isort>=5.10.0",
|
|
"flake8>=5.0.0",
|
|
],
|
|
},
|
|
entry_points={
|
|
"console_scripts": [
|
|
"aitbc=main:main",
|
|
],
|
|
},
|
|
include_package_data=True,
|
|
package_data={
|
|
"": ["*.yaml", "*.yml", "*.json"],
|
|
},
|
|
zip_safe=False,
|
|
)
|