gpt4 book ai didi

python - setup.py 脚本,如何将包安装到自定义目录?

转载 作者:太空宇宙 更新时间:2023-11-04 01:22:53 25 4
gpt4 key购买 nike

如何将我的包安装到替代目录(例如/opt/myapp)而不是通常的第三方 python 路径??

最佳答案

我找到了我可以接受的方式:

1/ Make setup configuration file .

2/ Add the following to the configuration file :

[install]
install-base= # custom path
install-purelib= # custom path
install-platlib= # add custom path
install-scripts= # add custom path
install-data= # add custom path
install-headers= #add custom path

这比强制用户在命令行中指定它们要好,此外他还可以覆盖此 conf。从命令行。对我来说效果很好。

关于python - setup.py 脚本,如何将包安装到自定义目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20037747/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com