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. "cli": [
  36. "aiohttp",
  37. "asyncer",
  38. "click",
  39. "fastapi",
  40. "filetype",
  41. "gradio",
  42. "python-multipart",
  43. "uvicorn",
  44. "watchdog",
  45. ],
  46. }
  47. entry_points = {
  48. "console_scripts": [
  49. "rembg=rembg.cli:main",
  50. ],
  51. }
  52. setup(
  53. name="rembg",
  54. description="Remove image background",
  55. long_description=long_description,
  56. long_description_content_type="text/markdown",
  57. url="https://github.com/danielgatis/rembg",
  58. author="Daniel Gatis",
  59. author_email="[email protected]",
  60. classifiers=[
  61. "License :: OSI Approved :: MIT License",
  62. "Topic :: Scientific/Engineering",
  63. "Topic :: Scientific/Engineering :: Mathematics",
  64. "Topic :: Scientific/Engineering :: Artificial Intelligence",
  65. "Topic :: Software Development",
  66. "Topic :: Software Development :: Libraries",
  67. "Topic :: Software Development :: Libraries :: Python Modules",
  68. "Programming Language :: Python",
  69. "Programming Language :: Python :: 3 :: Only",
  70. "Programming Language :: Python :: 3.8",
  71. "Programming Language :: Python :: 3.9",
  72. "Programming Language :: Python :: 3.10",
  73. "Programming Language :: Python :: 3.11",
  74. "Programming Language :: Python :: 3.12",
  75. ],
  76. keywords="remove, background, u2net",
  77. python_requires=">=3.8, <3.13",
  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. )