Files
seo/setup.py
Kevin Bataille d1b8e2c292 Refactor into integrated Python package structure
Architecture Changes:
- Created src/seo/ package with modular architecture
- Main application class (SEOApp) with Rails-inspired API
- Separated concerns into distinct modules:
  - app.py: Main application orchestrator
  - cli.py: Command-line interface
  - config.py: Configuration management
  - exporter.py: Post export functionality
  - analyzer.py: AI analysis
  - recategorizer.py: Recategorization
  - seo_checker.py: SEO quality checking
  - categories.py: Category management
  - approval.py: User approval system

New Features:
- Proper Python package structure (src layout)
- setup.py and setup.cfg for installation
- Can be installed with: pip install -e .
- Entry point: seo = seo.cli:main
- Cleaner imports and dependencies

Benefits:
- Better code organization
- Easier to maintain and extend
- Follows Python best practices
- Proper package isolation
- Can be imported as library
- Testable components
- Clear separation of concerns

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-16 14:37:11 +01:00

56 lines
1.7 KiB
Python

#!/usr/bin/env python3
"""
Setup script for SEO Automation Tool
"""
from setuptools import setup, find_packages
from pathlib import Path
# Read README for long description
readme_path = Path(__file__).parent / 'README.md'
long_description = readme_path.read_text(encoding='utf-8') if readme_path.exists() else ''
# Read requirements
requirements_path = Path(__file__).parent / 'requirements.txt'
requirements = [
line.strip()
for line in requirements_path.read_text().splitlines()
if line.strip() and not line.startswith('#')
] if requirements_path.exists() else []
setup(
name='seo-automation',
version='1.0.0',
author='SEO Automation Team',
author_email='seo@example.com',
description='WordPress SEO automation with AI-powered recommendations',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/example/seo-automation',
packages=find_packages(where='src'),
package_dir={'': 'src'},
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Internet :: WWW/HTTP',
'License :: OSI Approved :: MIT License',
'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',
],
python_requires='>=3.8',
install_requires=requirements,
entry_points={
'console_scripts': [
'seo=seo.cli:main',
],
},
include_package_data=True,
package_data={
'seo': ['py.typed'],
},
)