[英]Python build rpm from virtualenv
I created an rpm via python setup.py bdist_rpm
. 我通过python setup.py bdist_rpm
创建了一个rpm。
The above command was called inside a virtualenv. 上面的命令在virtualenv内部被调用。
The files in the rpm now contain the absolute path to the virtualenv: rpm中的文件现在包含virtualenv的绝对路径:
/home/user/...path-to-virtualenv/lib/python2.7/site-packages/
How to alter the paths? 如何更改路径? I want to install into /usr/lib
. 我想安装到/usr/lib
。
Edit setup.cfg
file (create it if it doesn't exist) and add following section to it 编辑setup.cfg
文件(如果不存在,请创建它)并添加以下部分
[install]
install-lib=/usr/lib/python2.7/site-packages
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.