我想更改python前缀
我想在$(myown_pfx)/usr/lib/python2.7/site-packages
中安装我的文件现在默认情况下,pythondir似乎指向$(前缀)/usr/lib/python2.7/site-packages
我的configure.ac
中有以下内容<field Field="lastlogin" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" />
<field Field="lastupdate" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" />
<field Field="postdate" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" /> - TABLE phpvms_pages.
<field Field="postdate" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" /> - TABLE phpvms_news.
<field Field="joindate" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" />
<field Field="lastpirep" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" />
<field Field="submitdate" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" />
但是,我的预期文件仍然安装,好像PYTHON_PREFIX从未更改为$ myown_pfx,它仍然是默认的$前缀。
我基本上想要覆盖PYTHON_PREFIX,但是不成功,我缺少什么?
我一直在阅读此文档 https://www.gnu.org/software/automake/manual/html_node/Python.html
答案 0 :(得分:0)
遗憾地AM_PATH_PYTHON无条件地设定如下:
AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
可以做的事情(除了重新计算pythondir
与AM_PATH_PYTHON
类似)是用'${prefix}'
替换$myown_pfx
:
pythondir=`echo "$pythondir" | sed s,'${prefix}',"$myown_pfx",`
或者更好:
pythondir=`echo "$pythondir" | sed "s,$PYTHON_PREFIX,$myown_pfx,"`