Browse Source

fix python version

Daniel Gatis 3 years ago
parent
commit
8bc16273bc
2 changed files with 8 additions and 2 deletions
  1. 6 0
      rembg/__init__.py
  2. 2 2
      setup.py

+ 6 - 0
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"]

+ 2 - 2
setup.py

@@ -27,11 +27,11 @@ setup(
     author_email="[email protected]",
     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": [