Package Details: python2-lxml 4.9.4-3

Git Clone URL: https://aur.archlinux.org/python2-lxml.git (read-only, click to copy)
Package Base: python2-lxml
Description: Python2 binding for the libxml2 and libxslt libraries
Upstream URL: https://lxml.de/
Licenses: custom, BSD
Submitter: patlefort
Maintainer: patlefort
Last Packager: patlefort
Votes: 10
Popularity: 0.016367
First Submitted: 2021-06-22 01:52 (UTC)
Last Updated: 2024-06-16 13:11 (UTC)

Dependencies (9)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 5 Next › Last »

dreieck commented on 2022-07-10 15:25 (UTC) (edited on 2022-07-10 15:25 (UTC) by dreieck)

Just for information:
I observe that after your recent two changes the installation size got 1.05 MiB smaller.
Anything important missing now because you don't seem to use the Makefile anymore for building?, or just some "junk" not included?

Regards!

patlefort commented on 2022-07-10 03:47 (UTC)

Ok so it's actually required. Man this package is giving me headaches. His makefile let you presume it's not required.

toddejohnson commented on 2022-07-10 02:40 (UTC)

I think cython2 is needed in makedepends. Errors from makechrootpkg:

==> Starting build()...
Building lxml version 4.9.1.
Traceback (most recent call last):
  File "setup.py", line 270, in <module>
    **setup_extra_options()
  File "setup.py", line 164, in setup_extra_options
    STATIC_CFLAGS, STATIC_BINARIES)
  File "/build/python2-lxml/src/lxml-lxml-4.9.1/setupinfo.py", line 104, in ext_modules
    "is not available (pass --without-cython to ignore this error)." % module)
RuntimeError: ERROR: Trying to build without Cython, but pre-generated 'src/lxml/etree.c' is not available (pass --without-cython to ignore this error).

Works when cython2 is added back.

patlefort commented on 2022-07-09 18:09 (UTC)

python2 setup.py build isn't enough, it needs build_ext -i option passed or tests will fail with ImportError: cannot import name etree. I've pushed an updated pkgbuild which should hopefully fix the issue by disabling coverage and cython dependency.

MarsSeed commented on 2022-07-09 15:23 (UTC) (edited on 2022-07-09 15:23 (UTC) by MarsSeed)

Or he can just omit using make altogether, since it is redundant here, and return to the previous way (was used in this PKGBUILD until recently):

python2 setup.py build

dreieck commented on 2022-07-09 15:13 (UTC) (edited on 2022-07-10 15:27 (UTC) by dreieck)

I played around with the options to test.py, and I found out that the --coverage option which is passed to the test script in the Makefile ~~causes~~triggers the segmentation fault for me. If I leave it out, I don't get the segmentation fault.

You could use this patch to the Makefile as a workaround to just disable --coverage completely:

--- Makefile    2022-07-01 21:19:44.000000000 +0200
+++ Makefile.nocoverage 2022-07-09 17:06:32.049350771 +0200
@@ -12,2 +12,5 @@
-CYTHON_WITH_COVERAGE?=$(shell $(PYTHON) -c 'import Cython.Coverage; import sys; assert not hasattr(sys, "pypy_version_info")' >/dev/null 2>/dev/null && echo " --coverage" || true)
-CYTHON3_WITH_COVERAGE?=$(shell $(PYTHON3) -c 'import Cython.Coverage; import sys; assert not hasattr(sys, "pypy_version_info")' >/dev/null 2>/dev/null && echo " --coverage" || true)
+## `make test` fails with a segmentation fault when the `--coverage` option is passsed. Disable coverage.
+#CYTHON_WITH_COVERAGE?=$(shell $(PYTHON) -c 'import Cython.Coverage; import sys; assert not hasattr(sys, "pypy_version_info")' >/dev/null 2>/dev/null && echo " --coverage" || true)
+#CYTHON3_WITH_COVERAGE?=$(shell $(PYTHON3) -c 'import Cython.Coverage; import sys; assert not hasattr(sys, "pypy_version_info")' >/dev/null 2>/dev/null && echo " --coverage" || true)
+CYTHON_WITH_COVERAGE=
+CYTHON3_WITH_COVERAGE=

spuggy commented on 2022-07-04 17:07 (UTC)

Thanks to those that suggested --nocheck; updating this package has been segfaulting for me for a week or two...

Armag67 commented on 2022-07-03 23:05 (UTC)

It worked with:

yay -S python2-lxml --mflags '--nocheck'

patlefort commented on 2022-06-28 10:35 (UTC)

@someonewithpc: Please don't flag out of date if it isn't, just post a comment if you have a problem. As for your problem, try cleaning and redownloading the PKGBUILD, yours isn't up-to-date.

patlefort commented on 2022-06-27 12:06 (UTC)

I'm using alhp repos and it crash only when these repos for me. @dreieck, are you also using these? Or maybe compiling your own packages? I'll have to dig to find which package is causing it to crash, it isn't python2.