且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

pip尝试将软件包安装在错误的位置

更新时间:2022-03-06 06:16:31

借助@NilsWerner:

With the help of @NilsWerner:

问题出在data_files中.我已使用package_data(语法略有不同)对此进行了更改:

The problem was in data_files. I have changed this with package_data (which has a slightly different syntax):

package_data = {'goosempl/stylelib':[
    'goosempl/stylelib/goose.mplstyle'
]}, 

这将导致所需的行为.

This results in the desired behavior.

在注释之后,还可以将这些文件包含在MANIFEST.in中.

Following the comments, one could also include these files in MANIFEST.in.