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

Generate requirements.txt from Python spec #7289

Merged
merged 15 commits into from
Feb 4, 2021
Prev Previous commit
Next Next commit
fix setup.py extras_require
  • Loading branch information
areusch committed Jan 28, 2021
commit c2235cbca7025e60708f8946b2723539a2c75e23
6 changes: 4 additions & 2 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,17 @@ def get_package_data_files():
sys.path.pop(0)

requirements = gen_requirements.join_requirements()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to print out some details on what the requirements identified are, to help with debugging?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean exactly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, just a suggestion that when this is being invoked, and the requirements being generated automatically, it might be useful to have them dumped to stdout during the invocation (perhaps optionally) so someone debugging issues with Python deps can readily see what they were. Not sure if they are exposed in an obvious way elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess, I don't typically expect to see the requirements printed when I run python setup.py. are there cases where you do? I could add a comment saying: to produce requirements.txt files, run python gen_requirements.py above this line, which is kind of the typical case i'd expect someone to be looking for them.

extras_require = {k: v for k, v in requirements.items() if k not in ("all", "core")}
extras_require = {
piece: deps for piece, (_, deps) in requirements.items() if piece not in ("all", "core")
}

setup(
name="tvm",
version=__version__,
description="TVM: An End to End Tensor IR/DSL Stack for Deep Learning Systems",
zip_safe=False,
entry_points={"console_scripts": ["tvmc = tvm.driver.tvmc.main:main"]},
install_requires=requirements["core"],
install_requires=requirements["core"][1],
extras_require=extras_require,
packages=find_packages(),
package_dir={"tvm": "tvm"},
Expand Down