不能在setup.py中包含glade文件

时间:2015-05-07 18:16:54

标签: python package glade setup.py

我正在尝试在setup.py中包含layout.glade文件。

package_data={'': ['src/layout.glade'],}, include_package_data=True



data_files=[('my_data', ['src/layout.glade'])],

但仍然会输出错误:

Traceback (most recent call last):
 File "/usr/local/bin/a3k", line 9, in <module>
 load_entry_point('a3k==1.1.0', 'console_scripts', 'a3k')()
 File "build/bdist.linux-x86_64/egg/src/main.py", line 571, in main
 File "build/bdist.linux-x86_64/egg/src/main.py", line 40, in __init__
gi._glib.GError: Failed to open file 'layout.glade': No such file or directory

我的目录结构是:

├── DESCRIPTION.rst
├── MANIFEST.in
├── README.rst
├── a3k.egg-info
│   ├── PKG-INFO
│   ├── SOURCES.txt
│   ├── dependency_links.txt
│   ├── entry_points.txt
│   ├── requires.txt
│   └── top_level.txt
├── build
│   └── bdist.macosx-10.10-x86_64
├── dist
│   └── a3k-1.1.0-cp27-none-macosx_10_10_x86_64.whl
├── setup.cfg
├── setup.py
└── src
    ├── README.md
    ├── __init__.py
    ├── bittorrenter.py
    ├── constants.py
    ├── create.py
    ├── layout.glade
    ├── main.py
    ├── messages.py
    ├── pieces.py
    ├── scrape_test.py
    ├── test.py
    └── torrent.py

我还修改了MANIFEST.IN文件,如下所示:

include DESCRIPTION.rst
include src/layout.glade
recursive-include src *

我已经阅读了很多其他问题并且已经尝试了所有这些问题,但没有一个能帮助

0 个答案:

没有答案