为什么./configure不能在python中工作setup.py?

2024-09-27 07:25:29 发布

您现在位置:Python中文网/ 问答频道 /正文

当在python setup.py文件中使用subprocess.call(["./configure"])subprocess.call(["make"])时,为什么自动工具会查找错误的automake版本?我们打电话给:

$ python setup.py install
....
WARNING: 'automake-1.13' is missing on your system.

     You should only need it if you modified 'Makefile.am' or

     'configure.ac' or m4 files included by 'configure.ac'.

     The 'automake' program is part of the GNU Automake package:

     <http://www.gnu.org/software/automake>

     It also requires GNU Autoconf, GNU m4 and Perl in order to run:

     <http://www.gnu.org/software/autoconf>

     <http://www.gnu.org/software/m4/>

     <http://www.perl.org/>

Tags: orpyorggnuhttpisconfigurewww
1条回答
网友
1楼 · 发布于 2024-09-27 07:25:29

简而言之:用 disable-maintainer-mode关闭AM_MAINTAINER_MODE

长话短说:尽管版本不同,但它不应该出错,因为它在命令行上工作得很好。Python打包过程中发生了一些干扰。

当你这么做的时候

$ python setup.py sdist

setuptools模块创建硬链接,从中创建tar存档,然后删除硬链接。在这个链接过程中,文件上的时间戳已被修改,并且与原始修改时间不匹配,从而造成一些源文件被修改的错觉。

当Makefile运行时,它会注意到时间戳的差异。如果启用了AM_MAINTAINER_MODE,它将运行missing脚本。此脚本然后检测aclocal版本的差异,导致make出错。

disable-maintainer-mode选项传递给configure脚本应禁止调用missing脚本,并允许生成成功:

^{pr2}$

(请参见here了解有关automake的维护者模式的更多信息。显然,时间戳业务也是CVS用户的一个问题。)

相关问题 更多 >

    热门问题