setup.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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.10",
  71. "Programming Language :: Python :: 3.11",
  72. "Programming Language :: Python :: 3.12",
  73. "Programming Language :: Python :: 3.13",
  74. ],
  75. keywords="remove, background, u2net",
  76. python_requires=">=3.10, <3.14",
  77. packages=find_packages(),
  78. install_requires=install_requires,
  79. entry_points=entry_points,
  80. extras_require=extras_require,
  81. version=versioneer.get_version(),
  82. cmdclass=versioneer.get_cmdclass(),
  83. )