Fix linting
This commit is contained in:
parent
be9e6d1612
commit
6c05f0f837
2 changed files with 12 additions and 11 deletions
|
|
@ -246,9 +246,9 @@ cd lightrag_webui && bun run build
|
|||
|
||||
## Summary
|
||||
|
||||
✅ **PyPI users**: No action needed, frontend included
|
||||
✅ **Developers**: Use `pip install -e ".[api]"`, build frontend when needed
|
||||
✅ **CI/CD**: Automatic build in GitHub Actions
|
||||
✅ **Git**: Frontend build output never committed
|
||||
✅ **PyPI users**: No action needed, frontend included
|
||||
✅ **Developers**: Use `pip install -e ".[api]"`, build frontend when needed
|
||||
✅ **CI/CD**: Automatic build in GitHub Actions
|
||||
✅ **Git**: Frontend build output never committed
|
||||
|
||||
For questions or issues, please open a GitHub issue.
|
||||
|
|
|
|||
15
setup.py
15
setup.py
|
|
@ -1,4 +1,5 @@
|
|||
"""Minimal setup.py for backward compatibility with frontend build check"""
|
||||
|
||||
from pathlib import Path
|
||||
from setuptools import setup
|
||||
from setuptools.command.build_py import build_py
|
||||
|
|
@ -13,12 +14,12 @@ def check_webui_exists():
|
|||
|
||||
class BuildPyCommand(build_py):
|
||||
"""Check WebUI build status before packaging/installation"""
|
||||
|
||||
|
||||
def run(self):
|
||||
# Check if running in development mode
|
||||
is_develop = any(arg in sys.argv for arg in ['develop', 'egg_info'])
|
||||
is_editable = '--editable' in sys.argv or '-e' in sys.argv
|
||||
|
||||
is_develop = any(arg in sys.argv for arg in ["develop", "egg_info"])
|
||||
is_editable = "--editable" in sys.argv or "-e" in sys.argv
|
||||
|
||||
if is_develop or is_editable:
|
||||
# Development mode: friendly reminder
|
||||
if not check_webui_exists():
|
||||
|
|
@ -55,19 +56,19 @@ Then run the installation again.
|
|||
|
||||
💡 TIP: For development, use editable mode instead:
|
||||
pip install -e ".[api]"
|
||||
|
||||
|
||||
This allows you to build the frontend after installation.
|
||||
|
||||
╚══════════════════════════════════════════════════════════════════════════╝
|
||||
""")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
print("✅ Proceeding with package build...")
|
||||
build_py.run(self)
|
||||
|
||||
|
||||
setup(
|
||||
cmdclass={
|
||||
'build_py': BuildPyCommand,
|
||||
"build_py": BuildPyCommand,
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue