seamseg icon indicating copy to clipboard operation
seamseg copied to clipboard

Add `install_requires` to `setup.py`

Open e13h opened this issue 4 years ago • 0 comments

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,
    ...
)

e13h avatar Jul 09 '21 22:07 e13h