管理Jython软件包的最佳方法

编程入门 行业动态 更新时间:2024-10-26 04:24:44
本文介绍了管理Jython软件包的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在PyDev中构建一个Jython程序,并且在此过程中发现需要一些对于Jython 2.5不是标准但对于CPython 2.7是标准的软件包.至此,我一直在使用python的easy_install,并错误地将PyDev指向/usr/lib/python2.7/dist-packages.虽然不正确,但在过去几个月一直有效,直到今天我遇到此问题;优先考虑Jython库并导致havok的Python 2.7库之一.

I'm building a Jython program in PyDev and in the process have found need for some packages that are not standard for Jython 2.5 but that are standard for CPython 2.7. To this point, I've been using python's easy_install and incorrectly pointing PyDev to /usr/lib/python2.7/dist-packages. While incorrect, this has worked for the past few months until today when I encountered this problem; one of the Python 2.7 libs taking prescient over a Jython lib and causing havok.

我的问题有两个:

为Jython打包库的正确方法是什么.它像virtual-env + easy_install一样简单吗?如果是这样,如何为Jython设置virtual-env?

What is the proper way to package libraries for Jython. Is it as simple as virtual-env + easy_install? If so how does one setup virtual-env for Jython?

假设Python 2.7库可以在2.5上运行,那么将Python 2.7库回移植到Jython安装中的正确方法是什么. (使用pkg_resources模块的奖励点和示例.)

What is the proper way to backport Python 2.7 libs into a Jython install, assuming they can function on 2.5. (Bonus points for and example using the pkg_resources modules.)

推荐答案

好的,所以这一点比我本来想要的更加明显.

Ok, so this one is way more obvious than I would have liked.

此问题的答案说明了安装Jython的easy_install,引用了所有内容,即Jython文档的附录...

The answer to this question explains the installation of easy_install for Jython, citing of all things, the Appendix of the Jython Docs...

使用/path/to/jython/bin/easy_install,然后将其他模块安装到它们应驻留的Jython/Lib/site-packages/目录中.

using /path/to/jython/bin/easy_install then installs additional modules to your Jython/Lib/site-packages/ directory where they should reside.

更多推荐

管理Jython软件包的最佳方法

本文发布于:2023-11-24 08:47:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624528.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:软件包   方法   Jython

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!