From 09b1190eabbc77e5f15c61fa7c38a2064b403e20 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Mon, 9 Jun 2025 22:03:48 +0300 Subject: [PATCH 1/3] Fix Python 3.13 --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 474e9188..4fa8c255 100644 --- a/setup.py +++ b/setup.py @@ -68,8 +68,7 @@ def write_version_py(): def get_version(): with open(version_file, 'r') as f: - exec(compile(f.read(), version_file, 'exec')) - return locals()['__version__'] + return f.read().split("'")[1] def get_requirements(filename='requirements.txt'): From 86c4253654c883523b9cf01c2ad20b08559a82a2 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Wed, 10 Sep 2025 19:00:54 +0300 Subject: [PATCH 2/3] add pyproject.toml --- pyproject.toml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..704130c2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,26 @@ +[build-system] +requires = [ + "basicsr", "facexlib", "lmdb", "numpy", "opencv-python", "pyyaml", + "scipy", "tb-nightly", "torch", "torchvision", "tqdm", "yapf", "cython" +] +build-backend = "setuptools.build_meta" +packages = ["gfpgan"] + +[project] +name = "gfpgan" +version = "1.3.8" +authors = [ + { name="Xintao Wang", email="xintao.wang@outlook.com" }, +] +description = "GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration" +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] +license = {text = "Apache-2.0"} + +[project.urls] +Homepage = "github.com/Disty0/GFPGAN" +Issues = "https://github.com/TencentARC/GFPGAN/issues" \ No newline at end of file From ae0f7e44fafe0ef4716f3c10067f8f379b74c21c Mon Sep 17 00:00:00 2001 From: Disty0 Date: Thu, 11 Sep 2025 21:05:46 +0300 Subject: [PATCH 3/3] fix dependencies --- pyproject.toml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 704130c2..9c29b8fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,5 @@ [build-system] -requires = [ - "basicsr", "facexlib", "lmdb", "numpy", "opencv-python", "pyyaml", - "scipy", "tb-nightly", "torch", "torchvision", "tqdm", "yapf", "cython" -] +requires = ["setuptools"] build-backend = "setuptools.build_meta" packages = ["gfpgan"] @@ -21,6 +18,11 @@ classifiers = [ ] license = {text = "Apache-2.0"} +dependencies = [ + "basicsr", "facexlib", "lmdb", "numpy", "opencv-python", "pyyaml", + "scipy", "tb-nightly", "torch", "torchvision", "tqdm", "yapf", "cython" +] + [project.urls] Homepage = "github.com/Disty0/GFPGAN" Issues = "https://github.com/TencentARC/GFPGAN/issues" \ No newline at end of file