I have noticed that upgrading from dev-python/lxml-4.2.5 to 4.3.3 now requires cython to be installed and there is no flag to avoid it.
According to the lxml website:
The lxml.etree and lxml.objectify modules are written in Cython. Since we distribute the Cython-generated .c files with lxml releases, however, you do not need Cython to build lxml from the normal release sources. We even encourage you to not install Cython for a normal release build, as the generated C code can vary quite heavily between Cython versions, which may or may not generate correct code for lxml. The pre-generated release sources were tested and therefore are known to work.
I think there should at least be a flag to not use Cython. Or is there any good reason to ignore upstream guidance?
Looks like it's a build dependency. You should be able to uninstall it with --depclean.
It is true that it is an optional build dependency (as per upstream), and primarily used for when there is a need to build from the source tree, instead of the release archive. Therefore I would be very curious to hear if there is a reason not to follow upstream recommendations and use prebuilt modules.
Also, Portage refuses to remove Cython.
I added this. It looked to me like a missing dependency but I didn't look well enough. I agree with you that it's better to go with upstream's recommendations in this case.
However, I'm not sure it's correct to remove the cython is the correct response. It's possible for a system to have a version of Cython installed that doesn't meet its minimum requirements and in this case it will miscompile.
--without-cython should also be added. If I do the next bump, I'll look into it.
Oh, I see what you mean now. This makes sense. I expected automagic dependency to be a bit smarter and check for versions installed. Anyway I agree that automagic dependency is no good and that adding a `--without-cython` option sounds like a reasonable approach to me! Thank you for looking into this!
Now hard required. See https://bugs.gentoo.org/830882#c17 and docs upstream.