如何使 easy_install 将包扩展为目录而不是单个 Egg 文件?
我到底如何配置我的 setup.py 文件,以便当有人运行 easy_install 时,包会作为目录扩展到 \site-packages\ 中,而不是保留在鸡蛋内。
我遇到的问题是,我创建的 django 应用程序之一不会自动检测它是否位于鸡蛋内。
编辑:例如,如果我输入easy_install photologue
,它只会将\photologue\
目录安装到站点包中。 这是我想要的行为,但似乎为了实现这一目标,正在打包的目录中至少需要有一个目录/模块。
How exactly do I configure my setup.py file so that when someone runs easy_install the package gets expanded into \site-packages\ as a directory, rather than remaining inside an egg.
The issue I'm encountering is that one of the django apps I've created won't auto-detect if it resides inside an egg.
EDIT: For example, if I type easy_install photologue
it simply installs a \photologue\
directory into site-packages. This the the behaviour I'd like, but it seems that in order to make that happen, there needs to be at least one directory/module within the directory being packaged.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将
zip_safe = False
添加为 setup() 的选项。我认为这与目录无关。 setuptools 会很乐意将包含大量目录的包蛋化。
当然,另一个问题是,即使压缩了,Django 的这一部分也找不到该包。 它应该。
You add
zip_safe = False
as an option to setup().I don't think it has to do with directories. Setuptools will happily eggify packages with loads of directories in it.
Then of course it's another problem that this part of Django doesn't find the package even though it's zipped. It should.