Created attachment 158355 [details]
math/py-networkx: Make most run-time dependencies optional
Several ports currently identified as run-time dependencies for math/py-networkx cannot yet be built under py3k. Specifically, graphics/py-graphviz, math/py-matplotlib, and science/py-scikit-sparse. Consequently, math/py-networkx cannot be built under py3k either, even though it is otherwise py3k-compatible.
The attached patch works around this problem by making most run-time dependencies optional, which is consistent with the upstream project documentation (https://networkx.github.io/documentation/networkx-1.9.1/install.html#requirements). A user who wishes to build the port against py3k can elect to disable the problematic optional dependencies.
Note: I am aware of the stock option descriptions defined in Mk/bsd.options.desc.mk, but choose not to implicitly use them in order to more precisely describe the effect of the option on the depending port.
While here, update WWW in pkg-descr.
FYI There are many py- ports that are 2.X-only due to similar problems. There are quite a bit of differences between 2.X and 3.X. That's why 2.X is still the default.
Such problems should really be reported to their respected upstreams, which I did today for science/py-scikit-sparse. And upstreams should be urged to apply patches and make releases. Patching them at the ports level isn't the right thing to do.
Ex. graphics/py-graphviz upstream is very responsive.
Yuri, I agree with you. In the case of science/py-scikit-learn, the patch seemed sufficiently trivial that the ports tree could realize a quick win while we wait for turn-around from upstream (thank you for propagating my patch, by the way). In the case of math/py-networkx, I think optional dependencies should be made optional anyway, while simultaneously giving some relief to py3k users who may be able to forgo the rendering capabilities in the interim. While we do the things you said we should do, we shouldn't let laggards hold back py3k-compatible ports unnecessarily.
My next stop, by the way, was going to be graphics/py-graphviz, which appears to have py3k support already in its 1.3 release candidate.
This patch can be applied, and would be useful, independent of #201346 or equivalent bugs against the other two py3k-incompatible ports. To that end, I'm removing the "depends-on" and changing the title accordingly.
QA artifacts to follow after I've gone and enjoyed this evening's fireworks.
Created attachment 158364 [details]
poudriere testport log for py27-networkx-1.9.1_1
Created attachment 158365 [details]
poudriere testport log for py34-networkx-1.9.1_1
% portlint -AC math/py-networkx
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: new ports should not set PORTREVISION.
0 fatal errors and 2 warnings found.
A commit references this bug:
Date: Sat Jul 25 10:44:37 UTC 2015
New revision: 392870
Allow for many run dependencies to be OPTIONs,
as by upstream suggestion
Submitted by: email@example.com
Approved by: maintainer timeout