如何更新Python Egg中的文件
我们正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需构建一个新的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.我只是使用解压缩 Egg 文件,
这在同一路径中创建了一个名为 tastypie 的新文件夹,然后,我将文件更改到其中,之后,我删除了 Egg 文件并继续仅使用新文件夹。
I just unzip the egg file using
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.