简体   繁体   中英

Best method for managing Jython packages

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.

My question is two-fold:

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?

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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM