fix generated requirements list
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Fri, 10 Mar 2023 23:17:47 +0000 (00:17 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Fri, 10 Mar 2023 23:17:47 +0000 (00:17 +0100)
pyproject.toml
requirements_all.txt
script/gen_requirements_all.py

index 199665e448c8e4f134e1c59c07721e0dacba3f8e..4a7e739caf9e32ff7efd3089c3d62f7827c51912 100644 (file)
@@ -18,9 +18,8 @@ classifiers = [
 ]
 dependencies = [
   "aiohttp",
-  "coloredlogs>=15.0.1",
   "orjson",
-  "mashumaro>=3.5"
+  "mashumaro"
 ]
 
 [project.optional-dependencies]
@@ -29,13 +28,14 @@ server = [
   "asyncio-throttle==1.0.2",
   "aiofiles==23.1.0",
   "aiorun==2022.11.1",
+  "coloredlogs==15.0.1",
   "databases==0.7.0",
   "aiosqlite==0.18.0",
   "python-slugify==7.0.0",
+  "mashumaro==3.5.0",
   "memory-tempfile==2.2.3",
   "pillow==9.4.0",
   "unidecode==1.3.6",
-  "mashumaro==3.5",
   "xmltodict==0.13.0",
   "orjson==3.8.6",
   "shortuuid==1.0.11",
index b648810139379a1601bcde9aa697225a9a833669..8bb4196a97fd09d050746774d6b283474f3d5047 100644 (file)
@@ -7,10 +7,11 @@ aioslimproto==2.2.0
 aiosqlite==0.18.0
 async-upnp-client==0.33.1
 asyncio-throttle==1.0.2
+coloredlogs==15.0.1
 cryptography==39.0.2
 databases==0.7.0
 getmac==0.8.2
-mashumaro==3.5
+mashumaro==3.5.0
 memory-tempfile==2.2.3
 music-assistant-frontend==20230310.0
 orjson==3.8.6
index 2dde54b383f9e83e4cb3a6da6d4eda49fc83e88d..8ac9e13f0a048582eb35acc04cc978b635806e30 100644 (file)
@@ -60,16 +60,17 @@ def main() -> int:
     for req_str in core_reqs + extra_reqs:
         if match := PACKAGE_REGEX.search(req_str):
             package_name = match.group(1).lower().replace("_", "-")
-        elif package_name in final_requirements:
-            # duplicate package without version is safe to ignore
-            continue
+            if package_name in final_requirements:
+                # duplicate package without version is safe to ignore
+                print("ignoring %s" % package_name)
+                continue
         else:
             print("Found requirement without version specifier: %s" % req_str)
             package_name = req_str
 
         existing = final_requirements.get(package_name)
         if existing:
-            print("WARNING: ignore duplicate package: %s - existing: %s" % package_name, existing)
+            print(f"WARNING: ignore duplicate package: {package_name} - existing: {existing}")
             continue
         final_requirements[package_name] = req_str