mapillary / seamseg

Seamless Scene Segmentation
BSD 3-Clause "New" or "Revised" License
289 stars 53 forks source link

Add `install_requires` to `setup.py` #33

Open e13h opened 3 years ago

e13h commented 3 years ago

Issue summary

In the README's setup section, it says:

or, in a single line:

pip install git+https://github.com/mapillary/seamseg.git

But, since setuptools.setup() does not include the install_requires argument, the projects dependencies do not get installed. https://github.com/mapillary/seamseg/blob/3d10aea4442f76a29ac4a59340f6d2049c3986e5/setup.py#L34-L80

The pip install one-liner ends in errors for me unless I install torch myself. And even when I do that, when I try to run the seamseg scripts, I hit errors because dependencies like umsgpack and inplace_abn are not installed.

Possible solution

Could we add something like this?

...
requirements = []
with open("requirements.txt") as f:
    requirements = f.read().splitlines()

setuptools.setup(
    ...
    # Requirements
    setup_requires=["setuptools_scm"],
    python_requires=">=3, <4",
    install_requires=requirements,
    ...
)