mintel / build-harness

🤖Collection of Makefiles to facilitate building Python/Golang projects, Dockerfiles, and more
Apache License 2.0
2 stars 6 forks source link

make dist depends on pipenv but the messaging is kinda bad #49

Closed awichmann-mintel closed 4 years ago

awichmann-mintel commented 4 years ago

This is what happens if you use the python/dist target without having pipenv installed.

awichmann@CHI-LX-L-018 '15:26:27' (upgrade_to_build_harness) '~/Code/everest_code/libraries/workflow-client'
> $ make dist
Writing requirements from Pipfile to requirements.txt and requirements-dev.txt
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pipenv'
/home/awichmann/Code/everest_code/libraries/build-harness/modules/pipenv/Makefile.env:56: recipe for target 'pipenv/generate_requirements' failed
make: *** [pipenv/generate_requirements] Error 1

It would be nice if build-harness first checked for pipenv's installation and alerted the user with a message like "your package needs pipenv installed as a dev-dependency" instead of printing this stacktrace.