python setuptool how can I add dependency for libxml2-dev and libxslt1-dev?(python setuptool 如何为 libxml2-dev 和 libxslt1-dev 添加依赖项?)
问题描述
我的应用程序需要 lxml >= 2.1,但要安装 lxml 它需要安装 libxml2-dev libxslt1-dev否则在安装 lxml 时会引发错误,
My application needs lxml >= 2.1, but to install lxml its requied to install libxml2-dev libxslt1-dev else it raises error while installing the lxml,
有没有一种方法可以使用 python 设置工具在我的 setup.py 中将其作为依赖项......
is there a way that using python setup tool I can give this as dependency in my setup.py....
推荐答案
不是真的... setuptools 只处理对已经属于 pypi 的包的依赖.所以如果你想要这些依赖,我认为你必须选择你喜欢的发行版带来的打包技术.
Not really ... setuptools only handle dependencies on package wich belongs already to pypi. So if you want these kind of dependencies, i think that you have to select the packaging technology brought by your favorite distribution.
但是,您可以覆盖您的 setuptools 构建或安装命令,以便在安装软件包之前进行额外检查.为此,请查看此 回答.
But, you can override your setuptools build or install command to make extra check before installing the package. To do so, please have a look of this answer.
这篇关于python setuptool 如何为 libxml2-dev 和 libxslt1-dev 添加依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:python setuptool 如何为 libxml2-dev 和 libxslt1-dev 添加依赖项?


基础教程推荐
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 筛选NumPy数组 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01