Patches which remove Python 2.3 compatibility code
Matthias Dieter Wallnöfer
mdw at samba.org
Tue Feb 9 09:56:37 MST 2010
Lastest version of the patch attached.
Jelmer Vernooij wrote:
> Hi Matthias,
> On Fri, 2010-02-05 at 09:21 +0100, Matthias Dieter Wallnöfer wrote:
>> this is a patch proposal. I think it's not really correct yet - but feel
>> free to point out my mistakes.
>> Also regarding the test command with the "<" operator I'm not really
>> sure: is it enough that it only exists in the internal bash ("test")
>> implementation? What could be done to have this portable?
> Using test is fine, it's portable (it's already used in other places in
> our configure script as well).
> Please don't remove the 'python' executable name from the list of python
> executables we search for. There is not reason why newer versions of
> python would not have that executable name. Similar for python-config.
> PYTHON_VER is an environment variable that can be set by the user to
> indicate what python version they want samba to use. Checking it makes
> sense, but it doesn't ensure that if they do not specify a version and
> we find one by ourselves that that version is newer than 2.3.
> Instead, I think we should just look for the Python interpreter like we
> do at the moment but make sure that whatever we find eventually is at
> least Python 2.4. One way you could do this is by checking the exit code
> of the following command:
> $PYTHON -c 'import sys; sys.exit(sys.version_info[:2]>= (2,4))
> So if you wanted to use this in an autoconf script, you could try
> something like this (not tested):
> if python -c 'import sys; sys.exit(sys.version_info[:2]>= (2,9))'
> AC_MSG_ERROR([Python ($PYTHON) is too old. At least version 2.4 is
>> Jelmer Vernooij wrote:
>>> On Thu, 2010-02-04 at 18:39 +0100, Matthias Dieter Wallnöfer wrote:
>>>> Here the patches which remove some of the Python 2.3 compatiblity code
>>>> (not TDB, not LDB, not TALLOC).
>>> Thanks, looks good. Any chance you can also update the configure test
>>> for Python>= 2.4 ? It's in configure.ac or samba4.m4 IIRC.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1118 bytes
Desc: not available
More information about the samba-technical