Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add install_requires to setup.py #33

Open
e13h opened this issue Jul 9, 2021 · 0 comments
Open

Add install_requires to setup.py #33

e13h opened this issue Jul 9, 2021 · 0 comments

Comments

@e13h
Copy link

e13h commented Jul 9, 2021

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.

seamseg/setup.py

Lines 34 to 80 in 3d10aea

setuptools.setup(
# Meta-data
name="seamseg",
author="Lorenzo Porzi",
author_email="[email protected]",
description="Seamless Scene Segmentation for Pytorch",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/mapillary/seamseg",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
# Versioning
use_scm_version={"root": ".", "relative_to": __file__, "write_to": "seamseg/_version.py"},
# Requirements
setup_requires=["setuptools_scm"],
python_requires=">=3, <4",
# Package description
packages=[
"seamseg",
"seamseg.algos",
"seamseg.config",
"seamseg.data",
"seamseg.models",
"seamseg.modules",
"seamseg.modules.heads",
"seamseg.utils",
"seamseg.utils.bbx",
"seamseg.utils.nms",
"seamseg.utils.parallel",
"seamseg.utils.roi_sampling",
],
ext_modules=[
make_extension("nms", "seamseg.utils"),
make_extension("bbx", "seamseg.utils"),
make_extension("roi_sampling", "seamseg.utils")
],
cmdclass={"build_ext": BuildExtension},
include_package_data=True,
)

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,
    ...
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant