setup.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import os
  2. import pathlib
  3. import sys
  4. sys.path.append(os.path.dirname(__file__))
  5. from setuptools import find_packages, setup
  6. import versioneer
  7. here = pathlib.Path(__file__).parent.resolve()
  8. long_description = (here / "README.md").read_text(encoding="utf-8")
  9. install_requires = [
  10. "jsonschema",
  11. "numpy",
  12. "opencv-python-headless",
  13. "pillow",
  14. "pooch",
  15. "pymatting",
  16. "scikit-image",
  17. "scipy",
  18. "tqdm",
  19. ]
  20. extras_require = {
  21. "dev": [
  22. "bandit",
  23. "black",
  24. "flake8",
  25. "imagehash",
  26. "isort",
  27. "mypy",
  28. "pytest",
  29. "setuptools",
  30. "twine",
  31. "wheel",
  32. ],
  33. "cpu": ["onnxruntime"],
  34. "gpu": ["onnxruntime-gpu"],
  35. "rocm": ["onnxruntime-rocm"],
  36. "cli": [
  37. "aiohttp",
  38. "asyncer",
  39. "click",
  40. "fastapi",
  41. "filetype",
  42. "gradio",
  43. "python-multipart",
  44. "uvicorn",
  45. "watchdog",
  46. ],
  47. }
  48. entry_points = {
  49. "console_scripts": [
  50. "rembg=rembg.cli:main",
  51. ],
  52. }
  53. setup(
  54. name="rembg",
  55. description="Remove image background",
  56. long_description=long_description,
  57. long_description_content_type="text/markdown",
  58. url="https://github.com/danielgatis/rembg",
  59. author="Daniel Gatis",
  60. author_email="[email protected]",
  61. classifiers=[
  62. "License :: OSI Approved :: MIT License",
  63. "Topic :: Scientific/Engineering",
  64. "Topic :: Scientific/Engineering :: Mathematics",
  65. "Topic :: Scientific/Engineering :: Artificial Intelligence",
  66. "Topic :: Software Development",
  67. "Topic :: Software Development :: Libraries",
  68. "Topic :: Software Development :: Libraries :: Python Modules",
  69. "Programming Language :: Python",
  70. "Programming Language :: Python :: 3 :: Only",
  71. "Programming Language :: Python :: 3.10",
  72. "Programming Language :: Python :: 3.11",
  73. "Programming Language :: Python :: 3.12",
  74. "Programming Language :: Python :: 3.13",
  75. ],
  76. keywords="remove, background, u2net",
  77. python_requires=">=3.10, <3.14",
  78. packages=find_packages(),
  79. install_requires=install_requires,
  80. entry_points=entry_points,
  81. extras_require=extras_require,
  82. version=versioneer.get_version(),
  83. cmdclass=versioneer.get_cmdclass(),
  84. )