我维护了一个 chrooted Linux 镜像,我有一个包我想安装到那个 chrooted 镜像中。
两个包最终都安装到两个位置;我不知道发生了什么以及如何解决它。
我的设置.py:
import os
from distutils.core import setup
setup(name='ServerLibrary',
version='1.1',
description='Server Framework',
author='Michael Brown',
scripts = [ 'foo.py' ],
packages = [ 'ServerLibrary' ],
)
os.chroot('/srv/nfs/chrooted-nfs-client/')
setup(name='ClientLibrary',
version='1.1',
description='Client Framework',
author='Michael Brown',
packages = [ 'ClientLibrary' ],
)
完成我想做的事情的最佳方法是什么?
请您参考如下方法:
我发现我需要为一组文件指定一个不同的构建目录。 distutils 假设每次都需要安装“构建”中的所有内容。
希望我能为其他人省去弄清楚如何执行此操作的麻烦。这是我固定的脚本的第二部分:
os.chroot('/srv/nfs/chrooted-nfs-client/')
setup(name='ClientLibrary',
version='1.1',
description='Client Framework',
author='Michael Brown',
packages = [ 'ClientLibrary' ],
options = {
'build': { 'build_base': 'build-chroot' }
}
)
