管理Jython软件包的最佳方法

管理Jython软件包的最佳方法

本文介绍了管理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软件包的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 00:35