[Samba] Samba4 with python2.7 and python3
Ng Oon-Ee
ngoonee at gmail.com
Mon Jan 17 20:13:55 MST 2011
On Mon, 2011-01-17 at 17:36 +0100, Paul Kölle wrote:
> Am 15.01.2011 00:57, schrieb Ng Oon-Ee:
> [ snipp... ]
>
> > I recall from my distro ML that there's no 'accepted' way of dealing
> > with this, we're pioneering it in some sense. From a user's perspective,
> > simply 'assuming' that python = python2 doesn't make much sense,
> > especially when the software will not compile with python3.
> Since there is no standard (this is linux after all) it's pretty hard to
> fix it cross-platform. IMO, your code below will break debian as it has
> python[major].[minor] i.e. /usr/bin/python2.5
>
> I assume Arch *does* link some python version to /usr/bin/python, so the
> only thing samba has to do is check version and abort if it's not 2.x
>
> PY_VER=$(python -c "import sys; print sys.version.split()[0]")
>
> or from a .py file:
> import sys
> major, minor, patch = sys.version.split()[0].split('.')
>
> cheers
> Paul
Yes, it links python3. That simple fix will suffice for now, I'm sure.
I'll continue to apply my distro-specific string replacements for the
time being (once samba4 is actually released, whenever that is, a proper
dev at Arch will take it up).
More information about the samba-technical
mailing list