如何使 easy_install 将包扩展为目录而不是单个 Egg 文件?

发布于 2024-07-27 18:37:55 字数 304 浏览 3 评论 0原文

我到底如何配置我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

森林散布 2024-08-03 18:37:55

您将 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文