nipapd: setup.py soft-fail when lacking rst2man #772
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use a special build class to dynamically build the list of data_files,
this allows us to try and generate man files but in the absence of
rst2man, the man files will simply not be included.
rst2man (docutils) is required to build but not install or run NIPAP so
I don't want to list docutils as a dependency in setup.py. We are
currently using distutils but if we were to switch to setuptools then we
would have the option of specifying setup_requires and install_requires
separately. I did try to rewrite this for setuptools but couldn't get it
to work without additional changes so I gave up on that.
I'm not sure if we should do this or not.. it's kind of a philosophical
question. Should we fail-hard when rst2man is not present? It would
allow to build incomplete .deb files. On the other hand I usually build
the deb files and I have rst2man installed so it's not much of an issue
and for anyone that just wishes to install NIPAP, not build packages, it
could be convenient that it's possible to do so from source without
first manually installing rst2man.
@garberg, what do you think?