64 bit install Python
Stephen Gallagher
sgallagh at redhat.com
Tue Feb 1 05:03:34 MST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/31/2011 06:51 AM, Andrew Bartlett wrote:
> On Sat, 2011-01-29 at 13:31 -0500, Scott Carradice wrote:
>> When installing samba on a 64 bit machine ( Opensuse 11.3 ) the python
>> portion seems to split up into lib and lib64. Python seems to be able
>> to use one directory so my fix so far is just to copy all of the lib64
>> directory into the lib directory. Is there a more correct solution at
>> this time?
>
> The issue is that installmisc.sh in Samba4 rewrites:
>
> sys.path.insert(0, "bin/python")
> into
> sys.path.insert(0, "/usr/local/samba/lib/python2.7/site-packages")
>
> This means that the 64 bit files are now not found on a fresh install.
>
> We need to fix installmisc.sh to be written in python itself, or for it
> to be folded into the waf rules. Then we can create a more sensible
> pattern match for fixing the scripts, that doesn't rely on lowest common
> denominator sed, and can insert both paths.
One approach that could also work would be to have installmisc.sh do the
following:
PYTHON_SITELIB=`python -c "from distutils.sysconfig import
get_python_lib; print(get_python_lib())"`
PYTHON_SITEARCH=`python -c "from distutils.sysconfig import
get_python_lib; print(get_python_lib(1))"`
And then pass sys.path.insert(0, "$PYTHON_SITELIB:%PYTHON_SITEARCH")
(This is similar to how it's done in spec files for Red Hat and Fedora)
This is also very portable, since we're asking python itself what path
it's expecting to need.
- --
Stephen Gallagher
RHCE 804006346421761
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk1H9pMACgkQeiVVYja6o6Mi0ACgkaH15tsEzdUVdfo50Guv/P1m
QxYAn0oRko7vmGb6mz+QiDryVr3eYqdr
=NnFY
-----END PGP SIGNATURE-----
More information about the samba-technical
mailing list