mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-18 02:35:54 +08:00
Specify compatible releases in setup.py
For more information on compatible releases, see [PEP 440](https://peps.python.org/pep-0440/#compatible-release) or [pip's requirement specifiers](https://pip.pypa.io/en/stable/reference/requirement-specifiers/). In general, `requirements.txt` should be used to define a repeatable installation, such as a development environment or a production environment. As such, versions of dependencies contained therein should be as specific as possible. `install_requires` should be used to indicate dependencies necessary to run the package. As such, versions of dependencies contained therein should be as broad as possible. See [“install_requires vs requirements files” on python.org](https://packaging.python.org/en/latest/discussions/install-requires-vs-requirements/) or [“requirements.txt vs setup.py” on stackoverflow](https://stackoverflow.com/a/43659126) for more information. Closes #355
This commit is contained in:
parent
edc9fe27df
commit
545f44bef6
29
setup.py
29
setup.py
@ -11,12 +11,6 @@ here = pathlib.Path(__file__).parent.resolve()
|
|||||||
|
|
||||||
long_description = (here / "README.md").read_text(encoding="utf-8")
|
long_description = (here / "README.md").read_text(encoding="utf-8")
|
||||||
|
|
||||||
with open(here / "requirements.txt") as f:
|
|
||||||
requireds = f.read().splitlines()
|
|
||||||
|
|
||||||
with open(here / "requirements-gpu.txt") as f:
|
|
||||||
gpu_requireds = f.read().splitlines()
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="rembg",
|
name="rembg",
|
||||||
description="Remove image background",
|
description="Remove image background",
|
||||||
@ -42,14 +36,33 @@ setup(
|
|||||||
keywords="remove, background, u2net",
|
keywords="remove, background, u2net",
|
||||||
packages=["rembg"],
|
packages=["rembg"],
|
||||||
python_requires=">3.7, <3.11",
|
python_requires=">3.7, <3.11",
|
||||||
install_requires=requireds,
|
install_requires=[
|
||||||
|
"aiohttp~=3.8.1",
|
||||||
|
"asyncer~=0.0.2",
|
||||||
|
"click~=8.1.3",
|
||||||
|
"fastapi~=0.87.0",
|
||||||
|
"filetype~=1.2.0",
|
||||||
|
"pooch~=1.6.0",
|
||||||
|
"imagehash~=4.3.1",
|
||||||
|
"numpy~=1.23.5",
|
||||||
|
"onnxruntime~=1.13.1",
|
||||||
|
"opencv-python-headless~=4.6.0.66",
|
||||||
|
"pillow~=9.3.0",
|
||||||
|
"pymatting~=1.1.8",
|
||||||
|
"python-multipart~=0.0.5",
|
||||||
|
"scikit-image~=0.19.3",
|
||||||
|
"scipy~=1.9.3",
|
||||||
|
"tqdm~=4.64.1",
|
||||||
|
"uvicorn~=0.20.0",
|
||||||
|
"watchdog~=2.1.9",
|
||||||
|
],
|
||||||
entry_points={
|
entry_points={
|
||||||
"console_scripts": [
|
"console_scripts": [
|
||||||
"rembg=rembg.cli:main",
|
"rembg=rembg.cli:main",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
extras_require={
|
extras_require={
|
||||||
"gpu": gpu_requireds,
|
"gpu": ["onnxruntime-gpu~=1.13.1"],
|
||||||
},
|
},
|
||||||
version=versioneer.get_version(),
|
version=versioneer.get_version(),
|
||||||
cmdclass=versioneer.get_cmdclass(),
|
cmdclass=versioneer.get_cmdclass(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user