On Sun, Nov 19, 2017 at 07:21:32PM +0100, Armin K. wrote:
> On Sun, 2017-11-19 at 01:41 +0000, Ken Moffat wrote:
> > 
> > The following works to build the libxml2 modules for both python2
> > and python3:
> > 
> > 1. Run the sed (we still describe it as if conditional, but we then
> > invoke Python3).  This seems to fix something for current Python3,
> > i.e. it changes code which is for Python major version 3 or later,
> > so not harmful for Python2.
> > 
> > 2. create a separate subdirectory for python2, build there using
> > ../configure and make [ I tried just make -C python but that failed
> > because it needed the main lib ], then make install in the python
> > directory, finally go back to the main directory :
> > 
> > mkdir py2
> > cd py2
> > ../configure with all desired options including disable-static
> >  EXCEPT omit --with-python
> > make
> > make check if desired - the python2 libs link agaisnt libxml2.so.2
> > but are not directly tested.
> > make -C python install
> > cd ..
> > 
> > continue with the current ./configure
> > 
> > That doubles the build time (I started timing using --with-icu and
> > discovered that my SBU was more than double what is in the book for
> > just the python2 part, then retried without that and got to 0.4 SBU
> > for each part.
> > 
> > Space is increased by 20MB.
> > 
[---]
> 
> From what I've seen, libxml2-x.x.x/python also contains setup.py file.
> You can use it to build python2 module without modifying or copying
> anything. Ie.
> 
> ./configure --prefix=/usr --with-python=/usr/bin/python3
> make
> make install
> 
> If python2 module is required
> 
> cd python
> python2 setup.py build
> python2 setup.py install --optimize=1
> 
> Not sure if libxml2 needs to be installed prior to running build
> commands.

Thanks.  If that works, it should reduce the extra time and space.
Added to my ToDo list.

ĸen
-- 
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
                                     - Unseen Academicals
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to