yangdx commited on
Commit ·
e2e2138
1
Parent(s): 6e3f788
Fix: pip pacakage missing requirement.txt
Browse files- MANIFEST.in +2 -0
- lightrag/api/requirements.txt +2 -0
- setup.py +8 -20
MANIFEST.in
CHANGED
|
@@ -1 +1,3 @@
|
|
|
|
|
|
|
|
| 1 |
recursive-include lightrag/api/webui *
|
|
|
|
| 1 |
+
include requirements.txt
|
| 2 |
+
include lightrag/api/requirements.txt
|
| 3 |
recursive-include lightrag/api/webui *
|
lightrag/api/requirements.txt
CHANGED
|
@@ -2,6 +2,7 @@ aiofiles
|
|
| 2 |
ascii_colors
|
| 3 |
asyncpg
|
| 4 |
distro
|
|
|
|
| 5 |
fastapi
|
| 6 |
graspologic>=3.4.1
|
| 7 |
httpcore
|
|
@@ -11,6 +12,7 @@ numpy
|
|
| 11 |
openai
|
| 12 |
passlib[bcrypt]
|
| 13 |
pipmaster
|
|
|
|
| 14 |
PyJWT
|
| 15 |
python-dotenv
|
| 16 |
python-jose[cryptography]
|
|
|
|
| 2 |
ascii_colors
|
| 3 |
asyncpg
|
| 4 |
distro
|
| 5 |
+
dotenv
|
| 6 |
fastapi
|
| 7 |
graspologic>=3.4.1
|
| 8 |
httpcore
|
|
|
|
| 12 |
openai
|
| 13 |
passlib[bcrypt]
|
| 14 |
pipmaster
|
| 15 |
+
pydantic
|
| 16 |
PyJWT
|
| 17 |
python-dotenv
|
| 18 |
python-jose[cryptography]
|
setup.py
CHANGED
|
@@ -40,36 +40,24 @@ def retrieve_metadata():
|
|
| 40 |
|
| 41 |
|
| 42 |
# Reading dependencies from requirements.txt
|
| 43 |
-
def read_requirements():
|
| 44 |
deps = []
|
| 45 |
try:
|
| 46 |
-
with open(
|
| 47 |
-
deps = [
|
|
|
|
|
|
|
| 48 |
except FileNotFoundError:
|
| 49 |
-
print(
|
| 50 |
-
"Warning: 'requirements.txt' not found. No dependencies will be installed."
|
| 51 |
-
)
|
| 52 |
return deps
|
| 53 |
|
| 54 |
|
| 55 |
def read_api_requirements():
|
| 56 |
-
|
| 57 |
-
try:
|
| 58 |
-
with open("./lightrag/api/requirements.txt") as f:
|
| 59 |
-
api_deps = [line.strip() for line in f if line.strip()]
|
| 60 |
-
except FileNotFoundError:
|
| 61 |
-
print("Warning: API requirements.txt not found.")
|
| 62 |
-
return api_deps
|
| 63 |
|
| 64 |
|
| 65 |
def read_extra_requirements():
|
| 66 |
-
|
| 67 |
-
try:
|
| 68 |
-
with open("./lightrag/tools/lightrag_visualizer/requirements.txt") as f:
|
| 69 |
-
api_deps = [line.strip() for line in f if line.strip()]
|
| 70 |
-
except FileNotFoundError:
|
| 71 |
-
print("Warning: API requirements.txt not found.")
|
| 72 |
-
return api_deps
|
| 73 |
|
| 74 |
|
| 75 |
metadata = retrieve_metadata()
|
|
|
|
| 40 |
|
| 41 |
|
| 42 |
# Reading dependencies from requirements.txt
|
| 43 |
+
def read_requirements(file_path="requirements.txt"):
|
| 44 |
deps = []
|
| 45 |
try:
|
| 46 |
+
with open(file_path) as f:
|
| 47 |
+
deps = [
|
| 48 |
+
line.strip() for line in f if line.strip() and not line.startswith("#")
|
| 49 |
+
]
|
| 50 |
except FileNotFoundError:
|
| 51 |
+
print(f"Warning: '{file_path}' not found. No dependencies will be installed.")
|
|
|
|
|
|
|
| 52 |
return deps
|
| 53 |
|
| 54 |
|
| 55 |
def read_api_requirements():
|
| 56 |
+
return read_requirements("lightrag/api/requirements.txt")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
|
| 59 |
def read_extra_requirements():
|
| 60 |
+
return read_requirements("lightrag/tools/lightrag_visualizer/requirements.txt")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
|
| 63 |
metadata = retrieve_metadata()
|