From 8bc16273bc9291c7f5d3b0c5965f461120ece229 Mon Sep 17 00:00:00 2001 From: Daniel Gatis Date: Wed, 20 Apr 2022 10:03:05 -0300 Subject: [PATCH] fix python version --- rembg/__init__.py | 6 ++++++ setup.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rembg/__init__.py b/rembg/__init__.py index 41dfb712..b679d820 100644 --- a/rembg/__init__.py +++ b/rembg/__init__.py @@ -1,3 +1,9 @@ +import sys + +if not (sys.version_info.major == 3 and sys.version_info.minor == 9): + print("Python 3.9.* is required", file=sys.stderr) + sys.exit(1) + from . import _version __version__ = _version.get_versions()["version"] diff --git a/setup.py b/setup.py index 8eea8a65..43f1068a 100644 --- a/setup.py +++ b/setup.py @@ -27,11 +27,11 @@ author_email="danielgatis@gmail.com", classifiers=[ "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", ], keywords="remove, background, u2net", packages=["rembg"], - python_requires=">=3.8, <4", + python_requires="~=3.9.0", install_requires=requireds, entry_points={ "console_scripts": [