From 9e47787a71efa2c74dbc2f1cfa2ccea0d9197a37 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Sat, 11 Mar 2023 00:17:47 +0100 Subject: [PATCH] fix generated requirements list --- pyproject.toml | 6 +++--- requirements_all.txt | 3 ++- script/gen_requirements_all.py | 9 +++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 199665e4..4a7e739c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/requirements_all.txt b/requirements_all.txt index b6488101..8bb4196a 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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 diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index 2dde54b3..8ac9e13f 100644 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -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 -- 2.34.1