mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-06-26 22:00:19 +00:00
Fix: pip pacakage missing requirement.txt
This commit is contained in:
parent
4acc2adc32
commit
74c8bde32a
@ -1 +1,3 @@
|
||||
include requirements.txt
|
||||
include lightrag/api/requirements.txt
|
||||
recursive-include lightrag/api/webui *
|
||||
|
@ -2,6 +2,7 @@ aiofiles
|
||||
ascii_colors
|
||||
asyncpg
|
||||
distro
|
||||
dotenv
|
||||
fastapi
|
||||
graspologic>=3.4.1
|
||||
httpcore
|
||||
@ -11,6 +12,7 @@ numpy
|
||||
openai
|
||||
passlib[bcrypt]
|
||||
pipmaster
|
||||
pydantic
|
||||
PyJWT
|
||||
python-dotenv
|
||||
python-jose[cryptography]
|
||||
|
28
setup.py
28
setup.py
@ -40,36 +40,24 @@ def retrieve_metadata():
|
||||
|
||||
|
||||
# Reading dependencies from requirements.txt
|
||||
def read_requirements():
|
||||
def read_requirements(file_path="requirements.txt"):
|
||||
deps = []
|
||||
try:
|
||||
with open("./requirements.txt") as f:
|
||||
deps = [line.strip() for line in f if line.strip()]
|
||||
with open(file_path) as f:
|
||||
deps = [
|
||||
line.strip() for line in f if line.strip() and not line.startswith("#")
|
||||
]
|
||||
except FileNotFoundError:
|
||||
print(
|
||||
"Warning: 'requirements.txt' not found. No dependencies will be installed."
|
||||
)
|
||||
print(f"Warning: '{file_path}' not found. No dependencies will be installed.")
|
||||
return deps
|
||||
|
||||
|
||||
def read_api_requirements():
|
||||
api_deps = []
|
||||
try:
|
||||
with open("./lightrag/api/requirements.txt") as f:
|
||||
api_deps = [line.strip() for line in f if line.strip()]
|
||||
except FileNotFoundError:
|
||||
print("Warning: API requirements.txt not found.")
|
||||
return api_deps
|
||||
return read_requirements("lightrag/api/requirements.txt")
|
||||
|
||||
|
||||
def read_extra_requirements():
|
||||
api_deps = []
|
||||
try:
|
||||
with open("./lightrag/tools/lightrag_visualizer/requirements.txt") as f:
|
||||
api_deps = [line.strip() for line in f if line.strip()]
|
||||
except FileNotFoundError:
|
||||
print("Warning: API requirements.txt not found.")
|
||||
return api_deps
|
||||
return read_requirements("lightrag/tools/lightrag_visualizer/requirements.txt")
|
||||
|
||||
|
||||
metadata = retrieve_metadata()
|
||||
|
Loading…
x
Reference in New Issue
Block a user