[Samba] Samba4 with python2.7 and python3

Jelmer Vernooij jelmer at vernstok.nl
Wed Jan 12 08:46:49 MST 2011


On Wed, 2011-01-12 at 20:52 +1100, Andrew Bartlett wrote:
> On Wed, 2011-01-12 at 08:49 +0200, Michael Wood wrote:
> > Hi
> > 
> > I've copied this message to samba-technical where issues like this
> > with Samba 4 should be discussed while it is still in alpha.
> 
> Indeed, this is where any development issue such as 'how to make Samba
> compile on a system that has depricated python2' should be discussed. 
I think we should just look for python2-config before we look for
python-config. And perhaps we should error out if the only python we
can find is python 3.

Maintaining two trees in parallel, one with support for Python 2 and one
with support for Python 3 would be a pain so I think we should delay
that until we absolutely have to do so, or until we can drop python 2
support.

Cheers,

jelmer

> > On 12 January 2011 01:23, Ng Oon-Ee <ngoonee at gmail.com> wrote:
> > > Hi all,
> > >
> > > Arch Linux (a rolling release distro) has updated to python3 a while
> > > back. python2 is still installed in parallel, but part of the
> > > ramifications of this move is the following:-0
> > > 1. /usr/bin/python points to /usr/bin/python3 instead of /usr/bin/python2
> > > 2. /usr/bin/python-config points to /usr/bin/python3-config instead of
> > > /usr/bin/python2-config
> > >
> > > I'm having problems with make for samba4 (am installing it to be able
> > > to install openchange->evolution-mapi. Initial problems were simply
> > > that various scripts don't reference the PYTHON env variable, so I ran
> > > a sed as follows:-
> > >  sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
> > >         -e "s|python-config|python2-config|" \
> > >         -e "s|bin/python|bin/python2|" \
> > >    $(find ${samba-4.0.0alpha13 -type f)
> > >
> > > This gets me all the way past configure, but now I have this error:-
> > >
> > > 'configure' finished successfully (29.915s)
> > > WAF_MAKE=1 ../buildtools/bin/waf build
> > > Waf: Entering directory
> > > `/var/abs/local/aur/samba4/src/samba-4.0.0alpha13/source4/bin'
> > > Checking project rules ...
> > > Project rules pass
> > > Waf: Leaving directory
> > > `/var/abs/local/aur/samba4/src/samba-4.0.0alpha13/source4/bin'
> > > find_or_declare found a source file where a build file was expected
> > > 'lib/Parse/Pidl/IDL.pm'
> > > make: *** [all] Error 1
> > >    Aborting...
> > 
> > I can't find where that message is printed.
> 
> My best guess is that this is caused by pidl regenerating some of it's
> files after the rules where changed by your sed script. 
> 
> First try again with the current GIT tree, and then let's see if we can
> some up with a sensible way to handle this.  What is the right way to
> find python 2.6 on all systems?  What is done for other packages - Samba
> must not be the only software not yet to move to python3?
> 
> Andrew Bartlett
> 



More information about the samba-technical mailing list