static building lxml

well  it is not really straightforward..

 

when building with static deps like python setup.py build --static_deps

 

you may see two possible errors

 

1: when you saw crc iconv.xx error, you can modify buildlibxml.py

 

check def download_libiconv and change 

version_re = re.compile(r'^libiconv-([0-9.]+[0-9]).tar.gz$')

as

version_re = re.compile(r'^libiconv-(1.14).tar.gz$')

 

2: importing lxml.etree sometimes may experience "undefined symbol clock_gettime"

 

the reason is some gcc version (4.6.x) may fail to link librt properly, so you can edit 

setupinfo.py

find 

def libraries()

add rt like:

libs = ['z', 'm', 'rt']

 

it can solve the problem.

Building lxml version 6.0.0. Building without Cython. Building against pre-built libxml2 andl libxslt libraries Warning (from warnings module): File "C:\Users\Start\AppData\Local\Programs\Python\Python314\Lib\site-packages\setuptools\dist.py", line 759 self._finalize_license_expression() SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: BSD License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help Building lxml version 6.0.0. Building without Cython. Building against pre-built libxml2 andl libxslt libraries Warning (from warnings module): File "C:\Users\Start\AppData\Local\Programs\Python\Python314\Lib\site-packages\setuptools\dist.py", line 759 self._finalize_license_expression() SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: BSD License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ********************************************************************************
07-02
able for lms (pyproject.toml) ... done Created wheel for lms: filename=lms-2.36.0-py3-none-any.whl size=3880 sha256=a07f8df8e315def59db82deac068562377d1d3cebb27c69aa110d5cb67a25a75 Stored in directory: /tmp/pip-ephem-wheel-cache-qsan0y00/wheels/b7/c2/c8/08995e7a3c183de99aec35d0691e0659f2fa6e65a5bc6ddaf6 DEPRECATION: Building &#39;lxml&#39; using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of &#39;lxml&#39;. Discussion can be found at https://github.com/pypa/pip/issues/6334 Building wheel for lxml (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [281 lines of output] Building lxml version 4.9.4. /tmp/pip-install-0gnhdy1l/lxml_eaa1e92edd414fb5b0d279c09f68f40a/setup.py:67: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources Building without Cython. Building against libxml2 2.9.14 and libxslt 1.1.35 /mnt/e/frappe-bench/env/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: BSD License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-313/lxml
09-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值