From 9d2b1cf4d14a9fbbcb7502715263628309d02b60 Mon Sep 17 00:00:00 2001 From: Mihai-Cristian Olteanu Date: Wed, 5 Mar 2025 23:49:23 +0000 Subject: [PATCH 1/2] Make repo pip-installable --- setup.py | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..3bb3d7e0 --- /dev/null +++ b/setup.py @@ -0,0 +1,54 @@ +import setuptools +import os + +# Read the long description from README.md (if available) +long_description = "" +if os.path.isfile("README.md"): + with open("README.md", "r", encoding="utf-8") as fh: + long_description = fh.read() + +# Read requirements from requirements.txt +requirements = [] +with open("requirements.txt", "r", encoding="utf-8") as fh: + for line in fh: + # Trim whitespace and skip comments/empty lines + line = line.strip() + if line and not line.startswith("#"): + # Remove inline comments and append + requirements.append(line.split("#")[0].strip()) + +setuptools.setup( + name="nunif", + version="0.1.0", + author="nagadomi", + author_email="", + description="Misc; latest version of waifu2x; 2D video to stereo 3D video conversion", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/nagadomi/nunif", + license="MIT", + packages=[ + "nunif", + "nunif.nunif", + "nunif.nunif.modules", + "nunif.nunif.training", + "nunif.waifu2x", + "nunif.waifu2x.models", + "nunif.cliqa", + "nunif.iw3", + ], + package_dir={ + "nunif.nunif": "nunif", + "nunif.waifu2x": "waifu2x", + "nunif.cliqa": "cliqa", + "nunif.iw3": "iw3", + }, + install_requires=requirements, + classifiers=[ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + python_requires=">=3.10", +) \ No newline at end of file From 3f1c1f0fec503819cf5a12aa1c9c99956e555ddc Mon Sep 17 00:00:00 2001 From: Mihai-Cristian Olteanu Date: Tue, 11 Mar 2025 14:34:24 +0000 Subject: [PATCH 2/2] Rely on package finder --- setup.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/setup.py b/setup.py index 3bb3d7e0..c9ea37d6 100644 --- a/setup.py +++ b/setup.py @@ -27,22 +27,7 @@ long_description_content_type="text/markdown", url="https://github.com/nagadomi/nunif", license="MIT", - packages=[ - "nunif", - "nunif.nunif", - "nunif.nunif.modules", - "nunif.nunif.training", - "nunif.waifu2x", - "nunif.waifu2x.models", - "nunif.cliqa", - "nunif.iw3", - ], - package_dir={ - "nunif.nunif": "nunif", - "nunif.waifu2x": "waifu2x", - "nunif.cliqa": "cliqa", - "nunif.iw3": "iw3", - }, + packages=setuptools.find_packages(), install_requires=requirements, classifiers=[ "Programming Language :: Python :: 3",