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 *
|
recursive-include lightrag/api/webui *
|
||||||
|
@ -2,6 +2,7 @@ aiofiles
|
|||||||
ascii_colors
|
ascii_colors
|
||||||
asyncpg
|
asyncpg
|
||||||
distro
|
distro
|
||||||
|
dotenv
|
||||||
fastapi
|
fastapi
|
||||||
graspologic>=3.4.1
|
graspologic>=3.4.1
|
||||||
httpcore
|
httpcore
|
||||||
@ -11,6 +12,7 @@ numpy
|
|||||||
openai
|
openai
|
||||||
passlib[bcrypt]
|
passlib[bcrypt]
|
||||||
pipmaster
|
pipmaster
|
||||||
|
pydantic
|
||||||
PyJWT
|
PyJWT
|
||||||
python-dotenv
|
python-dotenv
|
||||||
python-jose[cryptography]
|
python-jose[cryptography]
|
||||||
|
28
setup.py
28
setup.py
@ -40,36 +40,24 @@ def retrieve_metadata():
|
|||||||
|
|
||||||
|
|
||||||
# Reading dependencies from requirements.txt
|
# Reading dependencies from requirements.txt
|
||||||
def read_requirements():
|
def read_requirements(file_path="requirements.txt"):
|
||||||
deps = []
|
deps = []
|
||||||
try:
|
try:
|
||||||
with open("./requirements.txt") as f:
|
with open(file_path) as f:
|
||||||
deps = [line.strip() for line in f if line.strip()]
|
deps = [
|
||||||
|
line.strip() for line in f if line.strip() and not line.startswith("#")
|
||||||
|
]
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
print(
|
print(f"Warning: '{file_path}' not found. No dependencies will be installed.")
|
||||||
"Warning: 'requirements.txt' not found. No dependencies will be installed."
|
|
||||||
)
|
|
||||||
return deps
|
return deps
|
||||||
|
|
||||||
|
|
||||||
def read_api_requirements():
|
def read_api_requirements():
|
||||||
api_deps = []
|
return read_requirements("lightrag/api/requirements.txt")
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
def read_extra_requirements():
|
def read_extra_requirements():
|
||||||
api_deps = []
|
return read_requirements("lightrag/tools/lightrag_visualizer/requirements.txt")
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
metadata = retrieve_metadata()
|
metadata = retrieve_metadata()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user