building lxml package on windows and python 3.13
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
New
|
Undecided
|
Unassigned |
Bug Description
When I run python setup.py build on windows 10 and python 3.13 :
Python : sys.version_
>>> print("%-20s: %s" % ('Python', sys.version_info))
Python : sys.version_
>>> print("%-20s: %s" % ('lxml.etree', etree.LXML_
lxml.etree : (5, 2, 2, 0)
>>> print("%-20s: %s" % ('libxml used', etree.LIBXML_
libxml used : (2, 11, 7)
>>> print("%-20s: %s" % ('libxml compiled', etree.LIBXML_
libxml compiled : (2, 11, 7)
>>> print("%-20s: %s" % ('libxslt used', etree.LIBXSLT_
libxslt used : (1, 1, 35)
>>> print("%-20s: %s" % ('libxslt compiled', etree.LIBXSLT_
libxslt compiled : (1, 1, 35)
I got theses error, cannot link to lzma lib:
LINK : warning LNK4098: conflit entre la bibliothèque par défaut 'LIBCMT' et les autres bibliothèques ; utilisez /NODEFAULTLIB:
libxml2.
libxml2.
libxml2.
libxml2.
build\lib.
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\
I fixed the error with adding 'lzma' on libs in setupinfo.py :
if sys.platform in ('win32',):
libs = ['libxslt', 'libexslt', 'libxml2', 'iconv', 'lzma']
if OPTION_STATIC:
libs = ['%s_a' % lib for lib in libs]
elif OPTION_STATIC:
libs = standard_libs
else:
libs = ['xslt', 'exslt', 'xml2'] + standard_libs
return libs