As per summary. Please, clarify if DISTUTILS_OPTIONAL=1 and apropriate constructions like DEPEND="${PYTHON_DEPS}" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" can be used. It's vitally needed on systems which is currently running only Python 2.*
I know zero things about the python classes. According to https://github.com/lxc/lxc/blob/master/configure.ac the lxc seems to need python3 when python is enabled but I am not exactly sure how to express that to the ebuild. CC'ing python for suggestions
That should handle it. All other things: proper python deps, dependending on enabled python USE flag AND apropriate REQUIRED_USE is already in place. --- lxc-1.0.4.ebuild 2014-06-15 22:29:53.000000000 +0400 +++ lxc-1.0.4-r1.ebuild 2014-07-23 16:19:57.000000000 +0400 @@ -6,7 +6,7 @@ MY_P="${P/_/-}" PYTHON_COMPAT=( python{3_2,3_3,3_4} ) - +DISTUTILS_OPTIONAL=1 inherit autotools distutils-r1 eutils linux-info versionator flag-o-matic systemd DESCRIPTION="LinuX Containers userspace utilities"
As a note, I think you can remove python-related code from pkg_setup() and just pass --disable-python instead of enabling and cleaning up the Makefile ;). Looking at configure.ac&Makefile.am, --enable-python only enables calling setup.py in that Makefile... which you don't want anyway.
(In reply to Michał Górny from comment #3) > As a note, I think you can remove python-related code from pkg_setup() and > just pass --disable-python instead of enabling and cleaning up the Makefile > ;). Looking at configure.ac&Makefile.am, --enable-python only enables > calling setup.py in that Makefile... which you don't want anyway. Hmm what pkg_setup() ? I remember there was a reason I did it this way which I have completely forgot right now :/
@python can you help me with that?
Created attachment 386896 [details, diff] Ebuild patch (In reply to Markos Chandras from comment #5) > @python can you help me with that? I took a look, and it seems like the only change necessary is setting DISTUTILS_OPTIONAL=1 before inherit, as Sergey suggests. I think mgorny's suggestion is something like the attached patch.
Thanks. Fixed in 1.0.6