如何更新Python Egg中的文件

发布于 2024-09-19 21:10:38 字数 728 浏览 8 评论 0原文

我们正在使用 trac。在我们的设置中,我们有一个在存储库中解决的问题。因此,我从存储库中获取了固定文件 commit_update.py,我需要将其放入 Trac-0.12-py2.6.egg 中。

由于 Egg 只是一个压缩文件,我只是将其解压缩,更改文件并再次压缩。重新启动 trac 后,我收到一条错误消息:

ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg 
cache:

    [Errno 20] Not a directory

The Python egg cache directory is currently set to: 

    /var/trac/plugin-cache

Perhaps your account does not have write access to this directory?  You can 
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.

我不太明白为什么会出现此错误,因为我在 www-data 下运行 trac 实例,并且它是插件缓存的所有者。

会欣赏任何想法。

We are using trac. In our setup we have a problem that is solved in repository. So I got the fixed file commit_update.py from the repository and I need to place it into Trac-0.12-py2.6.egg.

As egg is just a ziped filed I just unziped it, changed the file and ziped again. After restarting trac, I've got a an error message:

ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg 
cache:

    [Errno 20] Not a directory

The Python egg cache directory is currently set to: 

    /var/trac/plugin-cache

Perhaps your account does not have write access to this directory?  You can 
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.

I don't quite understand why I got this error, because I'm running trac instance under www-data and it is the owner of the plugin-cache.

Will appreciate any ideas.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

我为君王 2024-09-26 21:10:40

只需构建一个新的egg(使用python setup.py bdist_egg),重新安装egg并重新启动您的trac实例。

Just build a new egg (with python setup.py bdist_egg), reinstall the egg and restart your trac instance.

末が日狂欢 2024-09-26 21:10:40

我只是使用解压缩 Egg 文件,

sudo unzip django_tastypie-0.9.11-py2.7.egg

这在同一路径中创建了一个名为 tastypie 的新文件夹,然后,我将文件更改到其中,之后,我删除了 Egg 文件并继续仅使用新文件夹。

I just unzip the egg file using

sudo unzip django_tastypie-0.9.11-py2.7.egg

This created a new folder in same path called tastypie, then, I changed files into it, and after that, I removed the egg file and keep using only the new folder.

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