[PATCH 29] Re: Disabling Python Modules

Ian Stakenvicius axs at gentoo.org
Thu Jan 26 04:56:09 UTC 2017


On 25/01/17 03:29 AM, Stefan Metzmacher wrote:
> Hi Ian,
> 
>> I can't be certain, but I think that may indeed be the last of them.
>> All wscript_build files that contain modules with deps= including
>> py*util, and LIBPYTHON, are now all covered.
> 
> I know I'm late in the discussion, but is there a chance
> that we could avoid all changes like this:
> 
> -bld.SAMBA3_PYTHON('pys3param',
> +if not bld.env.disable_python:
> +    bld.SAMBA3_PYTHON('pys3param',
> 
> And just to that globally within SAMBA_PYTHON()
> instead of changing each caller?


I considered doing that, but decided against it due to the fact that
this hides too much from the wscript_build of each module.  When a
bld.env.disable_python conditional exists it makes it clear that all
components the conditional applies to (whether SAMBA_PYTHON() or not,
and there's more than a few that aren't SAMBA_PYTHON()).



> [...]
> 
> For all others we should use something like
> enabled=bld.PYTHON_BUILD_IS_ENABLED(),
> see git grep 'enabled=' for examples.


Is this just for style? or..


> I think we should also have the --disable-python option
> near to the --extra-python option within
> buildtools/wafsamba/wscript, so that it is also available
> for the standalone builds of talloc, tevent, tdb and ldb.


--disable-python is already in the standalone builds, I don't recall
patching that in except maybe for one of those; most if not all of the
changes to those modules was to allow the pre-existing
--disable-python functionality to apply when it's _not_ being built
standalone.


> 
> For the samba build I think --disable-python give an error
> unless --without-ad-dc is also given as an ad-dc really requires
> python bindings.


I believe I tested this one and it works out fine, however it's worth
noting of course that ADDC ends up being practically disabled anyhow.
The disable-python patchset does NOT disable features of samba at this
point; that wasn't my goal when i built it as Gentoo just cherry-picks
the libs out of the compilation.  Things can definitely be expanded on
to disable full features instead, but that will need to be taken up by
someone that knows more than me.


> And finally we need this checked in script/autobuild.py in order
> to prevent future regressions, maybe more or less a copy of
> the "samba-libs" task (as "samba-nopython")
> just with other configure options, e.g.
> 
> samba_nopython_configure_libs = samba_libs_envvars + " ./configure
> --abi-check --enable-debug --picky-developer -C ${PREFIX} --disable-python"
> samba_nopython_configure_samba = samba_nopython_configure_libs + "
> --without-ad-dc"


I'll have to pass this one on to someone else as well, if anyone here
has autobuild.py experience and could take it on?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170125/88356cf6/signature.sig>


More information about the samba-technical mailing list