Message ID | 24d0ff88170493e141dd07c29c3bcf262a67692f.1421582718.git.yann.morin.1998@free.fr |
---|---|
State | Changes Requested |
Headers | show |
On Sun, Jan 18, 2015 at 1:11 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 > and libxslt. > > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > > --- > This is a host-only package for now, because I only needed it to build > opengl-registry. > --- > package/python-lxml/python-lxml.hash | 2 ++ > package/python-lxml/python-lxml.mk | 25 +++++++++++++++++++++++++ > 2 files changed, 27 insertions(+) > create mode 100644 package/python-lxml/python-lxml.hash > create mode 100644 package/python-lxml/python-lxml.mk > > diff --git a/package/python-lxml/python-lxml.hash b/package/python-lxml/python-lxml.hash > new file mode 100644 > index 0000000..470a245 > --- /dev/null > +++ b/package/python-lxml/python-lxml.hash > @@ -0,0 +1,2 @@ > +# Locally computed > +sha256 069594837d0376a1bacf5cc42aa9a1be2e1c1396dc62f7d07f7358afecd34adf lxml-3.4.1.tgz > diff --git a/package/python-lxml/python-lxml.mk b/package/python-lxml/python-lxml.mk > new file mode 100644 > index 0000000..758ce87 > --- /dev/null > +++ b/package/python-lxml/python-lxml.mk > @@ -0,0 +1,25 @@ > +################################################################################ > +# > +# python-lxml > +# > +################################################################################ > + > +PYTHON_LXML_VERSION = 3.4.1 > +PYTHON_LXML_SITE = http://lxml.de/files > +PYTHON_LXML_SOURCE = lxml-$(PYTHON_LXML_VERSION).tgz > + > +# Not including the GPL, because it is used only for the test scripts. > +PYTHON_LXML_LICENSE = BSD-3c, Others > +PYTHON_LXML_LICENSE_FILES = \ > + LICENSES.txt \ > + doc/licenses/BSD.txt \ > + doc/licenses/elementtree.txt \ > + src/lxml/isoschematron/resources/rng/iso-schematron.rng > + > +# python-lxml can use either setuptools, or distutils as a fallback. > +# So, we use setuptools. > +PYTHON_LXML_SETUP_TYPE = setuptools > + > +PYTHON_LXML_DEPENDENCIES = libxml2 libxslt > + > +$(eval $(host-python-package)) Trying to build lxml as normal package and get following error: running build_ext building 'lxml.etree' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src creating build/temp.linux-x86_64-2.7/src/lxml /home/user/Documents/versioned/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/user/Documents/versioned/buildroot/output/build/python-lxml-3.4.1/src/lxml/includes -I/home/user/Documents/versioned/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w In file included from src/lxml/lxml.etree.c:239:0: /home/user/Documents/versioned/buildroot/output/build/python-lxml-3.4.1/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory #include "libxml/xmlversion.h" ^ compilation terminated. What should I pass to setup.py? Should I pass include path to include/libxml2? How does it work for the host-package? Yegor
Yegor, All, On 2015-01-18 18:27 +0100, Yegor Yefremov spake thusly: > On Sun, Jan 18, 2015 at 1:11 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > > The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 > > and libxslt. [--SNIP--] > > +$(eval $(host-python-package)) > > Trying to build lxml as normal package and get following error: > > running build_ext > building 'lxml.etree' extension > creating build/temp.linux-x86_64-2.7 > creating build/temp.linux-x86_64-2.7/src > creating build/temp.linux-x86_64-2.7/src/lxml > /home/user/Documents/versioned/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc > -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE > -D_FILE_OFFSET_BITS=64 -Os -DNDEBUG -g -fwrapv -O3 -Wall > -Wstrict-prototypes -fPIC > -I/home/user/Documents/versioned/buildroot/output/build/python-lxml-3.4.1/src/lxml/includes > -I/home/user/Documents/versioned/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/python2.7 > -c src/lxml/lxml.etree.c -o > build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w > In file included from src/lxml/lxml.etree.c:239:0: > /home/user/Documents/versioned/buildroot/output/build/python-lxml-3.4.1/src/lxml/includes/etree_defs.h:14:31: > fatal error: libxml/xmlversion.h: No such file or directory > #include "libxml/xmlversion.h" > ^ > compilation terminated. > > What should I pass to setup.py? Should I pass include path to > include/libxml2? How does it work for the host-package? Oh.. Good question. I just checked, and I do have the libxml2 development files installed on my distro. I'll respin a build here with libxml2-dev uninstalled, see if it still works, and report back. Thanks for spotting that. Regards, Yann E. MORIN.
Yegor, All, On 2015-01-18 18:27 +0100, Yegor Yefremov spake thusly: > On Sun, Jan 18, 2015 at 1:11 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > > The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 > > and libxslt. > Trying to build lxml as normal package and get following error: You mean, as a target package? It can not work as-is, because I only declared the host variant. You'd have to add the target variant if you want the target package. > running build_ext > building 'lxml.etree' extension > creating build/temp.linux-x86_64-2.7 > creating build/temp.linux-x86_64-2.7/src > creating build/temp.linux-x86_64-2.7/src/lxml > /home/user/Documents/versioned/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc > -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE > -D_FILE_OFFSET_BITS=64 -Os -DNDEBUG -g -fwrapv -O3 -Wall > -Wstrict-prototypes -fPIC > -I/home/user/Documents/versioned/buildroot/output/build/python-lxml-3.4.1/src/lxml/includes > -I/home/user/Documents/versioned/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/python2.7 > -c src/lxml/lxml.etree.c -o > build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w > In file included from src/lxml/lxml.etree.c:239:0: > /home/user/Documents/versioned/buildroot/output/build/python-lxml-3.4.1/src/lxml/includes/etree_defs.h:14:31: > fatal error: libxml/xmlversion.h: No such file or directory > #include "libxml/xmlversion.h" > ^ > compilation terminated. > > What should I pass to setup.py? Should I pass include path to > include/libxml2? How does it work for the host-package? Well, I just tried, and it builds fine, even when I remove the libxml2 development files from my host: running build_ext building 'lxml.etree' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src creating build/temp.linux-x86_64-2.7/src/lxml /usr/bin/gcc -pthread -fno-strict-aliasing -O2 -I/home/ymorin/dev/buildroot/O/host/usr/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ymorin/dev/buildroot/O/host/usr/include -I/home/ymorin/dev/buildroot/O/host/usr/include/libxml2 -I/home/ymorin/dev/buildroot/O/build/host-python-lxml-3.4.1/src/lxml/includes -I/home/ymorin/dev/buildroot/O/host/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w /usr/bin/gcc -pthread -shared -L/home/ymorin/dev/buildroot/O/host/lib -L/home/ymorin/dev/buildroot/O/host/usr/lib -Wl,-rpath,/home/ymorin/dev/buildroot/O/host/usr/lib -Wl,--enable-new-dtags build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -L/home/ymorin/dev/buildroot/O/host/usr/lib -L/home/ymorin/dev/buildroot/O/host/usr/lib -lxslt -lexslt -lxml2 -lz -lm -lpython2.7 -o build/lib.linux-x86_64-2.7/lxml/etree.so building 'lxml.objectify' extension /usr/bin/gcc -pthread -fno-strict-aliasing -O2 -I/home/ymorin/dev/buildroot/O/host/usr/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ymorin/dev/buildroot/O/host/usr/include -I/home/ymorin/dev/buildroot/O/host/usr/include/libxml2 -I/home/ymorin/dev/buildroot/O/build/host-python-lxml-3.4.1/src/lxml/includes -I/home/ymorin/dev/buildroot/O/host/usr/include/python2.7 -c src/lxml/lxml.objectify.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o -w /usr/bin/gcc -pthread -shared -L/home/ymorin/dev/buildroot/O/host/lib -L/home/ymorin/dev/buildroot/O/host/usr/lib -Wl,-rpath,/home/ymorin/dev/buildroot/O/host/usr/lib -Wl,--enable-new-dtags build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o -L/home/ymorin/dev/buildroot/O/host/usr/lib -L/home/ymorin/dev/buildroot/O/host/usr/lib -lxslt -lexslt -lxml2 -lz -lm -lpython2.7 -o build/lib.linux-x86_64-2.7/lxml/objectify.so I don't know what would break for the target package. Maybe it includes unsafe paths (-I and/or -L) ? Regards, Yann E. MORIN.
On Sun, Jan 18, 2015 at 7:03 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > Yegor, All, > > On 2015-01-18 18:27 +0100, Yegor Yefremov spake thusly: >> On Sun, Jan 18, 2015 at 1:11 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: >> > The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 >> > and libxslt. >> Trying to build lxml as normal package and get following error: > > You mean, as a target package? > > It can not work as-is, because I only declared the host variant. > You'd have to add the target variant if you want the target package. I've created needed files like Config.in etc. >> running build_ext >> building 'lxml.etree' extension >> creating build/temp.linux-x86_64-2.7 >> creating build/temp.linux-x86_64-2.7/src >> creating build/temp.linux-x86_64-2.7/src/lxml >> /home/user/Documents/versioned/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc >> -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE >> -D_FILE_OFFSET_BITS=64 -Os -DNDEBUG -g -fwrapv -O3 -Wall >> -Wstrict-prototypes -fPIC >> -I/home/user/Documents/versioned/buildroot/output/build/python-lxml-3.4.1/src/lxml/includes >> -I/home/user/Documents/versioned/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/python2.7 >> -c src/lxml/lxml.etree.c -o >> build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w >> In file included from src/lxml/lxml.etree.c:239:0: >> /home/user/Documents/versioned/buildroot/output/build/python-lxml-3.4.1/src/lxml/includes/etree_defs.h:14:31: >> fatal error: libxml/xmlversion.h: No such file or directory >> #include "libxml/xmlversion.h" >> ^ >> compilation terminated. >> >> What should I pass to setup.py? Should I pass include path to >> include/libxml2? How does it work for the host-package? > > Well, I just tried, and it builds fine, even when I remove the libxml2 > development files from my host: > > running build_ext > building 'lxml.etree' extension > creating build/temp.linux-x86_64-2.7 > creating build/temp.linux-x86_64-2.7/src > creating build/temp.linux-x86_64-2.7/src/lxml > /usr/bin/gcc -pthread -fno-strict-aliasing -O2 > -I/home/ymorin/dev/buildroot/O/host/usr/include -DNDEBUG -g -fwrapv -O3 > -Wall -Wstrict-prototypes -fPIC > -I/home/ymorin/dev/buildroot/O/host/usr/include > -I/home/ymorin/dev/buildroot/O/host/usr/include/libxml2 > -I/home/ymorin/dev/buildroot/O/build/host-python-lxml-3.4.1/src/lxml/includes > -I/home/ymorin/dev/buildroot/O/host/usr/include/python2.7 -c > src/lxml/lxml.etree.c -o > build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w > /usr/bin/gcc -pthread -shared -L/home/ymorin/dev/buildroot/O/host/lib > -L/home/ymorin/dev/buildroot/O/host/usr/lib > -Wl,-rpath,/home/ymorin/dev/buildroot/O/host/usr/lib > -Wl,--enable-new-dtags build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o > -L/home/ymorin/dev/buildroot/O/host/usr/lib > -L/home/ymorin/dev/buildroot/O/host/usr/lib -lxslt -lexslt -lxml2 -lz > -lm -lpython2.7 -o build/lib.linux-x86_64-2.7/lxml/etree.so > building 'lxml.objectify' extension > /usr/bin/gcc -pthread -fno-strict-aliasing -O2 > -I/home/ymorin/dev/buildroot/O/host/usr/include -DNDEBUG -g -fwrapv -O3 > -Wall -Wstrict-prototypes -fPIC > -I/home/ymorin/dev/buildroot/O/host/usr/include > -I/home/ymorin/dev/buildroot/O/host/usr/include/libxml2 > -I/home/ymorin/dev/buildroot/O/build/host-python-lxml-3.4.1/src/lxml/includes > -I/home/ymorin/dev/buildroot/O/host/usr/include/python2.7 -c > src/lxml/lxml.objectify.c -o > build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o -w > /usr/bin/gcc -pthread -shared -L/home/ymorin/dev/buildroot/O/host/lib > -L/home/ymorin/dev/buildroot/O/host/usr/lib > -Wl,-rpath,/home/ymorin/dev/buildroot/O/host/usr/lib > -Wl,--enable-new-dtags > build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o > -L/home/ymorin/dev/buildroot/O/host/usr/lib > -L/home/ymorin/dev/buildroot/O/host/usr/lib -lxslt -lexslt -lxml2 -lz > -lm -lpython2.7 -o build/lib.linux-x86_64-2.7/lxml/objectify.so > > I don't know what would break for the target package. Maybe it includes > unsafe paths (-I and/or -L) ? Have you also installed libxslt-dev on your PC? After I've done this, I could cross-compile lxml, but it is not very "legal" approach :-) Yegor
Yegor, All, On 2015-01-18 20:14 +0100, Yegor Yefremov spake thusly: > On Sun, Jan 18, 2015 at 7:03 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > > Yegor, All, > > > > On 2015-01-18 18:27 +0100, Yegor Yefremov spake thusly: > >> On Sun, Jan 18, 2015 at 1:11 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > >> > The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 > >> > and libxslt. > >> Trying to build lxml as normal package and get following error: > > > > You mean, as a target package? > > > > It can not work as-is, because I only declared the host variant. > > You'd have to add the target variant if you want the target package. > > I've created needed files like Config.in etc. OK, I guessed you did, but was trying the obvious... ;-) [--SNIP--] > >> compilation terminated. > > > > Well, I just tried, and it builds fine, even when I remove the libxml2 > > development files from my host: [--SNIP--] > > > > I don't know what would break for the target package. Maybe it includes > > unsafe paths (-I and/or -L) ? > > Have you also installed libxslt-dev on your PC? No, I do not have libxslt development files installed on the host. > After I've done this, > I could cross-compile lxml, but it is not very "legal" approach :-) Smells like unclean include paths to me. I'll investigate further on the target-side package Adding the target variant can come in a later patch, no? And that should not impact the host variant from being comitted as-is, would it? Regards, Yann E. MORIN.
On Sun, Jan 18, 2015 at 8:26 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > Yegor, All, > > On 2015-01-18 20:14 +0100, Yegor Yefremov spake thusly: >> On Sun, Jan 18, 2015 at 7:03 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: >> > Yegor, All, >> > >> > On 2015-01-18 18:27 +0100, Yegor Yefremov spake thusly: >> >> On Sun, Jan 18, 2015 at 1:11 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: >> >> > The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 >> >> > and libxslt. >> >> Trying to build lxml as normal package and get following error: >> > >> > You mean, as a target package? >> > >> > It can not work as-is, because I only declared the host variant. >> > You'd have to add the target variant if you want the target package. >> >> I've created needed files like Config.in etc. > > OK, I guessed you did, but was trying the obvious... ;-) > > [--SNIP--] >> >> compilation terminated. >> > >> > Well, I just tried, and it builds fine, even when I remove the libxml2 >> > development files from my host: > [--SNIP--] >> > >> > I don't know what would break for the target package. Maybe it includes >> > unsafe paths (-I and/or -L) ? >> >> Have you also installed libxslt-dev on your PC? > > No, I do not have libxslt development files installed on the host. > >> After I've done this, >> I could cross-compile lxml, but it is not very "legal" approach :-) > > Smells like unclean include paths to me. I'll investigate further on the > target-side package > > Adding the target variant can come in a later patch, no? And that should > not impact the host variant from being comitted as-is, would it? No, that should not impact your patch. I'll send mine as RFC on top of yours. Thanks for your help. Yegor
diff --git a/package/python-lxml/python-lxml.hash b/package/python-lxml/python-lxml.hash new file mode 100644 index 0000000..470a245 --- /dev/null +++ b/package/python-lxml/python-lxml.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 069594837d0376a1bacf5cc42aa9a1be2e1c1396dc62f7d07f7358afecd34adf lxml-3.4.1.tgz diff --git a/package/python-lxml/python-lxml.mk b/package/python-lxml/python-lxml.mk new file mode 100644 index 0000000..758ce87 --- /dev/null +++ b/package/python-lxml/python-lxml.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# python-lxml +# +################################################################################ + +PYTHON_LXML_VERSION = 3.4.1 +PYTHON_LXML_SITE = http://lxml.de/files +PYTHON_LXML_SOURCE = lxml-$(PYTHON_LXML_VERSION).tgz + +# Not including the GPL, because it is used only for the test scripts. +PYTHON_LXML_LICENSE = BSD-3c, Others +PYTHON_LXML_LICENSE_FILES = \ + LICENSES.txt \ + doc/licenses/BSD.txt \ + doc/licenses/elementtree.txt \ + src/lxml/isoschematron/resources/rng/iso-schematron.rng + +# python-lxml can use either setuptools, or distutils as a fallback. +# So, we use setuptools. +PYTHON_LXML_SETUP_TYPE = setuptools + +PYTHON_LXML_DEPENDENCIES = libxml2 libxslt + +$(eval $(host-python-package))
The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 and libxslt. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> --- This is a host-only package for now, because I only needed it to build opengl-registry. --- package/python-lxml/python-lxml.hash | 2 ++ package/python-lxml/python-lxml.mk | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 package/python-lxml/python-lxml.hash create mode 100644 package/python-lxml/python-lxml.mk